CSE 321 final exam study guide: Spring 1998

These are questions some of which were on final exams from previous offerings for the course. Since lecture topics vary from year to year, some of the questions may relate to material that was not presented this year. The final will cover all the material presented in class which is contained in: 1.1-1.3, 2.3-2.4, 3.1-3.3, 4.1-4.5, 7.1-7.2, 7.4. Related material presented in class such the stable marriage algorithm and the linearity of expectation are also covered. There won't be any questions on cryptography.
  1. Show that the proposition p-> ((q-> (r-> s)) -> t) is a contingency WITHOUT constructing its full truth table.

  2. Using the universe of integers for all quantifiers express the following English sentences in predicate logic using the predicates, P, E, and L where P(x) means `x is prime', E(x) means `x is even', and L(x,y) means `x < y'.

  3. Use the Euclidean algorithm to find gcd(123,277).

  4. Show that if a,b,c and d are integers such that a|b and b|d, then ab|cd.

  5. In an undirected graph G, we define dist(v,w) to be the length of the shortest path from v to w. Show that for vertices x, y, z, we have dist(x,z)<= dist(x,y) + dist(y,z).

  6. Give a careful proof by induction that any connected, undirected graph with n vertices and e edges satisfies e>= n-1. Be careful that your proof includes all connected graphs.

  7. The formula ~(p -> ~q) -> (r -> (~s -> t)) is false for exactly one assignment to p, q, r, s and t. Find this assignment WITHOUT constructing a truth table.

  8. Determine the number of strings over {a,b,c} of length 100 that have exactly 98 a's.

  9. Suppose that you are working on a True-False test with 10 questions. Let p_i be the probability that you get answer i correct. Assume that the probabilities are independent.

  10. Let G be a directed graph with n vertices. Show that if G has a path of length greater than n, then G has a cycle.

  11. Let G=(V,E) be an undirected graph. The complement of G, G' is defined as the graph G'=(V,E') where E'={(v,w) | v is in V, w is in V, v!= w, (v,w) is not in E}. Give an example of a graph G such that both G and G' contain Hamiltonian circuits. (See definition of Hamiltonian circuit on page 478 of Rosen.)

  12. The following terms are used in the propositional calculus. Give a one sentence definition for each of the terms.

  13. Give logical expressions for the following statements. Use quantifiers, connectives, and the predicates P(x) and H(x) which mean ``x passed the class'' and ``x turned in all of the homework''.

  14. Consider the English alphabet, which consists of 5 vowels and 21 consonants.

    You may express your answers as products of integers.
  15. Suppose that propositions p_1, p_2, ... , p_{n+1} are independently assigned random truth values, where the probability that p_i is true is 1/2.

  16. Let G=(V,E) be the undirected graph that has as its vertices the set of integers, and edges: E = {(x,x+3)| x is an integer}. Describe the connected components of G.

  17. How many edges do the following undirected graphs contain.

  18. Translate the following English sentences into predicate logic where the universe is the set of people and the allowable predicates are: S(x) : x is a student F(x,y) : x and y are friends O(x,y) : x is older than y

  19. Suppose that n >= 3 and p_1,..., p_n are propositions that are true or false independently with probability exactly 1/2. Justify your answers.

  20. Here is a recursive definition of a "forest", a kind of undirected graph.

    Prove by induction that every forest with v vertices and e edges has exactly v-e connected components.
  21. As part of its effort to make U.S. paper money harder to counterfeit, the U.S. Treasury has decided to redesign the 1, 5, 10, 20, and 50 dollar bills. However, people have grown tired of seeing boring presidents on the bills so the Treasury Department is looking for more appealing candidates to appear on these 5 different bills. They have narrowed the field of available candidates to seven actors {a_1,...,a_7}, eight basketball players {b_1,...,b_8}, six cartoon characters {c_1,...,c_6}, and five disc jockeys {d_1,...,d_5}. (These four sets are pairwise disjoint, so there are 26 candidates in all.) Please JUSTIFY your answers for each of the following questions about the possible choices the Treasury Department might make. (Answers in the form of arithmetic expressions involving only +,*,-,/ and !, are acceptable for full credit.)

  22. In stud poker (as opposed to draw poker), 4 of the 5 cards in the poker hand are dealt 'face up' so that everyone can see them and one card is 'face down' so that nobody can see it. Suppose that we start with a perfectly shuffled deck so that the cards are equally like to be in any order. EXPLAIN your answers to each of the following questions:

  23. In the land of Garbanzo, the unit of currency is the bean. They only have two coins, one worth 2 beans and the other worth 5 beans.

  24. For each n>= 0 define T_n>, the 'complete 3-ary tree of height n' as follows: Prove by induction that for each n>= 0, T_n has exactly (3^{n+1}-1)/2 vertices.
  25. Suppose that you have a rectangular cake which you need to cut into n rectangles of equal size by successively cutting the cake into chunks. Show that no matter how you do it you need to make exactly n-1 cuts in the cake (where a single cut is a straight line cut of one chunk, i.e. you are NOT allowed to line up several chunks and cut them at once.) (Hint: induction may help.)