1 / 30

Integer Programming Based Algorithms for Peg Solitaire Problem ver. 2.1

Integer Programming Based Algorithms for Peg Solitaire Problem ver. 2.1. Univ. of Tokyo Masashi KIYOMI Univ. of Tokyo Tomomi MATSUI. Definitions. board : a board has holes 〇 : hole on the board example configuration :

wcervantes
Télécharger la présentation

Integer Programming Based Algorithms for Peg Solitaire Problem ver. 2.1

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. Integer Programming Based Algorithms for Peg Solitaire Problemver. 2.1 Univ. of Tokyo Masashi KIYOMI Univ. of Tokyo Tomomi MATSUI

  2. Definitions • board: a board has holes • 〇: hole on the board • example • configuration: • each hole contains at most one peg • ●:hole with a peg • jump operation: • ●●〇→〇〇● ● 〇 〇 ● • 〇●●→●〇〇 ●→〇 ●→〇 • 〇 ● ● 〇

  3. Definitions (jump positions) • jump position: • position where a jump operation occurs • 38 vertical + 38 horizontal • jump positions jump positions • = 76 jump positions in total

  4. peg solitaire problem • given instance: • starting configuration finishing configuration • solution • Find a sequence of jump operations, if it exists. • If not, say ``infeasible’’.

  5. previous results • complexity • Uehara, Iwata (1990): • NP-completeness of solitaire problem • necessary conditions for feasibility • de Bruijn (1972): • necessary condition based on finite field • Berlekamp, Conway, Guy (1982):(Winning Ways) • necessary condition using pagoda function • (linear inequality system) • Avis, Deza (1996): • solitaire cone (polyhedral approach)

  6. our results • We propose algorithms for peg solitaire problems defined on the English board. • main idea: • ordinary backtrack search method • + • search space pruning procedure • based on integer programming (IP)

  7. upper bound • IP finds an upper bound of the number of • jump operations at each jump position. • start finish • ∀solution, the # of jump operations at • (the # of jump operations) ≦1 • the right-hand-side is a tight upper bound

  8. 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 1 1 0 1 ・ ・ ・ 0 notations 1 2 3 4 5 6 7 ・ ・ • n: the number of holes • English board: n=33 • configuration vector: the n-dimensional • 0-1 vector corresponding to the configuration ・ ・ 27 28 29 30 31 32 33 ∈{0,1}33 1: hole with peg 0: empty hole

  9. jump vector • jump vectors • jump operation = subtraction of jump vector • (jump vector contains two 1s and one -1) 0 0 0 0 0 0 1 1 -1 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 -1 0 0 1 0 0 1 0 1 0 0 ー ー =

  10. jump matrix • jump matrix: (holes)×(jump position) • jump positions • 1 ‐1 ‥‥‥ ‐1 0 • 1 1 ‥‥‥ 0 0 • A= -1 1 ‥‥‥ 1 1 • 0 0 ‥‥‥ 1 ‐1 • 0 0 ‥‥‥ 0 1 • configuration p → configuration p’ • jump operation at jump position j • ⇔p’=p - Auj (uj :jth unit vector) holes

  11. jump matrix and peg solitaire problem • A: jump matrix (defined by the given board) • ps: configuration vector of starting config. • pf: configuration vector of finishing config. • If the given peg solitaire problem has a solution, • then ∃x=(x1,x2,...,xm)T: • (1) integer vector indexed by jump positions • (2) ps - Ax = pf • xj : # of jump operations at position j

  12. integer programming • IPj: max. xj • sub. to ps - Ax = pf , x≧0, • x=(x1,x2,...,xm)T is an integer vector. • (1) IPjs are infeasible • ⇒ peg solitaire problem is infeasible • (2) (# of jump operations at j)≦(opt. val. of IPj) • The optimal value of IPj is an upper bound of the # of jump operations at position j. • Our algorithm solves IPj for each position j. • 76 jump positions, 76 variables, 33 constraints

  13. 0 1 2 example of upper bounds • given problem: • solve 76 IP problems: • obtained UB:

  14. example of infeasible peg solitaire problem • given problem: • solve 76 IP problems: • IPj are infeasible • ⇒ peg solitaire problem is infeasible • Our computational experiences show that the above feasibility check is very powerful.

  15. pagoda function approach • Berlekamp, Conway, Guy (1982):(Winning Ways) • a pagoda function exists ⇔∃y, yTA≧0, yT(ps- pf )<0 • ⇒ peg solitaire problem is infeasible • Farkas’ Lemma • exactly one of (1) and (2) is satisfied • (1) ∃y, yTA≧0, yT(ps- pf )<0, • (2) ∃x, ps - Ax = pf , x≧0. • IPj: max{xj | ps - Ax = pf ,x≧0,x∈Zn} • Feasibility checking method by IPj is stronger than pagoda function approach.

  16. 0 1 2 example of infeasible peg solitaire problems (2) • given problem: • infeasible! • 76 IP problems have optimal solutions • obtained UB: • IP is infeasible ⇒ peg solitaire is infeasible • IP is infeasible peg solitaire is infeasible

  17. algorithm • We propose algorithms for peg solitaire problems defined on the English board. • main idea: • ordinary backtrack search method • + • search space pruning procedure • based on integer programming (IP)

  18. game tree • given problem: • game tree: • all possible jumps • from starting config. • node: configuration • root: starting config. • child=parent+jump finishing config.

  19. starting configuration finishing configuration search of game tree • depth first search • on game tree

  20. jump operation UB of # of jumps DFS+UB starting configuration • depth first search • +UB 2 1 1 0 2 1 0 0 1 1 1 1 1 0 1 1 0 0 finishing configuration

  21. prune the search tree DFS+UB starting configuration • depth first search • +UB 2 1 1 0 2 1 0 0 1 1 1 1 1 0 1 1 0 0 finishing configuration

  22. hash table • We used hash table to avoid searching the same configurations more than once. • hash size: 2,000,000 • The hash technique saves much computational efforts during the depth-first-search.

  23. reverse game tree half depth hash table search game tree starting configuration search method • forward-only search: ordinary DFS • forward-backward search: finishing configuration

  24. computational experience • MMX Pentium 233MHz with 64MB memory • problem (i) • 76 IPs: 9.1 sec. • forward-only: 37 min. • forward-backward:1.4 sec. • problem (ii) • 76 IPs: 122 sec. • forward-only: 3.0 sec. • forward-backward: hash overflow

  25. END

More Related