Discrete Mathematics · free preview

Chapter 4 Problem Set. Counting

Problem set for this chapter. Counting.

1. How this assessment works

This lesson is a curated assessment adapted from MIT OpenCourseWare 6.042J Mathematics for Computer Science (Spring 2015) (https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-spring-2015/), used under CC BY-NC-SA 4.0. Work through the 11 problems in order, for each problem, type your reasoning in the answer box or write it on the handwriting pad, then submit it for AI grading.

How the grading works Every problem is graded by an AI mathematics teacher that reads the official solution shipped with the course. It checks your work criterion by criterion, awards partial credit for correct steps, and returns written feedback. Equivalent mathematics and valid alternative methods are accepted, a different route to the same result can still earn full marks.

If your answer is incomplete, the feedback names exactly which steps are missing, so you can correct them and try again.

2. Problem 1, Finalphobia given shaky hands (Bayes)

Finalphobia is a rare disease in which the victim has the delusion that he or she is being subjected to an intense mathematical examination. A person selected uniformly at random has finalphobia with probability 1/1001/100. A person with finalphobia has shaky hands with probability 9/109/10. A person without finalphobia has shaky hands with probability 1/201/20. What is the probability that a person selected uniformly at random has finalphobia, given that he or she has shaky hands?

3. Problem 2, Probabilities of five dice patterns

Suppose that you roll five 6-sided dice that are fair and mutually independent. Answers alone are sufficient, but show your work for partial credit; you need not simplify. (a) What is the probability that all five dice show different values? Example (1,2,3,4,5)(1,2,3,4,5) is a roll of this type, but (1,1,2,3,4)(1,1,2,3,4) is not. (b) What is the probability that two dice show the same value and the remaining three dice all show different values? Example (6,1,6,2,3)(6,1,6,2,3) is a roll of this type, but (1,1,2,2,3)(1,1,2,2,3) and (4,4,4,5,6)(4,4,4,5,6) are not. (c) What is the probability that two dice show one value, two different dice show a second value, and the remaining die shows a third value? Example (6,1,2,1,2)(6,1,2,1,2) is a roll of this type, but (4,4,4,4,5)(4,4,4,4,5) and (5,5,5,6,6)(5,5,5,6,6) are not.

4. Problem 3, Pigeonhole principle on 4x4 colored grid

An electronic toy displays a 4×44\times 4 grid of colored squares. At all times, four are red, four are green, four are blue, and four are yellow. (a) How many such configurations are possible? (b) Below the display, there are five buttons numbered 1, 2, 3, 4, and 5. The player may press a sequence of buttons; however, the same button can not be pressed twice in a row. How many different sequences of nn button-presses are possible? (c) Each button press scrambles the colored squares in a complicated, but nonrandom way. Prove that there exist two different sequences of 32 button presses that both produce the same configuration, if the puzzle is initially in the state shown above. (Hint 432=1616>16!4^{32}=16^{16}>16!.)

5. Problem 4, Expected laundry delay times

MIT students sometimes delay laundry for a few days. Assume all random values described below are mutually independent. (a) A busy student must complete 3 problem sets before doing laundry. Each problem set requires 1 day with probability 2/32/3 and 2 days with probability 1/31/3. Let BB be the number of days a busy student delays laundry. What is Ex⁡(B)\operatorname{Ex}(B)? Example. If the first problem set requires 1 day and the second and third problem sets each require 2 days, then the student delays for B=5B=5 days. (b) A relaxed student rolls a fair, 6-sided die in the morning. If he rolls a 1, then he does his laundry immediately (with zero days of delay). Otherwise, he delays for one day and repeats the experiment the following morning. Let RR be the number of days a relaxed student delays laundry. What is Ex⁡(R)\operatorname{Ex}(R)? Example. If the student rolls a 2 the first morning, a 5 the second morning, and a 1 the third morning, then he delays for R=2R=2 days. (c) Before doing laundry, an unlucky student must recover from illness for a number of days equal to the product of the numbers rolled on two fair, 6-sided dice. Let UU be the expected number of days an unlucky student delays laundry. What is Ex⁡(U)\operatorname{Ex}(U)? Example. If the rolls are 5 and 3, then the student delays for U=15U=15 days. (d) A student is busy with probability 1/21/2, relaxed with probability 1/31/3, and unlucky with probability 1/61/6. Let DD be the number of days the student delays laundry. What is Ex⁡(D)\operatorname{Ex}(D)? Leave your answer in terms of Ex⁡(B)\operatorname{Ex}(B), Ex⁡(R)\operatorname{Ex}(R), and Ex⁡(U)\operatorname{Ex}(U).

6. Problem 5, Expected adjacent matching card pairs

I have twelve cards 1,1,2,2,3,3,4,4,5,5,6,61,1,2,2,3,3,4,4,5,5,6,6. I shuffle them and deal them in a row. For example, I might get 1,2,3,3,4,6,1,4,5,5,2,61,2,3,3,4,6,1,4,5,5,2,6. What is the expected number of adjacent pairs with the same value? In the example, there are two adjacent pairs with the same value, the 3's and the 5's. We can award partial credit only if you show your work.

7. Problem 6, Expected hits and probability bounds

