Backtracking and Theorem Proving - PowerPoint PPT Presentation

About This Presentation
Title:

Backtracking and Theorem Proving

Description:

Axioms: things you know are true without a proof. ... Forward proof: start from axioms and build facts using inference rules. Axiom. Axiom ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 15
Provided by: mike437
Category:

less

Transcript and Presenter's Notes

Title: Backtracking and Theorem Proving


1
Backtracking and Theorem Proving
  • Lecture 23
  • CS 312

2
Schedule
  • Monday Hamiltonian cycles and extracting the
    solution.
  • Wednesday review for midterm
  • Midterm in testing center starting Wed at noon,
    going Thursday, Friday and Saturday. Ends Monday
    at noon.
  • Friday no class.

3
Objectives
  • Draw proofs as trees.
  • Apply backtracking to automated theorem proving.

4
Parts of a Logic
  • Axioms things you know are true without a
    proof.
  • Inference rules how to build new true facts from
    old true facts
  • forward proof
  • Rewrite rules how to change one statement into
    another statement.
  • backward proof

5
Kinds of Proofs
  • Forward proof start from axioms and build facts
    using inference rules.

Axiom
Axiom
Fact
Fact
Fact
Fact
Fact
Fact
6
Kinds of Proofs
  • Backward proof start from what you want to
    prove and rewrite back to axioms.

Axiom
Axiom
Fact
Fact
Fact
7
Backward proofs as trees.
New Theorem
Intermediate facts
Axioms
8
A Logic
Rewrite Rules
Axioms 1. a a 2. a 0 a 3. 0 a a 4.
(ab)c a(bc) 5. a -a 0 6. a implies a
1
5
2
6
3
7
4
9
A Backward Proof
ab ac implies b c
Rule 1 with x/(ab) and y/-a
(ab)-a (ac)-a implies b c
Rule 5 with x/a, y/b and z/-a
a(b-a) (ac)-a implies b c
Rule 5 with x/a, y/c and z/-a
a(b-a) a(c-a) implies b c
10
A Backward Proof
ab ac implies b c
Rule 1 with x/(ab) and y/-a
(ab)-a (ac)-a implies b c
Rule 5 with x/a, y/b and z/c
Backtrack
a(b-a) (ac)-a implies b c
Rule 5 with x/a, y/b and z/c
Backtrack
a(b-a) a(c-a) implies b c
11
A Backward Proof
ab ac implies b c
Rule 1 with x/(ab) and y/-a
(ab)-a (ac)-a implies b c
Rule 5 with x/a, y/c and z/-a
(ab)-a a(c-a) implies b c
Rule 5 with x/a, y/b and z/c
a(b-a) a(c-a) implies b c
12
A Backward Proof
ab ac implies b c
Rule 2 with x/(ab) and y/-a
-a(ab) -a(ac) implies b c
Rule 5 with x/-a, y/a and z/b
(-aa)b -a(ac) implies b c
Rule 7 with x/a.
0b (-aa)c) implies b c
13
  • Apply the following algorithms to small examples
    dynamic programming knapsack problem, string
    editing, backtracking algorithm for graph
    coloring, backtracking algorithm for the knapsack
    problem and all pairs shortest paths.
  • Define optimality and explain why optimality is
    important for dynamic programming.
  • Compare and contrast dynamic programming and
    greedy algorithms.
  • Identify components, biconnected components and
    articulation points in graphs

14
  • Determine the order in which nodes are traversed
    in pre, post and inorder searches.
  • Compare and contrast BFS, DFS and D-search (p325,
    4,5)
  • Understand the role of bounding functions in
    backtracking problems and design bounding
    functions for simple problems
  • Compare and contrast dynamic programming and
    backtracking solutions to problems.
  • Compute worst-case bounds on backtracking
    algorithms (p368, 1)
Write a Comment
User Comments (0)
About PowerShow.com