Main content

# Ways to arrange colors

Thinking about how many ways you can pick four colors from a group of 6. Created by Sal Khan and Monterey Institute for Technology and Education.

## Want to join the conversation?

- What if the colours CAN repeat? How would the process/equation change?(27 votes)
- 6 x 6 x 6 x 6

Think about it like this: Since the colours can repeat and there are 6 alternatives, there will be 6 possible colours for every slot.(66 votes)

- Am not much into binary numbers and such but am wondering... Why can we store 256 different values into 8 bits and why does 8 bit translate into a decimal value of 4 decimal spaces? I know that an 8 bit color has 256 levels of black and white. And I can get any color when I mix 3 basic colors, Red, Green and Blue and using combinatronics I get 256^3 since these 3 colors can have same value or same level of shade between black and white. But why does 8 bit translate to 256 shades?(10 votes)
- Lets suppose you have just 2 bits. How many numbers can you represent?
`0 0 = 0`

0 1 = 1

1 0 = 2

1 1 = 3

So with just 2 bits we can represent 4 numbers. Notice that 2^2 = 4

Let's add another bit, now how many numbers can we represent?`0 0 0 = 0`

0 0 1 = 1

0 1 0 = 2

0 1 1 = 3

1 0 0 = 4

1 0 1 = 5

1 1 0 = 6

1 1 1 = 7

So with three bits we can represent 8 numbers, 0 to 7. Notice that 2^3 = 8.

That is the pattern. So, with 8 bits we can represent 2^8=256 different numbers or levels.(28 votes)

- in how many ways can the first, second, and third placers be chosen from a group of 8 contestants?(6 votes)
- Sorry i'm replying to you 8 years later, but it's better than nothing.

If you watch the Permutation formula video, you see that if you don't have enough spots for every position, you take the places, which there are 3 in this case, and then start from 8 and count down 3, if it was 4 you would count down 4, etc. So 8,7, and 6. So you multiply 8 7 and 6. And you get 336 ways that first second and third placers be chosen from 8 people.(6 votes)

- can anyone tell me why the factorial of 0 is 1?(6 votes)
- There's only one way to do nothing hence 0! =1, like the number of ways to arrange 4 objects is 4! the number of ways to arrange 0 objects is 1, by doing nothing.(2 votes)

- And what if BRYG is considered the same as GRYB? What numbers are input into the spaces then, for calculating the answer?(5 votes)
- Good question! He mentions that because he considers them
*different*, he is finding**permutations**(P). When you consider BRYG and GRYB the*same*, that is called finding the number of**combinations**(C). You can see that there will (almost) always be*fewer*combinations than permutations, since lots of permutations will only count as a single combination. If you are choosing r things out a collection of n things (in this case we are choosing 4 colors out of a total of 6 colors, so r = 4 and n = 6), then C(n, r) = P(n, r) / r!, where the "!" means "factorial" (3! = 3*2*1 = 6, 5! = 5*4*3*2*1 = 120, etc.). So in this problem, the number of combinations would equal the number of permutations divided by 4! = 4*3*2*1 = 24. So if BRYG, GRYB, RGBY, etc., were considered the same, then instead of 360, the number of possibilities would be 360/24 = 15. Not very many!(7 votes)

- this is a question about homework but this is not the real question: If the numbers 1-8 are used to make 3-digit numbers and they do not reapt , how many 3-digit numbers can be made? What is the formula? I don't get this. :((5 votes)
- Try the multiplication principle. You have 8 choices for the first digit, then (because there are no repeats) 7 choices for the second digit, and so on. Multiply 8*7*6 to get your answer. This is also the "permutation" formula, however: 8 P 3 = 8!/(8-3)!.(6 votes)

- in how many ways can 30 people be divided into 15 couples(5 votes)
- If you have 2 people and 1 couple, then there is only 1 option.

If you have 4 people and 2 couples, then the first person will select from 3 people. 2 people are left after they split off, but there is only 1 way to combine 2 people so we get 3x1.

If you have 6 people and 3 couples, then the first person chooses from 5 people and that leaves 4 people to make 2 couples. From above this is 3x1. So all together this makes 5x3x1

You can keep going like this and you'll see that you end up with a factorial of odd numbers up through 29. To get this, you can divide 30! by the factorial of even numbers through 30. This looks like (2^15)x15! because (2x2x2...2)(1x2x3....15) = (2x4x6...30). So all together it would look like

