Download presentation
Presentation is loading. Please wait.
Published byElvin Garrett Modified over 9 years ago
1
From … to Induction CS 270 Math Foundations of CS Jeremy Johnson
2
Objective To illustrate the shortcomings to the proof techniques seen so far and to introduce the principle of induction which allows the proof of infinitely many cases at once. With practice, students should be able to carry out simple inductive proofs following the lecture.
3
Outline 1.Motivating Example 2.Induction Principle 3.Inductive Proofs 1.Distributive Law 2.DeMorgan’s Law 3.Sums 4.Counting Clauses
4
Atmost One Recall the condition for at most one of the variables P 1,…,P t to be true P 1 ( P 2 P t ) … P t-2 ( P t-1 P t ) P t-1 P t We see a pattern and fill in the dots
5
Atmost One When converting to CNF we used a generalized version of the distributive law P 1 ( P 2 P t ) P 1 ( P 2 P t ) ( P 1 P 2 ) ( P 1 P t ) Again we fill in the dots and assume the distributive law generalizes appropriately
6
Generalized Distributive Law A (B C) (A B) (A C) What about A (B C D) (A B) (A C) (A D) What does this mean? (B C D) and (A B) (A C) (A D)
7
Generalized Distributive Law A (B C D) A ((B C) D) (A (B C)) (A D) ((A B) (A C)) (A D) (A B) (A C) (A D)
8
Generalized Distributive Law A (B C D E) A ((B C D) E) (A (B C D)) (A E) ((A B) (A C) (A D)) (A E) (A B) (A C) (A D) (A E)
9
Generalized Distributive Law A (B C D E F) A ((B C D E) F) (A (B C D E)) (A F) ((A B) (A C) (A D) (A D)) (A F) (A B) (A C) (A D) (A E) (A F) …
10
Generalized Distributive Law
11
Induction Principle Let S(n) be a statement paramterized by a non-negative integer n If S(0) is true and S(n) S(n+1) then S(n) holds for all non-negative integers. S(0), S(0) S(1) S(1) S(1), S(1) S(2) S(2) S(2), S(2) S(3) S(3) … This allows a proof of infinitely many cases
12
Inductive Proofs Let S(n) be a statement paramterized by n a nonnegative integer. To prove S(n) holds for all non-negative integers. 1.Prove S(0) [Base case] 2.Assume S(n) [inductive hypothesis] and prove S(n+1). This proves S(n) S(n+1) Can start with a positive integer k and show S(n) holds for all integers k.
13
Generalized Distributive Law
15
Exercise Generalized DeMorgan’s Law
16
Solution
18
Counting Clauses We would like a formula for the number of clauses in the N-queens problem. Count the number of clauses for atmost_one, atleast_one and exactly_one Sum over all rows, columns and diagonals
19
Number of Clauses in atmost_one
20
Summation Formula
22
Counting Clauses M(n) number of clauses for atmost_one L(n) number of clauses for atleast_one E(n) number of clauses for exactly_one M(n) = n(n-1)/2 L(n) = 1 E(n) = M(n)+E(n)
23
Clauses in N-Queens SAT Problem
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.