Presentation is loading. Please wait.

Presentation is loading. Please wait.

台大資工系 呂學一 1.

Similar presentations


Presentation on theme: "台大資工系 呂學一 1."— Presentation transcript:

1 台大資工系 呂學一 http://www.csie.ntu.edu.tw/~hil/algo/ 1

2 2  計算  難題  人生

3  Input:  A graph G  Output:  A smallest vertex subset of G that covers all edges of G. 3

4 4

5 Clever ways to solve computational problems 5

6 Being clever in solving a computation problem could make a big difference. 6

7 7

8 It makes a big difference 8

9 9 http://www.grand-illusions.com/simulator/montysim.htm

10 10

11 Coffee and Milk 11

12 12

13 13

14 14

15 15

16 16

17  The Factorization Problem  Input: a number N  Output:  “yes” if N is a prime number;  A factorization of N if N is not a prime number.  For example,  N = 323264989793317.  Output = 18672511 * 17312347. 17

18 Is there an efficient recipe for the Factorization Problem? 18

19 The security of many encryption schemes is based upon the assumption that the factorization problem is difficult. 19

20 20 Rivest ShamirAdleman

21 21 Challenge Number Prize ($US) Challenge Number Prize ($US) RSA-576$10,000RSA-896$75,000 RSA-640$20,000RSA-1024$100,000 RSA-704$30,000RSA-1536$150,000 RSA-768$50,000RSA-2048$200,000

22  18819881292060796383869723946165043980716 35633794138270076335642298885971523466548 531906060650474304531738801130339671619969 23212057340318795506569962130516875930765 0257059 22

23  3980750864240649373971255005503864911990 6436234252670840638518957594638895726176 8583317  472772146107435302536223071973048224632914 6953020971164598521711305207112563635903975 27  At the same time, Adi Shamir gave two talks at NTU (Dec. 4, 2003 ) 23

24  31074182404900437213507500358885679300373 46022842727545720161948823206440518081504 556346829671723286782437916272838033415471 07310850191954852900733772482278352574238 6454014691736602477652346609 24

25  F. Bahr, M. Boehm, J. Franke, T. Kleinjung  1634733645809253848443133883865090859841783670033 092312181110852389333100104508151212118167511579  190087128166482211312685157393541397547189678996851 5493666638539088027103802104498957191261465571  Efforts:  30 2.2GHz-Opteron-CPU years  over five months of calendar time. 25

26  251959084756578934940271832400483985714292821262040 32027777137836043662020707595556264018525880784406 9182906412495150821892985591491761845028084891200728 449926873928072877767359714183472702618963750149718 246911650776133798590957000973304597488084284017974 29100642458691817195118746121515172654632282216869987 549182422433637259085141865462043576798423387184774 4479207399342365848238242811981638150106748104516603 7730605620161967625613384414360383390441495263443219 0114657544454178424020924616515723350778707749817125 772467962926386356373289912154831438167899885040445 364023527381951378636564391212010397122822120720357 26

27 www.rsasecurity.com/rsalabs/challenges/factoring/ 27

28 28

29 29

30 30

31  Input:  A graph with edge lengths  Output:  A shortest tour visiting each node of the input graph exactly once. 31

32 32 2 3 2 1 1 3 2 4 2

33  Clay Mathematics Institute (Cambridge, MA, USA) offered US$1,000,000 for each of seven open problems on May 24, 2000 at Paris.  | Birch and Swinnerton-Dyer Conjecture | Hodge Conjecture | Navier-Stokes Equations | P vs NP | Poincare Conjecture | Riemann Hypothesis | Yang- Mills Theory |Birch and Swinnerton-Dyer Conjecture Hodge Conjecture Navier-Stokes Equations P vs NP Poincare Conjecture Riemann Hypothesis Yang- Mills Theory 33

34 34

35 35

36 36

37 37

38 38

39  Input:  A graph G  Output:  A smallest vertex subset of G that covers all edges of G. 39

