Presentation is loading. Please wait.

Presentation is loading. Please wait.

Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp.

Similar presentations


Presentation on theme: "Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp."— Presentation transcript:

1 Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

2 Among most important unsolved problems in mathematics/ computer science Does P = NP ? Does there exist a polynomial time algorithm to solve the Traveling Salesman Problem? =

3 The Traveling Salesman Problem Given a graph (with n nodes), find a path which runs through all the nodes without any repeats.

4 Does this graph have a Hamiltonian Path? NO (Proof coming later)

5 What about this graph? YES

6 The Traveling Salesman Problem (All P- equivalent) Version 1: Given a graph (with n nodes), find a path which runs through all the nodes without any repeats. Version 1 ′ : Determine whether or not such a path exists. Version 2: Same as 1, except starting and ending points are given. Version 3: Given a graph, find a Hamiltonian cycle which runs through each node once. Version 4: Given the complete graph of n nodes, and a table that specifies a cost to each of its n(n-1)/2 branches. Find the Hamiltonian cycle with least cost. S N Version 5: Given a set of n integers: N={a 1, a 2, a 3 …a n } and a set of pair sums; S = {s 1, s 2,...s k }, find a Hamiltonian path for the graph G whose nodes are N, and there is a branch between a i and a j iff a i + a j ε S.

7 Interesting Special Case of the Traveling Salesman Problem: Nodes = interval of j + 1- i consecutive integers: [ i, j ] S Permissible pairsums= S = { s 1, s 2 … } S We say [ i, j ] can be chained by S iff a Hamiltonian path exist. 16 20 9 5 7 11 2 14 18 23 22 13 3 24 1 124 817 2115 19 10 6 36 2516 2516 25 9 36 25 36 16 25 4 9 9 9 36 25 36 16 2536 16 25

8 Problems: (wide range of difficulty) For what value of n can [1, n ] be chained by squares? by cubes? by k th powers? What is the smallest n such that [1, n ] can be chained by squares? …? Is there a largest n such that [1, n ] cannot be chained by squares? …? If so, what is it?

9 S= {1, 4, 9, 16, 25, 36, 49, …} 1 2 3 45 6 7 8 9 10 1112 13

10 1 2 3 45 6 7 8 9 10 1112 13 14 S= {1, 4, 9, 16, 25, 36, 49, …}

11 1 2 3 45 6 7 8 9 10 1112 13 14 15 S= {1, 4, 9, 16, 25, 36, 49, …} 16 17 18 19 20

12 16 20 9 5 7 11 2 14 18 2313 3 24 1 124 817 2115 19 10 6 If branch 2-14 is not used, then use of 18-7 forces an endpoint at 2 or 9. If branch 2-14 is used, then there is an endpoint at 11 or 22. So one endpoint is at 18; the other is among {2,9,11,22} Branch 4-5 third endpoint at 20 or 11 Branch 3-6 third endpoint at 10 or 19 Branch 1-15 third endpoint at 21 or 10 Note: these reductions also work if nodes 24 and/or 23 are absent 92 1122 Let’s now prove this graph has no Hamiltonian Path: 22

13 16 205 7 14 18 2313 3 24 1 124 817 2115 19 10 6 Since 8 cannot be an endpoint, branch 1-8 must be used. Since 4 cannot be an endpoint, branch 12-4 must be used Since 24 cannot be an endpoint, branches 12-24 and 24-1 must be used But now [24,1,8,17,19,6,10,15,21,4,12] is a disjoint cycle So [1,24] cannot be chained by squares, QED 92 1122

14 16 20 9 5 7 11 2 14 18 23 22 13 3 24 1 124 817 2115 19 10 6 Can [1,22] be chained by squares?

15 16 20 9 5 7 11 2 14 18 22 13 3 1 124 817 2115 19 10 6 NO Can [1,22] be chained by squares?

16 16 205 7 14 18 2313 3 1 124 817 2115 19 10 6 In [1,23], branch 13-3 would force a third endpoint at 12 or 23. So it cannot be used. 92 1122 What are all solutions of chaining [1,23] by squares?

17 16 20 9 5 7 11 2 14 18 23 22 13 3 1 124 817 2115 19 10 6 [1,23] can be chained by squares in exactly three different ways, with endpoints {18,9}, {18,2}, or {18,22}. Dotted lines cannot be used. What are all solutions of chaining [1,23] by squares?

18 16 20 9 5 7 11 2 14 18 23 22 13 3 1 124 817 2115 19 10 6 2516 2516 25 36 25 36 25 4 9 36 25 162536 16 25 [1,23] chained by squares Conclusions: [1,22] cannot be chained by squares [1,23] CAN be chained by squares [1,24] cannot be chained by squares

19 8, 1, 15, 10, 6, 3, 13, 12, 4, 5, 11, 14, 2, 7, 9 17,, 16 Squares can chain [1,n] for n= 15, 16, and 17 And 23: 18, 7, 9, 16, 20, 5, 11, 14, 22, 3, 1, 8, 17, 19, 6, 10, 15, 21, 4, 12, 13, 23, 2. And 25: 18, 7, 9, 16, 20, 5, 11, 25, 24, 12, 4, 21, 15, 10, 6, 19, 17, 8, 1, 3, 22, 14, 2, 23, 13. And 26: 18, 7, 9, 16, 20, 5, 11, 25, 24, 12, 13, 3, 22, 14, 2, 23, 26, 10, 6, 19, 17, 8, 1, 15, 21, 4. And 27: 18, 7, 2, 14, 22, 27, 9, 16, 20, 5, 11, 25, 24, 12, 4, 21, 15, 10, 26, 23, 13, 3, 1, 8, 17, 19, 6.

