CSCI FOUNDATIONS OF COMPUTER SCIENCE

Size: px
Start display at page:

Download "CSCI FOUNDATIONS OF COMPUTER SCIENCE"

Transcription

1 1 CSCI FOUNDATIONS OF COMPUTER SCIENCE Spring 2015 April 2, 2015

2 2 Announcements Homework 6 is due next Monday, April 6 at 10am in class. Homework 6 ClarificaMon In Problem 2C, where you need to count the number of strings where G precedes A, G does not need to immediately precede A.

3 3 Review of CounMng I 1. How many strings of six uppercase English leters are there? 2. How many are there that start with a vowel? 3. How many are there that contain no vowels? 4. How many strings are there if leters cannot be repeated?

4 4 Review of CounMng I 1. How many strings of six uppercase English leters are there? 2. How many are there that start with a vowel? 3. How many are there that contain no vowels? 4. How many strings are there if leters cannot be repeated?

5 5 Review of CounMng II 1. How many funcmons are there from the set X = {0,1} to the set Y={1,2,3,4}. 2. How many of these funcmons are injecmve? 3. How many of these funcmons are surjecmve?

6 6 Review of CounMng III How many subsets of a set with 100 elements have more than 1 element?

7 7 Tree Diagrams Suppose that I Love FOCS T- shirts come in five different sizes: S,M,L,XL, and XXL. Each size comes in four colors (white, red, green, and black), except XL, which comes only in red, green, and black, and XXL, which comes only in green and black. What is the minimum number of shirts that the campus book store needs to stock to have one of each size and color available?

8 8 THE PIGEONHOLE PRINCIPLE SecMon 6.2

9 9 The Pigeonhole Principle Pigeonhole Principle: If k is a posimve integer and k + 1 objects are placed into k boxes, then at least one box contains two or more objects.

10 10 Proof of the Pigeonhole Principle Pigeonhole Principle: If k is a posimve integer and k + 1 objects are placed into k boxes, then at least one box contains two or more objects.

11 11 Example of the Pigeonhole Principle Among any group of 367 people, there must be at least two with the same birthday. How many possible birthdays are there? 366 What are the pigeonholes? The 366 birthdays What are the pigeons? The 367 people

12 Show that, among any group of five integers, there are two with the same remainder when divided by 4. 12

13 13 Show that for every posi?ve integer n there is a mul?ple of n that has only 0s and 1s in its decimal expansion (only contains the digits 0 and 1). Let n be a posimve integer. Consider the n + 1 integers 1, 11, 111,., (where the last integer has n + 1 1s). There are n possible remainders when an integer is divided by n. By the pigeonhole principle, when each of the n + 1 integers is divided by n, at least two must have the same remainder. Let x be the largest one and let y be the smallest one. x y is divisible by n and contains only the digits 0 and 1.

14 14 The Generalized Pigeonhole Principle If N objects are placed into k boxes, then there is at least one box containing at least N/k objects. Among 100 people there are at least how many who were born in the same month?

15 Example - Generalized Pigeonhole Principle How many cards must be selected from a standard deck of 52 cards to guarantee that at least three cards of the same suit are chosen? 15

16 16 PERMUTATIONS AND COMBINATIONS SecMon 6.3

17 17 PermutaMons A permuta?on of a set of dismnct objects is an ordered arrangement of these objects. An ordered arrangement of r elements of a set is called an r- permuta?on. Example: Let S = {1,2,3}. 3,1,2 is a permutamon of S. 3,2 is a 2- permutamon of S. The number of r- permutamons of a set with n elements is denoted by P(n,r).

18 18 A Formula for the Number of PermutaMons Theorem: If n is a posimve integer and r is an integer with 1 r n, then there are P(n, r) = n(n 1)(n 2) (n r + 1) r- permutamons of a set with n dismnct elements. Proof: Use the product rule. The first element can be chosen in n ways. The second in n 1 ways, and so on until there are (n ( r 1)) ways to choose the last element. Note that P(n,0) = 1, since there is only one way to order zero elements.

