Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

283 Final

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

Final exam  Graded

Student
Ethan Yountz

Total Points
70.1 / 83 pts

Question 1
Count trues 7 / 7 pts

1.1 a,b 2 / 2 pts

 + 2 pts Both correct a) 1 b) 5

+ 1 pt one correct

+ 0 pts both incorrect

1.2 c,d 2 / 2 pts

 + 2 pts Both correct: c) 4 d) 3

+ 1 pt one correct

+ 0 pts both incorrect

1.3 e,f 2 / 2 pts

 + 2 pts Both correct e) 7, f) 5

+ 1 pt one correct

+ 0 pts both incorrect

1.4 g 1 / 1 pt

 + 1 pt Correct: 8, meaning this is a tautology.

+ 0 pts Incorrect
Question 2
Negation 3 / 3 pts

 + 3 pts Correct: ∀N∈N+ ∀c1 ,c2 ∈R+ ∃n≥N (0 > c 1 g (n)) ∨ (c 1 g (n) > f(n)) ∨ (f(n) > c 2 g (n))
​ ​ ​

+ 1.5 pts Recognized the hidden ANDs becomes ORs

+ 1 pt Used de Morgan to get the correct quantifiers in the correct order.

+ 0.5 pts Correctlly negated ≤ to > .

Feedback comments

+ 0 pts You need quantifiers or your variables are not defined.

+ 0 pts You are using a logical negation operation; use de Morgan for quantifiers and logic to push those down.

+ 0 pts You didn't flip all your quantifiers or you changed the nesting of ∀ and ∃.

+ 0 pts Have not negated the original inequalities.

− 0.5 pts You have dropped some parts out of the inequalities for checking if f(n) ∈ Θ(g(n)).

− 0.5 pts You still have a logical negation operation like an overbar or ∄, even though you tried to negate under it. So
your expression is not equivalent to f(n) ∈ / Θ(g(n)).

+ 0 pts You make a false statement

+ 0 pts Left blank


Question 3
Quantifiers 13 / 14 pts

3.1 a 1 / 1 pt

 + 1 pt All correct: 1st and 3rd

+ 0.75 pts 3/4 correct

+ 0.5 pts 2/4 correct

+ 0.25 pts 1/4 correct

+ 0 pts None correct

3.2 b 1 / 1 pt

 + 1 pt All correct: 3rd and 4th

+ 0.75 pts 3/4 correct

+ 0.5 pts 2/4 correct

+ 0.25 pts 1/4 correct

+ 0 pts None correct

3.3 c 2 / 2 pts

 + 2 pts All correct: Only the 1st

+ 1.5 pts 3/4 correct

+ 1 pt 2/4 correct

+ 0.5 pts 1/4 correct

+ 0 pts None correct

3.4 d 2 / 2 pts

 + 2 pts All correct: Only the 4th

+ 1.5 pts 3/4 correct

+ 1 pt 2/4 correct

+ 0.5 pts 1/4 correct

+ 0 pts None correct


3.5 e 2 / 2 pts

 + 2 pts All correct: Only the 3rd

+ 1.5 pts 3/4 correct

+ 1 pt 2/4 correct

+ 0.5 pts 1/4 correct

+ 0 pts None correct

3.6 f 2 / 2 pts

 + 2 pts All correct: Only the 1st

+ 1.5 pts 3/4 correct

+ 1 pt 2/4 correct

+ 0.5 pts 1/4 correct

+ 0 pts None correct

3.7 g 2 / 2 pts

 + 2 pts All correct: 2nd and 3rd

+ 1.5 pts 3/4 correct

+ 1 pt 2/4 correct

+ 0.5 pts 1/4 correct

+ 0 pts None correct

3.8 h 1 / 2 pts

+ 2 pts All correct: 1st and 2nd

+ 1.5 pts 3/4 correct

 + 1 pt 2/4 correct

+ 0.5 pts 1/4 correct

+ 0 pts None correct


Question 4
DNA 5.3 / 9 pts

4.1 a 1 / 1 pt

 + 1 pt Correct: 4 12

+ 0.5 pts 12! would put 12 different items into order with no repeates. That is too high.

+ 0.3 pts Too high

+ 0.3 pts Too low

+ 0 pts In this problem the key numbers are the 4 different bases {A,T,C,G} and the 12 bases that make up a
strand. You are told that order matters and repeats are allowed.

+ 0 pts Your answer is not an integer.

+ 0 pts Left blank

