pancakes puzzles and polynomials cracking the cracker barrel game n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Pancakes, Puzzles, and Polynomials: Cracking the Cracker Barrel Game PowerPoint Presentation
Download Presentation
Pancakes, Puzzles, and Polynomials: Cracking the Cracker Barrel Game

Loading in 2 Seconds...

play fullscreen
1 / 18

Pancakes, Puzzles, and Polynomials: Cracking the Cracker Barrel Game - PowerPoint PPT Presentation


  • 211 Views
  • Uploaded on

Pancakes, Puzzles, and Polynomials: Cracking the Cracker Barrel Game. Christopher Frost Michael Peck. The Cracker Barrel Game. The Cracker Barrel Problem (CB).

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Pancakes, Puzzles, and Polynomials: Cracking the Cracker Barrel Game' - chastity


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
the cracker barrel problem cb
The Cracker Barrel Problem (CB)

Given an arbitrarily sized board with some initial configuration of pegs, is there a sequence of jumps such that the board will be left with one remaining peg?

how hard is it to solve the cracker barrel game
How Hard Is It To Solve The Cracker Barrel Game?
  • Straightforward way of solving the peg board puzzle:
    • Try all possible ways to move a peg
      • Look at all possible ways of moving a peg for each of the above moves
        • ...
          • Until find a sequence of moves with one peg left or run out of possible moves (no solution)
  • How long will this take to solve?
  • Is this the fastest way?
complexity
Complexity
  • Measuring complexity:
    • How does the time needed to solve a problem grow as the size of the input to the problem grows?
  • Example: linear-time
    • If the size of the input doubles, the time needed to solve doubles.
complexity classes the big three

P

NP

NP-C

or

NP-C

P=NP

  • Does P=NP? Are all the problems in NP also in P?
    • The biggest unanswered question in computer science.
Complexity Classes:The Big Three
  • Problems that can be solved in nk time
  • Problems that can be verified in nk time
  • Problems that are at least as hard as all other problems in NP
  • P – Polynomial
  • NP – Nondeterministic Polynomial
  • NP-Complete
example np complete problems
Example NP-Complete Problems
  • Protein Folding
  • Traveling Salesperson
  • Map coloring
  • Cracker Barrel?
project goal
Project Goal

Is CB (the Cracker Barrel problem) NP-Complete?

proving np completeness
Proving NP-Completeness
  • Must show two conditions:
  • Problem belongs to NP
  • Is at least as hard as any problem in NP
example np complete problem 3 sat
Example NP-Complete Problem: 3-SAT

Expression

Clauses

Terms

  • (x1 x2 x4)  (x1 x2 x3)
  • Is there an assignment of values to these terms that makes the above expression true?
    • Yes!
      • One solution: If x1 = true and x3 = true, the above expression is true.
proving np completeness solving any problem in np using cb
Proving NP-Completeness:Solving any problem in NP using CB
  • Reduction: Showing that a known NP-complete problem can be solved using a solver for CB.

3-SAT Solver

CB Solver

3-SAT to CB Transformer

Input to 3-SAT Solver

Answer

3 sat to cb transformer

Ø

Ø

Ø

Ø

x

x

x

x

x

x

x

x

1

2

3

4

1

2

3

4

x

1

x

C

2

1

x

4

Ø

x

1

x

C

2

2

x

3

3-SAT to CB Transformer
  • Represent a logical expression on a peg board.
  • (x1 x2 x4)  (x1 x2 x3)
3 sat to cb transformer inside the mysterious blue tile

The Non-transitive

Peg Hierarchy

of Power

=

>

1.

2.

>

>

a > b: a can jump b,

but b can’t jump a.

x

x

1

1

3-SAT to CB Transformer: Inside The Mysterious Blue Tile

Blue Tile Goal:

Allow green peg across

iff yellow has come down.

3 sat to cb transformer inside the green tile

The Non-transitive

Peg Hierarchy

of Power

=

>

1.

2.

>

>

a > b: a can jump b,

but b can’t jump a.

3-SAT to CB Transformer: Inside The Green Tile

Green Tile Goal:

Reduce the number of green pegs to one

iff every clause had one or more pegs cross the board.

x

1

C

x

2

1

x

4

progress and implications
Progress and Implications
  • Progress:
    • Our best known CB solver takes exponential time
    • Proved a variation of CB is NP-Complete
  • Implications:
    • Is it possible to create a CB solver that runs in polynomial time?
  • If so, P=NP
  • If not, P≠NP

(Given that CB is NP-complete)