Discrete Mathematics II, Combinatorics

Math. 325, Sec. 001, Spring 2018

Homework and Announcements

Urgent stuff

Handwritten solutions of the midterm exam and some info about the exam have be posted at Exam Info here below. You should print out a copy for your own records.

Solutions on the web. Just to iterate what I briefly mentioned in class, if you find a solution of an assigned problem online, it is perfectly OK to use that as a basis for your own solution. Just beware of the fact that these are rarely endorsed by the authors of the textbooks and have most likely not been reviewed properly. With this in mind the solutions are many times sketchy and then you need to fill in the blanks and complete them. (They can even be totally wrong on occasions.!) -- However, to be kosher you should give credit where credit is due and indicate clearly if you found the "solution" online. For example: "The following solution is based on a posted solution I found at Chegg.com" or something like that.

The Pascal's Pyramid. To see a clear presentation of what I was writing on the board regarding the three dimensional Pascal's pyramid, and how it resmebles the usual Pascal's Triangle, then goto here.

Please NOTE! All handouts for the class will be posted as pdf files after a bullet sign. All these handouts are copyright material and are intended for the students of this class only. IN PARTICULAR, DO NOT POST THESE HANDOUTS ON ANY OTHER WEBSITE OR INTO AN ARCHIVE DATABASE!

General Info

For general information regarding this course, please read the Syllabus here below (to be posted soon), it should answer all practical questions, like when tests are, what the grading policies are etc.

Homework and Solutions

