# A sequence of number...

• Apr 26th 2010, 08:15 PM
ManyTimes
A sequence of number...
A sequence of numbers:
0 0 0 0 0 0 1 0 2 1 2 0 3 1 0 2

It is 16 numbers long, consists of nine 0's, three 1's, three 2's and one 3.

How many different sequences of these 0's and 1's and 2's and the one 3 can you create in this 16 bit long number?

My shot:
Four different numbers: 0, 1, 2 and 3.
The length of the sequence is 16.
Among those 16, nine of those are nulls, for every sequence.
Among those 16, three of those are 1's for every sequence.
Among those 16, three of those are 2's for every sequence.
Among those 16, 1 of those is 3 for every sequence.

Alone they can be rearranged:
The nine 0's: 16 - 9+1 = 8 * 9 = 72 times can 0 alone be rearranged.
The three 1's: 16 - 3+1 = 14*3 = 42 times can the 1's be rearranged.
The three 2's: 16 - 3+1 = 14*3 = 42 times can the 2's be rearranged.
The one 3: 16 - 1 +1 = 16*1 = 16 times.

Then I multiply those:
72*42*42*16 = 2032128times can this sequence of numbers be rearranged iwthin a 16 bit long number.

Something wrong here?
Not entirely sure on my method...
• Apr 26th 2010, 10:54 PM
matheagle
I believe the answer should just be...

$\displaystyle {16 \choose 9,3,3,1}={16!\over 9! 3!3!1!}$

It's like how many ways you can write distinct 'words' with Mississippi.
First you consider all 16! possiblities, then when you switch the 0's you get the same response.
So you need to eliminate all the double counting, that's the denominator in the choose.
• Apr 27th 2010, 06:37 AM
Soroban
Hello, ManyTimes!

Quote:

A sequence of numbers: .0 0 0 0 0 0 1 0 2 1 2 0 3 1 0 2

It is 16 numbers long: nine 0's, three 1's, three 2's, one 3.

How many different 16-bit numbers can you create with these sixteen digits?

Here's another approach you could have used . . .

There are sixteen spaces.

Choose 9 of the 16 spaces to place the 0's.
. . There are: .$\displaystyle {16\choose9} \,=\,11,400$ ways.

Choose 3 of the remaining 7 spaces to place the 3's.
. . There are: .$\displaystyle {7\choose3} \,=\,35$ ways.

Choose 3 of the remaining 4 spaces to place the 2's.
. . There are: .$\displaystyle {4\choose3} \,=\,4$ ways.

There is one space remaining to place the 3.
. . There is: .$\displaystyle {1\choose1} \,=\,1$ way.

Therefore: .$\displaystyle 11,\!440 \times 35 \times 4 \times 1 \:=\:1,\!601,\!600\,\text{ possible 16-bit numbers.}$

• Apr 27th 2010, 06:49 AM
ManyTimes
Matheagle: Yes, I'll be darned... Faculty (fakultet in my native tounge)... Yes, thats the thing! :)

That means my approach was a bit off... or somewhat, even if I did not +1 after subtracting, would leave me with 1.533.168 ways. Sad, thought my logic could work...

Solved :)