Points miss: Stunt's Nm: Totl sor: /100 points Est Tnnss Stt Univrsity Dprtmnt o Computr n Inormtion Sins CSCI 2710 (Trno) Disrt Struturs TEST or Sprin Smstr, 2005 R this or strtin! This tst is los ook n los nots You my NOT us lultor All nswrs must hv ox rwn roun thm. This is to i th rr (who miht not m!) Filur to o so miht rsult in no rit or nswr. I you prorm work on th k o p in this tst, init tht you hv on so in s th n riss or prtil rit to trmin. Sttmnt rrin mi misonut rom Stion 5.7 o th Est Tnnss Stt Univrsity Fulty Hnook, Jun 1, 2001: "Ami misonut will sujt to isiplinry tion. Any t o ishonsty in mi work onstituts mi misonut. This inlus plirism, th hnin o lsiyin o ny mi oumnts or mtrils, htin, n th ivin or rivin o unuthoriz i in tsts, xmintions, or othr ssin shool work. Pnltis or mi misonut will vry with th sriousnss o th ons n my inlu, ut r not limit to: r o 'F' on th work in qustion, r o 'F' o th ours, rprimn, protion, suspnsion, n xpulsion. For son mi ons th pnlty is prmnnt xpulsion." QUESTIONS BEGIN HERE! Prolms 1, 2, n rprsnt rltions ross th Crtsin prout A A whr A = {,,, }. Th rltions r rprsnt ithr s susts o A A, mtris, or irphs. For h prolm, trmin whthr th rltion is rlxiv, irrlxiv, symmtri, symmtri, ntisymmtri, n/or trnsitiv. Chk ll tht pply. ( points h) 1. R = A A rlxiv irrlxiv symmtri symmtri ntisymmtri trnsitiv 2. R = {(, ), (, ), (, ), (, ), (, ), (, ), (, ), (, )} rlxiv irrlxiv symmtri symmtri ntisymmtri trnsitiv. 0 1 1 1 0 0 0 0 0 0 rlxiv irrlxiv symmtri symmtri ntisymmtri trnsitiv
4. Th irph low rprsnts rltion R on A = {1, 2,, 4, 5}. Convrt th irph to mtrix. ( points) 1 2 5 4 5. Fill out th tl low listin th in-r n out-r o h lmnt or th rltion o th prvious prolm. ( points) In-Dr Out-Dr 1 2 4 5 For prolms 6, 7, n 8, lt A = {,,, } n B = {1, 2,, 4}. Dtrmin whthr th h o th rltions R rom A to B in ths prolms is untion. (2 points h) 6. R = A B Funtion Not untion 7. R = {(, 2), (, 1), (, 1), (, 2)} Funtion Not untion 8. R = {(, 4), (, ), (, 2), (, 1)} Funtion Not untion For prolms 9 n 10, trmin th omin n rn o th untion. In othr wors, i () =, thn wht vlus o '' mk sns or (Dom()) n wht vlus o '' mk sns or (Rn())? By th wy, pls stik to susts o rl numrs. ( points h) 9. () = + Dom() = Rn() = 10. () = (mo 5) whr is n intr Dom() = Rn() = For prolms 11 n 12, lt th univrsl st U = Z + (th st o positiv intrs). Givn th sust A, trmin th output o th ivn hrtristi or mmrship untion A. (1 point h) 11. A = {n n = vn positiv intr} A (24) = 12. A = {0, 5, 10, 15, 5n} n = 0, 1, 2, A (24) = For prolms 1 n 14, lt th mo-100 untion. Comput th output or h o th prolms. (2 points h) 1. (4) = 14. (222) =
Eh rltion R in prolms 15 throuh 17 is in on A = {,,,, }. In h s, trmin i R is root tr, n i it is, wht is th root? I thr is no root, lv tht sp lnk. ( points.) 15. R = {(, ), (, ), (, ), (, )} R is root tr R is not root tr I R is root tr, th root is: 16. R = {(, ), (, ), (, ), (, )} R is root tr R is not root tr I R is root tr, th root is: 17. R = {(, ), (, ), (, ), (, ), (, )} R is root tr R is not root tr I R is root tr, th root is: For prolms 18 throuh 24, us th root tr T shown in th iur to th riht. (2 points h) 18. Wht is th hiht o T? 19. T is n n-tr. Wht is th vlu o n? 20. List ll o th lvs o T. 21. List ll o th silins o. 22. List ll o th osprin o. 2. List ll o th snnts o. h i 24. Tru or ls: T is omplt n-tr? 25. Construt th tr o th lri xprssion (( ) + 2) ( 6). (4 points)
26. Th ollowin ouly link list rprsnts inry positionl ll tr. Construt th irph o this tr with h vrtx ll s init. (6 points) inx lt t riht 1 8 0 2 0 N 0 0 T 6 4 0 U 0 5 0 H 0 6 0 S 2 7 5 A 10 8 7 M 9 0 F 0 10 9 I 4 27. Fill in th LEFT n RIGHT rrys in th tl to th lt or th tr shown low. (6 points) o t n inx lt t riht 1 5 0 2 t 4 r 5 6 7 n 8 o 9 r 28. Us th Humn o tr shown to th riht to in th strin o 0's n 1's tht rprsnts th wor PAYDAY. (4 points) P Y 29. Us th Humn o tr shown to th riht to o th mss 11101100010111111010. ( points) A H D 0. Th xprssion shown low is writtn in Polish (prix) nottion. Evlut it to th inl intr rsult. Not tht ll o th numrs r sinl iit intrs. ( points) 4 2 6 2 1
1. Th xprssion shown low is writtn in rvrs Polish (postix) nottion. Evlut it to th inl intr rsult. Not tht ll o th numrs r sinl iit intrs. ( points) 5 4 5 + 2. List th vrtis in th orr tht thy r visit in prorr srh o th tr shown to th riht. ( points). List th vrtis in th orr tht thy r visit in n inorr srh o th sm tr rom prolm 2. ( points) i h 4. In th sp to th riht, onvrt th tr shown low to inry positionl tr. (4 points) 5. Us ny mtho you wish to trmin th miniml spnnin tr or th onnt rph shown low n to th lt. Drw th onntions o th miniml spnnin tr usin th vrtis shown to th riht. (5 points) 4 5 6 2 4