Introduction to combinatorics (CSCI 2824, Spring 2015)In this lecture we start the chapter on combinatoics, the art of counting discrete objects. This page covers the following topics:
(Sections 5.1, 5.2 of the textbook) Case study: counting distinct length- binary strings.Let's consider the simple question: how many distinct binary strings of length 4 are there? It is not too difficult to list all the possible strings out and count; in this way, we would find out that there are 16 possibilities. If we change the question a bit, by asking for the number of distinct binary strings of length 100, it would take much longer to obtain the answer (by hand or by using a computer) if we use the same technique, i.e., listing all possibilities and then counting them. A more intelligent method would be to note that, as you probably observed in the previous question, there are two choices (0 or 1) for each bit. So in the previous question, the answer would be , each factor corresponding to the choice for one of the four bits. Similarly, we can expect that the number of distinct binary strings of length is . In particular, the number of distinct binary strings of length 100 would be . A takeaway from this case study is that, except for terribly small instances, it can often be very hard to use brute force methods to count the number of objects in a given collection. It is possible, however, to make use of the patterns present in the problem to help us count the number of elements in even very large collection. In this chapter, we will learn how to do just that. Product ruleOne simple and useful rule of counting is the product rule. Product rule
Suppose that there are ways to perform task 1, and there are ways to perform task 2. If tasks 1 and 2 can be performed independently of one another, then there are ways to perform task 1 and task 2. We can apply the product rule to count the number of length binary strings. There are two choices for each bit, and we need to make a choice for each of the bits. So by the product rule, there are choices. Case Study: number of distinct functions from a finite set to another finite setSuppose we have two nonempty finite sets and , with and . What is the number of distinct functions from to ?
What is the number of distinct injective functions from to ?
Note that if , one of the factors in would be zero. so there would be no injective function from to . This agrees with what we learned in Chapter 4, that if is injective, then . Four different structure types in combinatoricsVery often, we are given a set , and we are interested in counting the number of combinations of elements from with certain features.
When we talk about counting the number of combinations of elements from a set , it is very important to identify the following two features:
These two features defines four different basic discrete structures relevant to combinatorics:
In the next lecture, we will study these four structures in depth. |