Problem 19
How many times is the print statement executed for the following program segment? (Here, \(i, j, k\), and \(m\) are integer variables.) for \(i:=1\) to 20 do for \(j:=1\) to i do for \(k:=1\) to \(j\) do for \(m:=1\) to \(k\) do \(\quad\) print \((i * j)+(k * m)\)
Problem 20
In the following program segment, \(i, j, k\), and counter are integer variables. Determine the value that the variable counter will have after the segment is executed. counter \(:=10\) for \(i:=1\) to 15 do for \(j:=i\) to 15 do for \(k:=j\) to 15 do \(\quad\) counter \(:=\) counter \(+1\)
Problem 20
Over the Internet, data are transmitted in structured blocks of bits called datagrams. a) In how many ways can the letters in DATAGRAM be arranged? b) For the arrangements of part (a), how many have all three A's together?
Problem 20
Given \(n\) distinct objects, determine in how many ways \(r\) of these objects can be arranged in a circle, where arrangements are considered the same if one can be obtained from the other by rotation.
Problem 21
For every positive integer \(n\), show that $$ \left(\begin{array}{l} n \\ 0 \end{array}\right)+\left(\begin{array}{l} n \\ 2 \end{array}\right)+\left(\begin{array}{l} n \\ 4 \end{array}\right)+\cdots=\left(\begin{array}{l} n \\ 1 \end{array}\right)+\left(\begin{array}{l} n \\ 3 \end{array}\right)+\left(\begin{array}{l} n \\ 5 \end{array}\right)+\cdots $$
Problem 21
a) How many arrangements are there of all the letters in SOCIOLOGICAL? b) In how many of the arrangements in part (a) are A and G adjacent? c) In how many of the arrangements in part (a) are all the vowels adjacent?
Problem 21
Find the value of \(s u m\) after the given program segment is executed. (Here \(i, j, k\), increment, and sum are integer variables.) $$ \begin{aligned} &\text { increment }:=0 \\ &\text { sum }:=0 \\ &\text { for } i:=1 \text { to } 10 \text { do } \\ &\text { for } j:=1 \text { to i do } \\ &\text { for } k:=1 \text { to } j \text { do } \\ &\text { begin } \\ &\text { increment : }=\text { increment }+1 \\ &\text { sum }:=\text { sum }+\text { increment } \\ &\text { end } \end{aligned} $$
Problem 22
How many positive integers \(n\) can we form using the digits \(3,4,4,5,5,6,7\) if we want \(n\) to exceed \(5,000,000 ?\)
Problem 22
a) In how many ways can the letters in UNUSUAL be arranged? b) For the arrangements in part (a), how many have all three U's together? c) How many of the arrangements in part (a) have no consecutive U's?
Problem 23
Determine the coefficient of \(x^{9} y^{3}\) in the expansions of (a) \((x+y)^{12}\), (b) \((x+2 y)^{12}\), and (c) \((2 x-3 y)^{12}\).