The scale was A = 112, C = 70. The distribution of scores is given at the main CMPSCI 250 web page.
Q1: 45 points Q2: 15 points Q3: 25 points Q4: 40+5 points Total: 125+5 points
Thus P1 is "a1 → 0", P2 is "a2 → (a1 → 0)", P3 is "a3 → (a2 → (a1 → 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:
Base case, with i=1: We must prove ¬(a1) → (a1 → 0). Assume that a1 is false, then the implication is true by the rule of vacuous proof, as its antecedent is false.
Inductive step: Assume ¬(a1) → Pi. We prove "¬(a1) → Pi+1" by direct proof. Assume ¬(a1). Then by the IH and Modus Ponens, Pi is true. Since Pi+1 is defined to be "ai+1 → Pi", Pi+1 is true by the rule of trivial proof.
P1 is false only if a1 is true and 0 is false -- this has a 1/2 probability because a1 is equally likely to be true or false.
P2 is false only if a2 is true and P1 is false. Since a2 does not occur in P1, these two propositions are independent. So the probability that both are false is the product of the probabilities that either is false, or (1/2)(1/2) = 1/4. Thus the probability that P2 is true is 1 - (1/4) or 3/4.
P3 is false only if a3 is true and P2 is false, and again these two propositions are independent. So the probability that P3 is false is (1/2)(1/4) = 1/8, and the probability that it is true is 1 - (1/8) or 7/8.
From the examples, the rule appears to be Prob(Pi) = 1 - 2-i, so we will prove this statement by ordinary induction for all naturals i.
For i=0, Prof(P0 is 0 by the definition of P0 as 0, and 1 - 2-0 = 1 - 1 = 0, so the base case is proved.
For general positive i, Prob(Pi) = 1 - Prob(Pi is false) = 1 - Prob(ai is true and Pi-1 is false) = 1 - Prob(ai)Prob(Pi-1) because of independence, as the atomic proposition ai does not appear in Pi-1.
This is 1 - (1/2)(2-(i-1) by the IH, which is 1 - 2-i by arithmetic.
Reflexive property: ∀a: R(a,a)
Symmetric property: ∀a:∀b: R(a,b) → R(b,a)
Transitive property: ∀a:∀b:∀c: (R(a,b) ∧ R(b,c)) → R(a,c)
∀a:∀b: R(a,b) → [∀c:∀d: (R(c,a) ∧ R(d,b)) → R(c,d)]
Here the symbol I means "infinity":
A B C D E F G
---------------------
A| 0 2 3 I I I I
B| 2 0 I 4 1 I I
C| 3 I 0 3 I I 2
D| I 4 3 0 I 1 I
E| I 1 I I 0 0 2
F| I I I 1 1 0 2
G| I I 2 I I 2 0
We take this matrix X and compute the matrix X6 using min-plus matrix multiplication, with the minimum operation as "addition" and the ordinary addition operation as "multiplication". We compute the sixth power because 6 = n-1, where n is the number of nodes in the graph.
In the BFS, we find B and C from A, find D and E from B, find G (and the non-tree edge to D) from C, find F from D, and find non-tree edges to F from both E and G. The tree looks like this, where stars denote non-tree edges:
A
/ \
/ \
B C
/ \ * \
/ \ * \
E D G
* | *
* | *
* | *
* | *
*|*
F
In the DFS, we find B from A, D from B, and C from D, find the non-tree edge from C to A, then find G from C, F from G, the non-tree edge to D from F, E from F, and the non-tree edge to B from E. The DFS tree is a straight line through the nodes A, B, D, C, G, F, and E, with the three non-tree back edges as indicated. Other valid trees are possible given different choices of which neighbor of a node to visit first. But note that the DFS cannot finish processing a node without looking at all of that node's neighbors.
Here are your questions:
There are 8! or 88 = 40320 orders.
Solution 1: There are 4! orders of the boys, and 4! orders of the girls, so there are (4!)2 = 576 possible orders where the boy-girl arrangement holds. So the probability is 576/40320 = 1/70.
Solution 2: There are (8 choose 4) = 70 ways to pick four of the eight positions for the boys, and all are equally likely, so the probability is 1/70.
Solution 3: There is 4/8 chance of placing a boy first, then a 4/7 chance of a girl second, a 3/6 chance of a boy third, and so on for a total probability of (4/8)(4/7)(3/6)(3/5)(2/4)(2/3)(1/2)(1/1) = 1/70 as in solution 1.
Solution 1: The 3! = 6 possible relative orders of Abigail, Edward, and Frank are each equally likely, so there is a 1/6 chance they will occur in the given order.
Solution 2: There are eight equally likely positions for Abigail, so each has 1/8 probability. In each, we can calculate the probability that Edward is ahead of Abigail and Frank behind her. In each case, there are 72 = 42 ways to place Edward and Frank in two of the seven remaining positions. If Abigail is in position 1 or 8, none of these have Edward ahead of Abigail and Frank behind. If she is in position 2 or 7, six of the 42 choices meet this condition. (For example, if Abigail is in position 2 we can put Edward in position 1 and Frank in 3, 4, 5, 6, 7, or 8.) If Abigail is in position 3 or 6 there are 2*5 = 10 ways to place Edward and Frank and meet the conditions. If Abigail is in position 4 or 5 there are 3*4 = 12 ways to do it. Overall our probability is (1/8)(1/42)(0+6+10+12+12+10+6+0) = 56/(8*42) = 1/6.
Solution 1: Think of Edward-Abigail-Frank as a single unit -- there are 6! ways to order this unit and the five other students, so the probability that we get one of these orders is 6!/8! = 1/56.
Solution 2: There are (8 choose 3) possible sets of three positions for Edward, Abigail, and Frank, and six of these are consecutive: 123, 234, 345, 456, 567, and 678. So there is a 6/56 chance they will be consecutive, and a 1/6 chance they will be in the right order, so (6/56)(1/6) = 1/56 probability overall.
Solution 3: To find an order with Edward, Abigail, and Frank consecutive in that order, we place those three in any of those six sets of positions, then place the other five students in 5! possible ways. So there are 6*5! orders with them consecutive, and a probability of 6*5!/8! = 1/56.
Solution 1: There are (8 choose 3) choices of this set, and each is equally likely, making the probability 1/56.
Solution 2: There is a 3/8 chance that one of those three comes first, then a 2/7 chance that one of the other two comes second, then a 1/6 chance that the last of the three comes third, for (3/8)(2/7)(1/6) = 1/56.
Solution 1: This is the Fourth Counting Problem with k=3 and n=8, as we are choosing a multiset of size three from the eight-element set. The number of such multisets is (k+n-1 choose k) = (10 choose 3), or (k+n-1 choose n-1) = (10 choose 7) = 120.
Solution 2: There are 8 ways to give all three stars to the same person, 2(8 choose 2) ways to give two to one student and the third to another, and (8 choose 3) ways to pick a set of three to get one star each. The total is 8 + 2(8 choose 2) + (8 choose 3) = 8 + 56 + 56 = 120.
Solution 1: There are 83 sequences of three students, and 83 sequences with no repeats. Each such sequence is equally likely, so the probability is 8*7*6/8*8*8 = 42/64 = 21/32.
Solution 2: After the first star goes to some student, there is a 7/8 chance that the second star does not go to the same student. If this happens there is then a 6/8 chance that the third star goes to a third student, so the total probability is (7/8)(6/8) = 21/32.
Many people who used Solution 2 for part (f) thought that these 120 ways of awarding the stars were equally likely and thus answered 56/120 for part (g). This is incorrect -- of the 512 equally likely ways to award the three stars in a sequence, six result in each of the 56 sets of three separate winners, three result in each of the 56 ways to give two to one and one to another, and one results in each of the eight ways to give all three to the same student.
Last modified 21 December 2007