MATH 302 – Discrete Mathematics – Section 501

advertisement
Dr. Timo de Wolff
Institute of Mathematics
www.math.tamu.edu/~dewolff/Fall14/math302.html
MATH 302 – Discrete Mathematics – Section 501
Midterm 1 Preparation Homework
Fall 2014
Exercise 1. Let S := {a1 , . . . , an } be a set of real numbers with n ≥ 2. Write a pseudocode
that returns the two largest elements of S.
Exercise 2. Recall the BubbleSort algorithm from the lecture. Sort the list (9, 7, 3, 8) with
this algorithm step by step.
Exercise 3. Show the following statements are true:
1. 3x2 + 4x − 5 is Θ(x2 ).
2. n! is O(nn )
You may use that xn+m ≥ xn for every n, m ∈ N>0 and every x > 0. Recall that n! :=
n · (n − 1) · (n − 2) · · · 2 · 1.
Exercise 4. Show the following:
1. (A ∧ B) ↔ ¬(¬A ∨ ¬B) is a tautology.
2. (A → B) ↔ ¬(¬A ∨ B) is a contradiction.
3. (A ∧ B) → ¬(¬C ∨ ¬D) ↔ ¬(A ∧ B) ∨ ¬(C ∧ D) is a tautology.
4. ∀x, y : P (x) ∧ Q(y) ∀x[P (x)] ∧ ∀y[Q(y)].
Exercise 5. Consider the following predicates: R(x, y) := “run faster than”, E(x, y) :=
“wants to eat”, D(x) := “live in the desert” and let our domain be the set of animals.
1. Translate the following sentences into a proposition using quantifiers (if needed).
(a) “Wile E. Coyote does not run faster than the Road Runner.”
(b) “Every animal that lives in the desert does not run faster than the Road Runner.”
(c) “For every animal there is an animal that wants to eat it although it does not
run faster than it.”
1
(d) “Wile E. Coyote wants to eat every animal that runs faster than himself or lives
in the desert.”
Exercise 6. In propositional logic we have the connectives “¬”, “∧”, “∨”, “→”, “↔” and
6↔“. But we would not need all these connectives to be able to define an equivalent logical
system. Show that excluding the connective ”→“ from our language defines an equivalent
logical system.
Exercise 7. Assume the following three propositions are true:
1. “If algebraic geometry is not easy to learn then discrete math is the best mathematical
subject.”
2. “Stochastics give you an advantage on the job market.”
3. “Stochastics do not give you an advantage on the job market or algebraic geometry
is not easy to learn and calculus is related to physics.”
Formalize the statements in propositional logic and conclude that they imply the statement
“Discrete math is the best mathematical subject.”.
Exercise 8. Let S := {s1 , . . . , sk }, T := {t1 , . . . , tr } be sets with k, r ≥ 10.
1. Prove that S ⊆ S and ∅ ⊆ S.
2. Which of the following sets are subsets of the cartesian product? Explain your answer.
(a) {(s1 , t3 ), (s2 , t2 )},
(b) {{s1 , t3 }, {s2 , t2 }},
(c) {s1 , t3 , s2 , t2 },
(d) {(∅, t1 )},
(e) {s ∈ S : s ∈ T } × {t ∈ T : t ∈ S}.
2
Download