The scale was A = 112, C = 70.

Q1: 45 points Q2: 15 points Q3: 25 points Q4: 40+5 points Total: 125+5 points

**Question 1 (45):**This problem deals with the following recursively defined sequence of compound proposiations P_{0}, P_{1}, P_{2},..., which use the atomic propositions a_{1}, a_{2}, a_{3},...:- P
_{0}is the proposition "0", meaning "false". - For all positive natural numbers i, P
_{i}is defined to be "a_{i}→ P_{i-1}".

Thus P

_{1}is "a_{1}→ 0", P_{2}is "a_{2}→ (a_{1}→ 0)", P_{3}is "a_{3}→ (a_{2}→ (a_{1}→ 0))", and so forth. Don't forget that for any propositions x and y, "x → y" is defined to be true*unless*both x is true and y is false.Here are your problems:

- (a,15) Prove that for any
*positive*natural i, (¬a_{1}) → P_{i}. (Hint: Use ordinary induction starting with i=1.) (Also, not that it's "a_{1}", not "a_{i}". - (b,10) Suppose that we choose a truth value for each atomic proposition
a
_{i}independently, with each a_{i}equally likely to be true or false. Calculate the probability that P_{1}is true, the probability that P_{2}is true, and the probability that P_{3}is true. (These are three separate questions.) - (c,20) Under the assumption of part (b), find a formula that gives the
probability that P
_{i}is true as a function of the natural number i. Prove that your formula is correct, using (ordinary) induction and the laws of probability.

- P
**Question 2 (15):**Let R be a binary relation on a set X. You are given that R is an equivalence relation.- (a,5) Write down the three properties of an equivalence relation as quantified statements involving R.
- (b,10) Prove the following quantified statement using the quantifier
proof rules and the statements from part (a). All variables represent elements
of X:
∀a:∀b: R(a,b) → [∀c:∀d: (R(c,a) ∧ R(d,b)) → R(c,d)]

**Question 3 (25):**This question deals with the following labeled undirected graph. The vertex set is {A,B,C,D,E,F,G}. There are edges (B,E), (D,F), and (E,F) of length 1, edges (A,B), (C,G), and (F,G) of length 2, edges (A,C) and (C,D) of length 3, and an edge (B,D) of length 4.- (a,5) Write down the single-step distance matrix for this graph, suitable
as input for Floyd's Algorithm. Breifly describe how you would use this
algorithm to find the shortest-path distance matrix, but
*do not*do the calculation! - (b,10) Ignoring the weights of the edges for this part only, conduct a breadth-first search and a depth-first search of this graph, each time starting from node A. Assume that you are able to recognize previously seen nodes, as is usual for such searches of graphs. Draw the two search trees, indicating the tree edges and non-tree edges.
- (c,10) Carry out a uniform-cost search on the weighted graph to find the shortest path from node A to node D. Indicate what entries go on and off the priority queue before the final answer is found.

- (a,5) Write down the single-step distance matrix for this graph, suitable
as input for Floyd's Algorithm. Breifly describe how you would use this
algorithm to find the shortest-path distance matrix, but
**Question 4 (40+5):**This question deals with a preschool class of eight students: four girls named Abigail, Beatrice, Caroline, and Daisy, and four boys named Edward, Frank, George, and Henry.Here are your questions:

- (a,5) When the eight students line up to go to recess, each possible order of the students is equally likely. How many such orders are there?
- (b,10) When the students line up, what is the probability that they alternate between boys and girls, with the first student a boy?
- (c,5) When the students line up, what is the probability that Abigail is somewhere after Edward and somewhere before Frank, possibly with other students in between?
- (d,5XC) When the students line up, what is the probability that Edward,
Abigail, and Frank, in that order, are three
*consecutive*students in the line? (That is, Edward is*immediately*in front of Abigail, who is*immediately*in front of Frank.) - (e,5) Let Y be the set consisting of the first three students in the line. When the students line up, what is the probability that Y is the set {Abigail, Edward, Frank}?
- (f,10) During the day, the teacher awards three gold stars for good behavior. It is possible, though not required, that more than one star goes to the same student. How many possibilities are there for the way the stars are awarded (for example, one way is "two to Abigail, one to George")?
- (g,5) If the teacher awards each of the three gold stars randomly and independently, with each student equally likely to get each star, what is the probability that three different students get stars?

Last modified 21 December 2007