NivaarExam PrepOfficial exam papers ↗

04-BS-16 · May 2014

Question 11 of 12

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

National Examination, 04-BS-16 Discrete Mathematics, May 2014. Closed book, no aids. The exam instructs "answer 10 of 12 questions"; every question is answered below as a complete study resource.

Reference texts: Rosen, Discrete Mathematics and Its Applications, 7th ed. (logic, induction, combinatorics, probability, relations, graph theory).

Question 11

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Given data (Part a)
EventCountProbability
Headache ($H$)10 / 1000$P(H)=0.01$
Fever ($F$)20 / 1000$P(F)=0.02$
Both ($H\cap F$)5 / 1000$P(H\cap F)=0.005$

Given. A population of 1000 with the headache/fever/both counts tabulated above, and a random 8-bit byte with each bit independently 0 or 1 with probability 0.5.

Find. (a) $P(H\cup F)$, $P(H|F)$, $P(F|H)$, $P(H|\overline F)$; (b) $P(\text{no run of} \geq5 \text{ consecutive 0's in 8 bits})$.

Approach. (a) Apply inclusion-exclusion for the union and the conditional-probability definition $P(A|B)=P(A\cap B)/P(B)$ for each conditional; (b) enumerate/complement-count over all $2^8=256$ equally likely bytes for the maximum run of consecutive 0's.

  1. 11a-i) $P(\text{sick})=P(H\cup F)$. By inclusion-exclusion: $$P(H\cup F)=P(H)+P(F)-P(H\cap F)=0.01+0.02-0.005=0.025$$ $\boxed{P(\text{sick})=0.025}$
  2. 11a-ii) $P(H|F)$. $$P(H|F)=\frac{P(H\cap F)}{P(F)}=\frac{0.005}{0.02}=0.25$$ $\boxed{P(H|F)=0.25}$
  3. 11a-iii) $P(F|H)$. $$P(F|H)=\frac{P(H\cap F)}{P(H)}=\frac{0.005}{0.01}=0.5$$ $\boxed{P(F|H)=0.5}$
  4. 11a-iv) $P(H|\overline F)$. $P(H\cap\overline F)=P(H)-P(H\cap F)=0.01-0.005=0.005$ and $P(\overline F)=1-P(F)=0.98$, so $$P(H|\overline F)=\frac{0.005}{0.98}=\frac{1}{196}\approx0.00510$$ $\boxed{P(H|\overline F)=\dfrac{1}{196}\approx0.0051}$
  5. 11b) No run of $\geq5$ consecutive 0's in a random byte. There are $2^8=256$ equally likely bytes. Enumerating all 256 and checking the longest run of consecutive 0's in each: exactly 20 of the 256 bytes contain a run of 5 or more zeros (e.g. 00000xxx and its shifted/complemented positions), leaving $$256-20=236 \text{ bytes with every zero-run} \leq 4$$ $$P(\text{no run}\geq5 \text{ zeros})=\frac{236}{256}=\frac{59}{64}\approx0.9219$$ $\boxed{P=\dfrac{59}{64}\approx0.922}$
Conditional-probability and run-length results
PartResult
a-i $P(H\cup F)$0.025
a-ii $P(H\mid F)$0.25
a-iii $P(F\mid H)$0.5
a-iv $P(H\mid\overline F)$$1/196\approx0.0051$
b $P(\text{no run}\geq5 \text{ zeros in 8 bits})$$59/64\approx0.9219$