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

About This Presentation
Title:

Pancakes, Puzzles, and Polynomials: Cracking the Cracker Barrel Game

Description:

How Hard Is It To Solve The Cracker Barrel Game? ... Is CB (the Cracker Barrel problem) NP-Complete? 10. Must show two conditions: ... – PowerPoint PPT presentation

Number of Views:210
Avg rating:3.0/5.0
Slides: 19
Provided by: chrisfrost8
Category:

less

Transcript and Presenter's Notes

Title: Pancakes, Puzzles, and Polynomials: Cracking the Cracker Barrel Game


1
Pancakes,Puzzles,and PolynomialsCracking the
Cracker Barrel Game
  • Christopher Frost
  • Michael Peck

2
The Cracker Barrel Game
3
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?

4
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?

5
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.

6
ComplexityA Look at How Growth Rates Compare
7
Complexity ClassesThe 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

8
Example NP-Complete Problems
  • Protein Folding
  • Traveling Salesperson
  • Map coloring
  • Cracker Barrel?

9
Project Goal
  • Is CB (the Cracker Barrel problem) NP-Complete?

10
Proving NP-Completeness
  • Must show two conditions
  • Problem belongs to NP
  • Is at least as hard as any problem in NP

11
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.

12
Proving NP-CompletenessSolving 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
13
3-SAT to CB Transformer
  • Represent a logical expression on a peg board.
  • (x1 ? x2 ? x4) ? (?x1 ? x2 ? x3)

14
3-SAT to CB Transformer Inside The Mysterious
Blue Tile
Blue Tile Goal Allow green peg across iff yellow
has come down.
15
3-SAT to CB Transformer
16
3-SAT to CB Transformer Inside The Grey Tile
x
1
Grey Tile Goal Allow both the green and yellow
peg across at any time.
x
1
17
3-SAT to CB Transformer
18
3-SAT to CB Transformer Which Term?
Term-Area Goal Allow peg for a pair of terms to
represent either the variable or its negation as
true.
19
3-SAT to CB Transformer
20
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
21
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, PNP
  • If not, P?NP

(Given that CB is NP-complete)
22
Questions?
Write a Comment
User Comments (0)
About PowerShow.com