Jong C. Park Computer Science Division, KAIST

Size: px
Start display at page:

Download "Jong C. Park Computer Science Division, KAIST"

Transcription

1 Jong C. Park Computer Science Division, KAIST

2 Today s Topics Basic Principles Permutations and Combinations Algorithms for Generating Permutations Generalized Permutations and Combinations Binomial Coefficients and Combinatorial Identities The Pigeonhole Principle Discrete Mathematics, Computer Science Division, KAIST

3 Definition Given a set X = {x 1,..., x n } containing n (distinct) elements, (a) An r-combination of X is an unordered selection of r-elements of X (i.e., an r-element subset of X). (b) The number of r-combinations of a set of n distinct elements is denoted C(n,r) or (n r). 3

4 Theorem The number of r-combinations of a set of n distinct objects is C(n,r) = P(n,r)/r! = n(n 1) (n r + 1)/r! = n!/((n - r)! r!), r n. Examples In how many ways can we select a committee of three from a group of 10 distinct persons? C(10,3) In how many ways can we select a committee of two women and three men from a group of five distinct women and six distinct men? C(5,2) C(6,3) = = 200 4

5 Examples How many eight-bit strings contain exactly four 1 s? C(8,4) = 70 An ordinary deck of 52 cards consists of four suits (clubs, diamonds, hearts, spades) of 13 denominations each (ace, 2-10, jack, queen, king). (a) How many (unordered) five-card poker hands, selected from an ordinary 52-card deck, are there? C(52,5) = 2,598,960 (b) How many poker hands contain cards all of the same suit? 4 C(13,5) = 5148 (c) How many poker hands contain three cards of one denomination and two cards of a second denomination? 13 C(4,3) 12 C(4,2) =

6 Examples How many routes are there from the lower-left corner of an n n square grid to the upper-right corner if we are restricted to traveling only to the right or upward? C(2n,n) How many routes are there from the lower-left corner of an n n square grid to the upper-right corner if we are restricted to traveling only to the right or upward and if we are allowed to touch but not go above a diagonal line form the lowerleft corner or the upper-right corner? C(2n,n) C(2n,n-1) = C(2n,n)/(n + 1) Catalan numbers: C 0 = 1, C 1 = 1, C 2 = 2, C 3 = 5, 6

7 Note The rock group Unhinged Universe has recorded n videos whose running times are t 1, t 2,..., t n seconds. A tape is to be released that can hold C seconds. Since this is the first tape by the Unhinged Universe, the group wants to include as much material as possible. The problem is to choose a subset {i 1,..., i k } of {1, 2,..., n} such that the sum k j=1t ij does not exceed C and is as large as possible. For this purpose, we can examine all subsets of {1, 2,, n} and choose a subset so that the sum does not exceed C and is as large as possible. 7

8 Definition Let = s 1 s 2 s p and = t 1 t 2 t q be strings over {1, 2,, n}. We say that is lexicographically less than and write < if either (a) p < q and s i = t i for i = 1,..., p, or (b) for some i, s i t i, and for the smallest such i, we have s i < t i. Examples Determine the lexicographic relation between and as defined below. = 132 and = = and = = 1324 and = = and =

9 Examples Consider the (lexicographic) order in which the 5-combinations of {1, 2, 3, 4, 5, 6, 7} will be listed. What are the first string, the next string, and the last string? 12345, 12346, and Find the string that follows when we list the 5-combinations of X = {1, 2, 3, 4, 5, 6, 7} Find the string that follows 2367 when we list the 4-combinations of X = {1, 2, 3, 4, 5, 6, 7}

10 10

11 11

12 12

13 13

14 Example How many strings can be formed using the following letters? M I S S I S S I P P I Solution Consider the problem of filling 11 blanks with the letters given: _. First, there are C(11,2) ways to choose positions for the two P s. Then, there are C(9,4) ways to choose the remaining positions for the four S s. Finally, there are C(5,4) ways to choose positions for the four I s. C(11,2) C(9,4) C(5,4) = (11!/(2! 9!)) (9!/(4! 5!)) (5!/(4! 1!)) = 11!/(2! 4! 4! 1!) = 34,

15 Theorem Suppose that a sequence S of n items has n 1 identical objects of type 1, n 2 identical objects of type 2,..., and n t identical objects of type t. Then the number of orderings of S is n!/(n 1! n 2! n t!). Example In how many ways can eight distinct books be divided among three students if Bill gets four books and Shizuo and Marian each get two books? 8!/(4! 2! 2!) =

16 Example Consider three books: a computer science book, a physics book, and a history book. Suppose that the library has at least six copies of each of these books. In how many ways can we select six books? C(8,2) = 28 16

17 Theorem If X is a set containing t elements, the number of unordered, k-element selections from X, repetitions allowed, is C(k + t 1, t 1) = C(k + t 1, k). Example Suppose that there are piles of red, blue, and green balls and that each pile contains at least eight balls. (a) In how many ways can we select eight balls? C(8+3-1,3-1) = C(10,2) = 45 (b) In how many ways can we select eight balls if we must have at least one ball of each color? C(5+3-1,3-1) = C(7,2) = 21 17

18 Examples In how many ways can 12 identical mathematics books be distributed among the students Anna, Beth, Candy, and Dan? C(12+4-1,4-1) = C(15,3) = 455 How many solutions in nonnegative integers are there to the equation x 1 + x 2 + x 3 + x 4 = 29? C(29+4-1,4-1) = C(32,3) = 4960 How many solutions in integers are there in the equation above satisfying x 1 > 0, x 2 > 1, x 3 > 2, x 4 0? C(23+4-1,4-1) = C(26,3) =

19 Note (a+b) 3 = (a+b)(a+b)(a+b) = aaa + aab + aba + abb + baa + bab + bba + bbb = a 3 + a 2 b + a 2 b + ab 2 + a 2 b + ab 2 + ab 2 + b 3 = a 3 + 3a 2 b + 3ab 2 + b 3 (a+b) n = C(n,0)a n b 0 + C(n,1)a n-1 b 1 + C(n,2)a n-2 b C(n,n-1)a 1 b n-1 + C(n,n)a 0 b n 19

20 Theorem (Binomial Theorem) If a and b are real numbers and n is a positive integer, then (a + b) n = n k=0c(n,k)a n-k b k. The numbers C(n,r) are known as binomial coefficients. Examples Obtain (a + b) 3 using the Binomial Theorem. Expand (3x 2y) 4 using the Binomial Theorem. Find the coefficient of a 5 b 4 in the expansion of (a + b) 9. C(9,4) = 126 Find the coefficient of x 2 y 3 z 4 in the expansion of (x + y + z) 9. C(9,2) C(7,3) = 9!/(2! 3! 4!) =

21 Note Pascal s triangle The border consists of 1 s, and any interior value is the sum of the two numbers above it. Combinatorial identity An identity that results from some counting process Combinatorial argument The argument that leads to the formulation of a combinatorial identity 21

22 Theorem (Pascal s Triangle) C(n + 1,k) = C(n,k 1) + C(n,k) for 1 k n. Proof. Let X be a set with n elements. Choose a X. Then C(n + 1,k) is the number of k-element subsets of Y = X {a}. Now the k-element subsets of Y can be divided into two disjoint classes. 1. Subsets of Y not containing a. 2. Subsets of Y containing a. The subsets of class 1 are just k-element subsets of X and there are C(n,k) of these. Each subset of class 2 consists of a (k 1)-element subset of X together with a and there are C(n,k 1) of these. Therefore, C(n + 1,k) = C(n,k 1) + C(n,k). 22

23 Examples Use the Binomial Theorem to derive the equation n k=0c(n,k) = 2 n. Show that n i=kc(i,k) = C(n + 1,k + 1). Use the equation above to find the sum n n = C(1,1) + C(2,1) C(n,1) = C(n + 1,2) = (n + 1)n/2 23

24 Pigeonhole Principle (First Form) If n pigeons fly into k pigeonholes and k < n, some pigeonhole contains at least two pigeons. Example Ten persons have first names Alice, Bernard, and Charles and last names Lee, McDuff, and Ng. Show that at least two persons have the same first and last names. Proof. There are nine possible names for the 10 persons. If we think of the persons as pigeons and the names as pigeonholes, we can consider the assignment of names to people to be that of assigning pigeonholes to the pigeons. By the Pigeonhole Principle, some name (pigeonhole) is assigned to at least two persons (pigeons). 24

25 Pigeonhole Principle (Second Form) If f is a function from a finite set X to a finite set Y and X > Y, then f(x 1 ) = f(x 2 ) for some x 1, x 2 X, x 1 x 2. Examples If 20 processors are interconnected, show that at least two processors are directly connected to the same number of processors. Show that if we select 151 distinct computer science courses numbered between 1 and 300 inclusive, at least two are consecutively numbered. 25

26 Pigeonhole Principle (Third Form) Let f be a function from a finite set X into a finite set Y. Suppose that X = n and Y = m. Let k = n/m. Then there are at least k values a 1,..., a k X such that f(a 1 ) = f(a 2 ) = = f(a k ). Example A useful feature of black-and-white pictures is the average brightness of the picture. Let us say that two pictures are similar if their average brightness differs by no more than some fixed value. Show that among six pictures, there are either three that are mutually similar or three that are mutually dissimilar. 26

27 Combinations Algorithms for Generating Permutations Generalized Permutations and Combinations Binomial Coefficients and Combinatorial Identities The Pigeonhole Principle Discrete Mathematics, Computer Science Division, KAIST

DISCRETE STRUCTURES COUNTING

DISCRETE STRUCTURES COUNTING DISCRETE STRUCTURES COUNTING LECTURE2 The Pigeonhole Principle The generalized pigeonhole principle: If N objects are placed into k boxes, then there is at least one box containing at least N/k of the

More information

Topics to be covered

Topics to be covered Basic Counting 1 Topics to be covered Sum rule, product rule, generalized product rule Permutations, combinations Binomial coefficients, combinatorial proof Inclusion-exclusion principle Pigeon Hole Principle

More information

