Hello, smoothi963!

We have a 3-digit number: ._ _ _A ternary sequence is a sequence of digits made up entirely

of 0's, 1's, and 2's such as 002221102. (this is also known as a base-three number)

A. How many 3-digit ternary sequences have exactly one 1?

The "1" can be placed in any of the3slots.

The second digit must not be another 1; there are2choices.

The third digit also has2choices.

Hence, there are: .3 × 2² .= .12three-digit numbers with one 1.

We have a four-digit number: ._ _ _ _B. How many 4-digit ternary sequences have exactly one 1?

The "1" can be placed in any of the4slots.

The second, third and fourth digits have2choices each.

Hence, there are: .4 × 2³ .= .32four-digit numbers with one 1.

We have a four-digit number: ._ _ _ _C. How many 4-digit ternary sequences have exactly two 1's?

The two 1's can be placed in C(4,2) =6ways.

The other two digits have2choices each.

Hence, there are: .6 × 2² .= .24four-digit numbers with two 1's.

Generalize what we did before . . .D. How many n-digit ternary sequences have exactly k 1's?

(where n and k are non negative integers with k < n)

We have ann-digit number: ._ _ _ . . . _

Thek1's can be placed in: .C(n,k) ways

Each of the othern-kdigits have 2 choices each.

. . There are: .2^(n-k) ways

There are: .C(n,k)·2^(n-k)n-digit numbers withk1's.