\documentclass[11pt]{article}

\usepackage{exscale}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{latexsym}
\usepackage{times,mathptm}
\usepackage{epsfig}
\usepackage{amsmath}
\usepackage{enumitem}
\usepackage{mathpazo}
\usepackage{amssymb}
\usepackage{mathtools}

\textwidth 6.5truein          
\textheight 9.5truein
\oddsidemargin 0.0in
\topmargin -0.5in
\thispagestyle{empty} 

\parindent 0pt          
\parskip 0pt

\begin{document}

{\bf Name: }
\hspace{13cm}
{\bf Section: }

\begin{large}
\centerline {\bf Computer Science 243}
\centerline {\bf Spring 2025}
\centerline {\bf Homework 10}
% \centerline{\bf My name}
\vskip .7cm

\bf Due: 5:00 p.m., Friday, 4/18/25 \hfill Points: 100
\end{large}
\vskip 0.5cm
Answer the following questions and show your work.  Your final submission must be completely your own work.

\begin{enumerate}

\vskip 0.5cm
\item {[15 points]}  Answer the following:
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item What is the probability that when two dice are rolled, the sum of the numbers on the two dice is 5?
\item In a lottery, what is the probability that a player picks the correct five numbers out of thirty (no replacement -- see Chapter 7, slide 8)?
\item A sequence of 8 bits is chosen randomly. What is the probability that at least one of these bits is 0?
\item What is the probability that a positive integer selected at random from the set of positive integers not exceeding 100 is divisible by either 3 or 7?
\item A bit string of length five is generated at random so that each of the 32 bit strings of length 5 is equally likely. What is the probability that 
it contains at least two consecutive 0s, given that its first bit is a 0?
\end{enumerate}

\vskip 0.5cm
\item {[16 points]}  Answer the following:
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item What is the conditional probability that a family with two children has one boy and one girl, given that they have at least one boy. 
Assume that each of the possibilities BB, BG, GB, and GG is equally likely where B represents a boy and G represents a girl.
\item Suppose $E$ is the event that a randomly generated bit string of length four begins with a 1 and $F$ is the event that this bit string contains 
exactly three 1s. Are $E$ and $F$ independent if the 16 bit strings of length four are equally likely?
\item A coin is biased so that the probability of heads is 3/4. What is the probability that exactly three heads occur when the coin is flipped five times?
\item Suppose that a coin is flipped four times. Let $X(t)$ be the random variable that equals the number of heads that appear when $t$ is the outcome.
What is the distribution of $X(t)$?
\end{enumerate}


\vskip 0.5cm
\item {[9 points]}  Answer the following.  Show all work to receive full credit.
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item {[6 points]} Find a recurrence relation and initial conditions for the number of bit strings of length $n$ that contain 2 consecutive 1’s. \textit {(Hint: Break
the computation into three cases: strings ending in 0 and strings ending in 01 for the recursive parts, along with new strings ending in 11.)}
\item {[3 points]} How many bit strings of length 8 contain 2 consecutive 1’s?
\end{enumerate}


\newpage

\vskip 0.5cm
\item {[20 points]}  Answer the following.  Show all work to receive full credit. 
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item Find a closed-form solution for the linear homogenous recurrence relation: \\
\hspace*{2cm} $a_n = 7a_{n-1} - 10a_{n-2}$ \hspace*{0.5cm} for $n \ge 2$, where $a_0 = 2$, $a_1 = 1$ \\
\item Prove the solution to (a) is correct using strong induction.
\end{enumerate}


\vskip 0.5cm
\item {[20 points]}  Answer the following.  Show all work to receive full credit. 
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item Find a closed-form solution for the linear homogenous recurrence relation: \\
\hspace*{2cm} $a_n = 2a_{n-1} - a_{n-2}$ \hspace*{0.5cm} for $n \ge 2$, where $a_0 = 4$, $a_1 = 1$ \\
\item Prove the solution to (a) is correct using strong induction.
\end{enumerate}


\vskip 0.5cm
\item {[6 points]}  Suppose that $f(n) = 2 f(n/2) + 3$ when $n$ is a positive integer power of $2$ and $f(1) = 3$.
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item {[4 points]} Find $f(8)$, and $f(32)$.
\item {[2 points]} Give a big-O estimate for $f(n)$.
\end{enumerate}


\vskip 0.5cm
\item {[6 points]}  Suppose that $f(n) = 2 f(n/3) + 4$ when $n$ is a positive integer power of $3$ and $f(1) = 1$.
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item {[4 points]} Find $f(9)$, and $f(27)$.
\item {[2 points]} Give a big-O estimate for $f(n)$.
\end{enumerate}


\vskip 0.5cm
\item {[8 points]}  Answer the following.  Show all work to receive full credit. 
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item Use the inclusion-exclusion principle to find the number of positive integers not exceeding 100 that are not divisible by 3, 5, or 7.
\item How many elements are in the union of four sets if each of the sets has 100 elements, each pair of the sets shares 36 elements, 
each three of the sets share 17 elements, and there are 4 elements in all four sets?
\end{enumerate}


\end{enumerate}

\end{document}
