CS 173, Spring 2009 Homework 6 Solution
Total point value: 50 points.
1. Recursive denition of a set [10 points] (a) Dene the set S Z2 as follows: rule 1: rule 2: rule 3: rule 4: (0, 0) S (10, 0) S If (x, y) S, then (y, x) S If (x, y) S, then (x, y) S
Wha
CS 173, Spring 2009 Homework 4 Solutions
(Total point value: 54 points.)
1. Functions [6 points] For each of the following functions, state whether or not they are one-to-one and whether or not they are onto. (a) f : R R such that f (x) = x one-to-one: no
CS 173, Spring 2009 Homework 3 Solutions (Total point value: 50 points.)
1. Euclidean algorithm [4 points] Trace the execution of the Euclidean algorithm (lecture 9, p 229 in Rosen) on the inputs 1224 and 850. That is, give a table showing the values of t
CS 173, Spring 2009 Homework 1 Solutions
1. [9 points] Translate the following sentences into propositional logic, making the meaning of your propositional variables clear. See page 11 of the textbook for some examples of translating English sentences int
CS 173, Spring 2009 Homework 5 Solutions (Total point value: 50 points.)
1. Recursive denition [10 points] (a) Consider the function h dened by the following recursive denition. Compute h(x) for x from 0 to 10. h(0) = 0 h(1) = 1 h(2) = 1 h(n) = h(n 1) + h
CS 173: Discrete Mathematical Structures, Spring 2009 Homework 9 Solutions
1. [10 points] Pigeonhole Principle Let S be a set of ten distinct integers between 1 and 50. (Distinct means that no two elements of S are the same.) Use the pigeonhole principle
CS 173, Spring 2009 Homework 8 Solutions (Total point value: 50 points.)
1. Counting I [10 points] For the following four questions, you do not need to multiply out factorials to reach a nal answer. For example, P (10, 4) = 10! would be acceptable as an 6
CS 173: Discrete Mathematical Structures, Spring 2009 Homework 11 Solutions
1. [10 points] Proving an operation well-dened Suppose that A = R2 cfw_(0, 0), i.e A is 2D space minus the origin. We can dene an equivalence relation on A as follows: (x, y) (p,
CS 173, Spring 2009 Homework 7 Solutions (Total point value: 30 points.)
1. Induction with inequalities [10 points] Use induction to show that the following holds for all integers n 8. n2 > 7n + 1 Solution: Base case: Note that the base case here occurs w