Download Solutions for final exam practice problems File

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Addition wikipedia , lookup

Law of large numbers wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Four color theorem wikipedia , lookup

Transcript
Practice problems in preparation for the Final exam
Practice the following problems
1. Show that ¬(𝑝 ∨ ¬π‘ž)are π‘ž ∧ ¬π‘ equivalent
(a) using a truth table.
(b) using logical equivalences.
2. Prove each of the following statements.
(a) The sum of two even integers is always even.
(b) The sum of an even integer and an odd integer is always odd.
3. Prove or disprove that (𝑝 β†’ π‘ž) β†’ π‘Ÿ and 𝑝 β†’ (π‘ž β†’ π‘Ÿ) are equivalent.
4. Let P(m, n) be β€œn is greater than or equal to m” where the domain (universe of discourse) is the set
of nonnegative integers. What are the truth values of βˆƒπ‘›βˆ€π‘šπ‘ƒ(π‘š, 𝑛) and βˆ€π‘šβˆƒπ‘›π‘ƒ(π‘š, 𝑛)?
5. A stamp collector wants to include in her collection exactly one stamp from each country of Africa.
If I(s) means that she has stamp s in her collection, F(s, c) means that stamp s was issued by country
c, the domain for s is all stamps, and the domain for c is all countries of Africa, express the statement
that her collection satisfies her requirement. Do not use the βˆƒ! symbol.
6. Prove or disprove that if A and B are sets then 𝐴 ∩ (𝐴 βˆͺ 𝐡) = 𝐴
7. Use mathematical induction to prove that n! β‰₯2n-1 whenever n is a positive integer.
8. Suppose that a1 = 10, a2 = 5, and an = 2anβˆ’1 +3anβˆ’2 for n β‰₯ 3. Prove that 5 divides an whenever n is a
positive integer.
9. A door lock is opened by pushing a sequence of buttons. Each of the three terms in the
combination is entered by pushing either one button or two buttons simultaneously. If there are 5
buttons, how many different combinations are there? (Example: 1-3, 2, 2-4 is a valid combination.)
10. How many positive integers not exceeding 1000 are not divisible by either 8 or 12?
11. Answer the following questions about the graph K3,4 . How many vertices and how many edges
are in this graph?
12. Find a spanning tree for the graph K3,4 using
(a) a depth-first search.
(b) a breadth-first search.
13. A fair coin is flipped until a tail first appears, at which time no more flips are made.
(a) What is the probability that exactly five flips are made?
(b) What is the expected number of flips?
14. Use mathematical induction to prove that every postage of greater than 5 cents can be formed
from 3-cent and 4-cent stamps.
15. Construct a binary search tree from the words of the sentence This is your discrete mathematics
final, using alphabetical order, inserting words in the order they appear in the sentence.
16. Find the sum-of-products expansion for the Boolean function x + y + z .
17. A thumb tack is tossed until it first lands with its point down, at which time no more tosses are
made.
On each toss, the probability of the tack’s landing point down is 1/3.
(a) What is the probability that exactly five tosses are made?
(b) What is the expected number of tosses?
18. Are these two graphs isomorphic?
The graphs are isomorphic: A–7, B–4, C–3, D–6, E–5, F–2, G–1.
19. Are these two digraphs isomorphic?
The digraphs are isomorphic: label the center vertex 4, the top vertex 2, the left vertex 1, the right
vertex 3.
20. Draw the undirected graph with adjacency matrix
The numbers on the edges of the graph indicate the multiplicities of the edges
21 If T is a tree with 999 vertices, then T has ________edges.
998
22. The value of the arithmetic expression whose prefix representation is - 5 / βˆ™ 6 2 – 3 is _______
-1
23. Write 3n βˆ’ (k + 5) in prefix notation:
24. Every full binary tree with 50 leaves has ____________ vertices.
99
25. Find the preorder traversal of the parsing tree for (8x βˆ’ y)5 βˆ’ 7√4𝑧 βˆ’ 3
26. For the tree below find:
a) Find the preorder traversal.
b) Find the inorder traversal.
c) Find the postorder traversal.
a.
b.
c.
27. Two identical urns contain balls. One of the urns has 6 red balls and 3 blue balls. The other urn
has 5 red balls and 8 blue balls. An urn is chosen at random and two balls are drawn at random from
this urn, without replacement.
(a) What is the probability that both balls are red?
(b) What is the probability that the second ball is red, given that the first ball is red?
28. Consider the following relations on {1, 2, 3}.
R1 = {(1, 1), (1, 3), (2, 2), (3, 1)}
R2 = {(1, 1), (2, 2), (3, 1), (3, 3)}
R3 = {(1, 2), (2, 1), (3, 3)}
R4 = {(1, 3), (2, 3)}
(a) Which of these relations are reflexive? Justify your answers.
(b) Which of these relations are symmetric? Justify your answers.
(c) Which of these relations are antisymmetric? Justify your answers.
(d) Which of these relations are transitive? Justify your answers.
29. Consider following Hasse diagram.
(a) Find all maximal elements.
(b) Find all minimal elements.
(c) Find the least element if it exists, or show that it does not exist.
(d) Find the greatest element if it exists, or show that it does not exist.
(e) What is the greatest lower bound of the set {a, b, c}?
(f) What is the least upper bound of the set {a, b, c}?
30. List all positive integers n such that Cn is bipartite .
n even.