The Solutions of Nonlinear Equation 本文主要介绍几种用于解非线性方程$f(x)=0$的一些方法. (1) Bisection Method. 算法: step 1: 初始化$a,b(b>a)$,使$f(a),f(b)$异号. step 2: while (停止条件不满足) $p=a+\frac{b-a}{2}$: 若 $f(p)f(a)<0$,$b=p$:否则$a=p$. end while step 3: 返回的$p$为方程$f(x)=0$的解. 停止条件…
Jordan Lecture Note-1: Introduction 第一部分要整理的是Jordan的讲义,这份讲义是我刚进实验室时我们老师给我的第一个任务,要求我把讲义上的知识扩充出去,然后每周都要讲给他听.如果有需要这份讲义的话,请留言,我会用邮件发给你. 首先,我来说说机器学习这个东西.刚进实验室,我根本连什么是机器学习都不知道,听到这个名词后的第一反应是机器人,心想估计是搞硬件的.后来才发现其实机器学习更偏向于后面两个字,也就是“学习”.打个不恰当的比方吧,人类在婴儿时期,还无法对世上…
Jordan Lecture Note-3:梯度投影法 在这一节,我们介绍如何用梯度投影法来解如下的优化问题: \begin{align} \mathop{\min}&\quad f(x)\nonumber\\\mathop{s.t.}&\quad \mathbf{A}_1 x\leq b_1\nonumber\\&\quad \mathbf{A}_2x= b_2\label{equ:originalModel}\end{align} 其中$x\in\mathbb{R}^n,\ma…
题目1 : Colorful Lecture Note 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Little Hi is writing an algorithm lecture note for Little Ho. To make the note more comprehensible, Little Hi tries to color some of the text. Unfortunately Little Hi is using a plain…
Little Hi is writing an algorithm lecture note for Little Ho. To make the note more comprehensible, Little Hi tries to color some of the text. Unfortunately Little Hi is using a plain(black and white) text editor. So he decides to tag the text which…
Colorful Lecture Note 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Little Hi is writing an algorithm lecture note for Little Ho. To make the note more comprehensible, Little Hi tries to color some of the text. Unfortunately Little Hi is using a plain(black…
#1103 : Colorful Lecture Note 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Little Hi is writing an algorithm lecture note for Little Ho. To make the note more comprehensible, Little Hi tries to color some of the text. Unfortunately Little Hi is using a pla…
[lightoj P1306] Solutions to an Equation You have to find the number of solutions of the following equation: Ax + By + C = 0 Where A, B, C, x, y are integers and x1 ≤ x ≤ x2 and y1 ≤ y ≤ y2. Input Input starts with an integer T (≤ 10000), denoting th…
Solutions to an Equation LightOJ - 1306 一个基础的扩展欧几里得算法的应用. 解方程ax+by=c时,基本就是先记录下a和b的符号fla和flb(a为正则fla为1,为负则fla为-1,flb相同),然后对a和b取绝对值.求出ax+by=gcd(a,b)的一组解x=ansx,y=ansy,那么只有当c是gcd(a,b)的倍数时原方程才可能有解.设g=gcd(a,b),通解是x=ansx*(c/g)*fla+k*b/g*fla,y=ansy*(c/g)*flb…
1306 - Solutions to an Equation    PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB You have to find the number of solutions of the following equation: Ax + By + C = 0 Where A, B, C, x, y are integers and x1 ≤ x ≤ x2 and y1 …