1 / 35

A Symbolic Finite State Approach to Automated Theorem Proving

A Symbolic Finite State Approach to Automated Theorem Proving. Thotsaporn “Aek” Thanatipanonda thotsaporn@gmail.com. RISC, JKU, Linz,

sheriff
Télécharger la présentation

A Symbolic Finite State Approach to Automated Theorem Proving

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Symbolic Finite State Approach to Automated Theorem Proving Thotsaporn “Aek” Thanatipanondathotsaporn@gmail.com RISC, JKU, Linz, Wed Dec 15 2010

  2. Introduction • Finite State Approach on value of games Two games we are considering: - Toads and Frogs (Winning ways: Volume I 1982, by E. Berlekamp, J. H. Conway and R. K. Guy ) - Chess Endgame (About 1500 years ago).

  3. First Problem: Toads and Frogs • Rules The game plays on 1 by n strip . In each square there can be Toad (T) or Frog (F) or Blank () • Toad moves one square to the right or jump over a frog next to it to the empty square behind that frog. • Frog moves the same way as toad but in the opposite direction. Two players take turn playing, left moves toad and right moves frogs. Player who runs out of move first loses the game.

  4. Goal Find the value of the game in the given position. The value of the game can be obtained recursively from the choice of left (Toad) and right (Frog).

  5. Examples • T • TF • TTF • FT • FTTFF • TFTTF

  6. Meaning of Values • G = 0 means first player loses • G > 0 means left wins, no matter who starts first. • G < 0 means right wins, no matter who starts first. Note: {0|0} means first players wins.

  7. For the choices of the move: Left tries to move to the position with the most positive score. Right tries to move to the position with the most negative score. In some positions, the value of the game are incomparable. {0|0} and 0 are incomparable.

  8. History • First appear in Winning Ways 1982 Some analysis on some simple positions Example: aTFb (short hand!) = { b-a-2 | b-a+2 }.

  9. In Erickson’s paper (1996), he did more analysis of the positions and left 5 interesting conjectures: Conj1) TaFb = {{a-3|a-b}|{{0|0}|3-b}} ; a > b ≥ 2 Conj2) TaFF = {a-2|a-2} ; a ≥ 2 Conj3) TaFFF = a-7/2 ; a ≥ 5 Conj4) TaaFa-1= 1 or {1|1} ; a ≥ 1 Conj5) TabFa is an infinitesimal for all a,b except (a, b) = (3,2)

  10. Finite State Method • While I tried to prove Conj2, Zeilberger suggested the technique called symbolic finite state method • Example Instead of proving TaFF = {a-2|a-2} ; a ≥ 2

  11. Zeilberger suggested to prove • f1(a, b, c, d, e) = Ta  Tb  Tc  Td F Te F • f2(a, b, c, d, e) = Ta  Tb  Tc F Td  Te F • … • f10(a, b, c, d, e) = Ta F Tb F Tc Td Te • Conj2 is just f1(a, 0, 0, 0, 0) ; a ≥ 2

  12. Two Classes of Toads and Frogs • Aij := the class with i of  and j of F. • Bij := the class with i of T and j of F.

  13. Example1 Finite state on A11 (,F) Set up functions f(a, b) = Ta Tb F g(a, b) = Ta F Tb

  14. Recurrences Note: if a parameter is negative then return blank f(a, Δ) = {f(a-1,b+1) | g(a, b)} ; a ≥ 0, b = 0, 1 f(a, b) = {f(a-1, b+1) | } ; a ≥ 0, b ≥ 2 g(a, 0) = {f(a-1, 0) | } ; a ≥ 0 g(a, b) = {g(a, b-1) | } ; a ≥ 0, b ≥ 1

  15. Conjectures • f(0, 0) = -1 • f(a, 0) = {{ a-2| 1} | 0} ; a ≥ 1 • f(a, 1) = { a-1| 1} ; a ≥ 0 • f(a, b) = a ; a ≥ 0, b ≥ 2 • g(a, b) = b ; a ≥ 0, b ≥ 0

  16. Proof by Induction a -> b g -> f • For a = 0 g(0,0) = 0 f(0,0) = -1 g(0,b) = {g(0,b-1) | } = { b-1| } = b ; b ≥ 1 f(0,1) = { | g(0,1)} = { | 1} = 0 f(0,b) = { | } = 0 ; b ≥ 2

  17. For a ≥ 1, b ≥ 0 g(1,0) = {f(0,0) | } = { -1 | } = 0 g(a,0) = { f(a-1,0) | } = { {{a-3|1} | 0} | } = { | } (bypass reversible move) = 0 ; a ≥ 2 g(a,b) = { g(a,b-1) | } = { b-1 | } = b ; b ≥ 1 f(a,0) = { f(a-1,1) | g(a,0) }

  18. = { {a-2|1} | 0 } ; a ≥ 1 f(a,1) = { f(a-1,2) | g(a,1)} = { a-1 | 1 } ; a ≥ 1 f(a,b) = { f(a-1,b+1) | } = { a-1 | } = a ; a ≥ 1, b ≥ 2

  19. Example 2 Finite state on B11 (T,F) Set up functions: f(a,b,c) = a T b F c (Note: a F b T c = c-a) Recurrences: f(0,0,0) = 0 f(a,0,0) = { | -a+1+1} = { | -a+2} ;a ≥ 1 f(0,0,c) = { c-1-1 | } = {c-2 | } ;c ≥ 1 f(a,0,c) = {c-a-2 | c-a+2} ; a ≥ 1, c ≥ 1

  20. f(a,b,c) = { f(a+1,b-1,c) | f(a,b-1,c+1)} for a ≥0, b ≥1, c ≥0 Conjectures (solutions) : f(a,b,c) = { c-a-2| c-a+2 }, a ≥0, b is even, c ≥0 f(a,b,c) = { {c-a-3|c-a+1} | {c-a-1|c-a+3}} a ≥0, b is odd, c ≥0 Proof by Induction

  21. My Works • Implement this method in Maple program to automatically show values of all the positions in the following classes: A11, A21, A31, A41, A51, A12, A22, A23, A13 and B11. (Library Values of Toads and Frogs). • A symbolic finite-state approach for automated proving of theorems in combinatorial game theory, with Doron Zeilberger.

  22. Further hopping with Toads and Frogs • Three results of combinatorial game Toads and Frogs

  23. Erickson’s Conjectures Conj2) TaFF = {a-2|a-2} ; a ≥ 2 Proof by finite state method Conj3) TaFFF = a-7/2 ; a ≥ 5 Conj1) TaFb = {{a-3|a-b}|{{0|0}|3-b}} ; a > b ≥ 2 Proofwith the help of finite state method Conj4) TaaFa-1= 1 or {1|1} ; a ≥ 1 Wrong! Conj5) TabFa is an infinitesimal for all a,b except (a, b) = (3,2) Open!!

  24. Second Problem: Chess Endgame • Rules White (W): King & Rook Black (B): King We play the regular chess game but on m by n board! • Goal Given position P on m by n board, find smallest number of moves for W to checkmate B. White moves first.

  25. Main Problem For any position P on an m by n board; m ≥ 3 and n ≥ 3, show that f(P) <= m+n. Note: The best known value for f(P) is O(mn).

  26. Finite State Method • We work on k by n board (fixed k) • Only finite number of starting positions to work on.

  27. Example 1 Finite State on 3 by n board Find the minimum number of move to checkmate for all positions of the rook endgame on 3 by n board.

  28. Set up board and functions We set up the situation on the board and Define 11 positions as starting positions. f1(a,b), f2(a,b), …, f11(a,b) fi(a,b) = the smallest number of moves for W to checkmate B in a given position P (White moves first).

  29. Conjectures • f1(a,b) <= a+b ; a≥2 • f2(a,b) <= a+b, a is odd <= a+b+1, a is even ; a ≥2 • f3(a,b) <= a+b , a is odd <= a+b+1, a is even ; a ≥2 • f4(a,b) <= a+b , a is even <= a+b+1, a is odd = 1 , (0,0)

  30. f5(a,b) <= a+b+1 ; a ≥2 • f6(a,b) <= a+b+1 ; a ≥2 • f7(a,b) <= a+b+1 ; a ≥2 • f8(a,b) <= a+b+1, a is odd <= a+b+2, a is even ; a ≥2 • f9(a,b) <= a+b+1, a is odd <= a+b+2, a is even

  31. f10(a,b) <= a+b+1, a is odd <= a+b+2, a is even ; a ≥2 • f11(a,b) <= a+b+2 ; a ≥2

  32. Proof by Induction Induction on a+b in the order f1, f2, f3, f4,…,f11. Base case: for a+b <= 3; a ≥ 0, b ≥ 0. Induction Step: • f1 King moves UpLeft if a is even King moves UpRight if a is odd • f2 King moves Up if a is odd Rook moves Up one square, if a is even

  33. f3 King moves Up if a is odd Rook moves Up one square, if a is even • f4 Rook checkmates if a = 0 King moves Up if a is even, a ≥ 2 Rook moves Up one square, if a is odd. …

  34. Conclusion on 3 by n board • For any position on 3 by n board (n≥3), W can checkmate within n+2 moves. (This is sharp!)

  35. Future Work • Extend this idea that works for k by n board (k is fixed) to the general m by n board.

More Related