4.2 b 2 / 2 pts

 + 2 pts Correct: 5 ⋅ 4 4 : the block can have 0 to 4 bases before it begins (so it can start in position 1-5. Then
there are four bases to be filled in independently.

+ 1.7 pts 4 ⋅ 4 4 is close. But you can have 0 to 4 bases before the block, so that is 5 options.

+ 1 pt 4 4 Would be correct if the block was at a fixed position.

+ 1 pt 4 4 counts the ways to choose the 4 remaining bases, but you have overcounted the number of ways to
place the block.

+ 1 pt 5! is too low because we have 5 places to put the block, but then choose any of the for bases for the
other positions. Nothing says the bases must be different.

+ 0.5 pts 5 ⋅ 4 4 not 4!

+ 0.3 pts Too high

+ 0.3 pts Too low

+ 0 pts Left blank


4.3 c 1.7 / 2 pts
+ 2 pts Correct: 8 ⋅ 4 7 − (4)4 2 . You can choose to have 0 to 7 bases before the block, then fill in the
2 ​

remaining 7 bases independently. This counts each strand as many times as it has ACTAG blocks.
Note that ACTAG blocks can't overlap since they start with A and end with a single G. But we do have
strands with two ACTAG blocks and 2 independently chosen bases, so we subtract their number:
We choose 2 positions out of 4 for the ACTAG blocks, and fill in the two bases.

+ 1.7 pts 4 ⋅ 4 4 is close. But you can have 0 to 4 bases before the block, so that is 5 options.

 + 1.7 pts Did not subtract (4)4 2


2

+ 0.3 pts Too high

+ 0.3 pts Too low

+ 0 pts Left blank

4.4 d 0.3 / 2 pts


+ 2 pts Correct: (12)2 12 : Choose 4 positions at which you can place A or T ; in the remaining 8 you'll place C
4
or G . That is two choices per position, independently.

+ 1.7 pts Your answer is close; you choose 4 positions, but you also have to choose A/T and C/G at all positions.

+ 0.3 pts Too high

 + 0.3 pts Too low

+ 0 pts Left blank

4.5 e 0.3 / 2 pts

+ 2 pts Correct: (9)2 12 .


4
Let's break that down. We start by choosing 4 A or T bases, 2 4 , then insert 3 C or G between them,
2 3 ways. Think of this as 3 AT/CG pairs, followed by an AT, and we have 5 CG bases, 2 5 , to insert into 5
5−1+5 9
gaps, where order doesn't matter and repeats are allowed. The multiset count ( 5 ) = (4) is what ​

we multiply by the 12 choices between 2 bases.

+ 1.7 pts is close.

+ 0 pts Click here to replace this description.

 + 0.3 pts Too high

+ 0.3 pts Too low

+ 0 pts Left blank


Question 5
S_n,k 0.5 / 2 pts
+ 2 pts Correct: Sn,k = {S ⊆ [1..n] ∣ k
​ = ∣S∣ = min(S)}
or Sn,k = {S ∈ Sn ∣ ∣S∣ = k} .
​ ​

Sn,k = {S ⊆ [k..n] ∣ k ∈ S ∧ k = ∣S∣} also works.


+ 1 pt You define a set of subsets, but enforce only one of the two conditions that k is the size or k is the min.

 + 0.5 pts You've reproduced the definition of Sn ​

+ 0.5 pts You complete Sn,k ​ = with a set of subsets of [1..n], or elements from Sn .​

+ 0.2 pts You are defining a number, you should define a set of sets.

+ 0.5 pts At least your number is the number of elements that should be in Sn,k . ​

+ 0.2 pts You are defining a logical condition; you should define a set of sets.

+ 0.2 pts Your attempt is mixing types or is incomplete and will not evaluate.

+ 0 pts Left blank

Feedback comments

+ 0 pts The question asks you to define a set of sets.

+ 0 pts You are choosing the sets from

− 0.5 pts Your quantifier is overwriting input values n or k .

− 0.2 pts Since Sn is a set of sets, you want to take an element of Sn , not a subset or an element of its power set.
​ ​

+ 0 pts You are restricting S ⊆ [1..k], when you need k and k − 1 numbers from (k..n].

+ 0 pts Your definition of Sn,k refers to Sn,k , which is not yet defined.
​ ​

+ 0 pts You are using two different variable names, often Sn and S , as if they refer to the same thing.
​ Sn is already

defined; S is not, so can be given a definition.


Question 6
chocolate bar 10 / 10 pts

6.1 n 1 / 1 pt

 + 1 pt Correct: n

+ 0.2 pts Attempted

+ 0 pts Left blank

6.2 1 1 / 1 pt

 + 1 pt Correct: 1, since we are to prove for n ≥ 1.

+ 0.2 pts Attempted

+ 0 pts Left blank

6.3 no breaks needed. 1 / 1 pt

 + 1 pt Correct: no breaks needed, b(C ) =0

+ 0.2 pts Attempted

+ 0 pts Left blank

+ 0.5 pts b is defined on chocolate bars, not numbers.

+ 0.5 pts Should be an assertion, not simply a number.

6.4 n>1 1 / 1 pt

 + 1 pt Correct: n > 1 , since bars with a single square were handfled in the base case.

+ 0.2 pts Attempted

+ 0 pts Left blank

+ 0.5 pts n = 1 is included in the base case.

+ 0.5 pts You should be using n here.

6.5 1 <= k < n 1 / 1 pt

 + 1 pt Correct: 1 ≤k<n

+ 0.5 pts 1 < k < n does not include the assumption about the base case, which you need anytime you break
off a single square.

+ 0.5 pts 0 ≤ k < n includes a base case that we don't prove. (and can't, since we can't have -1 breaks.)

+ 0.35 pts 1 ≤ k ≤ n Assumes that what you are proving in S7 is already known to be true.

+ 0.2 pts Attempted

+ 0 pts Left blank


6.6 k-1 1 / 1 pt

 + 1 pt Correct: k − 1 breaks, since our bar D has k squares.

+ 0.2 pts Attempted

+ 0 pts Left blank

6.7 n-1 1 / 1 pt

 + 1 pt Correct: n − 1 breaks, since we are back to bar C with n squares that we were given in S4.

+ 0.35 pts Remember that k has no value outside S5 unless we assign it one. So k − 1 is not correct.

+ 0.2 pts Attempted

+ 0 pts Left blank

6.8 m--1 0.75 / 0.75 pts

 + 0.75 pts Correct: m − 1 breaks, since breaking gave bar A with m squares. (Note 1 ≤ m < n so the IH
applies.)

+ 0.2 pts Attempted

+ 0 pts Left blank

6.9 n-m-1 0.75 / 0.75 pts

 + 0.75 pts Correct: n − m − 1 breaks, since breaking also gave bar B with n − m squares. (Note 1 ≤ n −
m < n so the IH applies.)

+ 0.2 pts Attempted

+ 0 pts Left blank

6.10 m-1 0.75 / 0.75 pts

 + 0.75 pts Correct: m − 1 breaks, since breaking gave bar A with m squares. (Note 1 ≤ m < n so the IH
applies.)

+ 0.5 pts Used n-m-1 here and m-1 in the next. This doesn't match the line above, so is harder to verify, but
does earn partial credit.

+ 0.2 pts Attempted

+ 0 pts Left blank


6.11 n-m-1 0.75 / 0.75 pts

 + 0.75 pts Correct: n − m − 1 breaks, since breaking also gave bar B with n − m squares. (Note 1 ≤ n −
m < n so the IH applies.)

+ 0.5 pts Used m-1 her and n-m-1 in the previous. This doesn't match the line above, so is harder to verify, but
does earn partial credit.

 + 0.2 pts Attempted

+ 0 pts Left blank

Question 7
Nim IH 1.5 / 2 pts

 + 2 pts Correct: 5th and 7th.

 − 0.5 pts The first, second, and 6th do not apply. Since players may take blocks from only one stack we don't wind up
with both stacks being smaller, only one.

+ 1 pt One correct

+ 0.5 pts One correct, one incorrect.

− 0.5 pts Deduction for additional incorrect answer

+ 0 pts n and m are the sizes of the stacks given in S4. The IH must make assumptions about smaller stacks, but not
about them.

+ 0 pts The base case must be included in the IH assumption.

Question 8
M(n) IH 0 / 1 pt
+ 1 pt Correct: We assume, for all 1 ≤ k < n that M (k) ≤ ck lg k + dk + e. This will use using values for c > 0 ,
d , and e that are chosen outside the induction proof "for all n ≥ 1 .

+ 0 pts The first is the definition of M, which is not what we are trying to prove by induction.

 + 0 pts Induction proves "for all" so we need to get specific values for c > 0 , d , and e before the induction begins,
and are not allowed to have them change during the induction.

+ 0.5 pts Did select the correct one, but also one incorrect.
Question 9
Competition 16.1 / 20 pts

9.1 tieless 2 / 2 pts

 + 2 pts Correct: ∀x,y∈T xBy → yBx


 ​

+ 1.25 pts Partial Credit: ∀u=x∈T


 xBu ⊕ uBx is not correct because it assumes the tournament is round
robin

+ 1.25 pts Partial Credit: your answer assumes the tournament is round robin

+ 1 pt Partial Credit: Saying ∀x,y∈T xBy ∧ yBx ∧ (x =


 y) is not correct. If you dropped the ∧(x =
​  y) it

would be correct

+ 1 pt Typo: you need to draw x, y from the set T of teams. (The set, B , contains pairs, so you could write
∀(x,y)∈B xBy → yBx  in this case, but it is better to quantify over the teams.

+ 0.75 pts Partial Credit: your answer assumes the tournament is round robin and doesn't take into account
that teams don't play themselves

+ 0.5 pts Partial Credit: Saying ∀x,y∈B xBy ∧ yBx ∧ (x =


 y) is not correct. If you dropped the ∧(x =
​  y) ​

and drew x, y from T instead of B , it would be correct

+ 0.5 pts Partial credit: Saying ∀x,y∈T x  = y ∧ ((xBy ∨ yBx) ⊕ (xBy ∧ yBx )) is not quite correct. Having
​ ​ ​

x= y ∧ ... makes the statement false whenever T has more than one team. Also, the ⊕ statement

should not be included because it makes the assumption that all teams play each other, which is not
part of the definition of tieless

+ 0.5 pts Partial Credit: {∀x,y∈T ∣xBy ⊕ yBx} is not correct because set builder notation shouldn't have a
forall on the left hand side. If you wrote this without the set builder notation and just had
∀x,y∈T xBy ⊕ yBx it would be pretty close but still not quite right because it assumes the
tournament is round robin

+ 0.5 pts Partial Credit: ∀x,y∈T (x = y) ∧ (xRy) ⊕ (yRx) is not quite correct. The x =

​  y should be in the

subscript of the ∀ so that the statement isn't automatically false for T with more than 1 team. The R
's should be B 's. The ⊕ assumes that the tournament is round robin

+ 0.25 pts Incorrect but no major syntax errors

+ 0 pts Incorrect. Saying ∀x,y∈T xBy ∨ yBx doesn't tell you that teams don't tie, and it doesn't account for the
case where x = y

+ 0 pts Incorrect. Saying ∀x=y∈T


 xBy ∧ yBx  assumes that for any pair of teams (x, y) you pick, the first

team in that pair wins and the second loses

+ 0 pts Incorrect. Saying ∀x=y∈T


 xBy ∨ yBx doesn't tell you that teams don't tie.

+ 0 pts Incorrect. Saying ∀x,y∈T xBy ∧ yBx means that no one wins

+ 0 pts Incorrect: Saying ∀x,y∈T (xBy ∧ yBx) ⟹ (x  y) isn't what you want because that statement is
=

true when two different teams beat each other.

+ 0 pts Incorrect

+ 0 pts blank
9.2 round robin 2 / 2 pts

 + 2 pts Correct: ∀x=y∈T


 xBy ∨ yBx

+ 2 pts ∀x,y∈T (xBy) ⊕ (yBx) ⊕ (xBy ∧ yBx))

+ 1.25 pts Partial Credit: ∀x,y∈T xBy ∨ yBx doesn't account for the x = y case

+ 1 pt Typo: ∀t,x∈T (tBv ∧ vBt) ⟹ (t = v) would be correct except you define an x in your quantifier, not
the v that you are using

+ 1 pt Typo: Everything is right except you should be drawing x, y from T .

+ 1 pt Partial credit: Saying ∀x,y∈T (x 


= y) ∧ (xBy ∨ yBx) is not fully correct. If you dropped the (x
​  y)∧
=

and instead put x =​ y in the subscript of the ∀ it would be correct.

+ 1 pt Partial Credit: Saying ∀x,y∈T (x = y) ⟹ (xBy ∨ xBy ) is not quite correct. Changing the xBy to

​ ​ ​

yBx would make it correct.

+ 0.75 pts Partial credit / Typo: Saying ∀x,y∈T (x 


= y) ∧ (xRy ∨ yRx) is not fully correct. If you dropped the

(x =
 y)∧ and instead put x =
​  y in the subscript of the ∀ and also changed the R's to B 's it would

be correct.

+ 0.75 pts Partial Credit: ∀t,u∈T (t = u) ∨ (tRu ⊕ uRt) is not quite correct. The R's should be B 's. Having
the ⊕ makes it so no two teams can both beat each other, which is not part of the definition of round
robin.

+ 0.5 pts Partial Credit / Typo: ∀x,y∈U xBy ∨ yBx is not quite correct. You are drawing from the set U instead
of T . You are also not accounting for the case where x = y

+ 0.5 pts Partial credit: Saying ∀x,y∈T x = y ∧ ((xBy ∨ yBx) ⊕ (xBy ∧ yBx)) is not quite correct. Having

x= y ∧ ... makes the statement false whenever T has more than one team. Also, the ⊕ statement

should not be included because it makes the assumption that no two teams beat each other, which is
not part of the definition of round robin

+ 0.5 pts Partial Credit: {∀x,y∈T ∣xBy ∨ yBx} is not correct because set builder notation shouldn't have a
forall on the left hand side. If you wrote this without the set builder notation and just had
∀x,y∈T xBy ∨ yBx it would be pretty close but still not quite right because it doesn't account for the
case where x = y

+ 0 pts Incorrect: Should be looking at pairs of teams, not groups of 3

+ 0 pts Incorrect: Saying ∀x,y∈T (xBy ∧ yBx) means that every team beats every other team.

+ 0 pts Incorrect: The statement ∀x,y∈T (xBy ⟹ yBx) is true if no teams play each other, but that isn't
what you want. If there are teams in T , but none of them play each other, you shouldn't call that a round
robin tournament.

+ 0 pts Blank

+ 0.25 pts Incorrect but no major syntax errors

+ 0 pts Incorrect
9.3 r bijection 0.3 / 2 pts

T → N is a bijection iff ∀y∈[1..n] ∃t∈T (r(t) = y) ∧


+ 2 pts Correct: Function r : ​ ​

(∀x∈T (r(x) = y) → (x = y)) .

+ 2 pts Correct: Since we have a function r : T → [1..n] where we know ∣T ∣ = ∣[1..n], it is enough to test
either that

r is a surjection ∀y∈[1..n] ∃x∈T r(x) = y, or


​ ​

r is an injection, ∀t,u∈T (r(t) = r(u)) → (t = u).


+ 0.75 pts Your answer is addressing the next question, and not the question being asked here.

+ 0.4 pts Your expression answers a different question than the one that was asked.

 + 0.3 pts Your expression does not involve the function r , so cannot test if r is a bijection.

+ 0.2 pts Incomplete or type error means that this cannot be evaluated.

+ 0 pts I'm lookng for a quantified logic expression about the function r.

Feedback comments

− 0.3 pts The function is r : T → N , but you are using undefined notation: f , or misusing T or B .

+ 0 pts Much clearer to use function notation, r(x) = y, than relation notation, xry, though it is possible.

 + 0 pts This question involves the ranking function r : T → [1..n] only. It does not involve the B relation.

+ 0 pts There is no < comparison operation between teams x, y ∈ T.

+ 0 pts You are using undefined variables or functions. (Often because quantifiers are missing.)

+ 0 pts We are told that r is a function. Your expressions assert that r is not. Thus they clearly don't say that r
is a bijection.

+ 0 pts You have an expression that is always true.

+ 0 pts You have an expression that is always false.

+ 0 pts We are told that r is a function. Your expression just restates that.
To show that r is a bijection, you want to show that the inverse relation, which includes a pair (y, x) iff
r(x) = y, is a function.

+ 0 pts Left blank


9.4 r ranking 2 / 2 pts

 + 2 pts Correct: Function r : T → N is a ranking for B iff ∀x,y∈T xBy → (r(x) < r(y)).

(We could limit this to testing only x =


 y, but since B is irreflexive, it is not necessary.)

+ 2 pts Correct: Using that B is round-robin, tieless, and comparability, it will also work to test
∀x,y∈T xBy ↔ (r(x) < r(y)) or ∀x,y∈T (r(x) < r(y)) → xBy.

+ 1.2 pts This could be made correct if the quantifiers were all "For all." (and maybe some ∧s change to → s.)

+ 1 pt Your expression is testing whether the relation B is transitive. This is a necessary condition for it to have
a ranking, but does not test whether a given r is a ranking.

+ 1 pt Partial credit for having a valid quantified statement about B and r that does evaluate to true or false.
(Even if it may be always true or always false.)

+ 0.8 pts Missing quantifiers

+ 0.5 pts You have a statement that does not involvethe function r .

+ 0.5 pts You have a statement that does not involve the beats relation, B .

+ 0.2 pts Incomplete or type error means that this cannot be evaluated.

Feedback comments

− 0.2 pts The function is r : T → N , but you are using undefined notation: f , indexed values r x , or crazier

things like x[r] or x i .


− 0.1 pts Rank is defined so that, for example, the rank 1 team beats all the rest. Your expression has high rank
numbers beating lower rank numbers.

+ 0 pts The ranking function r goes from teams to numbers, not the reverse.

+ 0 pts You are comparing teams with <, but that is not defined. You can check for teams x, y ∈ T if xBy or
compare ranks r(x) < r(y). The task is to show these comparisons are consistent.

+ 0 pts You are using undefined variables (often because quantifiers are missing) or sets (often R or A) or
functions/relations (often R or T().)

+ 0 pts Using AND with forall means that this is always false.

+ 0 pts This will always be FALSE

+ 0 pts This will always be TRUE

+ 0 pts Left blank


9.5 t top team 0.8 / 2 pts

 + 2 pts Correct: ∀x∈T ∖{t} tBx ∨ ∃y∈T tBy ∧ yBx


+ 1.8 pts Mostly Correct: ∀x∈T tBx ∨ ∃y∈T tBy ∧ yBx doesn't account for the case where x = t

+ 1.7 pts ∀x∈T tBx ∨ (xBt → (∃y∈T tBy ∧ yBx )) is correct if the competition is tieless and round-robin.
However it also consider t to top any teams it hasn't played.

+ 1.7 pts Your expression is correct assuming round robin

+ 1.5 pts close: your solution is ∀x∈T ∃u∈T xBt ∨ (tBu ∧ uBt ∧ u  x). Changing it to ∀x∈T ∃u∈T tBx ∨
=
​ ​ ​

(tBu ∧ uBx ∧ u =  x) would make it correct


Your expression would be correct/mostly correct if you addressed the following mistakes

− 0.3 pts Either correct or mostly correct but you define a variable such as x and treat it as the top team rather
than using the t you were given

− 0.3 pts Either correct or mostly correct but you use (x = t)∧. Your expression becomes false whenever x is

t. So you should move that to the subscript of the quantifier where you define x .

− 1 pt You could alter your solution to use a ∀ for one variable and a ∃ for the other to make it correct or
mostly correct

+ 0 pts Because you use (x =  t)∧, your expression becomes false whenever x is t. So you should move that

to the subscript of the quantifier where you define x .

+ 0.25 pts Incorrect but no major syntax errors

+ 0 pts Blank

+ 0 pts Incorrect: incomplete/missing quantifiers/ or cannot evaluate

Correct Feedback Items

+ 0 pts Correct Quantifiers

+ 0 pts Handles the x = t case

+ 0 pts the expression you use inside of your quantifiers is correct

Incorrect Feedback Items

− 0.3 pts Either correct or mostly correct but you overwrite t

− 0.3 pts Your expression overwrites t

 − 1 pt Incorrect Quantifiers. It would make sense to have a ∀ and then a ∃

 − 0.2 pts Doesn't account for x =t


− 0.1 pts Your expression assumes round robin and/or tieless

+ 0 pts The expression inside your quantifiers is incorrect

Expression Feedback

+ 0 pts Incorrect: your expression doesn't use t

+ 0 pts Incorrect: your expression is always false

+ 0 pts Incorrect: your expression says some t beats everything / your expression says everything loses to
someone

+ 0 pts You use variables without defining them

− 0.5 pts Incorrect: As we saw in the final review slides, ∀u,x (u = t) ∨ (tBu) ∨ (xBu → tBx) can be false
when there does exist a top team in the tournament

+ 0 pts Incorrect: this is transitivity

+ 0 pts Incorrect: wrong question

9.6 irreflexive 1 / 1 pt

 + 1 pt Correct: b If teams never play themselves or beat or tie themselves, then we have, ∀x∈T  , so the
xBx
beats relation B is irreflexive.

+ 0.2 pts Attempted

+ 0 pts Left blank

9.7 Antisymmetric 1 / 1 pt

 + 1 pt Correct: C When there are no ties, then for all ∀x,y∈T (x 


= y) → (xBy
​  ∨ yBx)
 , so the beats relation
​ ​

B is anti-symmetric.

+ 0.3 pts We already knew irreflexive.

+ 0.25 pts Attempted

+ 0.1 pts Symmetric is almost the opposite of tieless. It says that whenever two teams play they tie. (It is not
the real opposite, because neither forces two teams to play -- that is the next condition.)

+ 0 pts Left blank


9.8 Comparability 1 / 1 pt

 + 1 pt Correct: C When tieless round-robin means ∀x,y∈T (x = y) ∨ (xBy ∨ yBx), so the beats relation B
is a Comparability relation.

+ 0.45 pts Anti-symmetric is true, but we learn that from "tieless", not from adding "round-robin".

+ 0.4 pts Transitive was a common answer, but that would require that ∀x,y,z∈T
(xBy ∧ yBz) → xBz . That
is, we can have no cycles where xBy ∧ yBz ∧ zBx . These are the tournaments with a ranking
function.

+ 0.35 pts If a tournament is not round robin (like the single or even double elimination tournaments for most
college championships), then not every pair of teams have to play each other. So learning it is round
robin does add information.

+ 0.3 pts Partial order would require transitive to also be added, but we don't have that assurance.

+ 0.2 pts Attempted

+ 0 pts Left blank


9.9 matches 1 / 1 pt

 + 1 pt Correct: There are at most (n) games.


2

+ 0.9 pts ∑ 1≤i≤ (n − i) = ∑ 0≤i<n i is correct, but the closed form of (n2) is preferred. (For one thing, the
​ ​

sum has far more opportunities to be written incorrectly.)

+ 0.6 pts This is asking only for the number of games, not their possible outcomes or possibe relations with
n
specific properties (which are the next two questions.) Some credit that ( 2 ) = n(n − 1)/2 appears
in your answer.

+ 0.4 pts P (n, 2) = n(n − 1) counts tuples (a, b) and (b, a) as different, so is double-counting. n2 also
includes (a, a) . That is why we want to count not permutations or tuples but sets, with no repeats and
where order does not matter.

+ 0.4 pts n − 1 is the maximum for one team, but you were asked for "the maximum number of games in a
competition with n teams"

+ 0.3 pts Factorials or exponentials give answers that are far too large.

+ 0.3 pts Too high

+ 0.3 pts Too low

+ 0 pts Left blank

Feedback comments

+ 0.2 pts Your answer does not depend on the number of teams, n.

+ 0 pts Your answer is not an integer.

+ 0 pts Answer seems to be missing parentheses

− 0.4 pts sum error: Using n as the summation variable overwrites the value for n given as input.

− 0.3 pts sum error: Your summation range is too large, giving an incorrect result.

− 0.2 pts sum error: You are double counting by summing over n − 1 rather than n − i or i. Once a game is
counted for the first team, it should not be counted for the second team.

− 0.2 pts sum error: summation variable not specified.


9.10 outcomes 2 / 2 pts

 + 2 pts (n) = 2 n(n−1) different relations that are irreflexive. Each one is a possible
Correct: There are 4 2
competition outcome.

2 2
+ 1.8 pts 2n = 4n /2 would be correct to count the number of relations, but in a competition, no team plays

itself.

+ 1.7 pts Your answer is incorrect because it is based on your answer to (e). This would be correct if you did
the same transformation to a correct answer to (e).

+ 1.5 pts
3 (2) counts the irreflexive, anti-symmetric relations, which is what we would have if we added
n

"tieless".
2 n 3 (2) counts the anti-symmetric relations.
n

+ 0.6 pts 2P (n, 2) = 2n(n − 1) would be adding the choices instead of multiplying: that corresponds to
picking on e pair and making the choice of one of the 4 outcomes. We need to make simultaneous,
independent choices, so the product rule applies.

+ 0.5 pts The count 4 n is too low. We decide for each pair of teams, not for each team. 2 n is even lower.

+ 0.3 pts Too high

+ 0.3 pts Too low

+ 0 pts Left blank

Feedback comments

+ 0.2 pts Your answer does not depend on the number of teams, n.

+ 0 pts Your answer is not an integer.

+ 0 pts Answer seems to be missing parentheses

+ 0 pts sum error: summation variable not specified.


9.11 tieless round robin 2 / 2 pts

 + 2 pts (n)
Correct: There are 2 2 = 2 n(n−1)/2 different relations that can come from tieless, round-robin
competitions (FYI: They are irreflexive, anti-symmetric, comparability relations.).

2 2
+ 1.5 pts 2n = 4n /2 would be correct to count the number of relations, so overcounts here.

+ 1.7 pts Your answer is incorrect because it is based on your answer to (e). This would be correct if you did
the same transformation to a correct answer to (e).

+ 1.5 pts
3 (2) counts the irreflexive, anti-symmetric relations, which is what we would have if we added
n

"tieless".
2 n 3 (2) counts the anti-symmetric relations.
n

+ 0.6 pts P (n, 2) = n(n − 1) would be adding the choices instead of multiplying: that corresponds to picking
on e pair and making the choice of one of the 2 outcomes. We need to make simultaneous,
independent choices, so the product rule applies.

+ 0.5 pts The count 2 n is too low. We decide for each pair of teams, not for each team.

+ 0.5 pts n! would answer the next question, when we add the restriction that top ranked teams beat teams
that have worse rankings. Here you can have upsets, so n! is too small.

+ 0.3 pts Too high

+ 0.3 pts Too low

+ 0 pts Left blank

Feedback comments

+ 0.2 pts Your answer does not depend on the number of teams, n.

+ 0 pts Your answer is not an integer.

+ 0 pts Answer seems to be missing parentheses

+ 0 pts sum error: summation variable not specified.


9.12 rankings 1 / 2 pts

+ 2 pts Correct: There are n! bijections that can be ranking function r : T → [1..n]. Each ranking gives a
different competition.

 + 1 pt
2 (2) = 2 n(n−1)/2 is the total number of tieless, round -robin competitions. The number that have
n

rankings, n! is much smaller.

+ 0.4 pts Too high

+ 0.4 pts Too low

+ 0 pts Left blank

Feedback comments

+ 0.3 pts Your answer does not depend on the number of teams, n.

+ 0.2 pts Your notation is incomplete or mixing types and not producing a number.

+ 0 pts Answer seems to be missing parentheses

+ 0 pts Your answer is not an integer.


Question 10
Heads/tails 1.7 / 3 pts

10.1 S_1=2 1 / 1 pt

 + 1 pt Correct: HT and TH are the S1 ​ = 2 ways.

+ 0 pts Left blank

+ 0 pts You were asked to draw the ways to line up 1 head and one tail; there should be two ways in your
picture.

+ 0.3 pts You seem to assumed that the coins can be distinguished, which would be P (2n, n) not (2n).
n ​

10.2 2(2n-1) S_{n-1} 0.7 / 2 pts


+ 2 pts Explains why 2(2n − 1)Sn−1 also counts the ways to line up n heads and n tails with the first coin

shiny and an opposite coin shiny.

Sn−1 counts the ways to line up n − 1 dull heads and n − 1 dull tails.

Independently we place our shiny first coin, deciding if it is a head or tail,


We then insert the second shiny coin, showing the opposite face, after any of the 2n − 1 coins.
By the product rule, there are 2(2n − 1)Sn−1 wasy to do this.

+ 1.5 pts Pretty complete answer, but doesn't explain why a specific value it mentions, like 2n − 1 , is used
instead of, say, 2(n − 1).

+ 1 pt Understood the question, though the answer is incompletely described.

 + 0.7 pts Relevant facts about the product rule, but does not explain why the 2 and why the 2n − 1 .

+ 0.7 pts Did algebra to show that n(2n) = 2(2n − 1)(2(n−1)). The question is asking for a combinatorial
n n−1 ​

proof by showing that both expressions count the same set of coin line-ups.

+ 0.2 pts Attempt is not addressing the question.

+ 0 pts Should answer for a general n, not just a small example.

+ 0 pts You have an = sign between two expressions that are not equal.

+ 0 pts Left blank


Question 11
Binary search 12 / 12 pts

11.1 x<1.1, W 3 / 3 pts

 + 3 pts Correct: When x < 1.1 , the search will return a Wrong index: 1 when it should return 0, because the
initial invariant x ∈ [A[lo], A[hi]) will not hold.
For all other x everything works.

+ 1.5 pts Correct that the problem is Wrong index, but that can happen only when the value of x < 1.1

+ 1 pt Correct that the problematic values are x < 1.1 . All others will return correctly.

+ 0.5 pts Attempted, but the search will actually work correctly for your value of x .

+ 0.5 pts Didn't specify an input value for x , and the outcome you did specify cannot happen.

+ 0 pts Left blank

11.2 any, I 3 / 3 pts

 + 3 pts Correct: Because lo < hi is an invariant, no matter what the value of x , this test will always be true.
This while loop is an Infinite loop.

+ 2 pts Correct that the problem is an infinite loop. You didn't specify a value, but in fact any value works.

+ 1 pt All the invariants are satisfied; this function just will never return.

+ 0.5 pts Didn't specify an input value for x , and the outcome you did specify cannot happen.

+ 0 pts Left blank

11.3 5.5, W 3 / 3 pts

 + 3 pts Correct: When x = 3.3 or x = 5.5 , the search will return a Wrong index, 2 or 4, respectively. It
should return 3 or 6, as those are the indices satisfying A[i] ≤ x < A[i + 1] for those values.
For all other x everything works.

+ 1.5 pts Correct that the problem is Wrong index, but that can happen only when the value of x ∈ {3.3, 5.5}
because those are not only repeated, but the search first looks at an early occurrence rather than the
last occurrence.

+ 1 pt Correct that the problematic values are x ∈ {3.3, 5.5} . All others will return correctly.

+ 0.5 pts Attempted, but the search will actually work correctly for your value of x .

+ 0.5 pts Didn't specify an input value for x , and the outcome you did specify cannot happen.

+ 0 pts Left blank


11.4 1.1, I 3 / 3 pts

 + 3 pts Correct: When x is any of the values in the array A, the search will reach x = A[mid] and will stop
updating lo or hi. This will be an Infinite loop.

+ 1.5 pts Correct that the problem is an infinite loop, but that can happen only when the value of x is in the
array A. The search will return the correct result for any x not in A.

+ 1 pt Correct that the problematic values for x are the numbers in A. For these it will never return.

+ 0.5 pts Attempted, but the search will actually work correctly for your value of x .

+ 0.5 pts Didn't specify an input value for x , and the outcome you did specify cannot happen.

+ 0 pts Left blank

Question 12
HC pledge 0 / 0 pts

 + 0 pts Acknowledged

− 83 pts Did not sign HC pledge.

You might also like