hello welcome back in our previous videos we've been exploring collections of discrete objects and now we're going to develop techniques to count them the study of counting techniques is called combinatorics as you'll see it requires a different kind of thinking the key to Counting well is to understand the structure of what you're counting now there's a distinction between the concept of counting and enumerating when we talk about counting objects the answer that you'll get is a number on the other hand if you're enumerating objects the answer will be the list of objects that you're counting and in fact sometimes the best way to count things is actually just to list out all of the objects for example let's say we were trying to count how many months have 31 days a strategy to approach that question would be list out all the months and determine which ones satisfy the Criterion that they have 31 days here we've enumerated all the months and the ones with 31 days are January March May July August October and December and so if we count the check marks the answer is that there are seven months with 31 days we'll get to some counting word problems in a minute but first let's answer a simpler question how many elements does the set one two three up to n have well hopefully we all know the answer to that if we start counting one two three and we go up to n we've counted in different numbers what happens if we start from zero though we know there are 10 numbers between 1 and 10 and so if we have a 0 in there there's going to be 11 elements now what about the set a A plus one a plus two all the way up to B that includes any set of consecutive integers not just ones that start with zero or one one way we could count that is to rewrite this set as a A plus one a plus two all the way up to a plus B minus a if we subtract a from each of these elements we get a minus a is zero aim plus one minus a is one all the way up to a plus B minus a minus a is B minus a and we learned above that the number of elements in this set is B minus a plus one so for any set of consecutive integers that starts off at a and goes up to B the number of elements is B minus a plus one so you want to be careful about this because a natural expectation is that the answer would be B minus a but there's always this plus one hanging around so if we look at this set we take 42 minus 23 plus 1 which is equal to 20 elements when you're comfortable with this rule that allows you to count sets of objects that can be indexed sometimes there's some logical number associated to every object that you're trying to count that's called an index in the indices correspond to a set of consecutive numbers this can help you count the set consider this set 13 15 17 up to 99. we see a pattern in this we see that all these numbers are odd numbers which means they're up to form 2K plus 1 for some integer k 13 is equal to two times six plus one 15 is equal to two times seven plus one 17 is equal to two times eight plus one and if we continue 99 is equal to 2 times 49 plus 1. these numbers 6 7 8 up to 49 can be thought of as the indices of each of these numbers and that means we can count them there are 49 minus six plus one element in this set which is 44.
now look at this example we want the numbers 26 37 50 65 going up to capital N squared plus one now that capital M squared plus 1 is a good hint I look at 26 and that is 25 plus 1. and 37 that's 36 plus 1. and 50 that's 49 plus 1 and 65 that's 64 plus 1.