logo

UTK Notes


8.31.2023

Question 1: Which of the following is equivalent to the sum:

\[\binom{3}{0} + \binom{3}{1} + \binom{3}{2} + \binom{3}{3}\]

(3 points)

A. $3^{2}$
B. $2^{3}$
C. $3^{4}$
D. $2^{4}$

Answer B. $2^{3}$

Question 2: How many times would the function fxn() function be called in the code below?

1
2
3
4
for(i = 0;i<10;i++) {
    for(j=0;j<=i;j++) {
        for(k=0;k<=j;k++) {
            fxn(i, j, k); }}}

(3 points)

A. $\binom{11}{3}$

B. $\binom{9}{3}$

C. $\binom{12}{3}$

D. $\binom{10}{3}$

Answer C. $\binom{12}{3}$

Question 3: How many times would the function fxn() function be called in the code below?

1
2
3
4
for(i = 0;i<10;i++) {
    for(j=0;j<=10;j++) {
        for(k=0;k<=10;k++) {
            fxn(i, j, k); }}}

(3 points)

A. $\binom{10}{3}$

B. $\binom{12}{3}$

C. $1000$
D. $999$

Answer C. $1000$

PDF Download