You are on page 1of 12
Blatt he © Mathematical Induction 93. Applying (2.3.1) tw expressions 4 and 7, we derive ad, ‘Now $ and 8 combine w give a contadiction, and the proof is complete. 4 11 can be shown that resolution is correct and vefiation complete, “Resolution is ‘correct” means that if resolution derives a contradiction from a set of elauses he clauses are inconsistent (1, the clauses are not all true). “Resolution is refutation complete” ‘means that resolution will be able to derive a contradiction from a set of insursisient slauses. Thus, if a conclusion fois trum a set of hypetheses, resolution will be able 1 derive a contadietion fam the hypotheses and the negition of the conclusion, Un fortunately, resolution aloes not tell us which clauses t0 combine in under to deduce: the contradiction. & key challenge i automating a reusoning system is t help guide the search for clauses to combine. References an resolution and automated reasoning, ‘are [Gallier; Genesereth: and Was), ‘To construct a resolution proof, first replace any of the hypotheses or conclusion that is not a clause with ene or more elauses. Then replace paits af hypotheses of the form pv qand =p vr with g vr umil deriving the conclusion. Rememiber that resolution ‘san be combined with proof by contradiction. 1, What rule of logic does proof by resolution use? Explain how u proof by resolution proceeds, 2. Whatica clause? 1, Weite a mu ble tha proves (2.3.11 Anevr Spe & per {Use resolution to derive each conctushm in Evercnes 2-6. Hb nee a Ia Eseaizes 3 and 6. replace + ard + wit kaieally euend ey oe ? expressions that use or and ae, oe 2h spvave Aspyr peas ~ ave 7. se resolution ane proof by sonmuiction to reprove Eer- = @ ines 26, > : 8. Use resolation un proof hy contaiction to repaove Exam rle23.6 2.4 _-> Mathematical Induction ‘Suppose that a sequence nf blocks numbered 1, 2... sits om an tinginitely) long table ‘see Figure 2.4.1) and.that some blocks are marked withan "X." (AI of the blocks visible in Figure 2.4.1 are marked.) Suppose thut “The first block is marked. 24a For all a, if block is marked, then black n+ 1 is also-marked. (2.4.2) 94 Chapter? # Proots Figure 2.4.1. Numbered blocks on = table. ‘We exumine the blacks one by one, Stawement (2.4. () explicitly states chau block 1 is marked. Consider block 2. Since block 1 is murked, by (2.4.2) (aking w = 1), black 2 is also marked. Consiier tslock 3. Since block 2 is marked, by (24,2) (taking m = 2}, block 3 is also marked. Continuing in this way. we eanshow that every black is marked. For example, suppose that we have verified that blocks |S are marked, as shown in Figure 24.1. To show that block 6, which is mot shown in Figure 2.4.1, is marked, we nove that sine block $ is marked, by (2.4.2) taking « = 3), block # is also masked, ‘The preveding example illustrates the Principle of Mathematical Induetion. To ‘show how mathematical industion can. be used in a more profound way, let $ denote the sum of the first m positive integers: SeSlt2t--40 (43) ‘Suppowe that sameone claims that nie +b s=™S A sequence af statements is really being made, oamely. forall = 0 aaa) Suppose that each true cquation has an “x” placed beside it (see Figure 2.4.2) ‘Since the first equation is wrue, itis marked. Now suppose we can show that for all if equation 1 is marked, then equation 1 +11 also marked. Then, as in the example involving the blocks, all of the equations are marked; that is. afl the equations are true 5 and the formula (2-44 is verified, asm ath ‘We must shaw that forall, if equation is true, then exquntion +1 is alse tree, us — SMe Equation n is : +t aan teas) ce arece af uurenern. Assuming that this equation is te, we must show that equation n+ # ‘True sterneats are tat tua +21 snarled with >. oa Principle of ‘Mathematical indaetion Definition 2.4.1 2.4 © Mathematical Induction 95, is truc, Acconling to-definition (2.4.3), Se S424 bu edn tO, ‘We fore that 5, is contained within 5,4, in the sense that Sue Leltocentine lh =Sobine le 24.6) ‘Because of (24.5) and (2.4.61, we have Sara stiet EY ay ‘Since aint Lat Met Ste EE ont Me - 2 te bre) =e we have mt Ihe +2 ee ae easel z ‘Therefore, assuring that equation a is true, we have proved thst equation ot + 1 is true. ‘We conelude that all af the equations are true. ‘Our proof using muthematieal induction consisted of two steps. First, we verified that the statement corresponding te 1 = I was true. Second, we eissumied thot statement 2 wus trueand then proved thatstatement + I was ulso true. In proving statement m+ |. ‘we were permitted to muke use of statement n; indeed, the trick in constructing & proof ‘using mathematical induction is to relate statement m te statement + 1. ‘We next formally slate the Principle of Mathematical Induction, Conditinn (2.4.7) is sometimes called the Basis Step and condition (2.4.8) is sometimes called the Inductive Step. Hereafier, “induction” will mean “mathesnatical ‘induction “Afier defining factorial, we illustrate the Principle of Mathematical Induction vwith another éximple. 1 Factorial is dened as ifn=o0 ifa et Copyrighted material 1 = (weet 96 Chapter? ® Proots Se ede ‘That is, if a = Int is equal to the product of all the integers between | and w inclusive Asa special case, Mis defined to be I 4 Olea d, Hagedede 6, Sle GeSdedeed oI < ‘Use induction to show that ater! forall > 24s) Basis Step (1 = 1) [Condition (2.4.7)] Wemust show that (2.4,9}is rue itn = 1. Thisiseasilyaccomplished, simee 1! al oh Inductive Step [Condition (2.4.8)] We assume that the inequality is tue for w = 1: that is, we assume that azo 2.4.10) is ume, We must then prove that the inequ that we must prove rete ean is ime, We eam relate (2.4.10) ana (26.11) by observing that (etait at Ba, Now (re Dre tae Ia) mtbr by 2410) since m+ 1=2 ‘Therefore, (2.4.11) is ume, We hive completed the Inductive Step, Since the Basis Step and the Inductive Step have been verified, the Principle of Mathematical Induction tells us that (2.4.9) is true for every positive imieger a. « Hi we want to verify that the statements ‘Statp). Staty + 0). where ng # 1, are true, we must.change the Basis Step ty ) iearue, In words. the Busis Step is to prove that the propositional function Stor) is true for the smallest value /a in the domain of discourse. ‘The Inductive Step then becomes 2.4 © Mathematical Induction 97 ‘Geometric Sum ‘Use induction to showy that if L, atar! part tee bar" (24.12) called the geometric sum. In the geometric sum in. which a 2 Dand r #0, the ratio of adjacent terms [(ar'*")/(ar’} = Fis constant, Basis Step (2 = 0) ‘Since the smallest value in the domain of discourse (vr | n> O) isve = 0, che Basis Step is w prove that (2.4.12) is uue fore = 0, For n = @, (2.4.12) becomes: aut whieh is ue, Inductive Step Assume that statement (2.4, /2) ts trae form. Now aoe TT _ ee red aun th rat tart rele afar! par? pe baet a0" ‘Since the Basis Step and the lnductive Step have bees verified, the Principle of Mathe= ‘matical Induction tells us that 424.124 is true forall w & 0. 4 Asan example of the mse of the geoehétrie suri, ff we titke «om L aid rom 2 in (2.4.12), we obtain the foesvals, Tete Bat yg te ‘The reader has surely noticed that in onder to prove the previous formulas, ome has to be given the correct formulas in advance. A reasonable question is: How docs oe ‘come op with the formulas? There are many answers to this question. One technique derive a formula is to experiment with small values and try to discover a pattem. {Another tecimigue is discussed in Exercives 67-70.) Kor example, consider the sum Tbbs sb (2n = 1), The following table gives the valuesot this sum form as 1, 2,3, 4 143+-¢0-1 bene Rese 9B Chapter? # Proots Since the second eoluran consists of squares, we conjecture that D3 +eb itn lpea? facevery positive integer m, ‘The conjectume iscorreet and the formula ean he proved by mathemasieal induction (see Exercise 1, ‘Atthis point, the reader may’ vant to read the Problere-Solving Comer that (allows this section. This Problem-Solving Comer gives anextended, detuiled exposition af how to-do proofs by mathernatical induction. (Our final examples show that induction is net limited to proving formulas for sums cand verifying inequalities. Uc hitctan tow nP— tidy fot Basis Step (= 1) Wore 15" — 1 5! = 1d, which is divisible by & Inductive Step “We assuine that 5" — | isible by 4. We must then show that 53°*! — 1 is divisible by 4, We use the fact that if ye and @ are each divisible by &, then » +g is also divisible by In our ease, k = 4. We leave the proof of this fact to the exercises (see Exercise 71), We relate dhe (a + L)st ease co the mth case by writing. srt 5° = 1-4 to be determined, (Now, by the inductive assumption, 5° — 1 is dicisible by 4. If T0 be determined’ also divisible by 4, then the preceding suum, which is equal to $**? — 1, will aso be divisible hy 4nd the laductive Step sil hecomplet. We must fad the value of "to be deteernined” Now SPSS 1 ads 4 Lost 1 ‘Thus, “1o be determined” is 4.5", which is divisible by +, Formally, we could site the Indvetive Step as follows, [By the inductive assumption, 3° = Lis divisible by 4 and, since 4.5" is divisible ‘by 4, the sum (tea sti is divisible by 4. ince the Basis Step and the: Inductive Step have been verified, the Principle of ‘Mathematical Induetion tells us that 5" — (is divisible by 4 for all a > 1 < We next give the proof promised in Section 11 that ifa set X has elements, dhe power set of X, PUTS, has 2 elements, Theorem 2.4.6 la} a la. BE eh lel tel ated wad Figure 2.4.3 Sabsets of X= {a,b,c} divided into two classes those that cantain a and those that do mot contain a. Each suet ithe Fight calumn ts obtained frum the corresponding sutset ithe left solumn by deleting the element crow it Figure 2.4.4. A tomino. 2.4 @ Mathematical Induction 99 Af AX| ny then POO) forall n > 0. Proof The proot'is by induction on m. Basis Step (n = 0) ‘Ia = 0. X is the empty set. The only subset of the empty set is the empry set itself, thus, Pon p= 2 ‘Thus, (24,13) is true for n= Inductive Step Assume that (2.4.13) holds fora, Let X be a set withor + 1 elements. Choose. « X. ‘Wecclaim that exactly half ofthe subsets of X contain x, andexactly half of the subsets of X do not contain x. To see this, notice that each subset S of X that contains. can bbe paired uniquely with the subset obtained by removing x from $ (see Figure 2.4.3), ‘Thus exacily half of the subsets of X contain x, and exactly balf of the subscis of X do pot contain x. I'we let ¥ be thesct oblained from X by removing x, ¥ hus n elements, By the inductive assumpsion, [P(¥)| = 2". But the subscts of ¥ are precisely the subsets of X that do net contain x, From the argument in the preceding paragraph, we conclude that labs (PO) = —— ‘Therefore, [PCO] = 2[PO))| = 262" = 2H ‘Thus (24.13) holds for n + 1 and the inductive step is complete. By the Principle of ‘Mathematical Induction, (2.4.13) holds for all n > 0. A Tiling Problem A righ cromino, berealier calles simply a rromino, i a object made up af three squats, 36 show in Figure 2.4.4. A tromiag is type of palyoming. Since polyominoes were Jntroduced by Soloman W. Golomb ia 1954 (see (Golomb, 1954)}, they have been a. ‘fworite tapic ia recreational mathematics. A polyomtina of onder «consists of «squares joined at the edges. A tromine #2 polyominn of order 3. Three squares i a ow form the only other type of polyemino of arder 3. (No one las yet found a simple formula for the number of polyominoes of endce s.} Numerous problems using polyeminocs have bboen devised (sce Marin). We give Golomb’s inductive proof (see [Golomb, 1954) that if we remave one square from ann xn board, where n is 2 pawer of 2, we can tle the remaining squares with ight trominocs (see Figure 2.4.5} By a.ling ofa figure by trominoes, we mean an ‘exact covering of the figure by traminoes without having any ofthe trominoes overlap 100 Chapter 2 @ Proofs ye Figure 2415 Tiling a4 Fighte 2.4.6 Using reathematical deficient hoard with tromainoes, indoetion to tle a 8°85 28! deficient board ith trominoes, cach otheror extend outside the figure. Wecall aboard with one square missing adeiclent oard. ‘We now usc induction onk to prove that we camtilea 2 x 2 deficient board with twowinoes foe all k= 1 Basis Step (c= 1) [the 2 x 2 deficient board is itself a tromine and ean therefore be tiled with one Inductive Step ‘Assume that we can tile a 2° x 38 deficient board We shoot that we ean tle 2° 53 deficient board. Consider a2"! x 2! deficient board. Divide the board into faur 2 x 2* boards, as shown in Figure 2.4.6, Rotate the bound so that che missing suace is in the upper quadrant. By the inductive assumption, the upper-left 2 x 2° board ean be dled. Place ‘one womino T in she center, as shown in Figure 2.4.6, so that each square of Tis in cach of the ether quadzants, Ifwe consider the squares covered by Fas missing. exch of these quaclants is a 2* » 2° defiskent boar Again, by the inluctive assumption, these ‘boards can be tiled, We now have a tiling of the 21 x 7%! board, By the Principle ‘of Mathematical foduction, it follows that any 2! » 2° deficient board ean be ted with wominoes, A= 1,2 Jf wean tle an 21 deficient board, where n is nom necessarily aposver af 2, the the nuinber of squazes, 1” — 1, muse be divisible by 3. [Chu] showed tha! the converse is {tmme, except when w ig 5. Mone precisely, ifm 3 5, any n x a deficient board can be tiled ‘with trominoes if and only i€ 3 divides m7 — 1 tee Exercises 27 and 28, Section 2.5). [Some 55 deficient boards can be tled and some cannot (4ee Exercises 32 and 39) Somme real-world probleans ean be modeled tiling profslems. One example ix the VLSI iayout probiem—the problem of packing many components on a computer chip (sce [Wong]. (VLSI is short for Very Large Scale Integrstioa. The problem is to tile a rectangle of misimom area with the desired components. The components are sometimes modeled as rectangles and L-shaped figures similar to (eighty trominoes. In ‘ructice, other constraints are imposed such as the proximity of various companents thal ‘must be inierconaected and resttictions on the ratios oF width to height of the resuling reclangle. 4 naterial See ae 2.4 © Mathematical Induction 101 A loop invariant is a statement about program variables that is trac just heflore 2 loop hegins executing and is alsa true after each iteration ofthe loop. In particu, a loop. livariant is te after the loop finishes, at which point the invariant tells us something, sboutthe tate the variables, Wally, this statement tells usthat thelosp prelaces the ex= posted result, that is, thatthe loop is correct. Forexample, a Iooprinvariant fora while loop. while (comdirion) ‘loop body is rue just before condition is evaluated the frst tone, and i is alse true each time the loop body is exewuted, ‘We can use mathematical induction to prove that an invariant has the desired behavior. The Basis Step proves that the invariant js true before the condition that controls looping is tested for the first tine. The Inductive Step assumes that the invariant is true cand thea proves that if che condition that controls looping is (rue (so that the loop body is executed again), the invariant is true after the loop body executes. Since a loop iterates a finite number of times, the form of mathematical induction used here peoves that & dinite sequence of statements is trae, rather whan ain infinite sequence of stakements as ‘in cor previous examples. Whether the sequence of statements is finite or imfinite, the steps needed for the proof by mathematical induction are the-same. We iMustrate a loop: ‘inwariant with an example, ‘We wse a Kaog invariant to prove thar when the psexdeceske fel foct=1 while (i < m) taiet fact = fact sé ) terminates, fact is equal tom ‘We prowe that ace = 4? is an invariant forthe while boop, Just before the while Joop begins executing, 7 Land fact =|, 90 facd = 1!, We huve proved the Basis Step. Assume thar faer = ft. WP ( Vand 0 < ¢ = 1 Hint) Using the wut oF the previous exercise, compere the sum of the berms in i the disposi 7 wi he tu Of the leests by columns. 1M, Prove that 4 en BURT TE ¥ forall w= Le (u Beeecizes 20-24, use induction la prune the statement, 11, 7 — L isivisible by 6, for all m 2 1 22, 11" = 6 i divicble by §, forall w 2 1 2B 6.1 — 20" is divisible by 4, fe alla ah, 3° £79 — 2 is divisible by 8 for all > 1, 25, Useinduction to prone thot IP), ..., Xy and X ore sets, hen fa) NUN 2 Red = ON UAT ATU ANT Xe) ob) KOA = RUE, 2H, Usecinduetion te prove that if May. Xa ate sets, the [Min 96 Ma = Nad = AED -=- Xa. 177, Prove thet the naib of subsets Sf [1.2, UU defieent bowed ean be ik -xithtromi= nes in’ Subivnethe board to ovsslapping Fx Fans bards and twodcd hoards, Thon, ose Exercises 32,340 39- JW. This ctercine and she one that follows are due tm. Aathony Quas. A2* x 2 deshame, > 0 i a figure of te form mee wee lore wily io assing: cures, Show thal any 2” x 2° Leshape ce be leg with eeominmes, 38. Use the preceding exercise to give a different proof that any 2" 2° deticieat board ean be tiled with trowsies 4 suaighc womine fran object mace wp of sivee squares in “oop Copyrighted material 104 Chapter 2 @ Proofs 230, Which #4 deficleat boone can be tld with straight te ‘loos? Héut- Number the squares of the 4 4 board, tft vo right, wp to bomee: 1, 2,3, 1,2, 4, amd se on Now that ‘fence tiling, cach stag rine covers exaaly se? snd exsatly 0963, 40. Which 3 x 5 deficient boards can be tiled wish stratghe teomonoes? AL, Which 8 8 eis foarls can be Gled with straight trominges? #2. Use a loop invariant io prove that when the paealocode iat pow =1 wwhibe Le = wt pow pws feted ’ texminates, pow is equal wa 483, Prove thar, afer the following pscudocose errnaates af = vol; forall pss p< Avalpl «vals andiorall pA < ps J fe] = wh tn particular. sat isin the position im the array al), fork = f+ tia iF] wa | babel wepetar[ a EDD i ‘vvoptai t ‘fit: Use the oop invariant: Baral .é

You might also like