19 19 CounMng PermutaMons How many ways are there to select a first- prize winner, a second prize winner, and a third- prize winner from 100 different people who have entered a contest?

20 20 More CounMng PermutaMons Suppose a saleswoman must visit 8 different cimes. She must begin her trip in a specified city, but she can visit the other seven cimes in any order she wishes. How many possible orders can the saleswoman use when visimng these cimes? SoluMon: The first city is chosen. Hence the number of possible orders is 7! = = 5040 If she wants to Cind the tour with the shortest path that visits all the cities, she must consider 5040 paths!

21 21 The Traveling Salesman Problem Suppose a saleswoman must visit all 6 cimes. The distances between the cimes are given. What is the shortest tour she can take that visits every city exactly once and then returns to the starmng city?

22 22 Even More CounMng PermutaMons How many permutamons of the leters A, B, C, D,E, F,G, H contain the string ABC?

23 23 CombinaMons An r- combina?on of elements of a set is an unordered selecmon of r elements from the set. An r- combinamon is simply a subset of the set with r elements. The number of r- combinamons of a set with n dismnct elements is denoted by C(n, r). The notamon coefficient. is also used and is called a binomial

24 24 Example I - CombinaMons Let S be the set {a, b, c, d}. Then {a, c, d} is a 3- combinamon from S. It is the same as {d, c, a} since the order does not mater. What is C(4,2)? What is P(4,2)?

25 25 CombinaMons Theorem 2: The number of r- combinamons of a set with n elements, where n r 0, equals

26 How many poker hands of five cards can be dealt from a standard deck of 52 cards? 26

27 27 CombinaMons Corollary: Let n and r be nonnegamve integers with r n. Then C(n, r) = C(n, n r). Proof: From the previous theorem, it follows that and Hence, C(n, r) = C(n, n r).

28 A group of 30 people have been trained as astronauts to go on the first mission to Mars. How many ways are there to select a crew of six people to go on this mission? 28

29 How many bit strings of length 10 contain at least three 0s and at least three 1s? 29

30 30 Good Problems to Review SecMon 6.2: 3, 5, 7, 9, 17, SecMon 6.3: 3, 5, 7, 11, 15, 17, 19 21, 23, 27, 31, 33

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

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

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. 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

COUNTING TECHNIQUES. Prepared by Engr. JP Timola Reference: Discrete Math by Kenneth H. Rosen

COUNTING TECHNIQUES. Prepared by Engr. JP Timola Reference: Discrete Math by Kenneth H. Rosen COUNTING TECHNIQUES Prepared by Engr. JP Timola Reference: Discrete Math by Kenneth H. Rosen COMBINATORICS the study of arrangements of objects, is an important part of discrete mathematics. Counting Introduction

More information

Jong C. Park Computer Science Division, KAIST

Jong C. Park Computer Science Division, KAIST Jong C. Park Computer Science Division, KAIST Today s Topics Basic Principles Permutations and Combinations Algorithms for Generating Permutations Generalized Permutations and Combinations Binomial Coefficients

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

Permutations and Combinations

Permutations and Combinations Permutations and Combinations Introduction Permutations and combinations refer to number of ways of selecting a number of distinct objects from a set of distinct objects. Permutations are ordered selections;

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

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

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

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

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

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

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

Outline. Content The basics of counting The pigeonhole principle Reading Chapter 5 IRIS H.-R. JIANG

Outline. Content The basics of counting The pigeonhole principle Reading Chapter 5 IRIS H.-R. JIANG CHAPTER 5 COUNTING Outline 2 Content The basics of counting The pigeonhole principle Reading Chapter 5 Most of the following slides are by courtesy of Prof. J.-D. Huang and Prof. M.P. Frank Combinatorics

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

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

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

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

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

