-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
915 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: Exam Fall 2019 | ||
path: comp2804/exam-fall-2019 | ||
author: Michiel Smid | ||
course: comp2804 | ||
questions: | ||
- comp2804/exam-fall-2019/1 | ||
- comp2804/exam-fall-2019/2 | ||
- comp2804/exam-fall-2019/3 | ||
- comp2804/exam-fall-2019/4 | ||
- comp2804/exam-fall-2019/5 | ||
- comp2804/exam-fall-2019/6 | ||
- comp2804/exam-fall-2019/7 | ||
- comp2804/exam-fall-2019/8 | ||
- comp2804/exam-fall-2019/9 | ||
- comp2804/exam-fall-2019/10 | ||
- comp2804/exam-fall-2019/11 | ||
- comp2804/exam-fall-2019/12 | ||
- comp2804/exam-fall-2019/13 | ||
- comp2804/exam-fall-2019/14 | ||
- comp2804/exam-fall-2019/15 | ||
- comp2804/exam-fall-2019/16 | ||
- comp2804/exam-fall-2019/17 | ||
- comp2804/exam-fall-2019/18 | ||
- comp2804/exam-fall-2019/19 | ||
- comp2804/exam-fall-2019/20 | ||
- comp2804/exam-fall-2019/21 | ||
- comp2804/exam-fall-2019/22 | ||
- comp2804/exam-fall-2019/23 | ||
- comp2804/exam-fall-2019/24 | ||
- comp2804/exam-fall-2019/25 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: N/A | ||
path: comp2804/exam-fall-2019/1 | ||
type: multiple-choice | ||
author: Michiel Smid | ||
question: comp2804/exam-fall-2019/1/question.ts | ||
tags: | ||
- comp2804 | ||
--- |
21 changes: 21 additions & 0 deletions
21
src/content/questions/comp2804/exam-fall-2019/1/question.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { MultipleChoiceQuestion } from "@common/MultipleChoiceQuestionGenerator"; | ||
|
||
const body = String.raw` | ||
Consider strings of length 85, in which each character is one of the letters $a,b,c,d$. <br> | ||
How many such strings have exactly 5 letters $c$? | ||
`; | ||
|
||
const label1 = "${85 \\choose 5} \\cdot 3^{80}$"; | ||
const label2 = "${85 \\choose 5} \\cdot 3^{85}$"; | ||
const label3 = "${85 \\choose 5} \\cdot 4^{80}$"; | ||
const label4 = "${85 \\choose 5} \\cdot 4^{85}$"; | ||
|
||
export const question: MultipleChoiceQuestion = { | ||
body: body, | ||
options: [ | ||
{ label: label1, correct: true }, | ||
{ label: label2, correct: false }, | ||
{ label: label3, correct: false }, | ||
{ label: label4, correct: false }, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: N/A | ||
path: comp2804/exam-fall-2019/10 | ||
type: multiple-choice | ||
author: Michiel Smid | ||
question: comp2804/exam-fall-2019/10/question.ts | ||
tags: | ||
- comp2804 | ||
--- |
37 changes: 37 additions & 0 deletions
37
src/content/questions/comp2804/exam-fall-2019/10/question.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import type { MultipleChoiceQuestion } from "@common/MultipleChoiceQuestionGenerator"; | ||
|
||
const body = String.raw` | ||
<div hidden> | ||
$\newcommand{\IFeelLikeSinging}{{\rm IF {\scriptsize EEL} L {\scriptsize IKE} S {\scriptsize INGING}}}$ | ||
</div> | ||
Consider the recursive algorithm $\IFeelLikeSinging$, which takes as input an integer $n \geq 0$: | ||
<p> | ||
$\IFeelLikeSinging(n):$ <br> | ||
$\quad \mathbf{if}\ n = 0\ \mathrm{or}\ n = 1\ \mathbf{then}$ <br> | ||
$\quad \quad \text{sing O Canada}$ <br> | ||
$\quad \mathbf{else}\ \mathbf{if}\ n\ \text{is odd}\ \mathbf{then}$ <br> | ||
$\quad \quad \IFeelLikeSinging(n + 1)$ <br> | ||
$\quad \mathbf{else}$ <br> | ||
$\quad \quad \IFeelLikeSinging(\frac{n}{2})$ <br> | ||
$\quad \quad \IFeelLikeSinging(\frac{n}{2} - 1)$ <br> | ||
</p> | ||
If you run algorithm $\IFeelLikeSinging(9)$, how many times do you sing O Canada? | ||
`; | ||
|
||
const label1 = String.raw`6`; | ||
const label2 = String.raw`7`; | ||
const label3 = String.raw`8`; | ||
const label4 = String.raw`9`; | ||
|
||
export const question: MultipleChoiceQuestion = { | ||
body: body, | ||
options: [ | ||
{ label: label1, correct: false }, | ||
{ label: label2, correct: false }, | ||
{ label: label3, correct: true }, | ||
{ label: label4, correct: false }, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: N/A | ||
path: comp2804/exam-fall-2019/11 | ||
type: multiple-choice | ||
author: Michiel Smid | ||
question: comp2804/exam-fall-2019/11/question.ts | ||
tags: | ||
- comp2804 | ||
--- |
25 changes: 25 additions & 0 deletions
25
src/content/questions/comp2804/exam-fall-2019/11/question.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { MultipleChoiceQuestion } from "@common/MultipleChoiceQuestionGenerator"; | ||
|
||
const body = String.raw` | ||
Assume you write a multiple-choice exam that has 25 questions. For each question, four options are given | ||
to you, and exactly one of these options is the correct answer. Assume that you answer each question | ||
uniformly at random, where the choices for different questions are independent of each other. What is the | ||
probability that you have exactly 17 correct answers? | ||
`; | ||
|
||
const label1 = "${25 \\choose 17} \\cdot \\left( 1 \\middle/ 4 \\right)^{17}$"; | ||
const label2 = "${25 \\choose 17} \\cdot \\left( 3 \\middle/ 4 \\right)^{17}$"; | ||
const label3 = | ||
"${25 \\choose 17} \\cdot \\left( 1 \\middle/ 4 \\right)^{17} \\cdot \\left( 3 \\middle/ 4 \\right)^8$"; | ||
const label4 = | ||
"${25 \\choose 17} \\cdot \\left( 1 \\middle/ 4 \\right)^8 \\cdot \\left( 3 \\middle/ 4 \\right)^{17}$"; | ||
|
||
export const question: MultipleChoiceQuestion = { | ||
body: body, | ||
options: [ | ||
{ label: label1, correct: false }, | ||
{ label: label2, correct: false }, | ||
{ label: label3, correct: true }, | ||
{ label: label4, correct: false }, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: N/A | ||
path: comp2804/exam-fall-2019/12 | ||
type: multiple-choice | ||
author: Michiel Smid | ||
question: comp2804/exam-fall-2019/12/question.ts | ||
tags: | ||
- comp2804 | ||
--- |
25 changes: 25 additions & 0 deletions
25
src/content/questions/comp2804/exam-fall-2019/12/question.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { MultipleChoiceQuestion } from "@common/MultipleChoiceQuestionGenerator"; | ||
|
||
const body = String.raw` | ||
Consider a uniformly random bitstring of length 5. Define the events | ||
[defs] | ||
A = "the first three bits are 101 or 110", | ||
B = "the last three bits are 111". | ||
[/defs] | ||
Which of the following is true? | ||
`; | ||
|
||
const label1 = String.raw`The events $A$ and $B$ are independent.`; | ||
const label2 = String.raw`The events $A$ and $B$ are not independent.`; | ||
const label3 = String.raw`None of the above.`; | ||
|
||
export const question: MultipleChoiceQuestion = { | ||
body: body, | ||
options: [ | ||
{ label: label1, correct: true }, | ||
{ label: label2, correct: false }, | ||
{ label: label3, correct: false }, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: N/A | ||
path: comp2804/exam-fall-2019/13 | ||
type: multiple-choice | ||
author: Michiel Smid | ||
question: comp2804/exam-fall-2019/13/question.ts | ||
tags: | ||
- comp2804 | ||
--- |
30 changes: 30 additions & 0 deletions
30
src/content/questions/comp2804/exam-fall-2019/13/question.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import type { MultipleChoiceQuestion } from "@common/MultipleChoiceQuestionGenerator"; | ||
|
||
const body = String.raw` | ||
A certain terrible, no-good, mean-spirited, awful professor gives his students 250 sample exam questions | ||
and then makes his final exam by choosing 25 of these questions uniformly at random. Student Nika doesn't | ||
have much time to study so she chooses 50 (out of 250) random sample exam questions and practices on those. | ||
<p style="margin: 0.5rem 0;"> | ||
When Nika writes the exam, what is the expected number of questions that appear on the exam and that | ||
Nika has practiced on? | ||
</p> | ||
(n.b., depending on your background, it may be helpful to observe that this can be modelled using the hypergeometric | ||
distribution) | ||
`; | ||
|
||
const label1 = String.raw`2`; | ||
const label2 = String.raw`5`; | ||
const label3 = String.raw`10`; | ||
const label4 = String.raw`20`; | ||
|
||
export const question: MultipleChoiceQuestion = { | ||
body: body, | ||
options: [ | ||
{ label: label1, correct: false }, | ||
{ label: label2, correct: true }, | ||
{ label: label3, correct: false }, | ||
{ label: label4, correct: false }, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: N/A | ||
path: comp2804/exam-fall-2019/14 | ||
type: multiple-choice | ||
author: Michiel Smid | ||
question: comp2804/exam-fall-2019/14/question.ts | ||
tags: | ||
- comp2804 | ||
--- |
21 changes: 21 additions & 0 deletions
21
src/content/questions/comp2804/exam-fall-2019/14/question.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { MultipleChoiceQuestion } from "@common/MultipleChoiceQuestionGenerator"; | ||
|
||
const body = String.raw` | ||
Continuing from the previous question, what is the probability that Nika has not practiced on any of the | ||
actual exam questions? | ||
`; | ||
|
||
const label1 = String.raw`0`; | ||
const label2 = String.raw`$\left. {225 \choose 50} \middle/ {250 \choose 50} \right.$`; | ||
const label3 = String.raw`$\left. {225 \choose 25} \middle/ {250 \choose 50} \right.$`; | ||
const label4 = String.raw`$\left. {225 \choose 25} \middle/ {225 \choose 50} \right.$`; | ||
|
||
export const question: MultipleChoiceQuestion = { | ||
body: body, | ||
options: [ | ||
{ label: label1, correct: false }, | ||
{ label: label2, correct: true }, | ||
{ label: label3, correct: false }, | ||
{ label: label4, correct: false }, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: N/A | ||
path: comp2804/exam-fall-2019/15 | ||
type: multiple-choice | ||
author: Michiel Smid | ||
question: comp2804/exam-fall-2019/15/question.ts | ||
tags: | ||
- comp2804 | ||
--- |
27 changes: 27 additions & 0 deletions
27
src/content/questions/comp2804/exam-fall-2019/15/question.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { MultipleChoiceQuestion } from "@common/MultipleChoiceQuestionGenerator"; | ||
|
||
const body = String.raw` | ||
A bowl contains 5 blue balls and 4 red balls. We choose 2 balls uniformly at random. Define the events | ||
[defs] | ||
A = "both balls are red", | ||
B = "both balls have the same color". | ||
[/defs] | ||
What is the conditional probability $\Pr(A|B)$? | ||
`; | ||
|
||
const label1 = String.raw`$\frac{{4 \choose 2}}{{5 \choose 2} + {4 \choose 2}}$`; | ||
const label2 = String.raw`$\frac{{5 \choose 2} + {4 \choose 2}}{{4 \choose 2}}$`; | ||
const label3 = String.raw`$\frac{{4 \choose 2}}{{9 \choose 2}}$`; | ||
const label4 = String.raw`$\frac{{4 \choose 2}}{{5 \choose 2} \cdot {4 \choose 2}}$`; | ||
|
||
export const question: MultipleChoiceQuestion = { | ||
body: body, | ||
options: [ | ||
{ label: label1, correct: true }, | ||
{ label: label2, correct: false }, | ||
{ label: label3, correct: false }, | ||
{ label: label4, correct: false }, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: N/A | ||
path: comp2804/exam-fall-2019/16 | ||
type: multiple-choice | ||
author: Michiel Smid | ||
question: comp2804/exam-fall-2019/16/question.ts | ||
tags: | ||
- comp2804 | ||
--- |
27 changes: 27 additions & 0 deletions
27
src/content/questions/comp2804/exam-fall-2019/16/question.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { MultipleChoiceQuestion } from "@common/MultipleChoiceQuestionGenerator"; | ||
|
||
const body = String.raw` | ||
We choose an element $x$ uniformly at random from the set $\{1,2,3,...,10\}$. Define the events | ||
[defs] | ||
A = "$x$ is even", | ||
B = "$x$ is divisible by 3". | ||
[/defs] | ||
What is the conditional probability $\Pr(A|B)$? | ||
`; | ||
|
||
const label1 = String.raw`3/10`; | ||
const label2 = String.raw`1/3`; | ||
const label3 = String.raw`1/2`; | ||
const label4 = String.raw`2/3`; | ||
|
||
export const question: MultipleChoiceQuestion = { | ||
body: body, | ||
options: [ | ||
{ label: label1, correct: false }, | ||
{ label: label2, correct: true }, | ||
{ label: label3, correct: false }, | ||
{ label: label4, correct: false }, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: N/A | ||
path: comp2804/exam-fall-2019/17 | ||
type: multiple-choice | ||
author: Michiel Smid | ||
question: comp2804/exam-fall-2019/17/question.ts | ||
tags: | ||
- comp2804 | ||
--- |
25 changes: 25 additions & 0 deletions
25
src/content/questions/comp2804/exam-fall-2019/17/question.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { MultipleChoiceQuestion } from "@common/MultipleChoiceQuestionGenerator"; | ||
|
||
const body = String.raw` | ||
We choose an element $x$ uniformly at random from the set $\{1,2,3,...,10\}$. Define the events | ||
[defs] | ||
A = "$x$ is even", | ||
B = "$1 \leq x \leq 5$". | ||
[/defs] | ||
Which of the following is true? | ||
`; | ||
|
||
const label1 = String.raw`The events $A$ and $B$ are independent.`; | ||
const label2 = String.raw`The events $A$ and $B$ are not independent.`; | ||
const label3 = String.raw`None of the above.`; | ||
|
||
export const question: MultipleChoiceQuestion = { | ||
body: body, | ||
options: [ | ||
{ label: label1, correct: false }, | ||
{ label: label2, correct: true }, | ||
{ label: label3, correct: false }, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: N/A | ||
path: comp2804/exam-fall-2019/18 | ||
type: multiple-choice | ||
author: Michiel Smid | ||
question: comp2804/exam-fall-2019/18/question.ts | ||
tags: | ||
- comp2804 | ||
--- |
Oops, something went wrong.