\magnification 1200 \parskip 10pt \parindent 0pt \hsize 7.4truein \vsize 9.4truein \hoffset -0.5truein \def\u{\vskip -10pt} \def\v{\vskip 10pt} \def\s{\vskip -4pt} \def\r{\vskip -4pt} 1.) Let $r_1 = $ number of ways to place one rook in a forbidden position = number of forbidden positions = 10. if 1 rook in $A$: 6 if 1 rook in $B$: 4 Let $r_2= $ number of ways to place two rooks in a forbidden positions: 34 if 2 rooks in $A$: 3 + 2 + 1 + 2 = 8 if 1 rook in $A$, 1 in $B$: 6(4) = 24 if 2 rooks in $B$: 2 Let $r_3= $ number of ways to place three rooks in a forbidden positions: 45 if 3 rooks in $A$: 1 if 2 rooks in $A$, 1 in $B$: 8(4) = 32 if 1 rook in $A$, 2 in $B$: 6(2) = 12 Let $r_4= $ number of ways to place four rooks in a forbidden positions: 20 if 3 rooks in $A$, 1 in $B$: 1(4) = 4 if 2 rook in $A$, 2 in $B$: 8(2) = 16 Let $r_5 = $ number of ways to place five rooks in a forbidden positions: 2 if 3 rooks in $A$, 2 in $B$: 1(2) = 2 Hence by thm 6.4.1, the number of different assignments is $5! - r_1 4! + r_2 3! - r_3 2! + r_4 1! - r_5 0! = 5! - 10(4!) + 34(3!) - 45(2!) + 20 - 2$ 2.) Let the 0's in the matrix be represented by nonattacking rooks. Since there must be $n$ nonattacking rooks on the $n \times n$ chessboard, there must be exactly one rook in each row and in each column. Since the rooks cannot be in the upper left $k \times k$ chessboard, the $k$ rooks which are in the first $k$ rows cannot be in the first $k$ columns. Thus the $k$ rooks which are in the first $k$ rows must be somewhere in the last $n - k$ columns. Thus if $n-k < k$ (i.e $n < 2k$), then we don't have enough columns to place the $k$ rooks which are in the first $k$ rows and hence if $n < 2k$, there are 0 such matrices. Suppose $n \geq 2k$: Suppose the 0's in the first $k$ rows are in the last $n - (k+2)$ columns. ~~There are $P( n - (k+2), k )$ ways to place the 0's in the first $k$ rows. ~~There are $(n - k)! - 10(n-k-1)! + 34(n-k-2)! - 45(n-k-3)! + 20(n-k-4)! - 2(n-k-5)!$ ways to place the remaining 0's. Suppose there exist a 0 in one of the first $k$ rows and in the $k+1$ or $k+2$ column (but not both). ~~There are $2kP( n - (k+2), k-1)$ ways to place the 0's in the first $k$ rows. ~~There are $(n - k)! - (6+2)(n-k-1)! + ([8+ 6(2)](n-k-2)! - [1 + 8(2)](n-k-3)! + [1(2)](n-k-4)! $ ways to place the remaining 0's. Suppose there exist 0's in the first $k$ rows and in both the $k+1$ and $k+2$ columns ~~There are $k(k-1) P(n - (k+2), k-2 )$ ways to place the 0's in the first $k$ rows. ~~There are $n - k - 3$ ways to place the 0 in the $k+1$ row, and $n - k - 3$ ways to place the 0 in the $k+2$ row, and $n - k - 3$ ways to place the 0 in the $k+3$ row, ~~There are $P(n - k - 3, n-k-3) = (n-k-3)!$ ways to place the remaining 0's in the remaining rows. Hence the number of different matrices is $P( n - (k+2), k )$ [$(n - k)! - 10(n-k-1)! + 34(n-k-2)! - 45(n-k-3)! + 20(n-k-4)! - 2(n-k-5)!$] + $2kP( n - (k+2), k-1)$[ $(n - k)! - (6+2)(n-k-1)! + ([8+ 6(2)](n-k-2)! - [1 + 8(2)](n-k-3)! + [1(2)](n-k-4)! $] + $k(k-1) P(n - (k+2), k-2 )$ $(n - k - 3)^3$$ (n-k-3)!$ 3.) Method 1: Solve recurrence relation: $h_n = 4h_{n-1} - h_{n-3} - h_{n-4} - h_{n-5}$ where $h_1 = 4, ~h_2 = 16,~ h_3 = 64 - 1, ~h_4 = 4^4 - [2[4] +1],~ h_5 = 4^5 - [3(16) + 2[4] +1]$ Or more complicated method: use inclusion/exclusion: $P_{1, i}$ = sequence contains AAATT starting at position $i$. $P_{2, i}$ = sequence contains CCG starting at position $i$. $P_{3, i}$ = sequence contains ACGT starting at position $i$. If DNA sequence has length $n$ $|P_{1, i}| = 4^{n-5}$, $|P_2, i| = 4^{n-4}$, $|P_3, i| = 4^{n-3}$, $|P_{1,i} \cap P_{1,,j}| = \cases{4^{n-10} & if $|i - j| \geq 5$ \cr 0 & otherwise}$ $|P_{1,i} \cap P_{2,j}| = \cases{4^{n-8} & if $j - i \geq 5$ or $i - j \geq 3$ \cr 0 & otherwise}$ etc. 4.) Distribute oranges first: Suppose first child gets 2 oranges. Distributing 12 indistinguishable apples among 3 distinguishable children so that each child gets at least two pieces of fruit = number of solutions to $x_1 + x_2 + x_3 = 12$ such that $x_1 \geq 0$, $x_2 \geq 2$, $x_3 \geq 2$ Let $y_1 = x_1 \geq 0$, $y_2 = x_2 - 2 \geq 0$, $y_3 = x_3 - 2 \geq 0$. Then the number of solutions to $x_1 + x_2 + x_3 = 12$ such that $x_1 \geq 0$, $x_2 \geq 2$, $x_3 \geq 2$ is the same as the number of solutions to $y_1 + y_2 +2+ y_3 + 2 = 12$ such that $y_1 \geq 0$, $y_2 \geq 0$, $y_3 \geq 0$ which is the same as the number of solutions to $y_1 + y_2 + y_3 = 8$ such that $y_1 \geq 0$, $y_2 \geq 0$, $y_3 \geq 0$ =$\left(\matrix{8 + 3 - 1 \cr 8 }\right)$ = $\left(\matrix{10 \cr 8 }\right) = 5(9) = 45$ Since any of the three children could have received the 2 oranges, the number of ways to distribute 2 oranges to one child and 12 indistinguishable apples among 3 distinguishable children so that each child gets at least two pieces of fruit = 3(45) Suppose exactly one child doesn't get an orange (i.e., two of the children receive exactly one orange): Distributing 12 indistinguishable apples among 3 distinguishable children so that each child gets at least two pieces of fruit = number of solutions to $x_1 + x_2 + x_3 = 12$ such that $x_1 \geq 1$, $x_2 \geq 1$, $x_3 \geq 2$ Let $y_1 = x_1 -1 \geq 0$, $y_2 = x_2 - 1 \geq 0$, $y_3 = x_3 - 2 \geq 0$. Then the number of solutions to $x_1 + x_2 + x_3 = 12$ such that $x_1 \geq 1$, $x_2 \geq 1$, $x_3 \geq 2$ is the same as the number of solutions to $y_1 + 1+ y_2 + 1+ y_3 + 2 = 12$ such that $y_1 \geq 0$, $y_2 \geq 0$, $y_3 \geq 0$. which is the same as the number of solutions to $y_1 + y_2 + y_3 = 8$ such that $y_1 \geq 0$, $y_2 \geq 0$, $y_3 \geq 0$. =$\left(\matrix{8 + 3 - 1 \cr 8 }\right)$ = $\left(\matrix{10 \cr 8 }\right) = 5(9) = 45$ Since any of the three children could have been the one to not receive an orange, the number of ways to distribute 2 oranges and 12 indistinguishable apples among 3 distinguishable children so that each child gets at least two pieces of fruit and exactly one child doesn't get an orange = 3(45) Hence the number of ways to distribute 2 oranges and 12 indistinguishable apples among 3 distinguishable children = 3(45) + 3(45) = 270. 6.) Suppose we wish to form a committee of arbitrary size which includes a chair and a vice-chair. There are $n(n-1)$ ways to choose a chair and a vice-chair from $n$ people. There are $2^{n-2}$ ways to form the rest of the committee from the remaining $n-2$ people if the committee can have an arbitrary number of people. Thus the number of different ways to form a committee of arbitrary size which includes a chair and a vice-chair starting with $n$ people is $n(n-1)2^{n-2}$. Suppose we wish to form a committee of consisting of $k$ people which includes chair and a vice-chair. There are $\left(\matrix{n \cr k }\right) $ ways to form a committee of $k$ people if we have $n$ people from which to choose. Having formed this committee, there are now $k(k-1)$ ways to choose a chair and a vice-chair from these $k$ people. Thus there are $k(k-1)\left(\matrix{n \cr k }\right) $ ways to form a committee of consisting of $k$ people which includes a chair and a vice-chair given $n$ people from which to choose. If the committee can be of arbitrary size then there could be 0 people, 1 person, 2 people, ..., or $n$ people on the committee. Hence the number of different ways to form a committee of arbitrary size which includes a chair and a vice-chair starting with $n$ people is $\Sigma_{k=0}^n k(k-1)\left(\matrix{n \cr k }\right) $. Thus $\Sigma_{k=0}^n k(k-1)\left(\matrix{n \cr k }\right) = n(n-1)2^{n-2}$. \end 47) Let $h_n$ = number of $n$ digit numbers where 1 and 3 occur an even number of times. Let $g_n$ = number of $n$ digit numbers where 1 occurs an even number of times and 3 occurs an odd number of times. Let $f_n$ = number of $n$ digit numbers where 1 occurs an odd number of times and 3 occurs an even number of times. Let $j_n$ = number of $n$ digit numbers where 1 and 3 occur an odd number of times. Note $g_n = f_n$ and $h_n + g_n + f_n + j_n =5^n$ $h_n = 3h_{n-1} + g_{n-1} + f_{n-1} = 3h_{n-1} + 2g_{n-1}$ $g_n = 3g_{n-1} + j_{n-1} + h_{n-1} = 3g_{n-1} + 5^{n-1} - (f_{n-1} + g_{n-1}) = 3g_{n-1} + 5^{n-1} - 2g_{n-1} = g_{n-1} + 5^{n-1} $ Find homogeneous solution to $g_n - g_{n-1} = 0$: Suppose $g_n = q^n$. Then $q^n - q^{n-1} = q^{n-1}(q - 1) = 0$. Thus $q = 1$ and $1^n = 1$ is a homogeneous solution to $g_n - g_{n-1} = 0$. Find non-homogeneous solution to $g_n - g_{n-1} = 5^{n-1}$: Suppose $g_n = a5^n$. Then $a5^n - a5^{n-1} = 5^{n-1}$ Hence $5a - a = 1$ and $a = {1 \over 4}$. Thus a general solution to $g_n - g_{n-1} = 5^n$ is $c(1) + {1 \over 4}(5^n)$. $g_1 = 1$. Thus $c + {1 \over 4}(5) = 1$ and $c = 1 - {5 \over 4} = -{1 \over 4}$. Thus $g_n = -{1 \over 4} + {1 \over 4}(5^n)$. Hence $h_n = 3h_{n-1} + 2g_{n-1} = 3h_{n-1} - {1 \over 2} + {1 \over 2}(5^{n-1}) = 3h_{n-1} - {1 \over 2} + {5^{n-1} \over 2} $ Find homogeneous solution to $h_n - 3h_{n-1} = 0$: Suppose $h_n = q^n$. Then $q^n - 3q^{n-1} = q^{n-1}(q - 3) = 0$. Thus $q = 3$ and $3^n$ is a homogeneous solution to $h_n - 3h_{n-1} = 0$. Find non-homogeneous solution to $h_n - 3h_{n-1} = - {1 \over 2} + {5^{n-1} \over 2} $: Suppose $h_n = a(5^n) + b$. Then $a(5^n) + b - 3(a5^{n-1} + b) = 5^na(1 - {3 \over 5}) -2b = {2\over 5}a(5^n) - 2b = - {1 \over 2} + {5^{n-1} \over 2} $ Thus $-2b = - {1 \over 2}$ and $b = {1 \over 4} $ And $ {2\over 5}a(5^n) = {5^{n-1} \over 2} $ and $a = {1 \over 4}$. Thus a general solution to $h_n - 3h_{n-1} = - {1 \over 2} + {5^{n-2} \over 2} $ is $c3^n + {1 \over 4}(5^n) + {1 \over 4} $. $h_1 = 3$: $3 = 3c + {5 \over 4} + {1 \over 4} = 3c + {6 \over 4} = 3c + {3 \over 2} $. $3c = 3 - {3 \over 2} = {3 \over 2}$. Thus $c = {1 \over 2} $ Hence $h_n = {1 \over 2}( 3^n) + {1 \over 4}(5^n) + {1 \over 4} $ \end Distributing 12 indistinguishable apples among 3 distinguishable children = number of solutions to $x_1 + x_2 + x_3 = 12$:$\left(\matrix{12 + 3 - 1 \cr 12 }\right)$ = $\left(\matrix{14 \cr 12 }\right) = 7(13)$ Distributing 2 indistinguishable oranges among 3 distinguishable children = number of solutions to $x_1 + x_2 + x_3 = 2$:$\left(\matrix{2 + 3 - 1 \cr 2 }\right)$ = $\left(\matrix{4 \cr 2 }\right) = 2(3)$ Distributing 12 indistinguishable apples and 2 indistinguishable oranges among 3 distinguishable children : 7(13)(2)(3) Distributing 12 indistinguishable apples and 2 indistinguishable oranges among 3 distinguishable children so that at least one child does not get 2 pieces of fruit: At least one child gets 0 pieces of fruit: Distributing 12 indistinguishable apples among 2 distinguishable children = number of solutions to $x_1 + x_2 = 12$:$\left(\matrix{12 + 2 - 1 \cr 12 }\right)$ = $\left(\matrix{13 \cr 12 }\right) = 13$ Distributing 2 indistinguishable oranges among 2 distinguishable children = number of solutions to $x_1 + x_2 = 2$:$\left(\matrix{2 + 2 - 1 \cr 2 }\right)$ = $\left(\matrix{3 \cr 2 }\right) = 3$ Distributing 12 indistinguishable apples and 2 indistinguishable oranges among 2 distinguishable children : 39 At least one child gets exactly 1 piece of fruit: If that piece of fruit is an apple: Distributing 11 indistinguishable apples among 2 distinguishable children = number of solutions to $x_1 + x_2 = 11$:$\left(\matrix{11 + 2 - 1 \cr 11 }\right)$ = $\left(\matrix{12 \cr 11 }\right) = 12$ Distributing 2 indistinguishable oranges among 2 distinguishable children = number of solutions to $x_1 + x_2 = 2$:$\left(\matrix{2 + 2 - 1 \cr 2 }\right)$ = $\left(\matrix{3 \cr 2 }\right) = 3$ Distributing 11 indistinguishable apples and 2 indistinguishable oranges among 2 distinguishable children : 36 OR If that piece of fruit is an orange: Distributing 12 indistinguishable apples among 2 distinguishable children = number of solutions to $x_1 + x_2 = 12$:$\left(\matrix{12 + 2 - 1 \cr 12 }\right)$ = $\left(\matrix{13 \cr 12 }\right) = 13$ Distributing 1 indistinguishable oranges among 2 distinguishable children = number of solutions to $x_1 + x_2 = 1$:$\left(\matrix{1 + 2 - 1 \cr 1 }\right)$ = $\left(\matrix{2 \cr 1 }\right) = 2$ Distributing 12 indistinguishable apples and 1 indistinguishable oranges among 2 distinguishable children : 26 If \end