Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

U.C. Berkeley CS70 Discrete Mathematics Review Problems - Prof. L. Trevisan, Exams of Discrete Mathematics

Review problems for the discrete mathematics for computer science course (cs70) at u.c. Berkeley, covering topics such as first-order logic, lucas numbers, modular arithmetic, and number theory. Students are encouraged to solve these problems before attending the review session.

Typology: Exams

2010/2011

Uploaded on 05/10/2011

koofers-user-57n
koofers-user-57n 🇺🇸

10 documents

1 / 2

Toggle sidebar

Related documents


Partial preview of the text

Download U.C. Berkeley CS70 Discrete Mathematics Review Problems - Prof. L. Trevisan and more Exams Discrete Mathematics in PDF only on Docsity! U.C. Berkeley – CS70: Discrete Mathematics for Computer Science MT 1 Review Problems, part 1 Lecturer: Luca Trevisan Do not turn in; bring solutions to MT review session Midterm 1 review problems, part 1 (try to solve before coming to the review session, 03/02 5-7pm, 306 Soda) 1. (Based on Rosen, Disc Math, 5th ed.) Consider the universe of people, with predicates F (a, b), “a is b’s friend”, and P (x), “x is perfect”. (a) Translate into first-order logic expressions (that is, expressions with propositional operators ∧, lor, and lnot and quantifiers ∀ and ∃): i. No one is perfect. ii. Not everyone is perfect. iii. All your friends are perfect. iv. One of your friends is perfect. v. Everyone is your friend and is perfect. vi. Not everybody is your friend or someone is not perfect. (b) Use DeMorgan’s law to negate the logical expression you got in 1(a)v above. Translate the result back into English. (c) Use DeMorgan’s law to negate the logical expression you got in 1(a)vi above. Translate the result back into English. 2. The “Lucas numbers” are a sequence of integers defined by setting L0 = 2 and L1 = 1, and then, for integers n ≥ 2, Ln = Ln−1 + Ln−2: L2 = 2 + 1 = 3, L3 = 1 + 3 = 4, L4 = 4 + 3 = 7, etc. (a) Let φ be the golden ratio, 1+ √ 5 2 . The golden ratio is so called because it’s a root of φ 2 −φ− 1, an polynomial that arises naturally surprisingly often. Prove that Ln = φ n + (1 − φ)n. Hint: that polynomial will come in useful here, too. (b) Prove or disprove: there exists an n such that Ln > n 5. (c) Compute L7 and L8 and run Euclid’s algorithm to find gcd(L7, L8). (d) Based on the results above, take a guess at (i) exactly how many steps Euclid’s algorithm takes when you run it on (Ln, Ln+1), and (ii) the value of gcd(Ln, Ln+1). Prove that your guesses are correct by strong induction. Remember that, by convention, we have Euclid’s algorithm terminate at a step that looks like a = bk+0 (some sources will use the convention that it terminates one step before that, a = bk+c where c|b). 3. Evaluate: (a) 4−1 (mod 17) (b) 306−1 (mod 679) (c) 679−1 (mod 306) 4. Let n be an odd integer. Find 2−1 (mod n). 5. Given a prime p, prove that (ab)−1 ≡ a−1b−1 (modp), that is, that in Zp, the inverse of ab is congruent to the product of the inverses of a and b. 1
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved