Counting. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee
|
|
- Pierce Patterson
- 5 years ago
- Views:
Transcription
1 Counting Mukulika Ghosh Fall 2018 Based on slides by Dr. Hyunyoung Lee
2 Counting Counting The art of counting is known as enumerative combinatorics. One tries to count the number of elements in a set (or, typically, simultaneously count the number of elements in a series of sets). Example Count the number of successful outcomes of an experiments The basic principles are extremely simple, but counting is a nontrivial task. Mukulika Ghosh Parasol Lab - Texas A&M University 2/41
3 Product Rule Product Rule Suppose that a task can be broken down into a sequence of two subtasks. If there are n 1 ways to solve subtask 1 and n 2 ways to solve subtask 2, then there must be n 1 n 2 ways to solve the task. Let S 1 and S 2 be sets describing the ways of the first and second subtasks, so n 1 = S 1 and n 2 = S 2. Then S 1 S 2 = n 1 n 2 Example How many rows are there in a truth table for a statement with n variables? Each variable can have 2 possible truth value. Hence for n variables, there can be (ntimes) = 2 n Mukulika Ghosh Parasol Lab - Texas A&M University 3/41
4 Exercise Exercise How many possible SSN numbers can there be? (Remember ssn number is denoted as XXX-XX-XXXX) Mukulika Ghosh Parasol Lab - Texas A&M University 4/41
5 Product rule in Functions Product rule in Functions How many functions are there from a set with m elements to a set with n elements? For each of the m elements in the domain, we can choose any element from the codomain as a function value. Hence, by the product rule, we get n n... n = n m different functions Mukulika Ghosh Parasol Lab - Texas A&M University 5/41
6 Product rule in Functions How many injective functions are there from a set with m elements to a set with n elements? If m > n, then there are 0 injective functions. If m n, then there are n ways to choose the value for the first element in the domain, n 1 ways to choose the value for the second element (as one has to avoid the previously chosen value), n 2 for the third element of the domain and so forth. Thus, we have n(n 1)...(n m + 1) injective functions in this case. Mukulika Ghosh Parasol Lab - Texas A&M University 6/41
7 Sum Rule Sum Rule If a task can be done either in one of n 1 ways or in one of n 2 ways, where none of the set of n 1 ways is the same as any of the set of n 2 ways, then there are n 1 + n 2 ways to do the task. Let S 1 and S 2 be disjoint sets (i.e, S 1 S 2 = with n 1 = S 1 and n 2 = S 2. Then S 1 S 2 = n 1 + n 2. Example: A student can choose a computer project from one of three lists. The three lists contain 23, 15, and 19 possible projects, respectively. No project is on more than one lists. How many possible projects are there to choose from? There are = 57 projects to choose from. Mukulika Ghosh Parasol Lab - Texas A&M University 7/41
8 Example Example How many sequences of 1s and 2s sum to n? Let s n denotes such sequence. s 0 = 1 = empty s 1 = 1 = {(1)} s 2 = 2 = {(1, 1), (2)} s 3 = 3 = {(1, 1, 1), (1, 2), (2, 1)} s 4 = 5 = {(1, 1, 1, 1), (1, 1, 2), (1, 2, 1), (2, 1, 1), (2, 2)} So for s n contains s n 1 sequences that starts with 1 and s n 2 sequences starting with 2. Mukulika Ghosh Parasol Lab - Texas A&M University 8/41
9 Example s n = s n 1 + s n 2 which is same as definition of Fibonacci numbers Mukulika Ghosh Parasol Lab - Texas A&M University 9/41
10 Exercise Exercise How many 5 letters word can be created that starts with a vowel? Mukulika Ghosh Parasol Lab - Texas A&M University 10/41
11 IPv4 IPv4 Computer addresses belong to one of the following 3 types: Class A: address contains a 7-bit netid 1 7, and a 24-bit hostid Class B: address has a 14-bit netid and a 16-bit hostid. Class C: address has 21-bit netid and an 8-bit hostid. Mukulika Ghosh Parasol Lab - Texas A&M University 11/41
12 IPv4 Hostids that are all 0s or all 1s are not allowed How many valid computer addresses are there? Number of address = (Class A) + (Class B) + (Class C) By sum rule, Class A = (valid netids) (valid hostids) by Product rule = (2 7 1).( ) Class B = ( ) Mukulika Ghosh Parasol Lab - Texas A&M University 12/41
13 IPv4 Class C = (2 8 2) In total, 3, 737, 091, 842 (3.7 billion IP addresses) Mukulika Ghosh Parasol Lab - Texas A&M University 13/41
14 Subtraction Rule Subtraction Rule If a task can be done in either n 1 ways or n 2 ways, then the number of ways to do the task is n 1 + n 2 minus the number of ways to do the task that is common to the two different ways. Principle of Inclusion-and-Exclusion: Let S1 and S2 be sets. Then S 1 S 2 = S 1 + S 2 S 1 S 2 Mukulika Ghosh Parasol Lab - Texas A&M University 14/41
15 Example: Example: How many bit strings of length 8 either start with a 1 bit or end with the last two bits equal to 00? Let S 1 be the number of strings that start with a 1 bit = 2 7. Let S 2 be the number of strings that end with 00 = 2 6. The number of strings that start with 1 and end with 00 = 2 5. Hence, in total = = 160 Mukulika Ghosh Parasol Lab - Texas A&M University 15/41
16 Example: Consider simple rules for passwords. Passwords must be 2 characters long. Each character must be 1. a letter [a-z], 2. a digit [0-9], or 3. one of the 10 special characters Mukulika Ghosh Parasol Lab - Texas A&M University 16/41
17 Example: Each password must contain at least 1 digit or special character. Number of password with 1 digit or special character in first character = ( )( ) = Number of password with 1 digit or special character in second character = Number of password with either a digit or special character in both places = Total = 2(20 46) = 1440 Mukulika Ghosh Parasol Lab - Texas A&M University 17/41
18 Exercise Exercise How many strings of two ASCII characters contain the at least once? (Note: There 128 different ASCII characters) Mukulika Ghosh Parasol Lab - Texas A&M University 18/41
19 Pigeonhole Principle Pigeonhole Principle If k + 1 objects are assigned to k places, then at least one place must be assigned at least two objects. Mukulika Ghosh Parasol Lab - Texas A&M University 19/41
20 Generalized Pigeonhole Principle Generalized Pigeonhole Principle If N > k objects are assigned to k places, then at least one place must be assigned at least N k objects. Proof Suppose every place has less than N k objects; so at most N k 1 objects per place. Total number of objects = k( N k 1) k( N k 1) < k(( N k + 1) 1) = k( N k ) = N Mukulika Ghosh Parasol Lab - Texas A&M University 20/41
21 Generalized Pigeonhole Principle So there are fewer than N objects in total which contradicts the assumption that there are N objects. Mukulika Ghosh Parasol Lab - Texas A&M University 21/41
22 Example Example 1. Among 90 students, there are at least 90/12 = 8 who have birthdays in same month. 2. Ten points are given within a square of unit size. Then there are two points that are closer to each other than Partition the square in 3 3 grid of 9 cells. By Pigeonhole principle, one grid must contain atleast 10/9 = 2 points. The points are far apart when they are at the opposite corners of the diagonal. Therefore, the points can be at most < 0.48 apart. Mukulika Ghosh Parasol Lab - Texas A&M University 22/41
23 Exercise Exercise What is the minimum number of students, each of whom comes from one of the 50 states, who must be enrolled in a university to guarantee that there are at least 10 who come from the same state? Mukulika Ghosh Parasol Lab - Texas A&M University 23/41
24 Counting in Two Different Ways Counting in Two Different Ways When two different formulas enumerate the same set, then they must be the same. In other words, you count the elements of the set in two different ways. Mukulika Ghosh Parasol Lab - Texas A&M University 24/41
25 Counting in Two Different Ways Example: Consider a grid of (n+1) (n+1) = (n + 1) 2 points. Similarly, we can count the number of points as total of points in all the diagonals (main, upper and lower): n n (n + 1) 2 = (n + 1) + i + i i=1 i=1 n (n + 1) 2 (n + 1) = 2 i i=1 n(n + 1) 2 n = i i=1 Mukulika Ghosh Parasol Lab - Texas A&M University 25/41
26 Permutation Permutations and Combination Permutation Let S be a set with n elements. An ordered arrangement of r elements of S is called an r permutation of S. A permutation of S is an n permutation. The number of r permutations of a set with n elements is denoted by P (n, r). Example: S = {1, 2, 3, 4}. Then (2, 4, 3) and (4, 3, 2) are two distinct 3 permutations of S. Note: Order is important. Mukulika Ghosh Parasol Lab - Texas A&M University 26/41
27 Number of r-permutations Number of r-permutations Let n and r be positive integers, r n. Then P (n, r) = n(n 1)...(n r + 1). Proof: Let S be a set with n elements. The first element of the permutation can be chosen in n ways, the second in n 1 ways,..., the r th element can be chosen in (n r + 1) ways. By the product rule, the total number becomes n(n 1)...(n r + 1) Mukulika Ghosh Parasol Lab - Texas A&M University 27/41
28 Number of r-permutations Let n be a positive integer, and r an integer in the range 0 r n. Then P (n, r) = n! (n r)! Proof: For r in the range 1 r n, = n(n 1)...(n r + 1) n! (n r)! For r = 0, we have P (n, 0) = 1, which equals n!/(n 0)! = n!/n! = 1 Mukulika Ghosh Parasol Lab - Texas A&M University 28/41
29 Number of r-permutations Example How many permutations of the letters ABCDEFGH contain the string ABC? Let us regard ABC, D, E, F, G, and H as blocks. Any permutation of these 6 blocks will yield a valid permutation containing ABC. Therefore, we have 6! = 720 permutations of the letters ABCDEFGH that contain ABC as a block. Mukulika Ghosh Parasol Lab - Texas A&M University 29/41
30 Combinations Combinations Let S be a set of n elements. An r combination of S is a subset of r elements from S. Note: Order does NOT matter here The number of r combinations of a set S with n elements is denoted by C(n, r) or ( n) k Mukulika Ghosh Parasol Lab - Texas A&M University 30/41
31 Number of Combinations Number of Combinations The number of r combinations of a set with n elements is given by ( ) n = r n! (n r)!r! Proof. We can form all r permutations of a set with n elements by first choosing an r combination and then ordering the r elements in all possible ways. Thus, P (n, r) = C(n, r)p (r, r) Hence, C(n, r) = P (n,r) P (r,r) = n!/(n r)! r!/(r r)! Since (r r)! = 0! = 1, this yields C(n, r) = n! (n r)!r! Mukulika Ghosh Parasol Lab - Texas A&M University 31/41
32 Exercise Exercise There are six different candidates for governor of a state. In how many different orders can the names of candidates be printed on a ballot? Mukulika Ghosh Parasol Lab - Texas A&M University 32/41
33 Binomial Coefficient Identity Binomial Coefficient Identity It can be proved that ( n) ( r = n ) n r Proof: Let S be a set with n elements. Each subset A of S has its corresponding complement A c, which contains the elements of S that are not contained in A. By double counting: The number C(n, r) of subsets of cardinality r of S corresponds to the number of complements of subsets of cardinality r in S. Since A = r iff A c = n r, the complements of subsets of cardinality r of S correspond to subsets of cardinality n r of S. Thus, C(n, r) = Number of r subsets of S = Number of complements of r subsets of S = C(n, n r), as claimed Mukulika Ghosh Parasol Lab - Texas A&M University 33/41
34 Counting Subset Identity Counting Subset Identity For any non-negative integer n, we have n k=0 ( ) n = 2 n k Proof: Let S be a set with n elements. The number of subsets of S is 2 n. The number of subsets with 0, 1, 2,..., n elements is given by ( n 0 )( n 1 )( n 2 ) ( ) n... n Mukulika Ghosh Parasol Lab - Texas A&M University 34/41
35 Counting Subset Identity Since subsets of S need to have between 0 and n elements, the claim follows Mukulika Ghosh Parasol Lab - Texas A&M University 35/41
36 Binomial Theorem Binomial Theorem Let x and y be variables. Let n be a non-negative integer. Then (x+y) n = n ) x k y n k k=0 ( n k Proof: Let us expand the left hand side. The terms of the product in expanded form are x k y n k for 0 k n. To obtain the term x k y n k one must choose k x s from the n(x + y) terms. There are ( n k) ways to do that. Mukulika Ghosh Parasol Lab - Texas A&M University 36/41
37 Binomial Coefficient Identity Binomial Coefficient Identity Let n be a positive integer. Then ( ) n n ( 1) k = 0 k k=0 Proof: We have 0 = 0 n = ( 1 + 1) n. Expanding the right hand side with the help of the binomial theorem, we obtain the claim. This implies that the number of subsets with an even number of elements is equal to the number of subsets with an odd number of elements. Mukulika Ghosh Parasol Lab - Texas A&M University 37/41
38 Pascal s Identity Pascal s Identity Let n and k be positive integers with n k. Then ( ) n + 1 = k ( ) n + k 1 ( ) n k Proof: We are going to prove this by counting the number of subsets with k elements of a set T with n + 1 elements in two different ways: First way of counting: The set T clearly contains ( n+1) k subsets of size k Mukulika Ghosh Parasol Lab - Texas A&M University 38/41
39 Pascal s Identity Second way of counting: Recall that T is a set with n + 1 elements. Let us consider an element t of T. We will count the subsets of T of size k that : (a) contain the element t, and (b) do not contain the element t. (a) There are ( n k 1) subsets of T that contain t, since t is already chosen, but the remaining k 1 elements need to be chosen from T {t}, a set of size n. (b) There are ( n k) subset of T not containing t, since one can choose any k elements from the set T {t} with n elements. Since the two cases are exhaustive, C(n + 1, k) = C(n, k 1) + C(n, k) Mukulika Ghosh Parasol Lab - Texas A&M University 39/41
40 Vandermonde s Identity Vandermonde s Identity Let m, n, and r be non-negative integers, r min(n, m). Then ( ) m + n = r ( )( ) r m n r k k k=0 In particular, when choosing m = n = r, we get ( ) 2n = n n k=0 ( ) 2 n k Mukulika Ghosh Parasol Lab - Texas A&M University 40/41
41 Vandermonde s Identity Proof: We will prove this by counting in two different ways. Let S and T be two disjoint sets with m = S and n = T. Counting in the first way: We can choose r elements from S T in ( n+m) r ways. Counting in the second way: We can pick r elements from S T by picking r k elements from S and k elements from T, where 0 k r. By the product rule, this can be done in ( m n r k)( k) ways. Hence the total number of ways to pick r elements from S T is ( )( ) r m n r k k k=0 Mukulika Ghosh Parasol Lab - Texas A&M University 41/41
Lecture 4: Counting, Pigeonhole Principle, Permutations, Combinations Lecturer: Lale Özkahya
BBM 205 Discrete Mathematics Hacettepe University http://web.cs.hacettepe.edu.tr/ bbm205 Lecture 4: Counting, Pigeonhole Principle, Permutations, Combinations Lecturer: Lale Özkahya Resources: Kenneth
More informationDiscrete Mathematics & Mathematical Reasoning Chapter 6: Counting
Discrete Mathematics & Mathematical Reasoning Chapter 6: Counting Kousha Etessami U. of Edinburgh, UK Kousha Etessami (U. of Edinburgh, UK) Discrete Mathematics (Chapter 6) 1 / 39 Chapter Summary The Basics
More informationSlides for a Course Based on the Text Discrete Mathematics & Its Applications (5 th Edition) by Kenneth H. Rosen
University of Florida Dept. of Computer & Information Science & Engineering COT 3100 Applications of Discrete Structures Dr. Michael P. Frank Slides for a Course Based on the Text Discrete Mathematics
More informationCounting. Math 301. November 24, Dr. Nahid Sultana
Basic Principles Dr. Nahid Sultana November 24, 2012 Basic Principles Basic Principles The Sum Rule The Product Rule Distinguishable Pascal s Triangle Binomial Theorem Basic Principles Combinatorics: The
More informationCounting Methods. CSE 191, Class Note 05: Counting Methods Computer Sci & Eng Dept SUNY Buffalo
Counting Methods CSE 191, Class Note 05: Counting Methods Computer Sci & Eng Dept SUNY Buffalo c Xin He (University at Buffalo) CSE 191 Discrete Structures 1 / 48 Need for Counting The problem of counting
More informationCounting. Spock's dilemma (Walls and mirrors) call it C(n,k) Rosen, Chapter 5.1, 5.2, 5.3 Walls and Mirrors, Chapter 3 10/11/12
Counting Rosen, Chapter 5.1, 5.2, 5.3 Walls and Mirrors, Chapter 3 Spock's dilemma (Walls and mirrors) n n planets in the solar system n can only visit k
More informationIntroduction to Decision Sciences Lecture 11
Introduction to Decision Sciences Lecture 11 Andrew Nobel October 24, 2017 Basics of Counting Product Rule Product Rule: Suppose that the elements of a collection S can be specified by a sequence of k
More informationAnnouncements. CSE 321 Discrete Structures. Counting. Counting Rules. Important cases of the Product Rule. Counting examples.
Announcements CSE 321 Discrete Structures Winter 2008 Lecture 16 Counting Readings Friday, Wednesday: Counting 6 th edition: 5.1, 5.2, 5.3, 5 th edition: 4.1, 4.2. 4.3 Lecture 16 video will be posted on
More informationBinomial Coefficient Identities/Complements
Binomial Coefficient Identities/Complements CSE21 Fall 2017, Day 4 Oct 6, 2017 https://sites.google.com/a/eng.ucsd.edu/cse21-fall-2017-miles-jones/ permutation P(n,r) = n(n-1) (n-2) (n-r+1) = Terminology
More informationRecursive Definitions
Recursive Definitions Example: Give a recursive definition of a n. a R and n N. Basis: n = 0, a 0 = 1. Recursion: a n+1 = a a n. Example: Give a recursive definition of n i=0 a i. Let S n = n i=0 a i,
More informationStatistical Inference
Statistical Inference Lecture 1: Probability Theory MING GAO DASE @ ECNU (for course related communications) mgao@dase.ecnu.edu.cn Sep. 11, 2018 Outline Introduction Set Theory Basics of Probability Theory
More informationF 2k 1 = F 2n. for all positive integers n.
Question 1 (Fibonacci Identity, 15 points). Recall that the Fibonacci numbers are defined by F 1 = F 2 = 1 and F n+2 = F n+1 + F n for all n 0. Prove that for all positive integers n. n F 2k 1 = F 2n We
More informationBasic counting techniques. Periklis A. Papakonstantinou Rutgers Business School
Basic counting techniques Periklis A. Papakonstantinou Rutgers Business School i LECTURE NOTES IN Elementary counting methods Periklis A. Papakonstantinou MSIS, Rutgers Business School ALL RIGHTS RESERVED
More informationCS 210 Foundations of Computer Science
IIT Madras Dept. of Computer Science & Engineering CS 210 Foundations of Computer Science Debdeep Mukhopadhyay Counting-II Pigeonhole Principle If n+1 or more objects (pigeons) are placed into n boxes,
More informationNotes. Combinatorics. Combinatorics II. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006
Combinatorics Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 4.1-4.6 & 6.5-6.6 of Rosen cse235@cse.unl.edu
More informationCSCE 222 Discrete Structures for Computing. Dr. Hyunyoung Lee
CSCE 222 Discrete Structures for Computing Sequences and Summations Dr. Hyunyoung Lee Based on slides by Andreas Klappenecker 1 Sequences 2 Sequences A sequence is a function from a subset of the set of
More informationAn Introduction to Combinatorics
Chapter 1 An Introduction to Combinatorics What Is Combinatorics? Combinatorics is the study of how to count things Have you ever counted the number of games teams would play if each team played every
More informationSolutions to Homework Problems
Solutions to Homework Problems November 11, 2017 1 Problems II: Sets and Functions (Page 117-118) 11. Give a proof or a counterexample of the following statements: (vi) x R, y R, xy 0; (x) ( x R, y R,
More informationThe Inclusion Exclusion Principle
The Inclusion Exclusion Principle 1 / 29 Outline Basic Instances of The Inclusion Exclusion Principle The General Inclusion Exclusion Principle Counting Derangements Counting Functions Stirling Numbers
More informationMATH 10B METHODS OF MATHEMATICS: CALCULUS, STATISTICS AND COMBINATORICS
MATH 10B METHODS OF MATHEMATICS: CALCULUS, STATISTICS AND COMBINATORICS Lior Pachter and Lawrence C. Evans Department of Mathematics University of California Berkeley, CA 94720 January 21, 2013 Lior Pachter
More informationCS Foundations of Computing
IIT KGP Dept. of Computer Science & Engineering CS 30053 Foundations of Computing Debdeep Mukhopadhyay Pigeon Hole Principle 1 Pigeonhole Principle If n+1 or more objects (pigeons) are placed into n boxes,
More informationCombinatorics. But there are some standard techniques. That s what we ll be studying.
Combinatorics Problem: How to count without counting. How do you figure out how many things there are with a certain property without actually enumerating all of them. Sometimes this requires a lot of
More information6 CARDINALITY OF SETS
6 CARDINALITY OF SETS MATH10111 - Foundations of Pure Mathematics We all have an idea of what it means to count a finite collection of objects, but we must be careful to define rigorously what it means
More informationMath.3336: Discrete Mathematics. Combinatorics: Basics of Counting
Math.3336: Discrete Mathematics Combinatorics: Basics of Counting Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu
More information1. Determine (with proof) the number of ordered triples (A 1, A 2, A 3 ) of sets which satisfy
UT Putnam Prep Problems, Oct 19 2016 I was very pleased that, between the whole gang of you, you solved almost every problem this week! Let me add a few comments here. 1. Determine (with proof) the number
More informationSolutions for Chapter Solutions for Chapter 17. Section 17.1 Exercises
Solutions for Chapter 17 403 17.6 Solutions for Chapter 17 Section 17.1 Exercises 1. Suppose A = {0,1,2,3,4}, B = {2,3,4,5} and f = {(0,3),(1,3),(2,4),(3,2),(4,2)}. State the domain and range of f. Find
More informationEquivalence of Propositions
Equivalence of Propositions 1. Truth tables: two same columns 2. Sequence of logical equivalences: from one to the other using equivalence laws 1 Equivalence laws Table 6 & 7 in 1.2, some often used: Associative:
More informationWe might divide A up into non-overlapping groups based on what dorm they live in:
Chapter 15 Sets of Sets So far, most of our sets have contained atomic elements (such as numbers or strings or tuples (e.g. pairs of numbers. Sets can also contain other sets. For example, {Z,Q} is a set
More informationCSCE 222 Discrete Structures for Computing. Review for Exam 2. Dr. Hyunyoung Lee !!!
CSCE 222 Discrete Structures for Computing Review for Exam 2 Dr. Hyunyoung Lee 1 Strategy for Exam Preparation - Start studying now (unless have already started) - Study class notes (lecture slides and
More informationNamed numbres. Ngày 25 tháng 11 năm () Named numbres Ngày 25 tháng 11 năm / 7
Named numbres Ngày 25 tháng 11 năm 2011 () Named numbres Ngày 25 tháng 11 năm 2011 1 / 7 Fibonacci, Catalan, Stirling, Euler, Bernoulli Many sequences are famous. 1 1, 2, 3, 4,... the integers. () Named
More informationDiscrete Mathematics 2007: Lecture 5 Infinite sets
Discrete Mathematics 2007: Lecture 5 Infinite sets Debrup Chakraborty 1 Countability The natural numbers originally arose from counting elements in sets. There are two very different possible sizes for
More informationDiscrete Probability
Discrete Probability Counting Permutations Combinations r- Combinations r- Combinations with repetition Allowed Pascal s Formula Binomial Theorem Conditional Probability Baye s Formula Independent Events
More informationChapter Summary. Sets (2.1) Set Operations (2.2) Functions (2.3) Sequences and Summations (2.4) Cardinality of Sets (2.5) Matrices (2.
Chapter 2 Chapter Summary Sets (2.1) Set Operations (2.2) Functions (2.3) Sequences and Summations (2.4) Cardinality of Sets (2.5) Matrices (2.6) Section 2.1 Section Summary Definition of sets Describing
More informationCounting Strategies: Inclusion-Exclusion, Categories
Counting Strategies: Inclusion-Exclusion, Categories Russell Impagliazzo and Miles Jones Thanks to Janine Tiefenbruck http://cseweb.ucsd.edu/classes/sp16/cse21-bd/ May 4, 2016 A scheduling problem In one
More informationProbability. Part 1 - Basic Counting Principles. 1. References. (1) R. Durrett, The Essentials of Probability, Duxbury.
Probability Part 1 - Basic Counting Principles 1. References (1) R. Durrett, The Essentials of Probability, Duxbury. (2) L.L. Helms, Probability Theory with Contemporary Applications, Freeman. (3) J.J.
More informationSets are one of the basic building blocks for the types of objects considered in discrete mathematics.
Section 2.1 Introduction Sets are one of the basic building blocks for the types of objects considered in discrete mathematics. Important for counting. Programming languages have set operations. Set theory
More informationUnit I (Logic and Proofs)
SUBJECT NAME SUBJECT CODE : MA 6566 MATERIAL NAME REGULATION : Discrete Mathematics : Part A questions : R2013 UPDATED ON : April-May 2018 (Scan the above QR code for the direct download of this material)
More informationDefinition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS.
4 Functions Before studying functions we will first quickly define a more general idea, namely the notion of a relation. A function turns out to be a special type of relation. Definition: Let S and T be
More informationUnit Combinatorics State pigeonhole principle. If k pigeons are assigned to n pigeonholes and n < k then there is at least one pigeonhole containing more than one pigeons. Find the recurrence relation
More informationChapter 7. Inclusion-Exclusion a.k.a. The Sieve Formula
Chapter 7. Inclusion-Exclusion a.k.a. The Sieve Formula Prof. Tesler Math 184A Fall 2019 Prof. Tesler Ch. 7. Inclusion-Exclusion Math 184A / Fall 2019 1 / 25 Venn diagram and set sizes A = {1, 2, 3, 4,
More informationDiscrete Mathematics with Applications MATH236
Discrete Mathematics with Applications MATH236 Dr. Hung P. Tong-Viet School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus Semester 1, 2013 Tong-Viet
More informationThe integers. Chapter 3
Chapter 3 The integers Recall that an abelian group is a set A with a special element 0, and operation + such that x +0=x x + y = y + x x +y + z) =x + y)+z every element x has an inverse x + y =0 We also
More informationHomework 7 Solutions, Math 55
Homework 7 Solutions, Math 55 5..36. (a) Since a is a positive integer, a = a 1 + b 0 is a positive integer of the form as + bt for some integers s and t, so a S. Thus S is nonempty. (b) Since S is nonempty,
More informationChapter Summary. Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations on Functions Computability
Chapter 2 1 Chapter Summary Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations on Functions Computability Sequences and Summations Types of Sequences Summation
More informationCSCE 222 Discrete Structures for Computing
CSCE 222 Discrete Structures for Computing Sets and Functions Dr. Hyunyoung Lee Based on slides by Andreas Klappenecker 1 Sets Sets are the most fundamental discrete structure on which all other discrete
More informationName (please print) Mathematics Final Examination December 14, 2005 I. (4)
Mathematics 513-00 Final Examination December 14, 005 I Use a direct argument to prove the following implication: The product of two odd integers is odd Let m and n be two odd integers Since they are odd,
More informationCS 2336 Discrete Mathematics
CS 2336 Discrete Mathematics Lecture 8 Counting: Permutations and Combinations 1 Outline Definitions Permutation Combination Interesting Identities 2 Definitions Selection and arrangement of objects appear
More information2 - Strings and Binomial Coefficients
November 14, 2017 2 - Strings and Binomial Coefficients William T. Trotter trotter@math.gatech.edu Basic Definition Let n be a positive integer and let [n] = {1, 2,, n}. A sequence of length n such as
More informationDiscrete Structures for Computer Science: Counting, Recursion, and Probability
Discrete Structures for Computer Science: Counting, Recursion, and Probability Michiel Smid School of Computer Science Carleton University Ottawa, Ontario Canada michiel@scs.carleton.ca December 18, 2017
More informationSETS AND FUNCTIONS JOSHUA BALLEW
SETS AND FUNCTIONS JOSHUA BALLEW 1. Sets As a review, we begin by considering a naive look at set theory. For our purposes, we define a set as a collection of objects. Except for certain sets like N, Z,
More informationSome Review Problems for Exam 3: Solutions
Math 3355 Fall 018 Some Review Problems for Exam 3: Solutions I thought I d start by reviewing some counting formulas. Counting the Complement: Given a set U (the universe for the problem), if you want
More informationMATH 802: ENUMERATIVE COMBINATORICS ASSIGNMENT 2
MATH 80: ENUMERATIVE COMBINATORICS ASSIGNMENT KANNAPPAN SAMPATH Facts Recall that, the Stirling number S(, n of the second ind is defined as the number of partitions of a [] into n non-empty blocs. We
More informationA function is a special kind of relation. More precisely... A function f from A to B is a relation on A B such that. f (x) = y
Functions A function is a special kind of relation. More precisely... A function f from A to B is a relation on A B such that for all x A, there is exactly one y B s.t. (x, y) f. The set A is called the
More informationSome Review Problems for Exam 3: Solutions
Math 3355 Spring 017 Some Review Problems for Exam 3: Solutions I thought I d start by reviewing some counting formulas. Counting the Complement: Given a set U (the universe for the problem), if you want
More informationAdvanced Counting Techniques. Chapter 8
Advanced Counting Techniques Chapter 8 Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence Relations Nonhomogeneous Recurrence Relations Divide-and-Conquer
More informationNotes Week 2 Chapter 3 Probability WEEK 2 page 1
Notes Week 2 Chapter 3 Probability WEEK 2 page 1 The sample space of an experiment, sometimes denoted S or in probability theory, is the set that consists of all possible elementary outcomes of that experiment
More informationThe Inclusion Exclusion Principle and Its More General Version
The Inclusion Exclusion Principle and Its More General Version Stewart Weiss June 28, 2009 1 Introduction The Inclusion-Exclusion Principle is typically seen in the context of combinatorics or probability
More informationPermutations and Combinations
Permutations and Combinations Permutations Definition: Let S be a set with n elements A permutation of S is an ordered list (arrangement) of its elements For r = 1,..., n an r-permutation of S is an ordered
More informationLecture 3: Miscellaneous Techniques
Lecture 3: Miscellaneous Techniques Rajat Mittal IIT Kanpur In this document, we will take a look at few diverse techniques used in combinatorics, exemplifying the fact that combinatorics is a collection
More informationAdvanced Counting Techniques
. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw-Hill Education. Advanced Counting
More informationDepartment of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)
Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007) Problem 1: Specify two different predicates P (x) and
More informationCounting Strategies: Inclusion/Exclusion, Categories
Counting Strategies: Inclusion/Exclusion, Categories CSE21 Winter 2017, Day 16 (B00), Day 11 (A00) February 17, 2017 http://vlsicad.ucsd.edu/courses/cse21-w17 Sum rule For any disjoint sets, A and B: A
More informationSets. A set is a collection of objects without repeats. The size or cardinality of a set S is denoted S and is the number of elements in the set.
Sets A set is a collection of objects without repeats. The size or cardinality of a set S is denoted S and is the number of elements in the set. If A and B are sets, then the set of ordered pairs each
More informationPascal s Triangle and III.3 Answers
Chapter 16 Pascal s Triangle and III3 Answers Pascal s Triangle Consider the pattern of numbers: 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 This pattern is called Pascal s Triangle, and it goes on forever
More informationCSCE 222 Discrete Structures for Computing. Review for the Final. Hyunyoung Lee
CSCE 222 Discrete Structures for Computing Review for the Final! Hyunyoung Lee! 1 Final Exam Section 501 (regular class time 8:00am) Friday, May 8, starting at 1:00pm in our classroom!! Section 502 (regular
More informationMATH 363: Discrete Mathematics
MATH 363: Discrete Mathematics Learning Objectives by topic The levels of learning for this class are classified as follows. 1. Basic Knowledge: To recall and memorize - Assess by direct questions. The
More informationCSE 20 DISCRETE MATH. Fall
CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Today's learning goals Define and compute the cardinality of a set. Use functions to compare the sizes of sets. Classify sets
More informationTrees/Intro to counting
Trees/Intro to counting Russell Impagliazzo and Miles Jones Thanks to Janine Tiefenbruck http://cseweb.ucsd.edu/classes/sp16/cse21-bd/ April 29, 2016 Equivalence between rooted and unrooted trees Goal
More information2.6 Tools for Counting sample points
2.6 Tools for Counting sample points When the number of simple events in S is too large, manual enumeration of every sample point in S is tedious or even impossible. (Example) If S contains N equiprobable
More informationCSCI 150 Discrete Mathematics Homework 5 Solution
CSCI 150 Discrete Mathematics Homework 5 Solution Saad Mneimneh Computer Science Hunter College of CUNY Problem 1: Happy Birthday (if it applies to you)! Based on the size of the class, there is approximately
More information1 Basic Combinatorics
1 Basic Combinatorics 1.1 Sets and sequences Sets. A set is an unordered collection of distinct objects. The objects are called elements of the set. We use braces to denote a set, for example, the set
More information1 The Basic Counting Principles
1 The Basic Counting Principles The Multiplication Rule If an operation consists of k steps and the first step can be performed in n 1 ways, the second step can be performed in n ways [regardless of how
More informationLecture 10: Everything Else
Math 94 Professor: Padraic Bartlett Lecture 10: Everything Else Week 10 UCSB 2015 This is the tenth week of the Mathematics Subject Test GRE prep course; here, we quickly review a handful of useful concepts
More informationDiscrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 27
CS 70 Discrete Mathematics for CS Spring 007 Luca Trevisan Lecture 7 Infinity and Countability Consider a function f that maps elements of a set A (called the domain of f ) to elements of set B (called
More informationNotes on Sets, Relations and Functions
PURE MTH 3002 Topology & Analysis III (3246) 2002 Notes on Sets, Relations and Functions These are some notes taken from Mathematical Applications (now Mathematics for Information Technology (MIT)). They
More informationNumber Theory and Counting Method. Divisors -Least common divisor -Greatest common multiple
Number Theory and Counting Method Divisors -Least common divisor -Greatest common multiple Divisors Definition n and d are integers d 0 d divides n if there exists q satisfying n = dq q the quotient, d
More informationLecture 6: The Pigeonhole Principle and Probability Spaces
Lecture 6: The Pigeonhole Principle and Probability Spaces Anup Rao January 17, 2018 We discuss the pigeonhole principle and probability spaces. Pigeonhole Principle The pigeonhole principle is an extremely
More informationMATH 402 : 2017 page 1 of 6
ADMINISTRATION What? Math 40: Enumerative Combinatorics Who? Me: Professor Greg Smith You: students interested in combinatorics When and Where? lectures: slot 00 office hours: Tuesdays at :30 6:30 and
More informationChapter 1 : The language of mathematics.
MAT 200, Logic, Language and Proof, Fall 2015 Summary Chapter 1 : The language of mathematics. Definition. A proposition is a sentence which is either true or false. Truth table for the connective or :
More informationCombinations. April 12, 2006
Combinations April 12, 2006 Combinations, April 12, 2006 Binomial Coecients Denition. The number of distinct subsets with j elements that can be chosen from a set with n elements is denoted by ( n j).
More informationCITS2211 Discrete Structures (2017) Cardinality and Countability
CITS2211 Discrete Structures (2017) Cardinality and Countability Highlights What is cardinality? Is it the same as size? Types of cardinality and infinite sets Reading Sections 45 and 81 84 of Mathematics
More informationCounting with Categories and Binomial Coefficients
Counting with Categories and Binomial Coefficients CSE21 Winter 2017, Day 17 (B00), Day 12 (A00) February 22, 2017 http://vlsicad.ucsd.edu/courses/cse21-w17 When sum rule fails Rosen p. 392-394 Let A =
More informationWarm-up Quantifiers and the harmonic series Sets Second warmup Induction Bijections. Writing more proofs. Misha Lavrov
Writing more proofs Misha Lavrov ARML Practice 3/16/2014 and 3/23/2014 Warm-up Using the quantifier notation on the reference sheet, and making any further definitions you need to, write the following:
More informationAutomata and Languages
Automata and Languages Prof. Mohamed Hamada Software Engineering Lab. The University of Aizu Japan Mathematical Background Mathematical Background Sets Relations Functions Graphs Proof techniques Sets
More informationBOOLEAN ALGEBRA INTRODUCTION SUBSETS
BOOLEAN ALGEBRA M. Ragheb 1/294/2018 INTRODUCTION Modern algebra is centered around the concept of an algebraic system: A, consisting of a set of elements: ai, i=1, 2,, which are combined by a set of operations
More informationUpdated Jan SESSION 4 Permutations Combinations Polynomials
SESSION 4 Permutations Combinations Polynomials Mathematics 30-1 Learning Outcomes Permutations and Combinations General Outcome: Develop algebraic and numeric reasoning that involves combinatorics. Specific
More informationIntroduction to Decision Sciences Lecture 10
Introduction to Decision Sciences Lecture 10 Andrew Nobel October 17, 2017 Mathematical Induction Given: Propositional function P (n) with domain N + Basis step: Show that P (1) is true Inductive step:
More information6 Permutations Very little of this section comes from PJE.
6 Permutations Very little of this section comes from PJE Definition A permutation (p147 of a set A is a bijection ρ : A A Notation If A = {a b c } and ρ is a permutation on A we can express the action
More informationContents. Counting Methods and Induction
Contents Counting Methods and Induction Lesson 1 Counting Strategies Investigations 1 Careful Counting... 555 Order and Repetition I... 56 3 Order and Repetition II... 569 On Your Own... 573 Lesson Counting
More informationCounting Strategies: Inclusion/Exclusion, Categories
Counting Strategies: Inclusion/Exclusion, Categories CSE21 Winter 2017, Day 16 (B00), Day 11 (A00) February 17, 2017 http://vlsicad.ucsd.edu/courses/cse21-w17 Miis In some video games, each player can
More informationMATH 61-02: PRACTICE PROBLEMS FOR FINAL EXAM
MATH 61-02: PRACTICE PROBLEMS FOR FINAL EXAM (FP1) The exclusive or operation, denoted by and sometimes known as XOR, is defined so that P Q is true iff P is true or Q is true, but not both. Prove (through
More information0 Logical Background. 0.1 Sets
0 Logical Background 0.1 Sets In this course we will use the term set to simply mean a collection of things which have a common property such as the totality of positive integers or the collection of points
More informationCombinatorics & Discrete Probability Theory
& Discrete Probability Theory CIS008-2 Logic and Foundations of Mathematics David Goodwin david.goodwin@perisic.com 11:00, Tuesday 28 th February 2012 Outline 1 Combinatorics Enumeration Permutations Combinations
More information{ 0! = 1 n! = n(n 1)!, n 1. n! =
Summations Question? What is the sum of the first 100 positive integers? Counting Question? In how many ways may the first three horses in a 10 horse race finish? Multiplication Principle: If an event
More information1 Functions, relations, and infinite cardinality
Discrete Structures Prelim 2 sample questions s CS2800 Questions selected for fall 2017 1 Functions, relations, and infinite cardinality 1. True/false. For each of the following statements, indicate whether
More informationCS Discrete Mathematics Dr. D. Manivannan (Mani)
CS 275 - Discrete Mathematics Dr. D. Manivannan (Mani) Department of Computer Science University of Kentucky Lexington, KY 40506 Course Website: www.cs.uky.edu/~manivann/cs275 Notes based on Discrete Mathematics
More informationPart IA Numbers and Sets
Part IA Numbers and Sets Theorems Based on lectures by A. G. Thomason Notes taken by Dexter Chua Michaelmas 2014 These notes are not endorsed by the lecturers, and I have modified them (often significantly)
More informationWith Question/Answer Animations. Chapter 2
With Question/Answer Animations Chapter 2 Chapter Summary Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations on Functions Sequences and Summations Types of
More informationNotes on counting. James Aspnes. December 13, 2010
Notes on counting James Aspnes December 13, 2010 1 What counting is Recall that in set theory we formally defined each natural number as the set of all smaller natural numbers, so that n = {0, 1, 2,...,
More informationMATH 220 (all sections) Homework #12 not to be turned in posted Friday, November 24, 2017
MATH 220 (all sections) Homework #12 not to be turned in posted Friday, November 24, 2017 Definition: A set A is finite if there exists a nonnegative integer c such that there exists a bijection from A
More information