40 40

41  Clay Mathematics Institute (Cambridge, MA, USA) offered US$1,000,000 for each of seven open problems on May 24, 2000 at Paris.  | Birch and Swinnerton-Dyer Conjecture | Hodge Conjecture | Navier-Stokes Equations | P vs NP | Poincare Conjecture | Riemann Hypothesis | Yang- Mills Theory |Birch and Swinnerton-Dyer Conjecture Hodge Conjecture Navier-Stokes Equations P vs NP Poincare Conjecture Riemann Hypothesis Yang- Mills Theory 41

42 Being clever in solving computational problems could make a big difference. 42

43 43

44 Approximation Algorithms ( 近似演算法 ) 44

45 放下對完美的堅持, 往往就可以找到新的出路。 知所進退, 則近道矣 ! 45

46 46

47 康熙大學士兼禮部尚書張英 一紙書來只為牆, 讓他三尺又何妨。 長城萬里今猶在, 不見當年秦始皇。 47

48 路燈問題 (Vertex Cover) 48

49  Input:  A graph G  Output:  A smallest vertex subset of G that covers all edges of G. 49

50 50

51 51

52  Input:  A graph G  Output:  A near smallest vertex subset of G that covers all edges of G. 52

53  Initially, let S be an empty set.  Repeat until G has no edges:  Arbitrarily choose an edge (u, v) of G.  Insert u and v into S.  Delete all edges of G incident to u or v.  Output S. 53

54 54

55  Q1: Is the output vertex set indeed a vertex cover of the input graph?  Q2: Does the algorithm run in polynomial time?  Q3: Is the quality of the output solution close to optimal? 55

56  Yes. 56

57  It is not difficult to see that this algorithm runs in linear time.  O(n + m) time, where n is the number of vertices and m is the number of edges in G. 57

58  The output vertex cover has size at most 2 times that of any optimal vertex cover. 58

59 59

60  Criterion 1: feasibility  Always output a feasible solution.  Criterion 2: tractability  Always runs in polynomial time.  Criterion 3: quality  The solution’s quality is always provably not too far from that of an optimal solution. 60

61 61

62  That 2-approximation was known for 30 years.  It remains the best known approximation algorithm for the vertex cover problem!  Finding a 1.166-approximation is known to be NP- hard.  Even a 1.9-approximation would be a significant breakthrough.  向公園路燈管理局致敬 62

63 掃黑的藝術 (maximum cut) 63

64  Input:  A graph G  Output:  A partition of G’s nodes into A and B that maximizes the number of edges between A and B. 64

65 65

66  Repeat the following randomized subroutine for, say, 100 times, and then output the best cut among them.  For each node v of G,  put v into A with probability ½. 66

67  Any partition is a feasible solution. 67

68  Throwing a fair coin is “easy” to simulate by computers.  As a matter of fact, the existence of pseudo-random generator implies NP≠P. 68

69  One can prove that this simple algorithm is a 2- approximation with very high probability (something like 1-1/2 100 ). 69

70  For about 20 years, the above 2-approximation was the best known result for maximum cut. 70

71 Goemans and Williamson, ACM STOC 1994 71

72  1/0.878-approximation for MAXCUT  Initiate a series of research in Operations Research, Scientific Computing, and Approximation Algorithms. 72

73 73 Integer Linear Program Integral solution Linear Program Fractional solution relaxation Rounding Approximation Solver

74 74 Quadratic Program Scalar solution Semi-definite Program Vector solution relaxation Rounding Approximation Solver

75  Being clever in solving problem can make a big difference  Most of the real life problems cannot be solved perfectly in reasonable amount of time.  Approximate solutions might be a nice alternative. 75

76  God, grant us the serenity to accept the things we cannot change, the courage to change the things we can, and the wisdom to know the difference. 76


Download ppt "台大資工系 呂學一 1."

Similar presentations


Ads by Google