File tree 1 file changed +60
-0
lines changed
1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Algorithm
2
+
3
+ ## Introduction
4
+
5
+ Turing machine is a Triple $(\Gamma,Q,\delta)$
6
+
7
+ Church-Turing Thesis: an effective method iff it's computable by a Turing machine.
8
+
9
+ Halt Problem
10
+
11
+ - Divide and Conquer
12
+
13
+ - Graphs
14
+
15
+ - Greedy
16
+
17
+ - Dynamic Programming
18
+
19
+ - Max Flow
20
+
21
+ - NP-hardness
22
+
23
+ - Advanced Problems
24
+
25
+ NP and P
26
+
27
+ NP-complete problem
28
+
29
+ Approximation Algorithms
30
+
31
+ Online Algorithm: how to evaluate:$\forall \text{ input }A(\sigma)\leq \Gamma\cdot OPT(\sigma)$
32
+
33
+ Ski-rental
34
+
35
+ ## Divide and Conquer and Running Time Analysis
36
+
37
+ ### Integer Multiplication
38
+
39
+ Divide a multiplication problem into two smaller problems!
40
+
41
+ #### Karatsuba Algorithm
42
+
43
+ $$
44
+
45
+ (a*10^\frac{n}{2}+b)(c*10^\frac n2+d)=ac*10^n+(ad+bc)*10^\frac n2+bd\\
46
+
47
+ =ac*10^n+((a+b)(c+d)-ac-bd)*10^\frac n2+bd
48
+ $$
49
+
50
+ Try to down the calculation!
51
+
52
+ #### Better algorithms
53
+
54
+ Toom-Cook: $O(n^{1.465})$,break it into 5 $\frac n3$-size problems
55
+
56
+ ### Matrix Problems
57
+
58
+ #### Srassen's magical idea
59
+
60
+
You can’t perform that action at this time.
0 commit comments