cs70_fa07_mt1 - C90 Discrete Mathemiiesfor Computer...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: C90 Discrete Mathemiiesfor Computer Science, Faii 20G? Midterm 1 6:flfl~3:flflpm, 3 October Notes: men” are [our questions on this midterm. Answer each question pan in the space beiow if, using the back of the sheet to continue your answer ifnecessary. {fyou need more space. use the blank sheet at the end. None of the quosfions requires a very long answer, so avoid writing too much! Unclear or long-winded solutions may be penalized. The approximate oredii‘for each question part is shown in the margin {Ioiai {it} poinm. Points are no: necessarin an i'ndioorion ofdificniry! Your Name: Your Section: For ofiicial use; please do not Write below this line! Total [exam starts on next page] 1. Quick Questions (:1) Write down the truth tables for (i) P =e Q; {ii} [.2 => F; {iii} P {=- Q. 6pm {in} Let and Gus} be propositions about integers I and 3; respectively. and suppose you want to prove 3pm: the theorem {Elm 13(3)) :- {lr'y Qliyjj. Which of the following proof strategies would be a valid way to proceed? (Note: There may be no valid strategies+ or more than one 1relid strategy. You do not need to explain your answers.] {i} Assume that there is some 3,; for which Q[y} is false, and deduce that 13(3) is false for all I. lit} Assume that Q[y] is true for all y. and deduce that is true for some 2:. till] Assume that. for some a: and some 1;, PL-r) is true and Qlfiy} is false. and deduce a contradiction. (iv) Assume that Plrl is true for all :r and Qfiy} is false for all y, and deduce a contradiction. [continued on next page] [Q1 continued] {c} Consider an instance of the Stable Maning problem in which the men are {1, 2, 3, 4}, the wcmen are 4pm {31, Bic. D}, and the preference lists are Men (1-4} Wurnen (A—B} l: B A D C A: 2 l 4 3 2: C A D B B: 3 4 2 l 3: A C B D C: l 4 3 2 4: D C B A D: 2 3 1 4 List the stable pairing given by the traditional propose-and-reject algorithm on this instance. [You need no: Sl'IDW the execution of the algorithm] (d) Compute the multiplicative inverse of ID modulo T43 using the extended GED algorithm diecuseed in {Spits class. Shim your workingl Your answer should be an integer in the range [0,?42], [continued on next page] 2- A Tiling Problem You are given three kinds of tiles. A, B, and C, of dimensions 1 x 2, 2 x 1, and 2 X 2 respectively [as shown in the figure below). Note that rotations of the tiles are not ctllowe', so tiles A and B are not the some! E 112 Bi 93:2 Your goal is to tile a board of dimension 2 x n. and you are interested in the number of tiling configurations possible [using the three types of tiles given}. The figure below shows an example of three different tiling configurations for a 2 >< 5 (i.e. n. = 5) b-osud. Let Tn denote the number of tiling configurations for a board of dimension 2 X n. (a) Compute T1 and T2. 2pm {in} Explain carefully whj.r ’1“rt = T114 + 2Tfl_2. [HINT: The configurations in the example given above 4pm for n = 5 may be helpfiil.] - . 2n+1 + {_l}l’t (c) Prove by induction that TnL = 3 for all :1 1‘3 1. Show cleaer the structure of your proof! 9pm [continued on next pagel 3. Modular Arithmetic: Which of the following staternents is mm? In each case, if the statement is true give a brief explanation; if it is false, give a simple counterexample. ' {i} For all-1,!) E Z, {r}. + 1:313 = u."1+ 153 mod 3. [Nata {a + b}3 = a3 + 3:12b + Hub: + b3.] 3m: {ii} For ail a, b e z. {a + b)“ = a," + 5‘1 mod r1.[Notc: (a + m4 = a4 + Mb + Enab?‘ + 4gb3 + 33.4.] 3pm (iii) For all :11 b e Z. (a.+b]5 = (15+? mod 5. [Note: {a+b]5 = a5+5a4h+lfla3bg+lfla2b3+fiafi4+b5j 3pm [continued on next page] 4. Stable Marriage For each of the following properties, sag.r whether the propertyI is true or false. If the property is true. provide a short proof. If it is false. provide a simple counterexample. You may use without proof any facts about Stable Marriage covered in class provided they are clearly stated. {a} In a Stable Marriage instance with at least two men and two women. if man M and woman W each 4pm put each other at the top of their respective preference lists then there exists a stable pairing in which fit and W are paired together. lb) In a Stable Marriage instance with at least two men and two women. if mat: .M and woman W each 4pm put each other at the bottom of their respective preference lists then there is no stable pairing in which M and W are paired together. to) In a Stable Man-iage instance with at least two men and. two women. it is possible that there exists an 4gb: unstable pairing in which every unmatched man-woman pair (M, W} is a rogue couple. [The end] ...
View Full Document

Page1 / 6

cs70_fa07_mt1 - C90 Discrete Mathemiiesfor Computer...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online