diff --git a/src/content/questions/comp2804/2018-winter-final/1/solution.md b/src/content/questions/comp2804/2018-winter-final/1/solution.md
index d213aff1..801aa4a5 100644
--- a/src/content/questions/comp2804/2018-winter-final/1/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/1/solution.md
@@ -1,3 +1,5 @@
Let's choose 12 beer bottles out of the 20: $ \binom{20}{12} $
+
Let's choose 18 cider bottles out of the 50: $ \binom{50}{18} $
+
$ \binom{20}{12} \cdot \binom{50}{18} $
diff --git a/src/content/questions/comp2804/2018-winter-final/10/solution.md b/src/content/questions/comp2804/2018-winter-final/10/solution.md
index 4d9de464..9023aeae 100644
--- a/src/content/questions/comp2804/2018-winter-final/10/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/10/solution.md
@@ -1,8 +1,15 @@
-On SundayEveningExam$ (n) $, the line \enquote{I don't like Sunday evening exams} is printed n times
-On SundayEveningExam$ (n-1) $, the line \enquote{I don't like Sunday evening exams} is printed n-1 times
-On SundayEveningExam$ (n-2) $, the line \enquote{I don't like Sunday evening exams} is printed n-2 times
-...
-On SundayEveningExam$ (1) $, the line \enquote{I don't like Sunday evening exams} is printed 1 time
+On SundayEveningExam$ (n) $, the line \enquote{I don't like Sunday evening exams} is printed n times
+
+On SundayEveningExam$ (n-1) $, the line \enquote{I don't like Sunday evening exams} is printed n-1 times
+
+On SundayEveningExam$ (n-2) $, the line \enquote{I don't like Sunday evening exams} is printed n-2 times
+
+...
+
+On SundayEveningExam$ (1) $, the line \enquote{I don't like Sunday evening exams} is printed 1 time
+
$ P(n) = n + (n-1) + (n-2) + \text{...} + 1$
+
Using the 1st Formula given on the Exam Sheet, it translates the above to the following:
+
$ P(n) = \frac{n(n+1)}{2} $
diff --git a/src/content/questions/comp2804/2018-winter-final/11/solution.md b/src/content/questions/comp2804/2018-winter-final/11/solution.md
index 88cd6d6e..bc078cff 100644
--- a/src/content/questions/comp2804/2018-winter-final/11/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/11/solution.md
@@ -1,6 +1,11 @@
First, we choose which 3 of the 18 rolls are 5: $ \binom{18}{3} $
-We also need to calculate the prbability of rolling a 5 exactly 3 times: ${( \frac{1}{6})}^3 $
-We also need to calculate the probability of not rolling a 5 exactly 15 times: ${( \frac{5}{6})}^{15} $
+
+We also need to calculate the prbability of rolling a 5 exactly 3 times: ${( \frac{1}{6})}^3 $
+
+We also need to calculate the probability of not rolling a 5 exactly 15 times: ${( \frac{5}{6})}^{15} $
+
$ \binom{18}{3} \cdot {( \frac{1}{6})}^3 \cdot {( \frac{5}{6})}^{15} $
+
$ = \binom{18}{3} \cdot ( \frac{1^3}{6^3}) \cdot ( \frac{5^{15}}{6^{15}}) $
+
$ = \binom{18}{3} \cdot \frac{5^{15}}{6^{18}} $
diff --git a/src/content/questions/comp2804/2018-winter-final/12/solution.md b/src/content/questions/comp2804/2018-winter-final/12/solution.md
index e59b8aeb..82e79f3d 100644
--- a/src/content/questions/comp2804/2018-winter-final/12/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/12/solution.md
@@ -1,4 +1,7 @@
To guarantee that a string is a palindrome in this case, we have to ensure that the first half of the string matches the second half (but reversed).
+
At each position in the "half of the string", there is a $\frac{1}{3}$ chance that the corresponding character in the other half of the string is the same since there are 3 character options (a, b, c) and only 1 of those can match.
+
Since the string is an odd integer, half of a string would be: $\frac{n-1}{2}$. So if $n = 3$, then half of the string would be $\frac{3-1}{2} = 1$. This makes sense, as we would check if the 1st and last character are the same, and the 2nd character we know would already be the same as itself.
+
This means that the total probability a string is a palindrome is: $( \frac{1}{3})^{n-1/2}$
diff --git a/src/content/questions/comp2804/2018-winter-final/13/solution.md b/src/content/questions/comp2804/2018-winter-final/13/solution.md
index 7b5cf444..642bcb44 100644
--- a/src/content/questions/comp2804/2018-winter-final/13/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/13/solution.md
@@ -17,7 +17,11 @@
$ |A \cap B| = 15 $
$ Pr(A \cap B) = \frac{15}{32} $
-$ Pr(A|B) = \frac{Pr(A \cap B)}{Pr(B)} $
-$ Pr(A|B) = \frac{ \frac{15}{32}}{ \frac{1}{2}} $
-$ Pr(A|B) = \frac{15}{32} \cdot 2 $
+
+$ Pr(A|B) = \frac{Pr(A \cap B)}{Pr(B)} $
+
+$ Pr(A|B) = \frac{ \frac{15}{32}}{ \frac{1}{2}} $
+
+$ Pr(A|B) = \frac{15}{32} \cdot 2 $
+
$ Pr(A|B) = \frac{15}{16} $
diff --git a/src/content/questions/comp2804/2018-winter-final/14/solution.md b/src/content/questions/comp2804/2018-winter-final/14/solution.md
index 3220cd77..e0928c3f 100644
--- a/src/content/questions/comp2804/2018-winter-final/14/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/14/solution.md
@@ -1,9 +1,17 @@
The difference in string $a-b$ is non-zero at each position only if $a_i$ is 1 and $b_i$ is 0 or $a_i$ is 0 and $b_i$ is 1, for all $1 leq i leq 77$
+
Let $X_i$ be 1 if $a_i$ and $b_i$ are different and 0 otherwise
+
$ Pr(X_i = 1) = \frac{1}{4} \cdot \frac{3}{4} + \frac{3}{4} \cdot \frac{1}{4} $
+
$ Pr(X_i = 1) = \frac{3}{16} + \frac{3}{16} $
+
$ Pr(X_i = 1) = \frac{6}{16} $
+
$ Pr(X_i = 1) = \frac{3}{8} $
+
The probability that each element in the string is non-zero is the probability that each element is different
+
$ \frac{3}{8} \cdot \frac{3}{8} \cdot \text{...} \cdot \frac{3}{8} $
+
$ = {( \frac{3}{8})}^{77} $
diff --git a/src/content/questions/comp2804/2018-winter-final/15/solution.md b/src/content/questions/comp2804/2018-winter-final/15/solution.md
index cbf950b3..f9742822 100644
--- a/src/content/questions/comp2804/2018-winter-final/15/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/15/solution.md
@@ -20,8 +20,13 @@ We'll take a slow and systematic approach to this question
$ |A \cap B| = 1 \cdot 2 = 2 $
$ Pr(A \cap B) = \frac{2}{16} = \frac{1}{8} $
-Now, let's check whether it's independent
-$ Pr(A \cap B) = Pr(A) \cdot Pr(B) $
-$ \frac{1}{8} = \frac{1}{4} \cdot \frac{1}{4} $
-$ \frac{1}{8} = \frac{1}{16} $
+
+Now, let's check whether it's independent
+
+$ Pr(A \cap B) = Pr(A) \cdot Pr(B) $
+
+$ \frac{1}{8} = \frac{1}{4} \cdot \frac{1}{4} $
+
+$ \frac{1}{8} = \frac{1}{16} $
+
Since the two sides are not equal, the events are not independent
diff --git a/src/content/questions/comp2804/2018-winter-final/16/solution.md b/src/content/questions/comp2804/2018-winter-final/16/solution.md
index 56c1539f..a1f7f32d 100644
--- a/src/content/questions/comp2804/2018-winter-final/16/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/16/solution.md
@@ -22,8 +22,13 @@ We'll take a slow and systematic approach to this question
$ |A \cap B| = 1 $
$ Pr(A \cap B) = \frac{1}{32} $
-Now, let's check whether it's independent
-$ Pr(A \cap B) = Pr(A) \cdot Pr(B) $
-$ \frac{1}{32} = \frac{1}{8} \cdot \frac{13}{16} $
-$ \frac{1}{32} = \frac{13}{128} $
+
+Now, let's check whether it's independent
+
+$ Pr(A \cap B) = Pr(A) \cdot Pr(B) $
+
+$ \frac{1}{32} = \frac{1}{8} \cdot \frac{13}{16} $
+
+$ \frac{1}{32} = \frac{13}{128} $
+
Since the two sides are not equal, the events are not independent
diff --git a/src/content/questions/comp2804/2018-winter-final/17/solution.md b/src/content/questions/comp2804/2018-winter-final/17/solution.md
index d1cc250c..5ff9c0dc 100644
--- a/src/content/questions/comp2804/2018-winter-final/17/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/17/solution.md
@@ -1,4 +1,7 @@
Let S be the total number of ways to choose a permutation from a set of size $2n$: $2n!$
+
For the first element and the last element in the permutation are even integers, we have to choose 2 even numbers. There are two ways to rearrange the 2 even numbers: $\binom{n}{2} \cdot 2$
+
For the remaining positions in the permutation, we have $(2n-2)!$ ways to rearrange these numbers: $(2n-2)!$.
+
$Pr(A) = \frac{|A|}{|S|} = \frac{\binom{n}{2} \cdot 2 \cdot (2n-2)!}{2n!} = \frac{ \frac{n!}{2!(n-2)!} \cdot 2 \cdot (2n-2)!}{2n!} = \frac{n(n-1)}{2n(2n-1)} = \frac{n-1}{2(2n-1)}$
diff --git a/src/content/questions/comp2804/2018-winter-final/18/solution.md b/src/content/questions/comp2804/2018-winter-final/18/solution.md
index 62dbfbaf..50006182 100644
--- a/src/content/questions/comp2804/2018-winter-final/18/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/18/solution.md
@@ -11,6 +11,9 @@ $ { (0, 0), (0, 1), (1, 0), (1, 1) } $
For $ (1,1) $, the minimum value is 1
There is a $ \frac{1}{4} $ chance of this happening
-$ \mathbb{E}(Z) = 0 \cdot \frac{1}{4} + 0 \cdot \frac{1}{4} + 0 \cdot \frac{1}{4} + 1 \cdot \frac{1}{4} $
-$ \mathbb{E}(Z) = 0 + 0 + 0 + \frac{1}{4} $
+
+$ \mathbb{E}(Z) = 0 \cdot \frac{1}{4} + 0 \cdot \frac{1}{4} + 0 \cdot \frac{1}{4} + 1 \cdot \frac{1}{4} $
+
+$ \mathbb{E}(Z) = 0 + 0 + 0 + \frac{1}{4} $
+
$ \mathbb{E}(Z) = \frac{1}{4} $
diff --git a/src/content/questions/comp2804/2018-winter-final/19/solution.md b/src/content/questions/comp2804/2018-winter-final/19/solution.md
index 5792fb22..3817cca4 100644
--- a/src/content/questions/comp2804/2018-winter-final/19/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/19/solution.md
@@ -1,10 +1,19 @@
Let $X_i$ be 1 if $b_i \cdot b_{i+1} = 0$ and 0 otherwise. This only happens if a pair of consecutive bits contain a 0.
+
$ Pr(X*i = 1) = Pr{(b_i = 0 \text{ and } b*{i+1} = 1)} + Pr{(b*i = 1 \text{ and } b*{i+1} = 0)} + Pr{(b*i = 0 \text{ and } b*{i+1} = 0)} $
-$ Pr(X*i = 1) = \frac{1}{2} \cdot \frac{1}{2} + \frac{1}{2} \cdot \frac{1}{2} + \frac{1}{2} \cdot \frac{1}{2} $
+
+$ Pr(X\*i = 1) = \frac{1}{2} \cdot \frac{1}{2} + \frac{1}{2} \cdot \frac{1}{2} + \frac{1}{2} \cdot \frac{1}{2} $
+
$ Pr(X_i = 1) = \frac{1}{4} + \frac{1}{4} + \frac{1}{4} $
+
$ Pr(X_i = 1) = \frac{3}{4} $
+
Since the last bit has no bit after it, we only take into account the first $n-1$ bits
+
$ \mathbb{E}(X) = \sum*{k=1}^{n-1} 1 \cdot Pr(X*i = 1) $
-$ \mathbb{E}(X) = \sum*{k=1}^{n-1} \frac{3}{4} $
+
+$ \mathbb{E}(X) = \sum\*{k=1}^{n-1} \frac{3}{4} $
+
$ \mathbb{E}(X) = \frac{3}{4} \cdot (n-1) $
+
$ \mathbb{E}(X) = \frac{3(n-1)}{4} $
diff --git a/src/content/questions/comp2804/2018-winter-final/2/solution.md b/src/content/questions/comp2804/2018-winter-final/2/solution.md
index aecc216a..56bf66ff 100644
--- a/src/content/questions/comp2804/2018-winter-final/2/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/2/solution.md
@@ -13,6 +13,9 @@
First, choose 12 cider bottles out of the 50: $ \binom{50}{12} $
$ |B \cap C| = \binom{20}{12} \cdot \binom{50}{12} $
-Now, we can find $ B \cup C $
-$ |B \cup C| = |B| + |C| - |B \cap C| $
+
+Now, we can find $ B \cup C $
+
+$ |B \cup C| = |B| + |C| - |B \cap C| $
+
$ |B \cup C| = \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/2018-winter-final/20/solution.md b/src/content/questions/comp2804/2018-winter-final/20/solution.md
index a8c9ae51..5892f57e 100644
--- a/src/content/questions/comp2804/2018-winter-final/20/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/20/solution.md
@@ -1,9 +1,17 @@
Let $X_i$ be 1 if $C$ is not at position 1 and 2 if $C$ is at position 1
-$ Pr(X*i=1) = Pr(\text{$B_i$ is at position 1}) = \frac{1}{n+1} $
+
+$ Pr(X\*i=1) = Pr(\text{$B_i$ is at position 1}) = \frac{1}{n+1} $
+
$ Pr(X_i=2) = Pr(\text{$C$ is at position 1}) = \frac{1}{n+1} $
+
$ \mathbb{E}(X) = \sum*{k=2}^{n+1} 1 \cdot Pr(X*i=1) + 2 \cdot Pr(X_i=2) $
-$ \mathbb{E}(X) = \sum*{k=2}^{n+1} 1 \cdot \frac{1}{n+1} + 2 \cdot \frac{1}{n+1} $
+
+$ \mathbb{E}(X) = \sum\*{k=2}^{n+1} 1 \cdot \frac{1}{n+1} + 2 \cdot \frac{1}{n+1} $
+
$ \mathbb{E}(X) = \sum\_{k=2}^{n+1} \frac{1}{n+1} + \frac{2}{n+1} $
+
$ \mathbb{E}(X) = (n+1-2) \cdot ( \frac{1}{n+1} + \frac{2}{n+1})$
+
$ \mathbb{E}(X) = \frac{n+1-2+1+2}{n+1} $
+
$ \mathbb{E}(X) = \frac{n+2}{n+1} $
diff --git a/src/content/questions/comp2804/2018-winter-final/21/solution.md b/src/content/questions/comp2804/2018-winter-final/21/solution.md
index aa55ee03..105ea739 100644
--- a/src/content/questions/comp2804/2018-winter-final/21/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/21/solution.md
@@ -1,5 +1,7 @@
For $X$ and $Z$ to be independent, $Pr(X = x \cap Z = z) = Pr(X = x) \cdot Pr(Z = z)$, for all real numbers $x$ and $z$, by definition of independent random variables.
+
If we can find a counterexample, aka where $Pr(X = x \cap Z = z) neq Pr(X = x) \cdot Pr(Z = z)$, then we know the two are not independent.
+
Let $z = 0$, $x = 0$ and $y = 0$:
@@ -8,11 +10,14 @@ Let $z = 0$, $x = 0$ and $y = 0$:
- $Pr(Z = 0) = Pr(X \cdot Y = 0) = Pr(X = 0 \cap Y = 0) + Pr(X = 0 \cap Y = 1) + Pr(X = 1 \cap Y = 0) = ( \frac{1}{2} \cdot \frac{1}{2}) + ( \frac{1}{2} \cdot \frac{1}{2}) + ( \frac{1}{2} \cdot \frac{1}{2}) = \frac{3}{4}$
- $Pr(X = 0 \cap Z = 0) = Pr(X = 0 \cap Y = 0) + Pr(X = 0 \cap Y = 1) = \frac{1}{2}$
+
Now we check if LHS = RHS for the expression:
+
- $Pr(X = x \cap Z = z) = Pr(X = x) \cdot Pr(Z = z)$
- $Pr(X = 0 \cap Z = 0) = Pr(X = 0) \cdot Pr(Z = 0)$
- $\frac{1}{2} = \frac{1}{2} \cdot \frac{3}{4}$
- $\frac{1}{2} neq \frac{3}{8}$
+
Since LHS is not equal to RHS, then the events $X$ and $Z$ are not independent.
diff --git a/src/content/questions/comp2804/2018-winter-final/22/solution.md b/src/content/questions/comp2804/2018-winter-final/22/solution.md
index 217b0db6..986e612c 100644
--- a/src/content/questions/comp2804/2018-winter-final/22/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/22/solution.md
@@ -1,4 +1,7 @@
In the algorithm, the value of $k$ keeps increasing if the two dice rolls are different. Theoreticaly, this algorithm can go on forever, until the two dice rolls are the same.
+
This is an example of the Geometric Distribution.
+
Let $p$ represent the probability of not ending the recursive algorithm. Using the formula for the expected value for Geometric Distribution we get:
+
$E(X) = \frac{1}{p} = \frac{1}{ \frac{5}{6}} = \frac{6}{5}$
diff --git a/src/content/questions/comp2804/2018-winter-final/23/solution.md b/src/content/questions/comp2804/2018-winter-final/23/solution.md
index 567a98bc..d60b528a 100644
--- a/src/content/questions/comp2804/2018-winter-final/23/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/23/solution.md
@@ -1,7 +1,11 @@
To prove that this statement is false, we need to provide a counterexample:
+
Let X, Y, Z all represent the random variables where $X, Y, Z = 1$ if a coin toss is heads and $X, Y, Z = 0$ if a coin toss is tails.
+
The expected value of $X, Y, Z$ in this case (as\suming that $\frac{1}{2}$ chance of hitting heads or tails) is: $E(X) = E(Y) = E(Z) = 0 \cdot \frac{1}{2} + 1 \cdot \frac{1}{2} = \frac{1}{2}$.
+
This means that the $min(E(X), E(Y), E(Z) = min( \frac{1}{2}, \frac{1}{2}, \frac{1}{2}) = \frac{1}{2}$ is $\frac{1}{2}$.
+
For the LHS, we need to calculate the expected value for $min(X, Y, Z)$. There are only two possible values in this case: $min(X, Y, Z) = 0$ and $min(X, Y, Z) = 1$
@@ -9,4 +13,5 @@ For the LHS, we need to calculate the expected value for $min(X, Y, Z)$. There a
- Pr(min(X, Y, Z) = 0) = 1 - Pr(min(X, Y, Z) = 1) = $1 - \frac{1}{8} = \frac{7}{8}$
- $E(min(X, Y, Z)) = 0 \cdot Pr(min(X, Y, Z) = 0) + 1 \cdot Pr(min(X, Y, Z) = 1) = 0 \cdot \frac{7}{8} + 1 \cdot ( \frac{1}{8}) = \frac{1}{8}$.
+
Since $E(min(X, Y, Z)) = \frac{1}{8}$ and $min(E(X), E(Y), E(Z)) = \frac{1}{2}$, the two are not the same, so the statement is false.
diff --git a/src/content/questions/comp2804/2018-winter-final/24/solution.md b/src/content/questions/comp2804/2018-winter-final/24/solution.md
index 5b1d4858..57ab19d9 100644
--- a/src/content/questions/comp2804/2018-winter-final/24/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/24/solution.md
@@ -1,5 +1,7 @@
Let S be the set of all possibilities = $ |S| = 8^{3} $
+
Let A be the set of all possibilities where a student gets exactly 2 ciders
+
To get exactly 2 ciders, a student has to have 2 ciders and 1 beer. There are 3 ways to get 2 ciders and a beer: $CBC, BCC, CCB$.
@@ -7,18 +9,33 @@ To get exactly 2 ciders, a student has to have 2 ciders and 1 beer. There are 3
- Number of ways for combination $BCC$: $\binom{3}{1} \cdot \binom{5}{1} \cdot \binom{5}{1} = 5^2 \cdot 3$
- Number of ways for combination $CCB$: $\binom{5}{1} \cdot \binom{5}{1} \cdot \binom{3}{1} = 5^2 \cdot 3$
-Now, we can sum
-$ Pr(A) = Pr( CBC ) + Pr( BCC ) + Pr( CCB ) $
-$ Pr(A) = (5^2 \cdot 3) + (5^2 \cdot 3) + (5^2 \cdot 3) $
-$ Pr(A) = 3 \cdot \frac{5^2 \cdot 3}{8^3} $
-$ Pr(A) = \frac{3^2 \cdot 5^2}{8^3}$
+
+Now, we can sum
+
+$ Pr(A) = Pr( CBC ) + Pr( BCC ) + Pr( CCB ) $
+
+$ Pr(A) = (5^2 \cdot 3) + (5^2 \cdot 3) + (5^2 \cdot 3) $
+
+$ Pr(A) = 3 \cdot \frac{5^2 \cdot 3}{8^3} $
+
+$ Pr(A) = \frac{3^2 \cdot 5^2}{8^3}$
+
Let $X_i$ be an indicator random variable where:
+
$ 1 \text{ if a student gets exactly 2 ciders} $
+
$ 0 \text{ otherwise} $
-$ Pr(X*i = 1) = Pr(A) = \frac{3^2 \cdot 5^2}{8^3}$
-$ \mathbb{E}(X) = \sum*{k=1}^{16} 1 \cdot Pr(X*i = 1) $
-$ \mathbb{E}(X) = \sum*{k=1}^{16} \frac{3^2 \cdot 5^2}{8^3} $
-$ \mathbb{E}(X) = 16 \cdot \frac{3^2 \cdot 5^2}{8^3} $
-$ \mathbb{E}(X) = 2^4 \cdot \frac{3^2 \cdot 5^2}{8^3} $
-$ \mathbb{E}(X) = \frac{2^4 \cdot 3^2 \cdot 5^2}{8^3} $
+
+$ Pr(X\*i = 1) = Pr(A) = \frac{3^2 \cdot 5^2}{8^3}$
+
+$ \mathbb{E}(X) = \sum*{k=1}^{16} 1 \cdot Pr(X*i = 1) $
+
+$ \mathbb{E}(X) = \sum\*{k=1}^{16} \frac{3^2 \cdot 5^2}{8^3} $
+
+$ \mathbb{E}(X) = 16 \cdot \frac{3^2 \cdot 5^2}{8^3} $
+
+$ \mathbb{E}(X) = 2^4 \cdot \frac{3^2 \cdot 5^2}{8^3} $
+
+$ \mathbb{E}(X) = \frac{2^4 \cdot 3^2 \cdot 5^2}{8^3} $
+
$ \mathbb{E}(X) = 2^4 \cdot 3^2 \cdot \frac{5^2}{8^3} $
diff --git a/src/content/questions/comp2804/2018-winter-final/3/solution.md b/src/content/questions/comp2804/2018-winter-final/3/solution.md
index 9abdd09c..bfbcea1c 100644
--- a/src/content/questions/comp2804/2018-winter-final/3/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/3/solution.md
@@ -12,8 +12,13 @@
We need to take into account all subsets of cider bottles that we add to the 2 beer bottles: $ 2^{50} $
$ |C| = \binom{20}{2} \cdot 2^{50} $
-Since the question is asking for all possibilities excluding 0, 1, and 2 beer bottles, we can find the total number of possibilities by subtracting the number of possibilities that contain 0, 1, and 2 beer bottles from the total number of possibilities
-Let D be the set of all bottles that contain at least 3 beer bottles
-$ |D| = 2^{70} - |A| - |B| - |C| $
-$ |D| = 2^{70} - \binom{20}{0} \cdot 2^{50} - \binom{20}{1} \cdot 2^{50} - \binom{20}{2} \cdot 2^{50} $
+
+Since the question is asking for all possibilities excluding 0, 1, and 2 beer bottles, we can find the total number of possibilities by subtracting the number of possibilities that contain 0, 1, and 2 beer bottles from the total number of possibilities
+
+Let D be the set of all bottles that contain at least 3 beer bottles
+
+$ |D| = 2^{70} - |A| - |B| - |C| $
+
+$ |D| = 2^{70} - \binom{20}{0} \cdot 2^{50} - \binom{20}{1} \cdot 2^{50} - \binom{20}{2} \cdot 2^{50} $
+
$ |D| = 2^{70} - 2^{50} - 20 \cdot 2^{50} - \binom{20}{2} \cdot 2^{50} $
diff --git a/src/content/questions/comp2804/2018-winter-final/4/solution.md b/src/content/questions/comp2804/2018-winter-final/4/solution.md
index 6b99912b..d82f7641 100644
--- a/src/content/questions/comp2804/2018-winter-final/4/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/4/solution.md
@@ -12,7 +12,11 @@
We need to choose 5 positions out of the remaining 35 for the $c$'s: $ \binom{35}{5} $
Then for the remaining characters in the strings, they can be either $b$ or $d$ = $ 2^{30} $
-Now, we can find $ A \cup B $
-$ |A \cup B| = |A| + |B| - |A \cap B| $
-$ |A \cup B| = \binom{40}{5} \cdot 3^{35} + \binom{40}{5} \cdot 3^{35} - \binom{40}{5} \cdot \binom{35}{5} \cdot 2^{30} $
+
+Now, we can find $ A \cup B $
+
+$ |A \cup B| = |A| + |B| - |A \cap B| $
+
+$ |A \cup B| = \binom{40}{5} \cdot 3^{35} + \binom{40}{5} \cdot 3^{35} - \binom{40}{5} \cdot \binom{35}{5} \cdot 2^{30} $
+
$ |A \cup B| = 2 \cdot \binom{40}{5} \cdot 3^{35} - \binom{40}{5} \cdot \binom{35}{5} \cdot 2^{30} $
diff --git a/src/content/questions/comp2804/2018-winter-final/5/solution.md b/src/content/questions/comp2804/2018-winter-final/5/solution.md
index 69bddb5d..d948cfb8 100644
--- a/src/content/questions/comp2804/2018-winter-final/5/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/5/solution.md
@@ -1,4 +1,5 @@
The answer is C, and I will show how the expression in the question shows the number of ways to choose a 2-element subset from a set consisting of m + n elements:
+
From a set of $m + n$ elements, we can form 2-element subsets in 3 different ways:
@@ -6,4 +7,5 @@ From a set of $m + n$ elements, we can form 2-element subsets in 3 different way
- Choose 2 elements from the $n$ set: there are $\binom{n}{2}$ ways to do this
- Choose 1 element from the $m$ set and 1 element from the $n$ set: there are $\binom{m}{1} \cdot \binom{n}{1} = m \cdot n$
+
Now, if we apply the Sum Rule to all of these cases above, we get $\binom{m}{2} + \binom{n}{2} + m \cdot n$, which matches the expression above.
diff --git a/src/content/questions/comp2804/2018-winter-final/6/solution.md b/src/content/questions/comp2804/2018-winter-final/6/solution.md
index ccd94580..73155cde 100644
--- a/src/content/questions/comp2804/2018-winter-final/6/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/6/solution.md
@@ -1,6 +1,9 @@
We can rephrase this into something more familiar. Let $x_1, x_2, x_3, x_4, x_5, x_6, x_7$ be the number of bananas Nick eats on each day.
+
$ x_1 + x_2 + x_3 + x_4 + x_5 + x_6 + x_7 = 25 $
+
This is one of the divider questions
+
Assume we have 25 bananas and 6 dividers. We place the dividers between any set of bananas to indicate how many are eaten between dividers
@@ -12,5 +15,7 @@ Assume we have 25 bananas and 6 dividers. We place the dividers between any set
- $x_6$ is represented as the number of bananas eaten between the fifth and sixth divider
- $x_7$ is represented as the number of bananas eaten to the right of the sixth divider
-Since we place dividers down, we need to add 6 dividers to the 25 bananas
+
+Since we place dividers down, we need to add 6 dividers to the 25 bananas
+
We choose 6 positions out of the 31 for the dividers: $ \binom{31}{6} $
diff --git a/src/content/questions/comp2804/2018-winter-final/7/solution.md b/src/content/questions/comp2804/2018-winter-final/7/solution.md
index d53cf3f1..9f0bbaa9 100644
--- a/src/content/questions/comp2804/2018-winter-final/7/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/7/solution.md
@@ -15,7 +15,11 @@
Then we choose 1 of the remaining 1 positions to place the $OO$: $ \binom{1}{1} = 1 $
$ |\overline{A}| = 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1 = 5! $
-Now, we can find the number of awesome strings
-$|A| = |S| - |\overline{A}| $
-$|A| = (6 \cdot \binom{5}{2} \cdot 3 \cdot 2 \cdot 1) - 5!$
+
+Now, we can find the number of awesome strings
+
+$|A| = |S| - |\overline{A}| $
+
+$|A| = (6 \cdot \binom{5}{2} \cdot 3 \cdot 2 \cdot 1) - 5!$
+
$|A| = (6 \cdot \binom{5}{2} \cdot 3 \cdot 2) - 5!$
diff --git a/src/content/questions/comp2804/2018-winter-final/8/solution.md b/src/content/questions/comp2804/2018-winter-final/8/solution.md
index b812e661..4ecf977e 100644
--- a/src/content/questions/comp2804/2018-winter-final/8/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/8/solution.md
@@ -1,6 +1,11 @@
The first character can be any of the 4 characters: 4
+
The second character can be any of the 3 characters that are not the first character: 3
+
The third character can be any of the 3 characters that are not the second character: 3
+
...
+
The nth character can be any of the 3 characters that are not the $(n-1)$th character: 3
+
$= 4 \cdot 3^{n-1} $
diff --git a/src/content/questions/comp2804/2018-winter-final/9/solution.md b/src/content/questions/comp2804/2018-winter-final/9/solution.md
index 4a81b490..4af1c276 100644
--- a/src/content/questions/comp2804/2018-winter-final/9/solution.md
+++ b/src/content/questions/comp2804/2018-winter-final/9/solution.md
@@ -5,5 +5,7 @@ Let's write out the possibilities and sum them:
$ 0, S*{n-1} $
$ 1, 0, S_{n-2} $
-Although this takes into account many possibilities, it does not take into a bitstring that is made of all 1's: 1
-$ S*n = S*{n-1} + S_{n-2} + 1 $
+
+Although this takes into account many possibilities, it does not take into a bitstring that is made of all 1's: 1
+
+$ S*n = S*{n-1} + S\_{n-2} + 1 $