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.

Main content
Current time:0:00Total duration:3:45

Video transcript

in one game a code made using different colors is created by one player the code maker and the other player the Code Breaker tries to guess the code the code maker gives hints about whether the colors are correct and in the right position alright the possible colors are blue let me underline these in the actual colors blue yellow blue yellow white white red red orange orange and green Green's already written in green but I'll underline it in green again and green how many four 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 four of them how many four color codes can be made if the colors cannot be repeated and since these are codes I'm we're going to assume that blue that blue red red yellow yellow and green that this that that is different than green red green red yellow yellow and blue we're going to assume that these are not the same code even though we've picked the same four colors we're going to assume that these are two different codes and that makes sense because we're dealing with codes so these are different codes different codes so this would count as two different codes right here even though we've picked even though we've picked the same actual colors the same four 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 four colors so let's say we have four slots here we have four slots one slot two slot three slot and four 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 six possible colors 1 2 3 4 5 6 so there's going to be 6 different possibilities for this slot right there let's put a six 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 one of the six out for the first slot so there's only five possibilities here and by the same logic when we go to the third slot we've used up two of the slots two of the colors already so there's only four possible colors left and then for the last slot we would have used up three of the color so there's only three possibilities left so if we think about all of the possibilities all of the permutations and permutations are we 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 when you pick four colors out of a possible of six colors it's going to be six six possibilities for the first one times five for the second bucket times four for the fourth for the third or the 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 for color codes