Problem 24
Assume that birthdays are equally likely to occur in any one of the 12 months of the year. a. Given a group of four people, \(A, B, C\), and \(D\). What is the total number of ways in which birth months could be associated with \(A, B, C\), and \(D ?\) (For instance, \(A\) and \(B\) might have been born in May, \(C\) in September, and \(D\) in February, As another example, \(A\) might have been born in January, \(B\) in June, \(C\) in March, and \(D\) in October.) b. How many ways could birth months be associated with \(A, B, C\), and \(D\) so that no two people would share the same birth month? c. How many ways could birth months be associated with \(A, B, C\), and \(D\) so that at least two people would share the same birth month? d. What is the probability that at least two people out of \(A, B, C\), and \(D\) share the same birth month? e. How large must \(n\) be so that in any group of \(n\) people, the probability that two or more share the same birth month is at least \(50 \mathrm{~g}\) ?
Problem 24
On an \(8 \times 8\) chessboard, a rook is allowed to move any number of squares either horizontally or vertically. How many different paths can a rook follow from the bottom-left square of the board to the top-right square of the board if all moves are to the right or upward?
Problem 25
The number 42 has the prime factorization \(2 \cdot 3 \cdot 7\). Thus 42 can be written in four ways as a product of two positive integer factors: \(1 \cdot 42,6 \cdot 7,14 \cdot 3\), and \(2 \cdot 21\). a. List the distinct ways the number 210 can be written as a product of two positive integer factors. b. If \(n=p_{1} p_{2} p_{3} p_{4}\), where the \(p_{i}\) are distinct prime numbers, how many ways can \(n\) be written as a product of two positive integer factors? c. If \(n=p_{1} p_{2} p_{3} p_{4} p_{5}\), where the \(p_{i}\) are distinct prime numbers, how many ways can \(n\) be written as a product of two positive integer factors? d. If \(n=p_{1} p_{2} \cdots p_{k}\), where the \(p_{i}\) are distinct prime numbers, how many ways can \(n\) be written as a product of two positive integer factors?
Problem 25
Suppose \(A[1], A[2], \ldots, A[n]\) is a one-dimensional array and \(n \geq 2\). Consider the subarray $$ A[1], A[2], \ldots, A[\lfloor n / 2\rfloor] . $$ a. How many elements are in the subarray (i) if \(n\) is even? and (ii) if \(n\) is odd? b. What is the probability that a randomly chosen array element is in the subarray (i) if \(n\) is even? and (ii) if \(n\) is odd?
Problem 25
A coin is loaded so that the probability of heads is \(0.7\) and the probability of tails is \(0.3\). Suppose that the coin is tossed twice and that the results of the tosses are independent. a. What is the probability of obtaining exactly two heads? b. What is the probability of obtaining exactly one head? c. What is the probability of obtaining no heads? d. What is the probability of obtaining at least one head?
Problem 25
In each of \(21-25\), determine how many times the innermost loop will be iterated when the algorithm segment is implemented and run. (Assume that \(m, n, p, a, b, c\), and \(d\) are all positive integers.) Assume \(a \leq b\) and \(c \leq d\) for \(i:=a\) to \(b\) for \(j:=c\) to \(d\) [Statements in body of inner loop. None contain branching statements that lead outside the loop.] next \(j\) next \(i\)
Problem 25
Assuming that all years have 365 days and all birthdays occur with equal probability, how large must \(n\) be so that in any randomly chosen group of \(n\) people, the probability that two or more have the same birthday is at least \(1 / 2\) ? (This is called the birthday problem. Many people find the answer surprising.)
Problem 26
Consider the numbers 1 through 99,999 in their ordinary decimal representations. How many contain exactly one of each of the digits \(2,3,4\), and 5 ?
Problem 26
A student council consists of three freshmen, four sophomores, four juniors, and five seniors. How many committees of eight members of the council contain at least one member from each class?
Problem 27
Let \(n=p_{1}^{k_{1}} p_{2}^{k_{2}} \cdots p_{m}^{k_{m}}\) where \(p_{1}, p_{2}, \ldots, p_{m}\) are distinct prime numbers and \(k_{1}, k_{2}, \ldots, k_{m}\) are positive integers. How many ways can \(n\) be written as a product of two positive integers that have no common factors a. assuming that order matters (i.e., \(8 \cdot 15\) and \(15 \cdot 8\) are regarded as different)? b. assuming that order does not matter (i.e., \(8 \cdot 15\) and \(15 \cdot 8\) are regarded as the same)?