 Hi, I'm Zor. Welcome to Unizor Education. We continue solving problems on combinatorics. This is the seventh series of problems of the first part. You see, 1.7, so we will have another part. Now, this lecture is part of the whole educational website, Unizor.com, for advanced mathematics for teenagers. I do recommend you to go to this website and try to solve all these problems yourself first, without listening to whatever I'm saying right now. All the problems are presented in the notes for this lecture. With solutions and answers, but obviously you first check if you can solve it yourself, check it against the answer, and if it's good, fine, excellent. And then listen to the lecture. These self-study are very, very important, actually, because the whole purpose of this course is to develop your analytical abilities to solve the problems, because the problems which we are talking about right now have practically nothing to do with real life. So it's just for training of your mental abilities, if you wish. Anyway, so let's go straight to the problems, and I have four of them. Number one. Okay, I have N houses on the street. Now, people who live in these houses, well, let's consider for simplicity there is one person who lives in every house. They know only their immediate neighbors. So this guy knows this one and this one. This guy knows this and this. This one who is on the edge of the street knows only this one, right? So, now, our task is to find three people who do not know each other. And basically the problem is how many different triplets of sets of three people you can pick from all these houses in such a way that none of them knows each other. Okay, I'm going to present it in two different ways, actually. Number one is let's calculate it this way. First, we will count all the different triplets which I can choose. And then I will subtract those which I do not consider fit for this task. I mean those who contain somebody who knows each other, right? So the total number of triplets is obviously number of combinations from N by 3. That's easy. Any three houses, any three people who live in these houses are in this count. Now let's exclude those which know each other. So we will exclude those triplets who contain people who know each other. Well, if there are people who know each other, they are neighbors, right? So it's either number one and number two, or number two and number three, or number three and number four, etc. So how many pairs of neighbors exist? Well, if the total number of N, then the neighbors are one and two, two and three, etc. The last one would be N minus one and N, right? So from one to N minus one and so it's N minus one pairs. Now with each such pair, I can choose any other house and I will get a triplet which I don't really need. We need people who have neighbors in it, right? Who know each other. Now how many others? Well, if two are fixed, then there are obviously N minus two who belong to any other house, right? So I have to multiply number of neighboring pairs by number of other people I can choose into each of these triplets. Well, here you have to be very, very careful. And this is a perfect example where this problem on combinatorics has this, how should I say it, some kind of underwater current. You have to be very careful in this particular regard because look at these three. Let's say this is number K, K plus one and K plus two. So we have three houses which are in a row. They're all immediate neighbors to each other, right? Now if I counted this pair and then one of others would need to connect the K plus second to this pair and I counted it. But then I can consider this pair and count this guy among others. So it looks like this triplet of immediate neighbors was counted twice. Now how many immediate triples I have? Well, it's either one, two, three or two, three, four, etc. And the last one would be N minus two and minus one and N. So it's N minus two of those, right? So I have to really subtract N minus two from this number because I counted double each triplet of three immediate neighbors was counted twice as this pair plus this or this pair plus that. So that's a very, very important and very kind of... It's a nuance, I would say, of this particular problem. So you have to be very, very careful when you're counting something. So if you double counted something, you have to subtract it. So overcounting and undercounting are definitely dangerous in these problems. So this is the number I really have to subtract. This is a number of triplets which have pairs of people who know each other. And by the way, this is equal to... If you factor out N minus two, you will have N minus one minus one, so it will be N minus two square. So the answer would be this. As I was saying many times, it's very good to have the problem approach from different angles if it will come up with the same result. So let's try to do it in this particular case. Here is the second way I would like to count. In this case, I don't want actually to go into the logic which leads to this double counting. I would like to count only those which really must be excluded, only the triplets which have pairs of people who know each other but without overcounting. All right, how can I do it? Well, here is my problem for the first solution. I had these triplets of neighboring houses, immediate neighbors, one after another, all three counted twice. So let's just do it differently this time to avoid this. First, I will count how many triplets exist where all three people know each other. Well, obviously it's those one, two, three, two, three, four, etc., N minus two, N minus one, N. These are triplets of all three being immediate neighbors. I count them separately. So how many of them are? N minus two, right? From one to N minus two. Okay. Now I will count only those who have exactly two neighbors who know each other and the third one is remote. So the two are neighbors and the third one is remote. Well, here unfortunately I have to split it into cases because if these two which know each other are in the middle of the street, like these two, then all together are N of them. Then immediate on both sides and these two makes the number of all other remote things, N minus four, right? N minus two and minus two immediate neighbors. However, my pair is at the edge of the street. I have to subtract only one immediate neighbors if I want to count remotes. So in this case remotes are N minus three. So for some pairs I have N minus four remote houses and for some pairs I have only N minus three. So let's count them separately, all right? How many pairs which are at the edge of the street? Well, two. One in the beginning, pair and one pair at the end. So I have two pairs and each of them has N minus three remotes to connect to this pair to have a triplet where only two people know each other. On the other hand, the other which are inside, so how many pairs are inside? Well, there are total number of pairs N minus one, right? One, two, two, three, et cetera, N minus one, N. So the total number of pairs N minus one. Two of them are at the edges. So the rest N minus one, minus two, which is N minus three pairs are in the middle of the street and they have N minus four remote houses which I can combine to make a triplet where only two people know each other. So that's my total count N minus two plus two N minus three plus N minus three N minus four. Well, equals to N minus two plus N minus three factor out I will have N minus four and two which is N minus two. N minus two factor out. I have N minus three and one. N minus two which is N minus two square. So I have to subtract N minus two square. The same result as before. So it's good that I have the same result. It means I am on the right way. But let me just spend some time to simplify this. So this equals to N N minus one N minus two divided by one, two, three minus N minus two square equals... Okay, what should we do? Well, let's factor out N minus two. I have N square minus N minus six N plus twelve. Right? N minus two was out. So I have N minus two remaining multiplied by six. So it's six N minus twelve. But there is a minus sign, so it's minus six N plus twelve. Equals N minus two. N square minus seven N plus twelve. It's N minus three N minus four. That's the formula. Now, this is number of combinations from N minus two by three. It's a very simple formula, right? So I don't know. It seems to me there might be some kind of other solution which leads directly to this formula. But I just don't know it. So if you know, by all means send it to me and I'll publish it on the website. So it looks like this formula seems to be too simple not to have a solution which leads directly to this. So maybe there is some trick which you can arrange and do this. Correct. So that's it for this particular problem. Next. Next is a simple one. You have M conference rooms and each room can hold N people. So let's consider we have a conference and we have M times N people participating in the conference and we would like to spread them among M rooms and N people in each room because that's exactly what each room holds. The question is how many different arrangements we can make. I mean obviously the arrangement is basically the same number of people to be in one room. And if I change the rooms for instance and I don't change the composition of the room that's exactly the same arrangement, right? So all rooms are equivalent and obviously I have to count how many different ways to spread these M times N people among M rooms exist. Now the easiest way is first have the permutation of all the people and there are M times N factorial but now they are broken into the rooms, right? The first N people here, the second N people here, the third N people here, etc. But now if you think about it if you change the rooms it does not change the arrangement, right? So there are M factorial of different segments of the rooms so if you just change the rooms it doesn't change anything. Now every room has a certain number of people and if you permute all these people within the same room it also doesn't really change anything, right? So you can definitely say that permutation of these N people which is N factorial and permutation of these N people which is also N factorial, which is also N factorial, etc. So it's N factorial to the power of M because these are all constitute the same arrangement of people among the rooms. So that's the answer. You permute without changing arrangements the rooms and people within each room. Next, also easy, if you have N straight lines now let's consider the most general case like lines are not parallel there are no three lines which are intersecting in the same point and it's also important for this particular problem there are no four lines which can be inscribed in a circle so because my question is about circles how many different circles and the circle can be inscribed or circumscribed inscribed actually in this particular case can be inscribed into any triangle, right? So question is how many circles exist which are tangential, each of them is tangential to exactly three lines because for any three non-parallel lines we can find a circle which uniquely tangential to inside the triangle or outside the triangle, right? So you can have it here or you can have it here or here or here So with each three lines you have four different circles which can be tangential to all three of them So now the answer to the question is how many circles are there which are tangential with each of them tangential to three lines This is obviously four times number of different combinations from n lines by three That's it That's the answer And the fourth problem Actually I like this problem because I don't know how to say how to qualify actually this I think it's cute if you wish and it looks really simple but it has a very very important combinatoric sense So we have a cube Now the cube has six sides and let's say I have six different colors I would like to paint six different sides with six different colors Now Obviously the question is how many different ways to paint six different sides of the cube with six different colors exist But I have to really make one very important note here If I can rotate the cube in some way and one combination of colors is basically transformed into another I really should consider them to be exactly the same color scheme So my question now is more precise question how many different color schemes there exist Now if we don't take into account that one can be transformed into another then obviously I have six factorials which is 720 different permutations of six colors Now which of them are the same So the question is how many different permutations are transformable from one to another Here is my logic Let's have this cube fixed in some position and some particular side is on the top So let's call this side number one Now these sides will be number two, number three number four on the back and number five on the left and number six on the bottom So we fixed it Now let's put one particular color into the number one Okay, number one is equal to red and put some other colors onto other Number two is something, number three is something, etc Now how many different transformations of this cube exist if my number one which is red is still on the top Well, if I fix the position of the top of the cube now all transformations are actually rotations So I can rotate the cube and there are four different positions I rotate it by 90 degree, by 180, and by 270 So the beginning position and three additional positions are rotations So I have four different positions of the cube with one side on the top But there are six sides So I can first put one side on the top one of six and with each of them I will have four different positions of the cube So I have six times four equals to 24 different transformations of the cube which are completely equivalent to each other They are transformed from one to another First we position the top to whatever is necessary and then we start switching them around rotating them around around this vertical axis to get into the position So I have 24 different positions of the cube which are completely equivalent to each other Well, that means I have such a different coloring scheme if you wish Well, that's it, thank you very much I do encourage you to go back to Unizor.com and go through these problems yourself again Just solve it yourself, check it against the answer which is provided and that would be a good kind of exercise for your analytical mind That's it, thank you very much and good luck