30! / [(2^15) x 15!] = 6.19 x 10^15(4 votes)

- 0:39Well, I think it matters because the "The codemaker gives hints about whether the colors are correct and IN THE RIGHT POSITION." shows us that we can't mix it up (the order matters). Because if you are trying to decipher a code, the arrangement of the code has to be in order. For example, B L U E is different than U L E B although the letters are the same. That is a hint for us to use permutation instead of combination because order matters in permutation.(4 votes)
- To be honest, I still think Sal is right, but I understand your thoughts. The question is basically the paragraph but shortened. In the paragraph, it's mentioned that the codemaker says whether the color is CORRECT or NOT, therefore we know the colors CANNOT be repeated.

If the codemaker doesn't give any hints, then the color COULD be repeated. But that would obviously be included in the question. That's why I agree with Sal that the paragraph doesn't really matter.(4 votes)

- how would you solve the problem:

"How many possible options are there to place 12 golfers on three teams of four?(4 votes)- Imagine you have the 12 golfers lined up (labelled as 'g') with two separators to group them into teams.

gggg|gggg|gggg

If you leave the separators in place, you can reorder the golfers in 12! ways, which will divide them into teams in every possible way with some overcounting.

Each team can be ordered in 4! ways, so there are (4!)³ ways to reorder the golfers within their teams. For each of those orderings, we can also permute the teams themselves in 3!=6 ways. That is, our 12! figure counts each team (4!)³·6 ways, so the correct number is

12!/((4!)³·6)=5775.(4 votes)

- can we talk about how Sal thinks the color of the words is green and not yellow? lol :)(4 votes)

## Video transcript

In one game, a code made using
different colors is created by one player, the codemaker,
and the other player, the codebreaker, tries to
guess the code. The codemaker gives hints about
whether the colors are correct and in the
right position. All right. The possible colors are blue--
let me underline these in the actual colors-- blue, yellow,
white, red, orange and green. Green is already written in
green, but I'll underline it in green again. And green. How many 4-color codes
can be made if the colors cannot be repeated? To some degree, this whole
paragraph in the beginning doesn't even matter. If we're just choosing from--
let's see, we're choosing from-- how many colors
are there? There's 1, 2, 3, 4, 5, 6 colors,
and we're going to pick 4 of them. How many 4-color codes
can be made if the colors cannot be repeated? And since these are codes, we're
going to assume that blue, red, yellow and green,
that this-- that that is different than green, red,
yellow and blue. We're going to assume that these
are not the same code. Even though we've picked the
same 4 colors, we're going to assume that these are 2
different codes, and that makes sense because we're
dealing with codes. So these are different codes. So this would count as 2
different codes right here, even though we've picked
the same actual colors. The same 4 colors,
we've picked them in different orders. Now, with that out of the way,
let's think about how many different ways we can
pick 4 colors. So let's say we have
4 slots here. 1 slot, 2 slot, 3 slot
and 4 slots. And at first, we care only
about, how many ways can we pick a color for that slot right
there, that first slot? We haven't picked
any colors yet. Well, we have 6 possible colors,
1, 2, 3, 4, 5, 6. So there's going to be 6
different possibilities for this slot right there. So let's put a 6 right there. Now, they told us that the
colors cannot be repeated, so whatever color is in this slot,
we're going to take it out of the possible colors. So now that we've taken that
color out, how many possibilities are when we go
to this slot, when we go to the next slot? How many possibilities
when we go to the next slot right here? Well, we took 1 of the 6 out for
the first slot, so there's only 5 possibilities here. And by the same logic when we
go to the third slot, we've used up 2 of the slots-- 2 of
the colors already, so there would only 4 possible
colors left. And then for the last slot, we
would've used up 3 of the colors, so there's only
3 possibilities left. So if we think about all of the
possibilities, all of the permutations-- and permutations
are when you think about all the
possibilities and you do care about order; where you say that
this is different than this-- this is a different
permutation than this. So all of the different
permutations here, when you pick 4 colors out of a possible
of 6 colors, it's going to be 6 possibilities for
the first 1, times 5 for the second bucket, times 4 for
the third or the third bucket of the third position,
times 3. So 6 times 5 is 30, times
4 is times 3. So 30 times 12. So this is 30 times 12, which is
equal to their 360 possible 4-color codes.