Here below the homework (HW) assignments and selected solutions will be posted. Many of the problems will be exercises from our textbook. -- Please be sure to read the solutions. If you have questions or comments feel free to come and talk to me.

  1. Homework for Tuesday, January 30. : We started discussin some preliminaries and listed four basic principles related to counting: (C1) Addition Principle, (C2) Product Principle, (C3) The Negation Principle and (C4) The Division Principle, whose more general form is the Pigeon Hole Principle (PHP). We discussed some examples on how this is used to show the existence of certain scenarios. One corollary of the general form of the PHP is that if n pigeons are put into n holes and each hole has at most one pigeon, then each hole must have a pigeon. This can then be used to prove the Chinese Reminder Theorem.
  2. Homework for Tuesday, February 6. : We continued our discussion of the Pigeon Hole Principle (PHP), and we discussed a particularly nice application of the PHP to prove a known theorem by Erdős and Szekeres from 1935. We then discussed a well-know Theorem of Friends and Strangers that states the in any group of six or more people, where any two are either friends or strangers, then one can always find a subgroup of three people that are all mutual friends or all mutual strangers. Since this is not always possible in a group of five people, then we know that six is the smallest number of people we must have so that we can always find three that are all mutually either friends or strangers. In the language of Ramsey Numbers this means have R(3,3) = 6, which in the language of graph theory means that p = 6 is the smallest number such that for any coloring of the edges of Kp, the complete graph on p vertices, with two colors (say red and blue), then we can always find a red K3 or a blue K3 inside our Kp.
  3. Homework for Tuesday, February 13. : We recalled the number of permutations and the number of r-permtuations of a set containing n elements. By a circular permutation we mean an arrangement of elements in a circular fashion where we ignore the clockwise and counter clockwise rotation of the circle (that is, a circular arrangement of the elements and any of its rotations is counted as one.) When counting such circular arrangement it is often good to fix a designated element, fix that, and then count the (linear / usual) permutations of the remaining elements. -- By counting the number of r-permuations in two ways (1) by directly listing the r elements from a given set of n elements on one hand, and (2) by first choosing all the r elements from the given n and then arrange them in a line on the other hand, we obtain a formula for the number of subsets containing r elements of a set of n elements. These are the binomial coefficients and they will be discussed in more detail later on in the course.
  4. Homework for Tuesday, February 20. : By a multiset we mean a collection of elements where some elements are identical, or in other words, a collection of elements where we can have more than one copy of each element. The notions of a submultiset and when two multisets are equal works in a way analogus to that of usual sets. The number of permutations of a given multiset is given by a corresponding multinomial coefficients, a natural generalization of the binomial coefficients, since when the number k of types is equal to 2, then the multinomial coefficients reduce to the binomial coefficients. A typical problem solved by multinomial coefficient is to count the number of words (real or not real) one can make from the letters of "MISSISSIPPI". The multinomial coefficients also count the number of ways we can partition a given (usual) set into parts, both in a labeled way or in an unlabeled way if all the parts have the same cardinality. By an r-permutation of a multiset S we mean an r-string where no two elements are listed twice (but elements of the same type can.) Unfortunately, there is no nice formula/expression for the number of these (unlike when we are dealing with usual sets.) An r-combination of a multiset S is simply a sub-multiset of S that contains r elements. By counting the number of integer solutions to an equation we obtain a nice binomial formula for the number of r-combinations of a given multiset. The formula that we derived to count the number of integer solutions to an integer equation is interesting in its own right. -- Recall the definition of a partially ordered set, or a poset for short. It is a binary relation on a given set which is reflexive, antisymmetric and transitive. The notion of a subposet is natural, namely it is simply a subset of the given set of the poset such that any relation that holds in the subposet also must hold in the given poset. We will discuss this better next week.
  5. Homework for Tuesday, February 27. : If P is a subposet of Q and they are both posets on the same underlying set X, then we say that Q is an extension of P. A partial order is a linear order or a total order if any two elements are comparable. This means that the Hasse diagram looks like a line, where one element comes after another in a linear fashion. A linearly ordered set L is a linear extension of a poset P if (i) L is a linearly ordered set and (ii) P is a subposet of L. An interesting fact is that if a poset P contains two incomparable elements x and y, then there is a linear extension of P in which x is less than y. This implies that any poset is, in fact, the intersetion of all of its linear extensions, simply since if two elements x and y are incomparable in the poset, then there are two linear extensions, one in which x is less than y and another one in which y is less than x. In particular, there is a smallest number of linear extensions of a given poset, the intersection of which will yield back the poset. This smallest number of linear extensions is call the dimension of the poset. In general it is difficult to compute the dimension of a given poset. A subset of the underlying set of a poset that is linearly ordered is called a chain of the poset and a subset of the underlying set of a poset, every two of which are incomparable, is called an antichain. If r is the number of elements in the longest chain in a poset, then the underlying set of the posed can be partitioned into exactly r antichains. Dually, if m is the number of elements in the longest antichain in the poset, then the underlying set can be partitioned into m chains. This is Dilworth's Theorem and is harder to prove than the partition into antichains.
  6. Homework for Tuesday, March 6. : A particularly nice corollary of the partition of a poset into antichains and chains is that: (i) if a poset can be partitioned into r antichains, then r is at least the size of the longest chain in the poset, (ii) if a poset can be partitioned into m chains, then m is at least the size of the largest antichain in the poset. There are both direct consequences of the PHP. -- In particular, the poset Pn of all the subsets of the set of the first n natural numbers ordered by inclusion, can be partitioned into n+1 antichains, and also by Sperner's Theorem into m chains, where m is the size of the largest antichain in Pn. This can have applications for some questions in elementary number theory.
  7. Homework for Tuesday, March 20. : By allowing arbitraty real powers when considering powers of x+1 we obtain Newton's Binomial Theorem (NBT) which allows us to obtain many more identities involving binomial coefficients. Also, by considering the sum of r variables instead of just two, we obtain the Multinomial Theorem (MT), which also is fairly easy to prove. Further, many familiar formulae that holds for the binomial coefficients hava an analogus form for the more general multinomial coefficients, for example the Pyramidal Pascal's identity for three variables, that resembles the two dimensional Pascal's triangle in the plane.

    Here is a nice wikipedia blurb on the Pascal's Pyramid, and the very layers I was cribbling on the board in considerable haste during the last lecture. As you can see, the three-sided pyramid has three sides consisting of Pascal's Triangle.

  8. Homework for Tuesday, March 27. : The Inclusion/Exclusion Principle (I/E) is an important method on how to count the number of elements of a union of sets, where they can intersect in an arbitrary fashion. For two and three sets the formula is fairly simple, but for k sets, the number of summands is 2k. In many cases it is convenient to count the number of elements that don't have any of the given k properties. Using I/E we were able to demonstrate how to compute the number of r-combinations of a general finite multiset. This we did by translating the problem to that of counting the number of integer solutions of an additive equation where the variables have each certain restrictions.
  9. Homework for Tuesday, April 3. : We used the I/E to find a formula for derangements of the integers 1,2,...,n. We found both an explicit formula and also two recurrence relation. One interesting fact about the number of derangements is that the ratio of the number of derrangements to that of all permutations tends to 1/e where e is the base number of the natrual logarithm. We also saw that the number of derangements is a special case of a more general number that tallies the number of permuations where for each i it cannot be contained in given set Xi. Determining such permutations can be difficult, but by translating this problem into the problem of placing rooks onto a board, we can in many special cases compute them exactly, especially if the forbidden positions are not too "bad".
  10. Homework for Tuesday, April 10. : In addition to compute the number of permutations where certain absolute positions are forbidden, we can also use the I/E to compute the number of permutations with certain relative forbidden positions. We derived a formula for one such type of permutations where the pattern i,i+1 did not occur for any i. -- When considering recurrences and generating functions, a good place to start is with the Fibonacci Numbers 0,1,1,2,3,5,8,13,21,34,..., where each term is the sum of the previous two. As we briefly discussed, it depends on the task at hand what is better; the recursive definition or the formula for them that involves the Golden Ratio. If the task is to print out the first million terms, then we should definitely use the defining recursion, but if we need to examine the behavior of the n-th term when n tends to infinity, then it is definitely better to use the closed formula. We also presented an alternate formula for the n-th Fibonacci Number, involving binomial coefficients, all of which are integers, but the downside is that we need at least (n+1)/2 summands. We will prove this formula next week.
  11. Homework for Tuesday, April 17. : Generating functions are used in a variety of ways in combinatorics. One of the main application of generating functions is that they can provide us with methods to obtain closed formulas for discrete number sequences that either are defined purely combinatorially or recursively. This opens up a gateway of useful tools we already know from calculus and function theory that we now we can use in combinatorial settings. Of particular value is when a generating function defines a "smooth" function on an open real/complex open set, since then we can both differentiate the generating function and/or integrate it to obtain additional information in our investigations. As an example we saw how NBT provided a generating function for the generalized binomial coefficients. In another example we saw how we could with relative ease (i.e. purely algebraic manipulation) obtain a formula for the number of integer solutions to an integer equation involving four integer variables where each variable had a predescribed range of integer values. Another application of generating functions occurs when we are unable to find a formula for terms of our discrete number sequence, but we are able to obtain a closed formula for the corresponding generating function. In this way, we could obtain each term explicitly from the function by taking the appropriate derivatives. This is the next best thing to obtaining a formula for the terms of the sequence. -- Next week we discuss in more detail how to obtain the generating function for a recursively defined number sequence, like the Fibonacci numbers and Lucas numbers etc.
  12. Homework for Tuesday, April 24. : We saw how we could use generating functions to obtain an explicit formula for the Fibonacci numbers in terms of powers of some irrational numbers. We then generalized this method to show that any number sequence that satisfies a linear recurrence of length k can be solved (theoretically!) in the same fashion, by (1) obtaining the generating function as a rational function where the denumerator is a polynomial of degree k, (2) factoring this polynomial in the denumerator, and then (3) use partial fractions techniques and the NBT to obtain a form/formula for the number sequence. This can, for sure, be a daunting task, but we saw how this can be done in a mechanical way. -- We then started discussing a very interesting number sequence in combinatorics, the Catalan Numbers. These numbers are defined by a very special recursion and they pop up in a variety of combinatorial questions. Using generating functions we were able to obtaina very nice compact formula for the Catalan Numbers. We will continue to discuss some of their properties next week.

Exam Info

Here below is a review sheet for the midterm to be held on Thursday, April 5. -- Please note that this sheet contains questions that I could potentially ask on the midterm, but it is not a recipe for the midterm! The midterm will consist of 5 - 8 problems each involving some computation or a short proofs of a statements. Basically,, the midterm will be on stuff that we have covered up to and including March 27, so roughly: Chapter 2 sections 1 -- 5, Chapter 3 sections 1 -- 3, Chapter 4 section 5, Chapter 5 sections 1 -- 6, Chapter 6 sections 1 -- 3.

Below are some drafts of solutions for some of the problems on the review sheet for the midterm. Please note that these are meant to present you the main ideas, but are not all fully written detailed solutions! -- Do attempt the problems here above first, before you read and study the solutions.

Below are handwritten solutions to the midterm exam, as I wanted to see them. The recorded (elevated) median score and the recorded average score were both 60/100. Note that I record only the elevated/yellow number grade and not the curve I gave in class. -- Please, read over these solutions and compare to what you did yourselves.