The Product Rule The Product Rule: A procedure can be broken down into a sequence of two tasks. There are n ways to do the first task and n

The Product Rule The Product Rule: A procedure can be broken down into a sequence of two tasks. There are n ways to do the first task and n Chapter 5 Chapter Summary 5.1 The Basics of Counting 5.2 The Pigeonhole Principle 5.3 Permutations and Combinations 5.5 Generalized Permutations and Combinations Section 5.1 The Product Rule The Product

More information

With Question/Answer Animations. Chapter 6

With Question/Answer Animations. Chapter 6 With Question/Answer Animations Chapter 6 Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients and Identities Generalized Permutations and

More information

Counting integral solutions

Counting integral solutions Thought exercise 2.2 20 Counting integral solutions Question: How many non-negative integer solutions are there of x 1 +x 2 +x 3 +x 4 = 10? Thought exercise 2.2 20 Counting integral solutions Question:

More information

Discrete Structures Lecture Permutations and Combinations

Discrete Structures Lecture Permutations and Combinations Introduction Good morning. Many counting problems can be solved by finding the number of ways to arrange a specified number of distinct elements of a set of a particular size, where the order of these

More information

Section Summary. Permutations Combinations Combinatorial Proofs

Section Summary. Permutations Combinations Combinatorial Proofs Section 6.3 Section Summary Permutations Combinations Combinatorial Proofs Permutations Definition: A permutation of a set of distinct objects is an ordered arrangement of these objects. An ordered arrangement

More information

Counting in Algorithms

Counting in Algorithms Counting Counting in Algorithms How many comparisons are needed to sort n numbers? How many steps to compute the GCD of two numbers? How many steps to factor an integer? Counting in Games How many different

More information

Counting. Chapter 6. With Question/Answer Animations

Counting. Chapter 6. With Question/Answer Animations . 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. Counting Chapter

More information

Mat 344F challenge set #2 Solutions

Mat 344F challenge set #2 Solutions Mat 344F challenge set #2 Solutions. Put two balls into box, one ball into box 2 and three balls into box 3. The remaining 4 balls can now be distributed in any way among the three remaining boxes. This

More information

Elementary Combinatorics

Elementary Combinatorics 184 DISCRETE MATHEMATICAL STRUCTURES 7 Elementary Combinatorics 7.1 INTRODUCTION Combinatorics deals with counting and enumeration of specified objects, patterns or designs. Techniques of counting are

More information

Math 166: Topics in Contemporary Mathematics II

Math 166: Topics in Contemporary Mathematics II Math 166: Topics in Contemporary Mathematics II Xin Ma Texas A&M University September 30, 2017 Xin Ma (TAMU) Math 166 September 30, 2017 1 / 11 Last Time Factorials For any natural number n, we define

More information

Combinatorial Proofs

Combinatorial Proofs Combinatorial Proofs Two Counting Principles Some proofs concerning finite sets involve counting the number of elements of the sets, so we will look at the basics of counting. Addition Principle: If A

More information

Sec$on Summary. Permutations Combinations Combinatorial Proofs

Sec$on Summary. Permutations Combinations Combinatorial Proofs Section 6.3 Sec$on Summary Permutations Combinations Combinatorial Proofs 2 Coun$ng ordered arrangements Ex: How many ways can we select 3 students from a group of 5 students to stand in line for a picture?

More information

Foundations of Computing Discrete Mathematics Solutions to exercises for week 12

Foundations of Computing Discrete Mathematics Solutions to exercises for week 12 Foundations of Computing Discrete Mathematics Solutions to exercises for week 12 Agata Murawska (agmu@itu.dk) November 13, 2013 Exercise (6.1.2). A multiple-choice test contains 10 questions. There are

More information

Sec 5.1 The Basics of Counting

Sec 5.1 The Basics of Counting 1 Sec 5.1 The Basics of Counting Combinatorics, the study of arrangements of objects, is an important part of discrete mathematics. In this chapter, we will learn basic techniques of counting which has

More information

CSE 21 Mathematics for Algorithm and System Analysis

CSE 21 Mathematics for Algorithm and System Analysis CSE 21 Mathematics for Algorithm and System Analysis Unit 1: Basic Count and List Section 3: Set CSE21: Lecture 3 1 Reminder Piazza forum address: http://piazza.com/ucsd/summer2013/cse21/hom e Notes on

More information

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6 CS100: DISCRETE STRUCTURES Lecture 8 Counting - CH6 Lecture Overview 2 6.1 The Basics of Counting: THE PRODUCT RULE THE SUM RULE THE SUBTRACTION RULE THE DIVISION RULE 6.2 The Pigeonhole Principle. 6.3

More information

Facilitator Guide. Unit 2

Facilitator Guide. Unit 2 Facilitator Guide Unit 2 UNIT 02 Facilitator Guide ACTIVITIES NOTE: At many points in the activities for Mathematics Illuminated, workshop participants will be asked to explain, either verbally or in

More information

MA 524 Midterm Solutions October 16, 2018

MA 524 Midterm Solutions October 16, 2018 MA 524 Midterm Solutions October 16, 2018 1. (a) Let a n be the number of ordered tuples (a, b, c, d) of integers satisfying 0 a < b c < d n. Find a closed formula for a n, as well as its ordinary generating

More information

Reading 14 : Counting

Reading 14 : Counting CS/Math 240: Introduction to Discrete Mathematics Fall 2015 Instructors: Beck Hasti, Gautam Prakriya Reading 14 : Counting In this reading we discuss counting. Often, we are interested in the cardinality

More information

CPCS 222 Discrete Structures I Counting

CPCS 222 Discrete Structures I Counting King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222 Discrete Structures I Counting Dr. Eng. Farag Elnagahy farahelnagahy@hotmail.com Office Phone: 67967 The Basics of counting

More information

9.5 Counting Subsets of a Set: Combinations. Answers for Test Yourself

9.5 Counting Subsets of a Set: Combinations. Answers for Test Yourself 9.5 Counting Subsets of a Set: Combinations 565 H 35. H 36. whose elements when added up give the same sum. (Thanks to Jonathan Goldstine for this problem. 34. Let S be a set of ten integers chosen from

More information

Discrete Mathematics. Spring 2017

Discrete Mathematics. Spring 2017 Discrete Mathematics Spring 2017 Previous Lecture Binomial Coefficients Pascal s Triangle The Pigeonhole Principle If a flock of 20 pigeons roosts in a set of 19 pigeonholes, one of the pigeonholes must

More information

What is counting? (how many ways of doing things) how many possible ways to choose 4 people from 10?

What is counting? (how many ways of doing things) how many possible ways to choose 4 people from 10? Chapter 5. Counting 5.1 The Basic of Counting What is counting? (how many ways of doing things) combinations: how many possible ways to choose 4 people from 10? how many license plates that start with

More information

Chapter 1. Probability

Chapter 1. Probability Chapter 1. Probability 1.1 Basic Concepts Scientific method a. For a given problem, we define measures that explains the problem well. b. Data is collected with observation and the measures are calculated.

More information

HOMEWORK ASSIGNMENT 5

HOMEWORK ASSIGNMENT 5 HOMEWORK ASSIGNMENT 5 MATH 251, WILLIAMS COLLEGE, FALL 2006 Abstract. These are the instructor s solutions. 1. Big Brother The social security number of a person is a sequence of nine digits that are not

More information

Discrete Mathematics with Applications MATH236

Discrete 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 information

Discrete Mathematics: Logic. Discrete Mathematics: Lecture 15: Counting

Discrete Mathematics: Logic. Discrete Mathematics: Lecture 15: Counting Discrete Mathematics: Logic Discrete Mathematics: Lecture 15: Counting counting combinatorics: the study of the number of ways to put things together into various combinations basic counting principles

More information

With Question/Answer Animations. Chapter 6

With Question/Answer Animations. Chapter 6 With Question/Answer Animations Chapter 6 Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients and Identities Generalized Permutations and

More information

Today s Topics. Sometimes when counting a set, we count the same item more than once

Today s Topics. Sometimes when counting a set, we count the same item more than once Today s Topics Inclusion/exclusion principle The pigeonhole principle Sometimes when counting a set, we count the same item more than once For instance, if something can be done n 1 ways or n 2 ways, but

More information

November 6, Chapter 8: Probability: The Mathematics of Chance

November 6, Chapter 8: Probability: The Mathematics of Chance Chapter 8: Probability: The Mathematics of Chance November 6, 2013 Last Time Crystallographic notation Groups Crystallographic notation The first symbol is always a p, which indicates that the pattern

More information

MC215: MATHEMATICAL REASONING AND DISCRETE STRUCTURES

MC215: MATHEMATICAL REASONING AND DISCRETE STRUCTURES MC215: MATHEMATICAL REASONING AND DISCRETE STRUCTURES Thursday, 4/17/14 The Addition Principle The Inclusion-Exclusion Principle The Pigeonhole Principle Reading: [J] 6.1, 6.8 [H] 3.5, 12.3 Exercises:

More information

Sec.on Summary. The Product Rule The Sum Rule The Subtraction Rule (Principle of Inclusion- Exclusion)

Sec.on Summary. The Product Rule The Sum Rule The Subtraction Rule (Principle of Inclusion- Exclusion) Chapter 6 1 Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients and Identities Generalized Permutations and Combinations 2 Section 6.1 3

More information

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG MATH DISCRETE MATHEMATICS INSTRUCTOR: P. WENG Counting and Probability Suggested Problems Basic Counting Skills, Inclusion-Exclusion, and Complement. (a An office building contains 7 floors and has 7 offices

More information

Lecture 18 - Counting

Lecture 18 - Counting Lecture 18 - Counting 6.0 - April, 003 One of the most common mathematical problems in computer science is counting the number of elements in a set. This is often the core difficulty in determining a program

More information

6.1 Basics of counting

6.1 Basics of counting 6.1 Basics of counting CSE2023 Discrete Computational Structures Lecture 17 1 Combinatorics: they study of arrangements of objects Enumeration: the counting of objects with certain properties (an important

More information

Chapter 1. Probability

Chapter 1. Probability Chapter 1. Probability 1.1 Basic Concepts Scientific method a. For a given problem, we define measures that explains the problem well. b. Data is collected with observation and the measures are calculated.

More information

November 8, Chapter 8: Probability: The Mathematics of Chance

November 8, Chapter 8: Probability: The Mathematics of Chance Chapter 8: Probability: The Mathematics of Chance November 8, 2013 Last Time Probability Models and Rules Discrete Probability Models Equally Likely Outcomes Crystallographic notation The first symbol

More information

{ a, b }, { a, c }, { b, c }

{ a, b }, { a, c }, { b, c } 12 d.) 0(5.5) c.) 0(5,0) h.) 0(7,1) a.) 0(6,3) 3.) Simplify the following combinations. PROBLEMS: C(n,k)= the number of combinations of n distinct objects taken k at a time is COMBINATION RULE It can easily

More information

Chapter 2. Permutations and Combinations

Chapter 2. Permutations and Combinations 2. Permutations and Combinations Chapter 2. Permutations and Combinations In this chapter, we define sets and count the objects in them. Example Let S be the set of students in this classroom today. Find

More information

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis Lecture 3 Class URL: http://vlsicad.ucsd.edu/courses/cse21-s14/ Lecture 3 Notes Goal for today: CL Section 3 Subsets,

More information

DISCUSSION #8 FRIDAY MAY 25 TH Sophie Engle (Teacher Assistant) ECS20: Discrete Mathematics

DISCUSSION #8 FRIDAY MAY 25 TH Sophie Engle (Teacher Assistant) ECS20: Discrete Mathematics DISCUSSION #8 FRIDAY MAY 25 TH 2007 Sophie Engle (Teacher Assistant) ECS20: Discrete Mathematics 2 Homework 8 Hints and Examples 3 Section 5.4 Binomial Coefficients Binomial Theorem 4 Example: j j n n

More information

CSE 312: Foundations of Computing II Quiz Section #2: Combinations, Counting Tricks (solutions)

CSE 312: Foundations of Computing II Quiz Section #2: Combinations, Counting Tricks (solutions) CSE 312: Foundations of Computing II Quiz Section #2: Combinations, Counting Tricks (solutions Review: Main Theorems and Concepts Combinations (number of ways to choose k objects out of n distinct objects,

More information

Introductory Probability

Introductory Probability Introductory Probability Combinations Nicholas Nguyen nicholas.nguyen@uky.edu Department of Mathematics UK Agenda Assigning Objects to Identical Positions Denitions Committee Card Hands Coin Toss Counts

More information

MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability. Preliminary Concepts, Formulas, and Terminology

MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability. Preliminary Concepts, Formulas, and Terminology MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability Preliminary Concepts, Formulas, and Terminology Meanings of Basic Arithmetic Operations in Mathematics Addition: Generally

More information

Permutations and Combinations

Permutations and Combinations Motivating question Permutations and Combinations A) Rosen, Chapter 5.3 B) C) D) Permutations A permutation of a set of distinct objects is an ordered arrangement of these objects. : (1, 3, 2, 4) is a

More information

1. An office building contains 27 floors and has 37 offices on each floor. How many offices are in the building?

1. An office building contains 27 floors and has 37 offices on each floor. How many offices are in the building? 1. An office building contains 27 floors and has 37 offices on each floor. How many offices are in the building? 2. A particular brand of shirt comes in 12 colors, has a male version and a female version,

More information

The Product Rule can be viewed as counting the number of elements in the Cartesian product of the finite sets

The Product Rule can be viewed as counting the number of elements in the Cartesian product of the finite sets Chapter 6 - Counting 6.1 - The Basics of Counting Theorem 1 (The Product Rule). If every task in a set of k tasks must be done, where the first task can be done in n 1 ways, the second in n 2 ways, and

More information

CISC 1400 Discrete Structures

CISC 1400 Discrete Structures CISC 1400 Discrete Structures Chapter 6 Counting CISC1400 Yanjun Li 1 1 New York Lottery New York Mega-million Jackpot Pick 5 numbers from 1 56, plus a mega ball number from 1 46, you could win biggest

More information

Math 42, Discrete Mathematics

Math 42, Discrete Mathematics c Fall 2018 last updated 10/29/2018 at 18:22:13 For use by students in this class only; all rights reserved. Note: some prose & some tables are taken directly from Kenneth R. Rosen, and Its Applications,

More information

Probability Theory. Mohamed I. Riffi. Islamic University of Gaza

Probability Theory. Mohamed I. Riffi. Islamic University of Gaza Probability Theory Mohamed I. Riffi Islamic University of Gaza Table of contents 1. Chapter 1 Probability Properties of probability Counting techniques 1 Chapter 1 Probability Probability Theorem P(φ)

More information

3 The multiplication rule/miscellaneous counting problems