20 And 28: 18, 7; 2, 23, 26, 10, 6, 19, 17, 8, 28, 21, 15, 1, 24, 25, 11; 14, 22, 27, 9, 16, 20; 5, 4, 12, 13, 3. And 29: 18, 7, (29), 20, 16, 9, 27, 22, 14; 2, 23, 26, 10, 6, 19, 17, 8, 28, 21, 15, 1, 24, 25, 11; 5, 4, 12, 13, 3. And (now trivially) 30 and 31: (31), 18, 7, 29, 20, 16, 9, 27, 22, 14, 2, 23, 26, 10; 6, (30), 19, 17, 8, 28, 21; 15, 1, 24, 25, 11, 5; 4, 12, because {6,19, 30} is the first triangle in the infinite graph. Here is another solution of 29, 30, and 31: (31), 18, 7, 29, 20, 16, 9, 27, 22, 14, 2, 23, 26, 10; 15, 1, 3, 6, (30), 19, 17, 8, 28, 21, 4; 5, 11, 25, 24, 12, 13 which extends to a solution of 31 and 32: 13, 12, 24, 25, 11, 5; 31, 18, 7, 29, 20, 16, 9, 27, 22, 14, 2, 23, 26, 10, 15, 1, 3, 6, 30, 19, 17, 8, 28, 21, 4, (32).

21 Problems: (wide range of difficulty) For what value of n can [1, n ] be chained by squares? by cubes? by k th powers? What is the smallest n such that [1, n ] can be chained by squares? …? Is there a largest n such that [1, n ] cannot be chained by squares? …? If so, what is it? [Vague?] How fast can the elements of S grow such that questions about chaining [1, n ] remain interesting?

22 F S [RKG’s Conjecture] Fibonacci numbers, F grow exponentially as fast as any interesting set S.

23 94 7 1 6 23 10 8 5 RKG: F F chains [1, n] for n = F F doesn’t chain [1, n] if n = 5 3 13 8 8 5 8 2,3,4,5, 6, 7,8, 9, 10 11, 11 13 21 12, 13 12 21 13 Fibonacci # Fibonacci # = {1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144…}

24 Fibonacci plays Billiards! Joint unpublished result of ERB and RKG [2003]: [1, F k ] is chained by { F k-1, F k, F k+1 } Fibonacci plays Pool! [1,34] is chained by {21,34,55}

25 Joint unpublished result of ERB and RKG [2003]: [1, F k ] is chained by { F k-1, F k, F k+1 } Fibonacci plays Pool! [1,34] is chained by {21,34,55}

26 Pythagoras plays Billiards, Too! If a, b, c, is a primitive Pythagorean triplet, with a <b <c and a²=b²=c², then [1, b²] is chained by squares n = 15 is the smallest n such that [1, n] is chained by squares If n < 23 and [1, n] is chained by squares, then it is chained by squares without using 2² = 4 S †Small elements of S aren’t of much use

27

28

29 S Conditions for 4 elements of S to form the corners of a billiard table: B A C D S. A, B, C, D ε S. (A > B > C > D) Corners are at A/2, B/2, C/2, D/2 Perimeter = n = A – C = B – D Height = B – A = C – D Width = B – C

30

31

32

33

34 S Conditions for 4 elements of S to form the corners of a billiard table: B A C D S. A, B, C, D ε S. (A > B > C > D) Corners are at A/2, B/2, C/2, D/2 Perimeter = n = A – C = B – D Height = B – A = C – D Width = B – C If all corners are integers and if gcd(height, width) > 2, then path is degenerate. If this gcd = 1, path is complete

35

36

37 If S = {s 1, s 2, …s k, …} Where s 1 < s 2 < … < s k-1 < s k < … And if s k + 2 ≤ n < s k+2 – (s k +2 ) Then S cannot chain [1, n] Proof: Corollaries: Fibs cannot chain [1, n ] unless F k – 2 ≤ n ≤ F k + 1 Squares cannot chain [1, n ] unless n ≥ 15 Cubes cannot chain [1, n ] unless n ≥ 295 1 sksk s k+ 1 s k+ 2 n x = s k y = x + 1 z = x + 2

38 FF F chains [1, n ] if n ε F F F F chains [1, n ] if n ε F - 1 F F F F cannot chain [1, n ] if F k-1 + 1 < n < F k - 1 Theorem FF F chains only 9 ε F + 1 F and only 11 ε F - 2

39 127 21689 72 17 233 161 377233 144

40 5121 17 4 55 38 8955 34

41 5121 17 4 55 38 F k +2 F k +1 FkFk 3F k 2 F k+1 F k -1 F k +1 - F k 2 F k -1 - F k 2 F k 2

42 9 4 12 1

43 If s k+2 > s k+1 + s k + 1 and { s 1, s 2, …, s k+2 } chains [1,n] then so does { s 1, s 2, …, s k+1 } What is the fastest growing sequence such that for all k, there exists n ( k ), such that { s 1, s 2, …, s k } chains [1, n ] but { s 1, s 2, …, s k-1 } does not? Answer: Super- Fibonaccis: x n = x n- 1 + x n -2 + 1 0, 1, 1, 3, 5, 9, 15, 25, 41, 68…

44

45

46 9 2515

47 Engineering of Modified Pool Tables

48

49

50

51

52 01827642163437291000 9999929739368757846574882710 7287217026656045133860 5125115044854483872961690 3423353162791270 216215208189152910 12512411798610 646356370 2726190 870 10 0 218 217 343 729 125 512 Can we make a useful pool table whose corners are CUBES?

53 343125 512729

54


Download ppt "Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp."

Similar presentations


Ads by Google