Each time a baseball player bats, he hits the ball with some probability. The table below gives the hit probability and number of chances to bat next season for five players.

\begin{array}{ccc}\text{player} & \text{prob. of hit} & \text{# chances to bat}\\\hline A & 1/3 & 300\\ B & 1/4 & 200\\ C & 1/4 & 400\\ D & 1/5 & 250\\ E & 2/5 & 500\end{array}

(a) Let XX be the total number times these five players hit the ball next season. What is Ex⁡(X)\operatorname{Ex}(X)? (b) Give a nontrivial upper bound on Pr⁡(X≥1500)\Pr(X\ge 1500) and justify your answer. Do not assume that hits happen mutually independently. (c) Using a Chernoff inequality, give a nontrivial upper bound on Pr⁡(X≤400)\Pr(X\le 400). For this part, you may assume that all hits happen mutually independently.

8. Problem 7, Beaver Fever positive test probability

Exactly 1/51/5th of the people in a town have Beaver Fever©. There are two tests for Beaver Fever, TEST1 and TEST2. When a person goes to a doctor to test for Beaver Fever, with probability 2/32/3 the doctor conducts TEST1 on him and with probability 1/31/3 the doctor conducts TEST2 on him.

When TEST1 is done on a person, the outcome is as follows.

  • If the person has the disease, the result is positive with probability 3/43/4.
  • If the person does not have the disease, the result is positive with probability 1/41/4.

When TEST2 is done on a person, the outcome is as follows.

  • If the person has the disease, the result is positive with probability 11.
  • If the person does not have the disease, the result is positive with probability 1/21/2.

A person is picked uniformly at random from the town and is sent to a doctor to test for Beaver Fever. The result comes out positive. What is the probability that the person has the disease?

9. Problem 8, Two decks card hand probabilities

Two identical complete decks of cards, each with 52 cards, have been mixed together. A hand of 5 cards is picked uniformly at random from amongst all subsets of exactly 5 cards.

(a) [5 points] What is the probability that the hand has no identical cards (i.e., cards with the same suit and value. For example, the hand {Q♡,5♠,6♠,8♣,Q♡}\{Q\heartsuit, 5\spadesuit, 6\spadesuit, 8\clubsuit, Q\heartsuit\} has identical cards.)?

(b) [5 points] What is the probability that the hand has exactly one pair of identical cards?

10. Problem 9, Exam score mean variance Chebyshev bounds

Scores for a final exam are given by picking an integer uniformly at random from the set {50,51,…,97,98}\{50,51,\dots,97,98\}. The scores of all 128 students in the class are assigned in this manner. For parts (a), (b), (c) and (d) you may NOT assume that these scores are assigned independently. For parts (e), (f), (g) and (h) you MAY assume that these scores are assigned independently.

Let S1,…,S128S_1,\dots,S_{128} be their scores. Let S=1128(∑i=1128Si)S=\frac{1}{128}\left(\sum_{i=1}^{128}S_i\right) be the average score of the class.

(a) [3 points] For i∈{1,…,128}i\in\{1,\dots,128\}, what is E[Si]E[S_i]?

(b) [2 points] Show that E[S]=74E[S]=74. Make no independence assumptions.

(c) [4 points] Prove that Pr⁡[S≥88]≤3744\Pr[S\ge 88]\le \frac{37}{44}. Make no independence assumptions.

(d) [5 points] Improve your previous bound by using the fact that the minimum possible score is 50. Prove that Pr⁡[S≥88]≤1219\Pr[S\ge 88]\le \frac{12}{19}. Make no independence assumptions.

(e) [4 points] For the remaining problems, assume that all the scores are assigned mutually independently. Use Problem 1 of this final to find Var⁡[Si]\operatorname{Var}[S_i].

(f) [3 points] What is Var⁡[S]\operatorname{Var}[S]?

(g) [2 points] What is the standard deviation of SS?

(h) [5 points] Prove, using the Chebyshev Inequality, that Pr⁡[S≤69]≤116\Pr[S\le 69]\le \frac{1}{16}.

11. Problem 10, Files uniform disk placement Chernoff bounds

1000 files F1,F2,…,F1000F_1,F_2,\dots,F_{1000} have just reached a disk manager for writing onto disk. Each file's size is between 0MB0MB and 1MB1MB. The sum of all files' sizes is 400MB400MB. The disk manager has 4 disks under its control. For each file FiF_i, the disk manager chooses a disk uniformly at random from amongst the 4 disks, and FiF_i is written to that disk. The choices of disk for the different files are mutually independent.

(a) [2 points] What is the expected number of files that will be written to the first disk?

(b) [2 points] What is the expected number of bytes written on the first disk?

(c) [8 points] Find the best upper bound you can on the probability that 200MB200MB or more are written on the first disk?

(d) [4 points] Find the best upper bound you can on the probability that there is some disk with 200MB200MB or more written on it?

12. Problem 11, Pigeonhole points within distance sqrt 2

Prove that among any n2+1n^2+1 points within an n×nn \times n square there must exist two points whose distance is at most 2\sqrt{2}.

Practice this interactively

Free account · instant grading · spaced review that schedules itself.

Start this course for free