Points misse: Stuent's Nme: Totl sore: /100 points Est Tennessee Stte University Deprtment of Computer n Informtion Sienes CSCI 2710 (Trnoff) Disrete Strutures TEST 2 for Fll Semester, 2004 Re this efore strting! This test is lose ook n lose notes You my NOT use lultor All nswers must hve ox rwn roun them. This is to i the grer (who might not e me!) Filure to o so might result in no reit for nswer. If you perform work on the k of pge in this test, inite tht you hve one so in se the nee rises for prtil reit to e etermine. Sttement regring emi misonut from Setion 5.7 of the Est Tennessee Stte University Fulty Hnook, June 1, 2001: "Aemi misonut will e sujet to isiplinry tion. Any t of ishonesty in emi work onstitutes emi misonut. This inlues plgirism, the hnging of flsifying of ny emi ouments or mterils, heting, n the giving or reeiving of unuthorize i in tests, exmintions, or other ssigne shool work. Penlties for emi misonut will vry with the seriousness of the offense n my inlue, ut re not limite to: gre of 'F' on the work in question, gre of 'F' of the ourse, reprimn, protion, suspension, n expulsion. For seon emi offense the penlty is permnent expulsion." A short list of some tutologies: 1. (p q) p 2. (p q) q 3. p (p q) 4. q (p q) 5. ~p (p q) 6. ~(p q) p 7. ((p q) p) q 8. ((p q) ~p) q 9. ((p q) ~q) ~p 10. ((p q) (q r)) (p r) Mthemtil inution: If P(n 0 ) is true n ssuming P(k) is true implies P(k+1) is true, then P(n) is true for ll n > n 0 Permuttions n Comintions: np r = n! n! (n - r)! nc r = r!(n - r)! Properties of Reltions: A reltion is reflexive if R, for ll A. A reltion is irreflexive if R, for ll A. A reltion is symmetri if whenever R, then R. A reltion is symmetri if whenever R, then R. A reltion is ntisymmetri if whenever R n R, then =. A reltion is trnsitive if whenever R n R, then R. A reltion is lle n equivlene reltion if it is reflexive, symmetri, n trnsitive.
Eh of the following six rguments uses one of the tutologies liste on the oversheet. (See tle uner the heing, " short list of some tutologies.") For eh of the four rguments, ientify whih tutology ws use from this list y entering vlue 1 through 10 in the spe provie. (2 points eh) 1. If it is thunering, then there is lightning 2. It is either rining or snowing There is thuner It isn't rining There is lightning It must e snowing Answer: 7 Answer: 8 3. Either E is short or E is tll 4. If I rive to shool, I will e lte to lss E is not short I m on time for lss E is tll I in't rive to shool Answer: 8 Answer: 9 5. This test is esy 6. Mtthew is my son Either I stuie well or this test is esy Mtthew is hil of mine Answer: 3 or 4 Answer: _1, 2, 3, or 4 For the next four rguments, inite whih re vli n whih re invli. (2 points eh) 7. If I pulish novel, I will e fmous 8. If I rive to shool, I will e lte to lss If I m fmous, I will e hppy I ws lte to lss I m hppy, therefore, I pulishe novel I rove to shool Vli Invli Vli The following seven prolems present seven situtions where r items re selete from set of n items. Selet the formul, n r, n P r, n C r, or (n+r-1) C r, tht will ompute the numer of ifferent, vli sequenes n ientify the vlues of r n n. (4 points eh) To nswer these prolems, you simply nee to rememer whih formul pertins to whih sitution: orere/unorere n uplites llowe/uplites not llowe. Eh sitution is either orere with uplites llowe, n r, orere with no uplites llowe, n P r, unorere with no uplites llowe, nc r, or unorere with uplites llowe, (n+r-1) C r. From there, it s just mtter of setting n to the numer of items in the set eing selete from n r to the numer of items eing selete. 11. Compute the numer of 4-igit ATM PINs where uplite igits re llowe. Invli 9. If I try hr, then I will suee 10. Pete is the nme of my pet If I suee, then I will e hppy The only ogs I own re lk ls I m not hppy, therefore, I in't try hr Pete is lk l Vli Invli Vli Invli.) n r.) np r.) nc r,.) (n+r-1) C r n = 10 r = 4
12. Compute the numer of ifferent 5 r hns n e rwn from ek of 52 rs..) n r.) np r.) nc r,.) (n+r-1) C r n = 52 r = 5 13. How mny ommittees of 5 people n e rete from group of 8 people?.) n r.) np r.) nc r,.) (n+r-1) C r n = 8 r = 5 14. How mny wys n the letters in the wor MICHAEL e rrnge?.) n r.) np r.) nc r,.) (n+r-1) C r n = 7 r = 7 15. Assume you nee to uy 10 ottles of so from seletion of {Coke, Pepsi, Dr. Pepper, n Sprite}. How mny wys oul you o this?.) n r.) np r.) nc r,.) (n+r-1) C r n = 4 r = 10 16. How mny three-igit numers re there in se-5? Assume leing zeros re inlue s igits..) n r.) np r.) nc r,.) (n+r-1) C r n = 5 r = 3 17. How mny ifferent wys n 2 six-sie ie ome up? There is no orer, e.g., 3 & 4 re the sme s 4 & 3..) n r.) np r.) nc r,.) (n+r-1) C r n = 6 r = 2 18. True or flse: In seleting r items from set of n items where orer oesn't mtter n uplites re llowe, r my e greter thn n. (2 points) 19. Whih of the following expressions esries how to lulte the numer of ville liense plte omintions of the formt ABC 123? (2 points).) 26 C 3 10 C 3.) (26 + 10 1) C 10.) 26 P 3 10 P 3.) (26 + 10 1) P 6 e.) (36 + 6 1) C 6 f.) 26 3 10 3 g.) 26 C 3 10 3 h.) None of the ove 20. Assume we hve lottery where you first pik 5 from group of 60 then pik one powerll option from group of 45? Wht is the rtio of piking the wrong powerll to piking the right powerll? (2 points).) 45:1.) 44:1.) 60 C 5 44 : 60C 5 45.) 45 C 1 : 1 f.) None of the ove 21. Let A = {, } n B = {1, 2, 3}. List ll of the elements in A B. (3 points) A B = {(, 1), (, 2), (, 3), (, 1), (, 2), (, 3)} 22. If A = 5 n B = 10, then the rinlity of A B is: (2 points).) 5 10.) 10 5.) 5 10.) 5 C 10.) 5 P 10 f.) None of the ove
The next 5 prolems represent reltions ross the Crtesin prout A A where A = {,,, }. The reltions re represente either s susets of A A, mtries, or igrphs. For eh prolem, etermine whether the reltion is reflexive, irreflexive, symmetri, symmetri, ntisymmetri, n/or trnsitive. Chek ll tht pply. (4 points eh) For eh of the following nswers, either the mtrix or the igrph is use to etermine the reltion s hrteristis. Reflexive sys tht there must e ones ll long the min igonl of the mtrix n every vertex in the igrph hs n ege tht loops k to itself. Irreflexive sys tht there must e zeros ll long the min igonl of the mtrix n no vertex in the igrph hs n ege tht loops k to itself. Symmetri sys tht the mtrix is symmetri ross the min igonl n for every ege in the igrph, there is n equl ege going k the other wy, i.e., every ege is iiretionl (yles of length one re llowe). Asymmetri sys tht for every 1 in the mtrix, there must e 0 opposite the min igonl from it n there n e no 1 s on the igonl while every ege in the igrph must e only one-wy n there n e no loop ks, i.e., yles of length one. Antisymmetri sys tht for every 1 in the mtrix, there must e 0 opposite the min igonl from it, ut 1 s re llowe on the igonl. Every ege in the igrph must e only one-wy, ut loop ks, i.e., yles of length one, re llowe. Trnsitive sys tht for every pir of 1 s in mtrix ij n jk, there must e 1 t ik. The igrph sys tht for every pth of length two, there must lso e pth of length one. 23. R = {(,), (,), (,), (,), (,), (,)} Below, I hve rete oth the mtrix efining R n the igrph. reflexive irreflexive symmetri symmetri ntisymmetri trnsitive 24. R = A A M R = 0 1 1 1 0 0 1 1 0 0 0 1 0 0 0 0 Below, I hve rete oth the mtrix efining R n the igrph. M R = reflexive irreflexive symmetri symmetri ntisymmetri trnsitive
25. 0 1 0 1 1 0 1 1 0 1 0 0 1 1 0 1 reflexive irreflexive symmetri symmetri ntisymmetri trnsitive 26. 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1 reflexive irreflexive symmetri symmetri ntisymmetri trnsitive 27. M R = reflexive irreflexive symmetri symmetri ntisymmetri trnsitive The next three prolems represent reltions ross the Crtesin prout A A where A = {1, 2, 3, 4, 5}. 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 0 28. Write the set of orere pirs represente y the reltion mtrix (4 points) R = {(1, 1), (1, 3), (2, 1), (2, 5), (3, 2), (4, 5), (5, 2), (5, 5)} 29. Convert the following igrph to mtrix. (3 points) 1 0 1 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 1 1 2 5 3 4 0 0 1 0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0
30. Fill out the tle elow listing the in-egree n out egree of eh element for the igrph of the previous prolem. (4 points) 1 2 3 4 5 In-Degree 1 2 1 1 2 Out-Degree 2 2 1 1 1 31. Crete the igrph of the reltion R = A A for the set A = {,, }. (3 points) 32. Selet only one of the following sttements to prove true using mthemtil inution. (7 points).) 2 + 4 + 6 + + 2n = n(n + 1).) 1 + 2 1 + 2 2 + 2 3 + + 2 n = 2 n+1 1.) 1 + 1 + 2 + 3 + + n 1 = n 1 1.) First, test to see if the se se is true, i.e., the n=1 se: 1 (1+1) = 1 2 = 2 this se is TRUE! Now, ssume tht the k se is true. The k se looks like this: 2 + 4 + 6 + + 2k = k(k + 1) Wht we wnt to o is mke this look like the k+1 se, i.e., wht we re trying to prove is 2 + 4 + 6 + + 2k + 2(k + 1) = (k + 1) (k + 2). To get the k se to look like this, we nee to egin y ing 2(k+1) to oth sies of the k expression ove. 2 + 4 + 6 + + 2k + 2(k + 1) = k(k + 1) + 2(k + 1) On the right sie of the eqution, pulling (k + 1) from oth of the prout terms gives us: 2 + 4 + 6 + + 2k + 2(k + 1) = (k + 1)(k + 2) An this proves tht the expression 2 + 4 + 6 + + 2n = n(n + 1) is true for ll n>1.
.) First, test to see if the se se is true, i.e., the n=1 se: 1 + 2 1 = 3 = 2 1+1 1 = 2 2 1 = 4 1 = 3 this se is TRUE! Now, ssume tht the k se is true. The k se looks like this: 1 + 2 1 + 2 2 + 2 3 + + 2 k = 2 k+1 1 Wht we wnt to o is mke this look like the k+1 se, i.e., wht we re trying to prove is 1 + 2 1 + 2 2 + 2 3 + + 2 k+1 = 2 k+2 1. To get the k se to look like this, we nee to egin y ing 2 k+1 to oth sies of the k expression ove. 1 + 2 1 + 2 2 + 2 3 + + 2 k + 2 k+1 = 2 k+1 1 + 2 k+1 1 + 2 1 + 2 2 + 2 3 + + 2 k + 2 k+1 = 2 k+1 + 2 k+1 1 1 + 2 1 + 2 2 + 2 3 + + 2 k + 2 k+1 = 2 2 k+1 1 1 + 2 1 + 2 2 + 2 3 + + 2 k + 2 k+1 = 2 k+1+1 1 1 + 2 1 + 2 2 + 2 3 + + 2 k + 2 k+1 = 2 k+2 1 An this proves tht the expression 1 + 2 1 + 2 2 + 2 3 + + 2 n = 2 n+1 1 is true for ll n>1..) First, test to see if the se se is true, i.e., the n=1 se: ( 1 1)/( 1) = ( 1)/( 1) = 1 this se is TRUE! Now, ssume tht the k se is true. The k se looks like this: 1 + 1 + 2 + 3 + + k-1 = ( k 1)/( 1) Wht we wnt to o is mke this look like the k+1 se, i.e., wht we re trying to prove is 1 + 1 + 2 + 3 + + k-1 + k = ( k+1 1)/( 1). To get the k se to look like this, we nee to egin y ing k to oth sies of the k expression ove. 1 + 1 + 2 + 3 + + k-1 + k = ( k 1)/( 1) + k Now, multiply the k term on the right sie of the eqution y ( 1)/( 1) so tht we n omine it with the first term. 1 + 1 + 2 + 3 + + k-1 + k = ( k 1)/( 1) + k ( 1)/( 1) = [( k 1) + k ( 1)]/( 1) Next, multiply the term k ( 1) through 1 + 1 + 2 + 3 + + k-1 + k = [( k 1) + k+1 k )]/( 1) 1 + 1 + 2 + 3 + + k-1 + k = [ k k 1 + k+1 )]/( 1) = ( k+1 1)/( 1) An this proves tht the expression 1 + 1 + 2 + 3 + + n-1 = ( n 1)/( 1) is true for ll n>1.