Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett

Similar presentations


Presentation on theme: "CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett"— Presentation transcript:

1 CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett

2 Review problems Midterm 2

3 Material Everything we studied (excluding 1st midterm)
Graphs, sets, functions, relations Proofs: direct, contrapositive, by contradiction, induction, strong induction

4 Question 1 Let f:NN be defined as f(x)=(x+1)2. Is f: Injective
Surjective Bijective None

5 Question 2 Write the set “all elements which are equal to 1 modulo 3” in set builder notation {𝑥∈𝑍:∃𝑦∈𝑍, 𝑥=3𝑦+1} 𝑥∈𝑍:∃𝑦∈𝑍, 𝑦=3𝑥+1 {𝑥∈𝑍:∀𝑦∈𝑍, 𝑥=3𝑦+1} {𝑥∈𝑍:∀𝑦∈𝑍,𝑦=3𝑥+1}

6 Question 3 Let X,Y be finite sets. f:XY be a function such that f is injective but not surjective. Prove that |X|<|Y|. Proof (direct proof): Let A={f(x): x X}. Note that AY. Since f is injective, all the elements f(x) are unique, hence |A|=|X|. Since f is not surjective, there are elements in Y not attainable as images of f. Hence AY. As AY and AY, A is a strict subset of Y. Hence |A|<|Y|. Thus, |X|<|Y|. QED.

7 Question 4a Let X=“all formulas  on n inputs x1,…,xn, using the connectives AND,OR,NOT”. Define a relation R for ,X as “ is a tautology”. Is R symmetric: Yes No

8 Question 4b Let X=“all formulas  on n inputs x1,…,xn, using the connectives AND,OR,NOT”. Define a relation R for ,X as “ is a tautology”. Is R reflexive: Yes No

9 Question 4c Let X=“all formulas  on n inputs x1,…,xn, using the connectives AND,OR,NOT”. Define a relation R for ,X as “ is a tautology”. Is R transitive: Yes No


Download ppt "CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett"

Similar presentations


Ads by Google