![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法导论(Introduction to Algorithms CLR
LBWNB、
这个作者很懒,什么都没留下…
展开
-
Approximation Algorithm1(近似算法(一))(Introduction to Algorithms, 算法导论,CLRS)学习笔记
Approximation Algorithm1. Approximation ratioCost: the size of the solution, for example, in vertex cover, it’s the size of the cover; in TSP, it’s the total distance.Since the approximation algorithm, the cost we have is always greater than the optima原创 2020-10-16 23:21:18 · 1660 阅读 · 1 评论 -
Exact exponential algorithms and parameterized complexity指数算法和参数复杂性(Introduction to Algorithms, 算法导论
Exact exponential algorithms and parameterized complexityWe usually want algorithms that:in polynomial time;for all instances;find an exact solution;We can settle for 2 out of 3:relax 1: exponential algorithmrelax 2: parameterizedrelax 3: approx原创 2020-10-16 16:19:06 · 389 阅读 · 0 评论 -
NP completeness(NP完整性)(Introduction to Algorithms, 算法导论,CLRS)学习笔记
NP completenessHere we use binary string in our problems;Call an instance of a problem language, and x∈{0,1}∗x\in\{0,1\}^*x∈{0,1}∗ means the input of the language x is encoded in binary; A(X)=1/0A(X)=1/0A(X)=1/0 means there is a verification algorithm A原创 2020-10-14 21:45:51 · 505 阅读 · 0 评论 -
van Emde Boas Trees(vEB树)(Introduction to Algorithms, 算法导论,CLRS)学习笔记
van Emde Boas Trees1. Predecessor search/ordered setspredecessor: return the nearest left neighborsuccessor: return the nearest right neighbor2.Naive: O(∣U∣)O(|U|)O(∣U∣) spacepredecessor/successor: if x∈Sx\in Sx∈S then it’s O(1)O(1)O(1);insert:原创 2020-10-12 21:44:57 · 614 阅读 · 0 评论 -
Hashing哈希函数(Introduction to Algorithms, 算法导论,CLRS)学习笔记
HashingHashing fundamentalsApplication: Unordered setsHash table with chainingPractical universal hash functionsApplication: Coordinated sampling1. Hashing fundamentalsNotation:For n∈Nn\in Nn∈N:[n]={0,...,n−1}[n]=\{0,...,n-1\}[n]={0,...,n−1}原创 2020-10-11 23:51:32 · 653 阅读 · 0 评论 -
Randomized Algorithms随机算法(Introduction to Algorithms, 算法导论,CLRS)学习笔记
Randomized AlgorithmsLas Vegas Algorithm for quick sortMonte Carlo Algorithm for find min cutThe quick sort:Best case: each time the chose pivot is in the middle; O(nlogn)O(n\log n)O(nlogn);Worst case: in a sorted list, each time the chosen pi原创 2020-10-11 15:47:03 · 787 阅读 · 0 评论 -
Linear Programming线性规划(Introduction to Algorithms, 算法导论,CLRS)学习笔记
Linear Programming1. Fundamentalsobjective function and constraints:min/max3x1+24x2+13x3+9x4...s.t linear constraintsmin/max\quad 3x_1+24x_2+13x_3+9x_4...\\s.t\quad\;\; linear\; constraints min/max3x1+24x2+13x3+9x4...s.tlinearconstraintsopt原创 2020-10-10 02:23:43 · 650 阅读 · 0 评论 -
Max flow最大流(Introduction to Algorithms, 算法导论,CLRS)学习笔记
Max Flow1. FoundationsWhat we do in Max flow: Given a flow network G with source sss and sink ttt, to find a flow of maximum valueWhat is a valid flow: must satisfy both: 1. flow constraint; 2. flow conservation2. Define a max-flow problemG=(V,原创 2020-10-09 17:33:22 · 891 阅读 · 0 评论