 Welcome back to our lecture series, Math 3120, Transition to Advanced Mathematics for Students at Southern Utah University. As usual, I'll be your professor today, Dr. Andrew Misseldine. Incompetent torques were often are faced with enumeration problems involving partitions. More specifically, given a set A and some partition P, we want to count the number of classes inside of the partition. So if A is our set and if P is our partition of the set, what we often want to do is count the number of cells in the partition. That is, we want to find the cardinality of the partition itself. How many classes are there? And the way we approach as often is by looking at elements inside the set and using that to help us better understand the partition. Because after all, if you look at a class, you could take an element in that class, and they're probably connected to each other by some relation, like there's some notion of sameness, like these elements are in the same cell for some reason. And so you might look at a typical element in a class and use that to try to count how many classes you have. But the problem you can get is over counting. Over counting is a problem when you count the same class in a partition more than once because you took two different representatives of the same class and counted them more than once. To try to illustrate that, let me actually take a very simple classic problem from polynomial theory and consider how one can over count the potential rational roots it has. So consider the polynomial 2x squared minus 11x minus 6. By the so-called rational roots theorem, we actually have a list of potential rational roots for that polynomial. Now, the rational roots theorem tells us that all of the possible rational roots of a polynomial can be found by taking the divisors of the constant term and divide them by the divisors of the leading coefficient. So if you take all the divisors of 6, which would be 1, 2, 3, and 6, and you divide that by all the possible divisors of 1 and 2, and these are integer divisors, so they actually could be plus or minus, plus or minus 1, plus or minus 2, plus or minus 3, plus or minus 6. You have to take all the possible divisors of 6 and divide them by all the possible divisors of 2. And if you look at that complete list, you look at the following. You get plus or minus 1, plus or minus 2, plus or minus 3, plus or minus 6, plus or minus 1 half, plus or minus 2 halves, plus or minus 3 halves, and plus or minus 6 halves. And so this gives us the list of potential rational roots. The rational roots theorem then says that if this polynomial has a rational root, it's among these numbers I've listed on the screen right now. And therefore, if you're going to start looking for them, you could start testing these numbers. And so like a college Auser student might then proceed to start doing synthetic division on the polynomial, using these as your potential roots there. But how many potential roots did I list here? It's tempting to say that there are 2 times 8, that is 16 potential roots in this situation. Where did the 2 times 8 come from? Well, 2 comes from the fact that every choice is a plus or minus. There's the positive choice and the negative choice. Sure, you can go with that. But this 8, the temptation there is that, oh, 6 has 4 divisors, 2 has 2 divisors, and of course only counting the positive divisors right now. And 2 times 4 gives you 8. But when you look at this list, there are not 16 possibilities. Now again, it looks like 2, 4, 6, 8, 10, 12, 14, 16. It looks like that's the case. But when you look at some of these, look at this one, plus or minus 2 over 2. As a fraction, 2 over 2 is the same thing as 1. And so the potential root of 1 actually was listed twice on this list here. Same thing if you look at 6 halves. 6 halves is the same thing as 3. And so if I list all of these potential rational roots, it's tempting to think there's 16 possibilities. But these ones actually count the same rational number twice. And therefore it's not going to be 16 because we actually took away 4. There's only 12 potential rational roots in this list because some of them got listed more than once. And this is something important to remember about rational numbers. I can take fractions like 1, 1, 2 halves, 4 fourths, etc. These are all the same rational number, even though they're different fractions. So if I list a bunch of fractions, I might erroneously think that different fractions give us different rational numbers. But clearly, different fractions can give us the same rational number. And so if I write different fraction that represents the same rational number, I have to make sure I only count that rational number once. This is the fundamental problem of over counting. We have to make sure that different representatives actually represent different classes and that we don't take the same or we don't take different representatives for the same class. 0 1 always must be wary of this in combinatorial problems. And this comes into play when you start thinking about partitions. Okay, so now this gets us to the titular topic of this video, the so-called division counting principle. This is in connection to the multiplicative additive and subtraction counting principles that we've seen previously. If A is a finite set with a partition P, remember a partition is going to be a collection of subsets that cover everything in the set and which none of the cells overlap each other whatsoever. So we have a finite set with a partition, the exact problem we were talking about earlier. If each class in the partition called C has the exact same cardinality, then the cardinality of the partition is just the cardinality of the set itself divided by the cardinality of a single class. If everyone shows up with every class shows up with the same size, then we can divide the total set by the size of a class and that'll give us the number of classes, number of representative classes in the partition. Let's utilize the division principle in the following example. How many anagrams can be formed from the word rearrange? Now just so you're aware, an anagram is when you take the letters of a word, you rearrange them and then form a new word. And so appropriately, we're going to look for rearrangements of the word rearrange. It's kind of fun little example here. And when we consider these anagrams, we're going to look at all real and imaginary ones. That is to say that when you excramble up the letters, it doesn't necessarily have to make a new word. So we could do something like if I just were to swap around the letters E and R, we would get E, R, and then let's keep everything else the same. And so this would be an anagram of R-range or something like that. I don't even know how you pronounce that. It's not a word that I'm aware of, but that would be considered a rearrangement. You can swap up the letters and we get an anagram. How many possible anagrams can you get here? Now, if I give us a much simpler question, like if I were to take the word like say cat, three letters here, how many anagrams could you get there? You can get things like act, right? TAC. But again, it doesn't actually have to be a word. You could take CTA. That would be considered anagram here. In this situation, when there's no repetition in the letters, then the number of anagrams is going to be three factorial because you have three options for the first one. Then you have two options for the second one because you can't repeat the letter you had. And then you have one option for the last one. And so if you have a word with no repeated letters, the number of anagrams is just going to be in factorial. Now the word rearrange other than a pun was chosen because there are some repeated letters in this word. The word itself contains nine letters, in which case we have three letter R's. We have two letter A's. We have two letter E's. We have one N and we have one G. To construct each of the anagrams, we need to assign a letter to the first position of the new word, the second position of the new word, the third position, etc. If we suppose that each repeated letter is actually distinct, because when you look at these letters here, we have, here's my three R's. If I were to rearrange the R's, you couldn't tell the difference between them because they're all the same. So what I'm going to actually do is I'm going to pretend for a moment that the R's are actually distinguishable. I'm going to put a little mark that only I can tell about, right? So I'm going to call them R1, R2, R3. Then if I were to rearrange the R's, because I've marked them in a way that only I can tell, then I would be able to tell the difference as they get moved around because I've now made them distinguishable. So therefore, words like the original word, rearrange, R1, E, A, R2, R3, A, N, G, E, like so. That's one rearrange, but then another anagram could be R2, E, A, R3, R1, A, N, G, E, right? Because of the marks I have put on the R's, which make these now distinguishable, you can tell how I've rearranged the R's, okay? So I'm intentionally making my identical elements distinguishable, so I can tell how I rearrange them. Because if you do that, if you do that for each of the letters, so let's say something like the E's, there's two E's after all, we'll call this E1 and E2. So then in an anagram, you can tell if they got swapped around or not. And then we'll do one last one with the A's. If I tell a difference between the A's, maybe you switch them around, maybe you don't. If you have little markers on them, I can tell how they are moved around. Then in that situation, if you've marked all the letters, there's nine letters total, then much like we did earlier with the word cat, if I can tell the difference between the letters, I can rearrange them. There's going to be nine factorial anagrams of this word rearrange. But that's only if you have the markers, if you have the marks attached to them. Now, nine factorial is going to be much too large for our problem here, because in all reality, we shouldn't be able to tell the difference between the A's, the E's, and the R's. They all should be indistinguishable. And this is where the division category, or the division principle comes into play here. So if you were to consider just a rearrange one where you only change the R's, so we take R1, E, A, R2, R3, A, and G. Don't even worry about the A's and the E's marked right now. And we'll take the R, we'll switch them around like we did before, like this. These words should be considered the same word as an anagram, even though we distinguish between them, no one else should be able to distinguish between them. So these are going to be considered the same word. And so what we can do is, if we take as set A, we could take as the set A all possible anagrams with distinction, that is, we've marked the letters so that we can tell them apart. If we take A to be the set of all anagrams with distinguishable letters here, we put little marks on them, then what we can do is we can form a partition on that set here. The partition, this is our partition on A, where words are considered equivalent, where anagrams are together, they're together if they only disagree on the R's. We could do something like that. So we take all of the anagrams that we could form from the word rear range, and we form a partition where two words are considered equivalent. If the only difference between them is how we changed the R's, like we had on the screen a moment ago, where we changed only the R's, everything else was the same. And then in that situation, then if we want to count the size of the partition, this is going to be the size of A divided by the size of C. Because regardless of what the anagram is, each of these classes is going to be the same. If all the other letters are still considered distinguishable, you only care on how the R's disagree with each other, all of those classes sizes are going to be the same. So you end up with nine factorial on the top. And then how big is each of the classes? Well, like we wrote them on the screen a moment ago, rear range, one possible representative of this class would be if they're in the order one, two, three. Another possible order would be like two, three, one. You could take one, three, two. You could take three, two, one. You basically, it comes down to how many ways can you rearrange the R's? In which case the ways you can arrange three R's and a line would be three factorial. So our partition here, basically what it does is it's going to forget the distinction of the R's. If we take the total number of words here, and we, which is nine factorial, divide that by three factorial, it forgets the distinction of the R's. But we also have distinctions of the E's and distinctions of the A's. And so if we take B to be the set of anagrams where E and A are distinguishable, but R is no longer the case, then we see that the cardinality of B is this number we did before. It's nine factorial over three factorial. But we can put a partition on this one as well. What if we put a partition so that the partition here forgets, it forgets the distinction of the E's. So like with the word we look at earlier, what if we can tell the difference between the E's? How many ways can you arrange it? One and two, you could do two and one. Those are the only possibilities. That's actually going to turn out to be two factorial. In that situation, your partition P, it's going to have the cardinality of B. But then each relation you put here, when you forget the E, there's two factorial possibilities. And so with B early, you get nine factorial over three factorial and two factorial. We've now forgotten the E's and the R's in that rearrangement. You have to do it also for the A's. And so in the end, the number of anagrams we're going to come up with is you end up with nine factorial over three factorial, which forgets the R's. You divide by two factorial, which forgets the E's. You then get also a two factorial, which forgets the A's. And so ever since we made the elements distinguishable, we can forget the distinction by using a partition on the set of possible anagrams that do have the distinctions. And so by dividing out each time these equivalencies, we're then forgetting the distinctions. Now, to be fair, there are two other letters. There was N and G, right? If you divide by one factorial, you forget the distinctions of the N's, which of course is just one. And then if you forget the distinction on the G's, that's also one factorial. You'll notice that three plus two plus two plus one plus one adds up to be nine. And this number right here gives us the total amount of anagrams here. And it's curious that while we wrote it as a fraction, this is actually equal to a integer, right? Nine factorial would look like nine times eight times seven times six times five times four times three times two times one. Three factorial is three times two times one. Two factorial, two factorial, one factorial. You can see some things canceling out. Like the three factorial will cancel with that. Two and two goes into four. And so you end up with nine times eight times seven times six times five. And that, of course, is a falling factorial. That's more of a coincidence in the situation. You end up with 15,120 possible anagrams. I wrote that incorrectly, 120 anagrams. But as we often see with comic torques, the number we care about is this one right here. The formula, the general formula of where the number came from. And so the formula we saw just a moment ago, I want to generalize that. And so we're going to create a new symbol, which is known as the multinomial coefficient, the multinomial coefficient. It looks like use the following notation. You put these big parentheses here on the very top, you write a number N. And then on the bottom, you're going to write a sequence of numbers separated by commas. And there is no fraction bar between them. There's no line there. One just kind of floats on top of the other. And this symbol, known as the multinomial coefficient, is of the form N factorial. That's the number on top. And then the numbers on the bottom, you're going to get a product of factorials in one factorial, in two factorial, in three factorial, all the way up to NK factorial. And these numbers do satisfy certain conditions here. So for example, the sum of the NIs has to add up to be N itself. So N1 plus N2 plus N3 up to NK is equal to N, like we saw on the previous screen there. And so for example, on the previous screen, the number we were looking at was nine, three, two, two, one, one. Sometimes the numbers one are omitted and you just write it like this. You can get away with doing that. Basically, if your number doesn't add up to be the number on top, then you just take what's left over to make sense of it. You really should put in the ones there just to avoid any ambiguity whatsoever. Sometimes people drop it. I think it sort of can lead to confusion and notation. So I would encourage you include the numbers there. This number right here, N, suppose you have N distinct, excuse me, you have N objects that are not necessarily distinct. So like in the letters we saw before, we had nine letters, but some of them were the same. We had R's repeated, E's repeated, A's repeated. So we have N possibly in distinct objects there. N1 of them belong to the first type, N2 of them belong to the second type, and there's K types total. So basically what we're saying here is you have some type of partition on your set N for which there's K classes in the partition. There's N1 things in the first cell. There's N2 things in the second cell, N3 things in the third cell, up to NK things in the Kth cell right there. Then the number of ordered arrangements involving these N objects is going to be this multinomial coefficient. So to give you a quick example of this, how many different vertical arrangements are there of eight flags? If four of the flags are white, three of them are blue, and one of them is red. So the idea is we have these flags we're going to put in a line here. So we have eight flags. Did I get up to eight yet? Yes, I did. So we have these eight flags we're going to put in a row. Four of them are white. We can't tell a difference between the white ones. They're all the same. Three of them are blue, and one of them is red. The number of arrangements of flags we have is going to be this multinomial coefficient eight. On the bottom, it's eight, choose four comma three comma one. The numbers on the bottom four plus three plus one adds up to eight. And therefore the number of possibilities is going to be eight factorial over four factorial times three factorial times one factorial. If you drop the one factorial, that's perfectly fine. Be aware that this number, you can simplify it and it's going to turn out to be 280 possible arrangements of the flags. But it's the calculation of this multinomial coefficient, which is a consequence of the division principle we saw on the previous slide. Now it does beg the question, why is it called the multinomial coefficient? Well, admittedly, multinomial and polynomial, they kind of feel like they're synonyms. And for the most part, I would say yes. The multinomial coefficient, it gets its name in relation to a forthcoming theorem, which we will call the binomial theorem and the binomial coefficients, which you may or may not have seen that before. This is a generalization of that result. The multinomial theorem is the following. In the multiplicative expansion of a multivariate polynomial, that is a polynomial which could have lots of variables. And that's why we're using the term multinomial here as opposed to polynomial. There are multiple variables, multivariate, multiple variables in this polynomial. The variables we're going to call them without the lack of better names, x1, x2, up to xk. So if you have like a variable, a polynomial of three variables, you might call it xy and z, but as k could be arbitrarily large, we'll just call it x1, x2, xi in that situation. If you take, if you were to foil out the expansion x1 plus x2 plus x3 up to xk to the nth power, then the coefficient of the monomial term where you take the product of xi to the nth i power, that is the coefficient of xi to the n minus 1 power, x2 to the x, to the n2 power, x3 to the x, to the n3 power, all the way up to xk to the nk power, the coefficient of that monomial in this polynomial expansion is exactly this number right here, the multinomial coefficient. And to see that, well, let's think, how does one produce this monomial in the foil? Like if you foil this thing out, how do you do it? Well, because multiplication is both commutative and associative, it basically comes down to how many ways can you grab in one many x1's and how many ways can you grab in two many x2's and how many ways can you grab in k many xk's. Well, in the original foil, you can tell them apart, this x1 came from the first factor and this x1 came from the third factor. But when you put it all together, you've kind of forget the ordering, that's the exact problem we were seeing before. And so the way to produce this monomial here is you're looking for ordered list of variables x1, so that x1 shows up in one times, x2 shows up in two times, x3 shows up in three times, etc. But then by the theorem from the previous slide, we see that the number of such ordered strings where repetition shows up exactly in this prescribed manner, this is exactly what the multinomial coefficient counts. And so that then solves this problem and thus also guarantees the name of this problem right here. So let's apply this. Let's imagine we have the multivariant polynomial 2x cubed plus y minus z squared, and we raise that to the 100th power. That would be a massive thing to foil out. But what I can tell you, I can tell you what the coefficient of x to the 99 times x to the 60th times z to the 14th is going to be. And how we do that is we have to figure out how do you produce this right here. Now notice y is the simplest one here because it's x1, it's just a 1. If you're going to get y 60 times, that means your n2 is going to equal 60. Well, how did you produce x 99 times? Well, if you have x cubed here, every time you grab an x, you're actually grabbing three x's. And so to produce 99 here, the idea is you just take 99 divided by 3, you take 33. And so the number of times you choose x is going to be 33 times. We have 33 times for the x cubed. We have 60 times for the y. How are we going to grab the z squared? Well, we basically can figure out what we have left over here, right? In order to get z to the 14th. Well, since you only can get z multiples of z squared there, you're going to have to grab z squared seven times. And do notice that 33 plus 60 plus 7 does actually add up to be 100. So n1 plus n2 plus n3 is equal to 100. So that is a possible way you could foil these things out. So the coefficient of this thing is going to look like the following. You are going to have the multinomial coefficient 100, choose 33, 60, and 7. But there's also more to it as well. Every time you grab an x cubed, you're going to get a multiple of two. So we actually get two to the 33 power. Every time you choose a y, you get a multiple of one, no big deal there. And then every time you choose an x, you're also going to get negative one. And you get negative one to the seventh power. So when we throw all three of those numbers together, we actually get that the coefficient will be negative two cubed times three times 100 factorial over 33 factorial times 60 factorial times seven factorial. And that number is approximately negative 2.201 times 10 to the 45th power. It's a huge number. You cannot possibly get that number by just listing all these possibilities. But using common torques, we can predict what that number is going to be by these formulas. Now, another example I do want to mention before we close this video is what if you want to take x to the ninth, what if you want the coefficient of x to the 99th times y to the 61st times z to the 13th, right? I want you to notice in this situation, this is not a possible one you can create. In particular, if you look at the z to the power of z there, how do you get a z to the 13th when you only have as an option z squared? Since two is an even number and 13 is not, there's no possible way you can get that in this. And so in that case, the coefficient is going to be zero. So if it's impossible to create it, your coefficient is going to be zero. But if it is possible to create it, this multinomial coefficient will help you in that calculation.