3 The multiplication rule/miscellaneous counting problems Practice for Exam 1 1 Axioms of probability, disjoint and independent events 1 Suppose P (A 0, P (B 05 (a If A and B are independent, what is P (A B? What is P (A B? (b If A and B are disjoint, what is

More information

Week 1: Probability models and counting

Week 1: Probability models and counting Week 1: Probability models and counting Part 1: Probability model Probability theory is the mathematical toolbox to describe phenomena or experiments where randomness occur. To have a probability model

More information

n! = n(n 1)(n 2) 3 2 1

n! = n(n 1)(n 2) 3 2 1 A Counting A.1 First principles If the sample space Ω is finite and the outomes are equally likely, then the probability measure is given by P(E) = E / Ω where E denotes the number of outcomes in the event

More information

Honors Precalculus Chapter 9 Summary Basic Combinatorics

Honors Precalculus Chapter 9 Summary Basic Combinatorics Honors Precalculus Chapter 9 Summary Basic Combinatorics A. Factorial: n! means 0! = Why? B. Counting principle: 1. How many different ways can a license plate be formed a) if 7 letters are used and each

More information

Discrete Structures for Computer Science

Discrete Structures for Computer Science Discrete Structures for Computer Science William Garrison bill@cs.pitt.edu 6311 Sennott Square Lecture #22: Generalized Permutations and Combinations Based on materials developed by Dr. Adam Lee Counting

More information

November 11, Chapter 8: Probability: The Mathematics of Chance

November 11, Chapter 8: Probability: The Mathematics of Chance Chapter 8: Probability: The Mathematics of Chance November 11, 2013 Last Time Probability Models and Rules Discrete Probability Models Equally Likely Outcomes Probability Rules Probability Rules Rule 1.

More information

Problems from 9th edition of Probability and Statistical Inference by Hogg, Tanis and Zimmerman:

Problems from 9th edition of Probability and Statistical Inference by Hogg, Tanis and Zimmerman: Math 22 Fall 2017 Homework 2 Drew Armstrong Problems from 9th edition of Probability and Statistical Inference by Hogg, Tanis and Zimmerman: Section 1.2, Exercises 5, 7, 13, 16. Section 1.3, Exercises,

More information

Problem Set 8 Solutions R Y G R R G

Problem Set 8 Solutions R Y G R R G 6.04/18.06J Mathematics for Computer Science April 5, 005 Srini Devadas and Eric Lehman Problem Set 8 Solutions Due: Monday, April 11 at 9 PM in Room 3-044 Problem 1. An electronic toy displays a 4 4 grid

More information

Principle of Inclusion-Exclusion Notes

Principle of Inclusion-Exclusion Notes Principle of Inclusion-Exclusion Notes The Principle of Inclusion-Exclusion (often abbreviated PIE is the following general formula used for finding the cardinality of a union of finite sets. Theorem 0.1.

More information

MAT3707. Tutorial letter 202/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/202/1/2017

MAT3707. Tutorial letter 202/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/202/1/2017 MAT3707/0//07 Tutorial letter 0//07 DISCRETE MATHEMATICS: COMBINATORICS MAT3707 Semester Department of Mathematical Sciences SOLUTIONS TO ASSIGNMENT 0 BARCODE Define tomorrow university of south africa

More information

Permutations and Combinations

Permutations and Combinations Permutations and Combinations Rosen, Chapter 5.3 Motivating question In a family of 3, how many ways can we arrange the members of the family in a line for a photograph? 1 Permutations A permutation of

More information

5. (1-25 M) How many ways can 4 women and 4 men be seated around a circular table so that no two women are seated next to each other.

5. (1-25 M) How many ways can 4 women and 4 men be seated around a circular table so that no two women are seated next to each other. A.Miller M475 Fall 2010 Homewor problems are due in class one wee from the day assigned (which is in parentheses. Please do not hand in the problems early. 1. (1-20 W A boo shelf holds 5 different English

More information

MAT 115: Finite Math for Computer Science Problem Set 5

MAT 115: Finite Math for Computer Science Problem Set 5 MAT 115: Finite Math for Computer Science Problem Set 5 Out: 04/10/2017 Due: 04/17/2017 Instructions: I leave plenty of space on each page for your computation. If you need more sheet, please attach your

More information

It is important that you show your work. The total value of this test is 220 points.

It is important that you show your work. The total value of this test is 220 points. June 27, 2001 Your name It is important that you show your work. The total value of this test is 220 points. 1. (10 points) Use the Euclidean algorithm to solve the decanting problem for decanters of sizes

More information

Lecture 14. What s to come? Probability. A bag contains:

Lecture 14. What s to come? Probability. A bag contains: Lecture 14 What s to come? Probability. A bag contains: What is the chance that a ball taken from the bag is blue? Count blue. Count total. Divide. Today: Counting! Later: Probability. Professor Walrand.

More information

Week 3-4: Permutations and Combinations

Week 3-4: Permutations and Combinations Week 3-4: Permutations and Combinations February 20, 2017 1 Two Counting Principles Addition Principle. Let S 1, S 2,..., S m be disjoint subsets of a finite set S. If S = S 1 S 2 S m, then S = S 1 + S

More information

LESSON 2: THE INCLUSION-EXCLUSION PRINCIPLE

LESSON 2: THE INCLUSION-EXCLUSION PRINCIPLE LESSON 2: THE INCLUSION-EXCLUSION PRINCIPLE The inclusion-exclusion principle (also known as the sieve principle) is an extended version of the rule of the sum. It states that, for two (finite) sets, A

More information

Counting Poker Hands

Counting Poker Hands Counting Poker Hands George Ballinger In a standard deck of cards there are kinds of cards: ce (),,,,,,,,,, ack (), ueen () and ing (). Each of these kinds comes in four suits: Spade (), Heart (), Diamond

More information

Problem Set 8 Solutions R Y G R R G

Problem Set 8 Solutions R Y G R R G 6.04/18.06J Mathematics for Computer Science April 5, 005 Srini Devadas and Eric Lehman Problem Set 8 Solutions Due: Monday, April 11 at 9 PM in oom 3-044 Problem 1. An electronic toy displays a 4 4 grid

More information

CISC-102 Fall 2017 Week 8

CISC-102 Fall 2017 Week 8 Week 8 Page! of! 34 Playing cards. CISC-02 Fall 207 Week 8 Some of the following examples make use of the standard 52 deck of playing cards as shown below. There are 4 suits (clubs, spades, hearts, diamonds)

More information

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability (solutions)

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability (solutions) CSE 31: Foundations of Computing II Quiz Section #: Inclusion-Exclusion, Pigeonhole, Introduction to Probability (solutions) Review: Main Theorems and Concepts Binomial Theorem: x, y R, n N: (x + y) n

More information

CS1802 Week 3: Counting Next Week : QUIZ 1 (30 min)

CS1802 Week 3: Counting Next Week : QUIZ 1 (30 min) CS1802 Discrete Structures Recitation Fall 2018 September 25-26, 2018 CS1802 Week 3: Counting Next Week : QUIZ 1 (30 min) Permutations and Combinations i. Evaluate the following expressions. 1. P(10, 4)

More information

1 of 5 7/16/2009 6:57 AM Virtual Laboratories > 13. Games of Chance > 1 2 3 4 5 6 7 8 9 10 11 3. Simple Dice Games In this section, we will analyze several simple games played with dice--poker dice, chuck-a-luck,

More information

More Probability: Poker Hands and some issues in Counting

More Probability: Poker Hands and some issues in Counting More Probability: Poker Hands and some issues in Counting Data From Thursday Everybody flipped a pair of coins and recorded how many times they got two heads, two tails, or one of each. We saw that the

More information

1. Counting. 2. Tree 3. Rules of Counting 4. Sample with/without replacement where order does/doesn t matter.

1. Counting. 2. Tree 3. Rules of Counting 4. Sample with/without replacement where order does/doesn t matter. Lecture 4 Outline: basics What s to come? Probability A bag contains: What is the chance that a ball taken from the bag is blue? Count blue Count total Divide Today: Counting! Later: Probability Professor

More information

Theory of Probability - Brett Bernstein

Theory of Probability - Brett Bernstein Theory of Probability - Brett Bernstein Lecture 3 Finishing Basic Probability Review Exercises 1. Model flipping two fair coins using a sample space and a probability measure. Compute the probability of

More information

Review I. October 14, 2008

Review I. October 14, 2008 Review I October 14, 008 If you put n + 1 pigeons in n pigeonholes then at least one hole would have more than one pigeon. If n(r 1 + 1 objects are put into n boxes, then at least one of the boxes contains

More information

1 = 3 2 = 3 ( ) = = = 33( ) 98 = = =

1 = 3 2 = 3 ( ) = = = 33( ) 98 = = = Math 115 Discrete Math Final Exam December 13, 2000 Your name It is important that you show your work. 1. Use the Euclidean algorithm to solve the decanting problem for decanters of sizes 199 and 98. In

More information

Block 1 - Sets and Basic Combinatorics. Main Topics in Block 1:

Block 1 - Sets and Basic Combinatorics. Main Topics in Block 1: Block 1 - Sets and Basic Combinatorics Main Topics in Block 1: A short revision of some set theory Sets and subsets. Venn diagrams to represent sets. Describing sets using rules of inclusion. Set operations.

More information

Probability and Counting Techniques

Probability and Counting Techniques Probability and Counting Techniques Diana Pell (Multiplication Principle) Suppose that a task consists of t choices performed consecutively. Suppose that choice 1 can be performed in m 1 ways; for each

More information

CSCI 2200 Foundations of Computer Science (FoCS) Solutions for Homework 7

CSCI 2200 Foundations of Computer Science (FoCS) Solutions for Homework 7 CSCI 00 Foundations of Computer Science (FoCS) Solutions for Homework 7 Homework Problems. [0 POINTS] Problem.4(e)-(f) [or F7 Problem.7(e)-(f)]: In each case, count. (e) The number of orders in which a

More information

11.3B Warmup. 1. Expand: 2x. 2. Express the expansion of 2x. using combinations. 3. Simplify: a 2b a 2b

11.3B Warmup. 1. Expand: 2x. 2. Express the expansion of 2x. using combinations. 3. Simplify: a 2b a 2b 11.3 Warmup 1. Expand: 2x y 4 2. Express the expansion of 2x y 4 using combinations. 3 3 3. Simplify: a 2b a 2b 4. How many terms are there in the expansion of 2x y 15? 5. What would the 10 th term in

More information

CSCI FOUNDATIONS OF COMPUTER SCIENCE

CSCI FOUNDATIONS OF COMPUTER SCIENCE 1 CSCI- 2200 FOUNDATIONS OF COMPUTER SCIENCE Spring 2015 April 2, 2015 2 Announcements Homework 6 is due next Monday, April 6 at 10am in class. Homework 6 ClarificaMon In Problem 2C, where you need to

More information

POKER (AN INTRODUCTION TO COUNTING)

POKER (AN INTRODUCTION TO COUNTING) POKER (AN INTRODUCTION TO COUNTING) LAMC INTERMEDIATE GROUP - 10/27/13 If you want to be a succesful poker player the first thing you need to do is learn combinatorics! Today we are going to count poker

More information

Discrete Finite Probability Probability 1

Discrete Finite Probability Probability 1 Discrete Finite Probability Probability 1 In these notes, I will consider only the finite discrete case. That is, in every situation the possible outcomes are all distinct cases, which can be modeled by

More information

Combinations AMC AMS AMR ACS ACR ASR MSR MCR MCS CRS

Combinations AMC AMS AMR ACS ACR ASR MSR MCR MCS CRS Example Recall our five friends, Alan, Cassie, Maggie, Seth and Roger from the example at the beginning of the previous section. They have won 3 tickets for a concert in Chicago and everybody would like

More information

Intermediate Math Circles November 1, 2017 Probability I

Intermediate Math Circles November 1, 2017 Probability I Intermediate Math Circles November 1, 2017 Probability I Probability is the study of uncertain events or outcomes. Games of chance that involve rolling dice or dealing cards are one obvious area of application.

More information

3 The multiplication rule/miscellaneous counting problems

3 The multiplication rule/miscellaneous counting problems Practice for Exam 1 1 Axioms of probability, disjoint and independent events 1. Suppose P (A) = 0.4, P (B) = 0.5. (a) If A and B are independent, what is P (A B)? What is P (A B)? (b) If A and B are disjoint,

More information

Section : Combinations and Permutations

Section : Combinations and Permutations Section 11.1-11.2: Combinations and Permutations Diana Pell A construction crew has three members. A team of two must be chosen for a particular job. In how many ways can the team be chosen? How many words

More information

Unit on Permutations and Combinations (Counting Techniques)

Unit on Permutations and Combinations (Counting Techniques) Page 1 of 15 (Edit by Y.M. LIU) Page 2 of 15 (Edit by Y.M. LIU) Unit on Permutations and Combinations (Counting Techniques) e.g. How many different license plates can be made that consist of three digits

More information

The probability set-up

The probability set-up CHAPTER 2 The probability set-up 2.1. Introduction and basic theory We will have a sample space, denoted S (sometimes Ω) that consists of all possible outcomes. For example, if we roll two dice, the sample

More information

Solution: This is sampling without repetition and order matters. Therefore

Solution: This is sampling without repetition and order matters. Therefore June 27, 2001 Your name It is important that you show your work. The total value of this test is 220 points. 1. (10 points) Use the Euclidean algorithm to solve the decanting problem for decanters of sizes

More information

Math 1111 Math Exam Study Guide

Math 1111 Math Exam Study Guide Math 1111 Math Exam Study Guide The math exam will cover the mathematical concepts and techniques we ve explored this semester. The exam will not involve any codebreaking, although some questions on the

More information

Compound Probability. Set Theory. Basic Definitions

Compound Probability. Set Theory. Basic Definitions Compound Probability Set Theory A probability measure P is a function that maps subsets of the state space Ω to numbers in the interval [0, 1]. In order to study these functions, we need to know some basic

More information

March 5, What is the area (in square units) of the region in the first quadrant defined by 18 x + y 20?

March 5, What is the area (in square units) of the region in the first quadrant defined by 18 x + y 20? March 5, 007 1. We randomly select 4 prime numbers without replacement from the first 10 prime numbers. What is the probability that the sum of the four selected numbers is odd? (A) 0.1 (B) 0.30 (C) 0.36

More information

Chapter 7. Intro to Counting

Chapter 7. Intro to Counting Chapter 7. Intro to Counting 7.7 Counting by complement 7.8 Permutations with repetitions 7.9 Counting multisets 7.10 Assignment problems: Balls in bins 7.11 Inclusion-exclusion principle 7.12 Counting

More information

Counting integral solutions

Counting integral solutions Thought exercise 2.2 25 Counting integral solutions Question: How many non-negative integer solutions are there of x 1 + x 2 + x 3 + x 4 =10? Give some examples of solutions. Characterize what solutions

More information

Counting (Enumerative Combinatorics) X. Zhang, Fordham Univ.

Counting (Enumerative Combinatorics) X. Zhang, Fordham Univ. Counting (Enumerative Combinatorics) X. Zhang, Fordham Univ. 1 Chance of winning?! What s the chances of winning New York Megamillion Jackpot!! just pick 5 numbers from 1 to 56, plus a mega ball number

More information