2. How many bit strings of length 10 begin with 1101? a b. 2 6 c. 2 4 d. None of the above.

2. How many bit strings of length 10 begin with 1101? a b. 2 6 c. 2 4 d. None of the above. This test consists of 25 equally weighted questions. 1. Given a two-step procedure where there are n1 ways to do Task 1, and n2 ways to do Task 2 after completing Task 1, then there are ways to do the

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

COUNTING AND PROBABILITY

COUNTING AND PROBABILITY CHAPTER 9 COUNTING AND PROBABILITY Copyright Cengage Learning. All rights reserved. SECTION 9.2 Possibility Trees and the Multiplication Rule Copyright Cengage Learning. All rights reserved. Possibility

More information

Permutations and Combinations. Quantitative Aptitude & Business Statistics

Permutations and Combinations. Quantitative Aptitude & Business Statistics Permutations and Combinations Statistics The Fundamental Principle of If there are Multiplication n 1 ways of doing one operation, n 2 ways of doing a second operation, n 3 ways of doing a third operation,

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

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

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

Counting: Basics. Four main concepts this week 10/12/2016. Product rule Sum rule Inclusion-exclusion principle Pigeonhole principle

Counting: Basics. Four main concepts this week 10/12/2016. Product rule Sum rule Inclusion-exclusion principle Pigeonhole principle Counting: Basics Rosen, Chapter 5.1-2 Motivation: Counting is useful in CS Application domains such as, security, telecom How many password combinations does a hacker need to crack? How many telephone

More information

Multiple Choice Questions for Review

