some problems in computer science and elementary number theory elwyn berlekamp

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

Post on 21-Dec-2015

220 views

Category:

Documents


0 download

TRANSCRIPT

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

Some Problems in Computer Science and Elementary

Number Theory

Elwyn Berlekamp

Page 2: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

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?

=

Page 3: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

The Traveling Salesman Problem

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

Page 4: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

Does this graph have a Hamiltonian Path?

NO(Proof coming later)

Page 5: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

What about this graph?

YES

Page 6: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

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.

Version 5: Given a set of n integers: N={a1, a2, a3…an} and a set of pair sums; SS = {s1, s2, ...sk}, find a Hamiltonian path for the graph G whose nodes are NN, and there is a branch between ai and aj iff ai + aj ε S.

Page 7: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

Interesting Special Case of the Traveling Salesman Problem:

Nodes = interval of j + 1- i consecutive integers: [ i , j ]

Permissible pairsums= SS = {s1, s2…}

We say [ i , j ] can be chained by SS iff a Hamiltonian path exist.

16

20

9

5

7

11

2

14

18

23

22

13

3

24

1

12 4

8 17

21 15

19

10

6

36

25 16

25 1625

9

25 36

25

25

36

16 16

25

4

9 25

99

3625

25

36

16

16 25 36

16

25

Page 8: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

Problems: (wide range of difficulty)

For what value of n can[1, n] be chained by squares?

by cubes? by kth 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?

Page 9: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

S= {1, 4, 9, 16, 25, 36, 49, …}

1

2

3

4 5

6

7

8

9

10

111213

Page 10: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

1

2

3

4 5

6

7

8

9

10

1112

13

14

S= {1, 4, 9, 16, 25, 36, 49, …}

Page 11: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

1

2

3

4 5

6

7

8

9

10

1112

13

14

15

S= {1, 4, 9, 16, 25, 36, 49, …}

16

17

18

19

20

Page 12: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

16

20

9

5

7

11

2

14

18

23 13

3

24

1

12 4

8 17

21 15

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

9 2

11 22

Let’s now prove this graph has no Hamiltonian Path:

22

Page 13: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

16

20 5

7

14

18

23 13

3

24

1

12 4

8 17

21 15

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

9 2

11 22

Page 14: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

16

20

9

5

7

11

2

14

18

23

22

13

3

24

1

12 4

8 17

21 15

19

10

6

Can [1,22] be chained by squares?

Page 15: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

16

20

9

5

7

11

2

14

18

22

13

3

1

12 4

8 17

21 15

19

10

6

NO

Can [1,22] be chained by squares?

Page 16: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

16

20 5

7

14

18

23 13

3

1

12 4

8 17

21 15

19

10

6

•In [1,23], branch 13-3 would force a third endpoint at 12 or 23.

So it cannot be used.

9 2

11 22

What are all solutions of chaining [1,23] by squares?

Page 17: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

16

20

9

5

7

11

2

14

18

23

22

13

3

1

12 4

8 17

21 15

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?

Page 18: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

16

20

9

5

7

11

2

14

18

23

22

13

3

1

12 4

8 17

21 15

19

10

625 16

25 1625

25 36

25

25

3625

4

9 25 3625

16 25 36

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

Page 19: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

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.

Page 20: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

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, 13which 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).

Page 21: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

Problems: (wide range of difficulty)

For what value of n can[1, n] be chained by squares?

by cubes? by kth 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?

Page 22: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

[RKG’s Conjecture] Fibonacci numbers, FF grow exponentially as

fast as any interesting set SS.

Page 23: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

9 4

7

1

6

2 3

10

8

5

RKG:

FF chains [1, n] for n =

FF doesn’t chain [1, n] if n =

5 313

813

8

5 813

13

2, 3,4, 5,

6,

7,8,9,

10

11,

1113

21

12,

13

1312 2121 13

Fibonacci #Fibonacci # = {1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144…}

Page 24: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

Fibonacci plays Billiards!Joint unpublished result of ERB and RKG [2003]:

[1, Fk] is chained by {Fk-1, Fk, Fk+1}

Fibonacci plays Pool!

[1,34] is chained by {21,34,55}

Page 25: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

Joint unpublished result of ERB and RKG [2003]:

[1, Fk] is chained by {Fk-1, Fk, Fk+1}

Fibonacci plays Pool!

[1,34] is chained by {21,34,55}

Page 26: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

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

†Small elements of SS aren’t of much use

Page 27: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp
Page 28: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp
Page 29: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

Conditions for 4 elements of SS to form the corners of a billiard table:

B

A

C

D

A, B, C, D ε SS. . (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

Page 30: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp
Page 31: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp
Page 32: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp
Page 33: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp
Page 34: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

Conditions for 4 elements of SS to form the corners of a billiard table:

B

A

C

D

A, B, C, D ε SS. . (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

Page 35: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp
Page 36: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp
Page 37: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

If S = {s1 , s2 , …sk , …}

Where s1 < s2 < … < sk-1 < sk < …

And if sk + 2 ≤ n < sk+2 – (sk+2 )

Then S cannot chain [1, n]

Proof:

Corollaries: Fibs cannot chain [1, n] unless Fk – 2 ≤ n ≤ Fk + 1

Squares cannot chain [1, n] unless n ≥ 15

Cubes cannot chain [1, n] unless n ≥ 295

1 sk

sk+ 1sk+ 2

n

x = sk

y = x + 1

z = x + 2

Page 38: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

FF chains [1, n] if n ε FF

FF chains [1, n] if n ε FF - 1

FF cannot chain [1, n] if FFk-1 + 1 < n < FFk - 1

Theorem

FF chains only 9 ε FF + 1

and only 11 ε FF - 2

Page 39: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

127

216 89

7217233

161

377 233

144

Page 40: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

51 21

17455

38

89 55

34

Page 41: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

51 21

17455

38

Fk+2 Fk+1

Fk

3Fk

2

Fk+1

Fk-1

Fk+1 - Fk

2

Fk-1 - Fk

2 Fk

2

Page 42: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

9

4

12

1

Page 43: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

If sk+2 > sk+1 + sk + 1

and {s1, s2 , …, sk+2} chains [1,n]

then so does {s1, s2 , …, sk+1}

What is the fastest growing sequence such that for all k, there exists n(k), such that {s1, s2 , …, sk} chains [1, n]

but {s1, s2 , …, sk-1} does not?

Answer: Super- Fibonaccis: xn = xn-1 +xn-2 + 1

0, 1, 1, 3, 5, 9, 15, 25, 41, 68…

Page 44: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp
Page 45: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp
Page 46: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

9

25 15

Page 47: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

Engineering of Modified Pool Tables

Page 48: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp
Page 49: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp
Page 50: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp
Page 51: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp
Page 52: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

0 1 8 27 64 216 343 7291000

1000

999 992 973 936 875 784 657 488 271 0

728 721 702 665 604 513 386 0

512 511 504 485 448 387 296 169 0

342 335 316 279 127 0

216 215 208 189 152 91 0

125 124 117 98 61 0

64 63 56 37 0

27 26 19 0

8 7 0

1 0

0

218218

217217

343343

729729

125125 512512

Can we make a useful pool table whose corners are CUBES?

Page 53: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp

343 125

512 729

Page 54: Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp