 Welcome back to our lecture series, Math 31-20, Transition to Advanced Mathematics for Students at Southern Utah University. As usual, I'll be a professor today, Dr. Andrew Misseldine. In the lecture 11, we're going to start our conversation continuing our lectures about combinatorics and we're going to learn about the so-called addition and subtraction principles. In the previous lecture on combinatorics, we learned about the multiplication principle, which is really the most fundamental of all of these combinatorial principles we'll be learning about. But in this video, again, we're going to learn about the addition principle and its related subtraction, which really the subtraction was just a special case of the addition principle. So let's begin with that. Now, to describe the addition principle, it is important that we introduce a new set theoretic concept, that of a partition. So imagine that A is a set. So unlike the list that we were concerning before, a set remember, it's a collection of objects, but repetition and order are completely ignored inside of a set. With regard to the list that we considered previously, order was paramount. Order is the main distinction between a list and a set. But on the other hand, with list, we could also allow for repetition. Maybe we didn't, so we looked at some of those counting problems. So let A be a set. Then the notion of a partition, a partition P of A, is itself a collection of subsets of A, such that when you take the union of all of the subsets in the partition, you get back all of A, all right? So our partition is P, and if you allow this, and each element of P is a subset of A right here. So notice that these X's are subsets of A. So if you take the union of all of the subsets inside of the partition, so you union together all of those X's, all of those subsets, you get back everything inside the set. But also we have the requirement that if you take two distinct subsets in the partition, call them X and Y, their intersection will be empty. So these subsets don't overlap each other whatsoever. And so when you think of a partition, a partition often in a non-mathematical setting is basically means a wall. It's some way of separating one, one room for another. If you have like two congregations of people having a meeting, a partition would be a wall that separates them. That's how we think of this mathematically as well. We have a set. So that set might be some collection of points like so. And then we separate those elements of the set into different groups. And there's this wall that separates them like so. And this is the partition. The partition is then the collection of all of these cells or classes. So the classes are the elements of the partition. They're gonna be these subsets of A. And what's important about partition is that every element of the set belongs to one and exactly one class in this partition. So a partition is a covering of the set so that none of the classes overlap with each other. So let's consider, for example, the set A, which contains five elements. I clearly said four here, apparently I can't count. We have five elements inside of this partition. Oh, I'm sorry. There's four distinct partitions below. That's what it was. Ooh, oh well. Our set here, it contains five elements. One, two, three, four, five. Let me give you four possible partitions. One partition would be the number one is by itself. The number two is by itself. And the numbers three, four and five are in the same class. That's a partition. Notice that every element, one, two, three, four, five belongs to one and exactly one class. There's no overlap and everyone's included. Another partition would be one, three, five could be in the same class and then two and four could be in the same class as well. That would also be a partition. Again, the rule to check there is that every element belongs to one and only one cell, one class in the partition. We could do five by itself, two and three by itself, one and four together. I said two and three by themselves. I'm sorry, they're together in a pair of one and four together. That'd be partition. Another one, this sort of a trivial example here, it turns out you could put everyone together in one cell, sort of like this kumbaya. We all live together in harmony. That is also a partition. Now, one thing we're gonna see in the future, the importance of a partition is among other things. It has this combinatorial conversation that we're having right now. But later on in this lecture series, when we introduced the notion of an equivalence relation, we're gonna see that an equivalence relation always produces a partition and a partition always produces an equivalence relation. I can make an allusion to that right now if you consider this partition, for example. When you look at the two classes, one, three, five and two, four, you'll notice that one, three, five, these are the three odd numbers contained inside of A and then two, four, these are the two even numbers inside of this cell, inside of the set, I should say. In which case then if we separate the numbers, whether they're even or odd, that is, if we separate them by parity, that is, as we'll see in the future, an equivalence relation we can put on the integers. And so this partition is suggestive of them. But again, that's something we'll talk about later on. I wanted to then show you, before we move on, I just wanna show you a quick diagram. This diagram is courtesy of Wikipedia and this actually shows the 52 possible partitions that one can put onto a set of five elements. So I do wanna bring up the cells we had before. And so the way you would read these diagrams here is that when different cells have the same color, that means they are in the same class of the partition. So when you look at this partition diagram right here, this says that these two elements are in the same partition and these three elements are in the same partition exactly like we had right here. All right, so this would be an illustration or something like that. Or if you don't like the overlap, you could also use that diagram instead. When you look at this diagram, this would tell you that four of the elements are in the same class. And this one would be like, oh, there's one singleton as well. I don't have an example of that above. But if you look at this one, this would tell you you have a singleton, there's a pair and there's a pair. That's exactly like this partition. That's how you could draw it. That would be the shape of such a thing. This partition, of course, would be the partition where we put everyone together. That's this one, of course. And then for this one right here, we have two singletons and a class of size three. That'd be exactly like this diagram right here. All right, we didn't draw the other ones here, but this one here would be a situation where two elements are together in a class and there's three singletons. This diagram would actually suggest that everyone's their own singleton, right? This would be like the exact opposite. If this is everyone fitting together and the picture of inclusion, this would be like the exclusive one. No one is associated with each other whatsoever. And so this gives us the notion of a partition. So then pivoting back to our conversation about combinatorics, we then can talk about the additive counting principle, the principle of addition here. If we have a finite set A, because in combinatorics, we wanna find the cardinality of finite sets. If we have a finite set A and suppose that we have N subsets of A, we're gonna call them A1, A2, A3, A4, up to AN. And if those subsets have the property that the union of all of the subsets gives you A and the intersection of distinct subsets gives you the empty set, in other words, if we have a partition on A, then we can count the cardinality of A by taking the sum of the cardinalities of each of the classes. And intuitively that makes sense, right? Because every element of A belongs to one and exactly one class in the partition. So if I take some element X that belongs to A, X either belongs to A1 or A2 or A3 or AN, it belongs to one of them. And so when I take the cardinality of that set, say it belongs to class one, if X is in A1, then when I count the cardinality of A1, I will grab X in that count. And then since these classes don't have any overlap, I won't count X twice because it doesn't appear anywhere else. So the idea is if you wanna count an entire set, you can organize the set and then count each of the subclasses later on. It's a very, very simple property but can be very useful in solving various combinatorial problems. So consider the following that's on the screen right now. How many length four lists can be made with the symbols A, B, C, D, E, F, G if the list must contain the letter E and repetition is not allowed in the list? I chose this example because it's actually strikingly similar to some examples we considered in the previous lecture when we learned about the multiplicative property. We were very much interested in repetition versus non-repetition. But this time what's different is that there's a mandate. The list has to contain the letter E. So much like we considered before, take this set of letters here and this is gonna be our alphabet, all right? So we have A, B, C, D, E, F. Notice there are seven letters inside of that alphabet. That number seven was very important in our previous calculations. But this time around, we have to have the letter E. So acceptable codes will be things like E, A, B, C. That would be fine. We could do something like G, F, E, B. That would be an acceptable list. We could do something like A, B, E, F, whatever. These all would be acceptable. The idea is that E shows up once and only once. And so what we can do is because we know E shows up once, why do we know it shows up once? It must contain E, but repetition is not allowed. So the must contain E means that there's at least one E in the list. But because there's no repetition, there won't be a second E. We can organize our list based upon where does the E appear? Because after all, a list is basically, we have these four buckets that have to be filled. Who goes into one of these buckets? We have these seven letters that have to go in there, but one E has to appear in one of them. Well, there is the option. What if we have E that comes first? Right, if the very first letter is E, that is one possibility. And we'll say all of the lists that have E as its first letter, we'll call that list, we'll call that one A1 for our consideration here, like we were doing before. And then if we have a second possibility, what if E is the second letter, right? And then the other three letters could be anything potentially, right? Think of that as like our A2. Then we have E could be in the third spot, or E could be in our fourth spot. So A3 and A4, okay? And so this is what we wanna consider. If A, I've already used A here, so if, whatever, we can just use this simple A again, not a big deal. So if A is the set of all of the lists that we're looking for, then our set A here is then the union of these other As. And I should also mention that each of these As have an intersection that is empty. That is, if you take A1 intersect A2, you get empty and this is true for all of the possible pairings. By the way, we've constructed it. If there's an E in the first position because it shows up only once, I know that this letter over here is not an E. These classes do not overlap whatsoever. So this provides for us a partition of the thing we're trying to count. So the order, I should say the cardinality of A is equal to the cardinality of A1 plus the cardinality of A2 plus the cardinality of A3 plus the cardinality of A4. So now we just have to count what is the cardinality of these subclasses here. Now, if we come to A1 in this consideration, well, the first letter has to be E. So there's really only one option for what's gonna go there. It has to be E. But what about the other ones? Well, now that E cannot be repeated, we only have six letters left, A, B, C, D, F, and G. And so for the next position, there's six options for that one. But like we considered before, because we can't have repetition, five options for the next and then four options for the next right there. And so we see that the cardinality of A1 is then gonna equal one times six times five times four, which of course is equal to 120, like so. Now, when you look at A2, there's no E right here, right? You have an E in the second position. So there's one option for that one. But in the first position, you have six options. For the third position, you can't repeat the first letter. So there's only five options there, four options here. We get the exact same 120 that we did a moment ago. And by similar reasoning, all four of these classes actually have the exact same cardinality. This is a very nice convenient thing. Oftentimes when you do partitions, the different subclasses might have similar sizes. So in this case, the cardinality of A is gonna be four times the cardinality of A1 because all of the classes are then symmetric in this regard. The order, the cardinality of A1 was in fact 120. And so we would take four times 120. We see that there are 480 four letter list for which they contain exactly one E chosen from those seven letters. All right, so now let's talk about this subtraction principle. Like I said, the subtraction principle is really just a special case of the additive principle. And it comes from the following observation. If you have a set A and you take any, any, any non-empty subset of A, call it B, then you have the partition that A equals B union B complement. That is, you can always create a partition of a set by taking some non-trivial, non-empty subset and taking its complement. Those two cells together form a partition. We've seen previously that the union of a set with its complement will give you everything and that their intersection will give you nothing like so. And as such, we then can use this partition with our counting principles. So by the additive property, the cardinality of A is going to equal the cardinality of B plus the cardinality of B complement. Now this is an equation of natural numbers. And as such, this is a natural number. So is this, so is this. This is the sum of two natural numbers. I can manipulate that equation like I would any other equation. We can subtract the cardinality of B complement from both sides and then that gives us the following equation. The cardinality of the subset B will equal the cardinality of the universal set A minus the complement of B, B's cardinality there. And so the subtraction principle comes into play in the following essence. You have a set that you want to count, but it's hard to count it, but its complement might be easier to count. If I can count the complement, I can then use that to count the original set. And so that's what we're gonna do right here. So again, consider the following problem. How many lists of length four can be made from the symbols A, B, C, D, E, F, G if the list has at least one E and repetition is now allowed. So this is very different from the last one. It had to have an E in it, at least one, but because repetition is now allowed, the E could show up more than once. And so if we try to partition it in the method we did before for the additive principle, we'd have to consider like, well, what if we have one E? What if we have two E's? What if we have three E's? What if you have four E's? And it might be very difficult to organize all of that information. But what we can do is instead is the following. If A here is gonna be the set of acceptable list that is list that, excuse me, we're gonna make B be the set we're interested in. If B is the set of acceptable list, that is list of length four, which contain at least one E and repetition is allowed. This then sits as a subset of A for which A is gonna be the set of all list of length four. For which no restriction on whether E shows up at all is the valid here. Now, if you want an acceptable list, that means you need to have at least one E. If you look at the complement here, because the set B means there's at least one E, the complement would then be the set of list without an E. And that's a lot easier to count. This is something we considered before. If you wanna find the cardinality of B complement, if you wanna find the set of list which have no E's in them, well then for the first letter, you have only six options, because you can't use E, you could use A, B, C, D, F, G. There's six options there. So you get six options for the first letter. For the second letter, well, because repetition's allowed, you could use the same letter, just can't be E. So this set has order, has cardinality six to the fourth there. Let me make it not look like 64. And then by similar reasoning, A, you take all list of length four, for which there is no restriction on whether you use E or not. You're gonna get seven to the fourth. And so by the subtraction principle, the cardinality of B is then gonna equal the cardinality of A which is seven to the fourth, minus the cardinality of its complement which is six to the fourth. Let's see what are these numbers here. Seven to the fourth would be 2,401. Six to the fourth is 1,296. When you take their difference, you get 1,105. And so the subtraction principle is very useful when the complement of a set is easier to enumerate than the set itself. And follow those from this additive principle which is useful when you can partition the set into smaller subsets that are easier to count. Thus perhaps because you've organized it better.