diff --git a/src/content/questions/comp2804/2019-fall-final/3/solution.md b/src/content/questions/comp2804/2019-fall-final/3/solution.md index ceb86120..7c3d33e1 100644 --- a/src/content/questions/comp2804/2019-fall-final/3/solution.md +++ b/src/content/questions/comp2804/2019-fall-final/3/solution.md @@ -15,6 +15,9 @@ Let's break me down The remaining 40 positions can be any of the 2 letters: $ 2^{40} $
Thus, the total number of strings is $ \binom{85}{15} \cdot \binom{70}{30} \cdot 2^{40} $ -Now, we can determine $A \cup B$ -$ |A \cup B| = |A| + |B| - |A \cap B| $ + +Now, we can determine $A \cup B$ + +$ |A \cup B| = |A| + |B| - |A \cap B| $ + $ |A \cup B| = \binom{85}{15} \cdot 3^{70} + \binom{85}{30} \cdot 3^{55} - \binom{85}{15} \cdot \binom{70}{30} \cdot 2^{40} $ diff --git a/src/content/questions/comp2804/2019-fall-final/4/solution.md b/src/content/questions/comp2804/2019-fall-final/4/solution.md index 808d329d..1c5ab80a 100644 --- a/src/content/questions/comp2804/2019-fall-final/4/solution.md +++ b/src/content/questions/comp2804/2019-fall-final/4/solution.md @@ -14,6 +14,9 @@ Let's do this uwu We choose 12 of the 50 cider bottles: $ \binom{50}{12} $
$|A \cap B| = \binom{20}{12} \cdot \binom{50}{12} $ -Now, we can determine $A \cup B$ -$ |A \cup B| = |A| + |B| - |A \cap B| $ + +Now, we can determine $A \cup B$ + +$ |A \cup B| = |A| + |B| - |A \cap B| $ + $ |A \cup B| = \binom{20}{12} \cdot 2^{50} + \binom{50}{12} \cdot 2^{20} - \binom{20}{12} \cdot \binom{50}{12} $ diff --git a/src/content/questions/comp2804/2019-fall-final/5/solution.md b/src/content/questions/comp2804/2019-fall-final/5/solution.md index f642158f..911d3caf 100644 --- a/src/content/questions/comp2804/2019-fall-final/5/solution.md +++ b/src/content/questions/comp2804/2019-fall-final/5/solution.md @@ -14,6 +14,9 @@ We choose any subset of the 50 cider bottles: $ 2^{50} $
$ |C| = \binom{20}{2} \cdot 2^{50} = 190 \cdot 2^{50} $ -Now, we can determine the number of subsets that contain at least 3 beer bottles -$ |S| - |A| - |B| - |C| $ + +Now, we can determine the number of subsets that contain at least 3 beer bottles + +$ |S| - |A| - |B| - |C| $ + $ = 2^{70} - 2^{50} - 20 \cdot 2^{50} -\binom{20}{2} \cdot 2^{50} $ diff --git a/src/content/questions/comp2804/2019-fall-final/7/solution.md b/src/content/questions/comp2804/2019-fall-final/7/solution.md index 845a2326..d82a8602 100644 --- a/src/content/questions/comp2804/2019-fall-final/7/solution.md +++ b/src/content/questions/comp2804/2019-fall-final/7/solution.md @@ -12,6 +12,9 @@ Assuming you have a sea of bananas, let's put dividers to split them off into di
  • $x_6$ is the number of bananas between the fifth and sixth divider
  • $x_7$ is the number of bananas to the right of the sixth divider -Now, we have 6 dividers and 25 bananas, so we have 31 objects in total + +Now, we have 6 dividers and 25 bananas, so we have 31 objects in total + Since each object has a position, we can just move the dividers around to change any x. + We choose 6 spots out of the 31 to be dividers: $ \binom{31}{6} $ diff --git a/src/content/questions/comp2804/2019-winter-midterm/11/solution.md b/src/content/questions/comp2804/2019-winter-midterm/11/solution.md index bb369072..e4e91d5d 100644 --- a/src/content/questions/comp2804/2019-winter-midterm/11/solution.md +++ b/src/content/questions/comp2804/2019-winter-midterm/11/solution.md @@ -1,13 +1,7 @@ -textbf{Plaintext Question:} The function $ f: \mathbb{N} rightarrow \mathbb{N} $ -is recursively defined as follows: -$ f(0) = 6, $ -$ f(n) = 4 \cdot f(n-1) + 2^{n} \text{ if } n geq 1. $ -Which of the following is true for all integers $ n geq 0 $? -textbf{Correct Answer: } B -textbf{Relevant Theorems: } Recursive Functions (4.1) -textbf{Explanation: } -We can find the first few values of $ f(n) $ to find a pattern: +We can find the first few values of $ f(n) $ to find a pattern: + $ f(1) = 4 \cdot f(0) + 2^1 = 4 \cdot 6 + 2 = 26 $ + $ f(2) = 4 \cdot f(1) + 2^2 = 4 \cdot 26 + 4 = 108 $ + Thus, the correct answer is $ f(n) = 7 \cdot 4^{n} - 2^{n} $.