Download presentation
Presentation is loading. Please wait.
Published bySusan Ward Modified over 6 years ago
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:NN 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:XY 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 AY. 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 AY. As AY and AY, 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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.