Multiple Choice Questions for Review Review Questions Multiple Choice Questions for Review 1. Suppose there are 12 students, among whom are three students, M, B, C (a Math Major, a Biology Major, a Computer Science Major. We want to send

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

Generalized Permutations and The Multinomial Theorem

Generalized Permutations and The Multinomial Theorem Generalized Permutations and The Multinomial Theorem 1 / 19 Overview The Binomial Theorem Generalized Permutations The Multinomial Theorem Circular and Ring Permutations 2 / 19 Outline The Binomial Theorem

More information

Well, there are 6 possible pairs: AB, AC, AD, BC, BD, and CD. This is the binomial coefficient s job. The answer we want is abbreviated ( 4

Well, there are 6 possible pairs: AB, AC, AD, BC, BD, and CD. This is the binomial coefficient s job. The answer we want is abbreviated ( 4 2 More Counting 21 Unordered Sets In counting sequences, the ordering of the digits or letters mattered Another common situation is where the order does not matter, for example, if we want to choose a

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

Math236 Discrete Maths with Applications

Math236 Discrete Maths with Applications Math236 Discrete Maths with Applications P. Ittmann UKZN, Pietermaritzburg Semester 1, 2012 Ittmann (UKZN PMB) Math236 2012 1 / 43 The Multiplication Principle Theorem Let S be a set of k-tuples (s 1,

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

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

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

Elementary Combinatorics CE 311S

Elementary Combinatorics CE 311S CE 311S INTRODUCTION How can we actually calculate probabilities? Let s assume that there all of the outcomes in the sample space S are equally likely. If A is the number of outcomes included in the event

More information

Counting and Probability Math 2320

Counting and Probability Math 2320 Counting and Probability Math 2320 For a finite set A, the number of elements of A is denoted by A. We have two important rules for counting. 1. Union rule: Let A and B be two finite sets. Then A B = A

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

THE PIGEONHOLE PRINCIPLE. MARK FLANAGAN School of Electrical and Electronic Engineering University College Dublin

THE PIGEONHOLE PRINCIPLE. MARK FLANAGAN School of Electrical and Electronic Engineering University College Dublin THE PIGEONHOLE PRINCIPLE MARK FLANAGAN School of Electrical and Electronic Engineering University College Dublin The Pigeonhole Principle: If n + 1 objects are placed into n boxes, then some box contains

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

NOTES ON SEPT 13-18, 2012

NOTES ON SEPT 13-18, 2012 NOTES ON SEPT 13-18, 01 MIKE ZABROCKI Last time I gave a name to S(n, k := number of set partitions of [n] into k parts. This only makes sense for n 1 and 1 k n. For other values we need to choose a convention

More information

Mathematical Foundations of Computer Science Lecture Outline August 30, 2018

Mathematical Foundations of Computer Science Lecture Outline August 30, 2018 Mathematical Foundations of omputer Science Lecture Outline ugust 30, 2018 ounting ounting is a part of combinatorics, an area of mathematics which is concerned with the arrangement of objects of a set

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

Section 6.1 #16. Question: What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit?

Section 6.1 #16. Question: What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit? Section 6.1 #16 What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit? page 1 Section 6.1 #38 Two events E 1 and E 2 are called independent if p(e 1

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

CS 3233 Discrete Mathematical Structure Midterm 2 Exam Solution Tuesday, April 17, :30 1:45 pm. Last Name: First Name: Student ID:

CS 3233 Discrete Mathematical Structure Midterm 2 Exam Solution Tuesday, April 17, :30 1:45 pm. Last Name: First Name: Student ID: CS Discrete Mathematical Structure Midterm Exam Solution Tuesday, April 17, 007 1:0 1:4 pm Last Name: First Name: Student ID: Problem No. Points Score 1 10 10 10 4 1 10 6 10 7 1 Total 80 1 This is a closed

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

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

The Pigeonhole Principle

The Pigeonhole Principle The Pigeonhole Principle Some Questions Does there have to be two trees on Earth with the same number of leaves? How large of a set of distinct integers between 1 and 200 is needed to assure that two numbers

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

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

6/24/14. The Poker Manipulation. The Counting Principle. MAFS.912.S-IC.1: Understand and evaluate random processes underlying statistical experiments

6/24/14. The Poker Manipulation. The Counting Principle. MAFS.912.S-IC.1: Understand and evaluate random processes underlying statistical experiments The Poker Manipulation Unit 5 Probability 6/24/14 Algebra 1 Ins1tute 1 6/24/14 Algebra 1 Ins1tute 2 MAFS. 7.SP.3: Investigate chance processes and develop, use, and evaluate probability models MAFS. 7.SP.3:

More information

Finite Math - Fall 2016

Finite Math - Fall 2016 Finite Math - Fall 206 Lecture Notes - /28/206 Section 7.4 - Permutations and Combinations There are often situations in which we have to multiply many consecutive numbers together, for example, in examples

More information

PERMUTATIONS AND COMBINATIONS

PERMUTATIONS AND COMBINATIONS PERMUTATIONS AND COMBINATIONS 1. Fundamental Counting Principle Assignment: Workbook: pg. 375 378 #1-14 2. Permutations and Factorial Notation Assignment: Workbook pg. 382-384 #1-13, pg. 526 of text #22

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

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

2. Combinatorics: the systematic study of counting. The Basic Principle of Counting (BPC)

2. Combinatorics: the systematic study of counting. The Basic Principle of Counting (BPC) 2. Combinatorics: the systematic study of counting The Basic Principle of Counting (BPC) Suppose r experiments will be performed. The 1st has n 1 possible outcomes, for each of these outcomes there are

More information

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

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability Review: Main Theorems and Concepts Binomial Theorem: Principle of Inclusion-Exclusion

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

Exercises Exercises. 1. List all the permutations of {a, b, c}. 2. How many different permutations are there of the set {a, b, c, d, e, f, g}?

Exercises Exercises. 1. List all the permutations of {a, b, c}. 2. How many different permutations are there of the set {a, b, c, d, e, f, g}? Exercises Exercises 1. List all the permutations of {a, b, c}. 2. How many different permutations are there of the set {a, b, c, d, e, f, g}? 3. How many permutations of {a, b, c, d, e, f, g} end with

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

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. More 9.-9.3 Practice Name MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Answer the question. ) In how many ways can you answer the questions on

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

Combinatorics. Chapter Permutations. Counting Problems

Combinatorics. Chapter Permutations. Counting Problems Chapter 3 Combinatorics 3.1 Permutations Many problems in probability theory require that we count the number of ways that a particular event can occur. For this, we study the topics of permutations and

More information

About Permutations and Combinations: Examples

About Permutations and Combinations: Examples About Permutations and Combinations: Examples TABLE OF CONTENTS Basics... 1 Product Rule...1-2 Sum Rule...2 Permutations... 2-3 Combinations... 3-4 Pascal s Triangle... 4 Binomial Theorem.. 4 Pascal s

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

Probability. Engr. Jeffrey T. Dellosa.

Probability. Engr. Jeffrey T. Dellosa. Probability Engr. Jeffrey T. Dellosa Email: jtdellosa@gmail.com Outline Probability 2.1 Sample Space 2.2 Events 2.3 Counting Sample Points 2.4 Probability of an Event 2.5 Additive Rules 2.6 Conditional

More information

Lecture 1. Permutations and combinations, Pascal s triangle, learning to count

Lecture 1. Permutations and combinations, Pascal s triangle, learning to count 18.440: Lecture 1 Permutations and combinations, Pascal s triangle, learning to count Scott Sheffield MIT 1 Outline Remark, just for fun Permutations Counting tricks Binomial coefficients Problems 2 Outline

More information

Distribution of Aces Among Dealt Hands

Distribution of Aces Among Dealt Hands Distribution of Aces Among Dealt Hands Brian Alspach 3 March 05 Abstract We provide details of the computations for the distribution of aces among nine and ten hold em hands. There are 4 aces and non-aces

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

Sets. Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) August 6, Outline Sets Equality Subset Empty Set Cardinality Power Set

Sets. Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) August 6, Outline Sets Equality Subset Empty Set Cardinality Power Set Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) August 6, 2012 Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) Gazihan Alankuş (Based on original slides by Brahim Hnich

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

FOURTH LECTURE : SEPTEMBER 18, 2014

FOURTH LECTURE : SEPTEMBER 18, 2014 FOURTH LECTURE : SEPTEMBER 18, 01 MIKE ZABROCKI I started off by listing the building block numbers that we have already seen and their combinatorial interpretations. S(n, k = the number of set partitions

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

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MH1301 DISCRETE MATHEMATICS. Time Allowed: 2 hours

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MH1301 DISCRETE MATHEMATICS. Time Allowed: 2 hours NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION 206-207 DISCRETE MATHEMATICS May 207 Time Allowed: 2 hours INSTRUCTIONS TO CANDIDATES. This examination paper contains FOUR (4) questions and comprises

More information

7.4 Permutations and Combinations

7.4 Permutations and Combinations 7.4 Permutations and Combinations The multiplication principle discussed in the preceding section can be used to develop two additional counting devices that are extremely useful in more complicated counting

More information

12. 6 jokes are minimal.

12. 6 jokes are minimal. Pigeonhole Principle Pigeonhole Principle: When you organize n things into k categories, one of the categories has at least n/k things in it. Proof: If each category had fewer than n/k things in it then

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

Permutations and Combinations Section

Permutations and Combinations Section A B I L E N E C H R I S T I A N U N I V E R S I T Y Department of Mathematics Permutations and Combinations Section 13.3-13.4 Dr. John Ehrke Department of Mathematics Fall 2012 Permutations A permutation

More information

Week 1. 1 What Is Combinatorics?

Week 1. 1 What Is Combinatorics? 1 What Is Combinatorics? Week 1 The question that what is combinatorics is similar to the question that what is mathematics. If we say that mathematics is about the study of numbers and figures, then combinatorics

More information