









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
During the study of discrete mathematics, I found this course very informative and applicable.The main points in these lecture slides are:Counting, Product Rule, Sum Rule, One-To-One Functions, Bit-Strings of Length, Number of Subsets, Cardinality of Power-Set, Cartesian Product of Sets, Union Set of Disjoint, Mixed Examples
Typology: Slides
1 / 15
This page cannot be seen from the preview
Don't miss anything!
Two Important Principles: Product Rule and Sum Rule. Product Rule: Assume we need to perform procedure 1 AND procedure 2. There are n1 ways to perform procedure 1 and n2 ways to perform procedure 2. Then there are n1xn2 ways to perform procedure 1 AND procedure 2. Sum Rule: Assume we need to perform procedure 1 OR procedure 2. There are n1 ways to perform procedure 1 and n2 ways to perform procedure 2. Then there are n1+n2 ways to perform procedure 1 OR procedure 2.
Examples sum rule:
Inclusion – Exclusion Principle: Assume that m out of n1 ways to do procedure 1 are equivalent to m out of n ways to do procedure 2. Then the number of ways to perform procedure 1 OR procedure 2 are n1+n2-m. Example: There are 3 topics and 20 projects per topic, but 1 project is listed in all three topics. What is the total number of projects? 20+20+20 – 2 because one project was over-counted twice. Recall: The cardinality of the union set of overlapping sets A, B: Recall Sum Rule: Assume we need to perform procedure 1 OR procedure 2. There are n1 ways to perform procedure 1 and n2 ways to perform procedure 2. Then there are n1+n2 ways to perform procedure 1 OR procedure 2.
Example: How many bit-strings of length 8 begin with either a 1 or end with 00? Total number of bit-strings starting with 1 is 2^7. Total number of bit-strings ending with 00 is 2^ However, out of those 2^6 there are 2^5 bit-strings which stared with a one and were counted in the 2^7 of the first line. Conclusion: 2^7+2^6-2^5. Tree Diagrams: For small problems you can enumerate all possibilities in a “decision tree”. Example: What is the total number of bit-strings of length 4 that do not have 2 consecutive 1’s? (white-board) Note: this approach becomes infeasible very quickly with growing number of possibilities.
1 1 1 n n k k n k k (^) (^) − < + − = (^) ^ ^ ^ Proof: Note that the following is true:^1 n n k k < + ceiling function (e.g. 3 < 2.1 + 1 = 3.1) Therefore: This is the maximal number of balls if none of the boxes contains more than. However, this number is smaller than n, which is a contradiction. 1 n k −
Examples:
More examples: We have 15 workstations and 10 servers. We want that each subset of the 10 workstations can simultaneously access a server, while a server can only handle one workstation at a time. Prove that the minimal number of connections required is 60. Assume it is 59. Then one server S* must have at most 5 connections (if all servers had 6 connections we had 60 wires). Assume that the workstations that are not connected to S* (which are 10 in number) are the ones that try to make a connection. However, there are only 9 servers left..... A possible solution is this: connect the first 10 workstations to a unique server, and the remaining 5 to all servers. For any subset of 10 workstations, the uniquely wired workstations connect to their assigned server. The remaining ones pick an unoccupied server, which is always possible because they are connected to all of them.
Example: Every sequence of n^2+1 distinct real numbers contains a subsequence of length n+1 that is either strictly increasing or strictly decreasing. e.g.: 4 2 6 1 9 (n=2). 4 2 1, or 2 6 9 proof: Let m=n^2+1 and denote the sequence with a1,a2,...,am. At each position we define a pair: (Li,Di) for the longest increasing and longest decreasing sequence starting at position i. Suppose there is no sequence of length at least n+1 decreasing or increasing. The number of possibilities of (Li,Di) = n^2. Thus by the pigeonhole principle, 2 pairs (Li,Di) and (Lj,Dj) of these are equal. However, assume first that ai < aj (they must be distinct). Starting at aj there is an increasing subsequence of length Lj: b1 b2 b ... If we now construct the sequence ai b1 b2 b3 then that has length Lj+1=Li CONTRADICTION same prove for ai > aj