If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Precalculus>Unit 8

Lesson 3: Permutations

# 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?
• 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.
• 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?
• Lets suppose you have just 2 bits. How many numbers can you represent?

``0  0  =  00  1  =  11  0  =  21  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 = 00 0 1 = 10 1 0 = 20 1 1 = 31 0 0 = 41 0 1 = 51 1 0 = 61 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.
• in how many ways can the first, second, and third placers be chosen from a group of 8 contestants?
• 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.
• can anyone tell me why the factorial of 0 is 1?
• 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.
• And what if BRYG is considered the same as GRYB? What numbers are input into the spaces then, for calculating the answer?
• 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!
• 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. :(
• 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)!.
• in how many ways can 30 people be divided into 15 couples
• 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
• Well, 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.
• 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.
• how would you solve the problem:

"How many possible options are there to place 12 golfers on three teams of four?
• 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.