Introduction to Counting Discrete Structures. A Multiplication Principle.

Slides:



Advertisements
Similar presentations
4/16/2015 MATH 224 – Discrete Mathematics Counting Basic counting techniques are important in many aspects of computer science. For example, consider the.
Advertisements

Section 4.1: The Basics of Counting As we have seen, one way to count the number of objects in a finite set S is to produce a one-to-one correspondence.
Section 3-6 Counting. FUNDAMENTAL COUNTING RULE For a sequence of two events in which the first event can occur m ways and the second event can occur.
How many possible outcomes can you make with the accessories?
Counting Techniques: Combinations
Counting Tools ● Enumeration ● Multiplication ● Addition ● Negation.
Chapter 2 Section 2.4 Permutations and Combinations.
Basics of Probability. Trial or Experiment Experiment - a process that results in a particular outcome or “event”. Simple event (or sample point), E i.
Combinations We should use permutation where order matters
Counting principle and permutations
4. Counting 4.1 The Basic of Counting Basic Counting Principles Example 1 suppose that either a member of the faculty or a student in the department is.
Counting Principles (Permutations and Combinations )
Counting and Probability Sets and Counting Permutations & Combinations Probability.
Chapter 8 Counting Principles: Further Probability Topics Section 8.2 Combinations.
Do Now: Make a tree diagram that shows the number of different objects that can be created. T-shirts: Sizes: S, M, L and T-shirts: Sizes: S, M, L and Type:
6  Sets and Set Operations  The Number of Elements in a Finite Set  The Multiplication Principle  Permutations and Combinations Sets and Counting.
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
MAT 2720 Discrete Mathematics Section 6.1 Basic Counting Principles
Permutations Counting Techniques, Part 1. Permutations Recall the notion of calculating the number of ways in which to arrange a given number of items.
Permutations and Combinations Multiplication counting principle: This is used to determine the number of POSSIBLE OUTCOMES when there is more than one.
Formulas and Principles. Math I Unit 4 If one event can occur in m ways and another event can occur in n ways, then the number of ways that both events.
7 Further Topics in Algebra © 2008 Pearson Addison-Wesley. All rights reserved Sections 7.4–7.7.
PROBABILITY. FACTORIALS, PERMUTATIONS AND COMBINATIONS.
Counting Techniques 0.4.
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
Warm Up Evaluate  4  3  2   6  5  4  3  2 
Chapter  Determine how many different possibilities are possible:  1. There are 3 different ice cream flavors and 5 different toppings. You.
At the local deli you can add two toppings to your sandwich. Draw a tree diagram to show how many ways you can select two different toppings for your sandwich.
1 Lecture 4 (part 1) Combinatorics Reading: Epp Chp 6.
Quiz 10-1, Which of these are an example of a “descrete” set of data? 2.Make a “tree diagram” showing all the ways the letters ‘x’, ‘y’, and ‘z’
Objectives Solve counting problems using the Multiplication Rule Solve counting problems using permutations Solve counting problems using combinations.
Simple Arrangements & Selections. Combinations & Permutations A permutation of n distinct objects is an arrangement, or ordering, of the n objects. An.
Sullivan Algebra and Trigonometry: Section 14.2 Objectives of this Section Solve Counting Problems Using the Multiplication Principle Solve Counting Problems.
The Basics of Counting Section 6.1.
Quiz Plot the point: (-4, 2, -3) in the Cartesian space. Find the midpoint between the 2 points: P(1, 5, -7) and Q(-5, 3, -3) 3. Find the distance.
Permutations and Combinations Section 2.2 & 2.3 Finite Math.
HAWKES LEARNING Students Count. Success Matters. Copyright © 2015 by Hawkes Learning/Quant Systems, Inc. All rights reserved. Section 2.3 Operations with.
Counting Discrete Mathematics. Basic Counting Principles Counting problems are of the following kind: “How many different 8-letter passwords are there?”
PERMUTATIONS AND COMBINATIONS BOTH PERMUTATIONS AND COMBINATIONS USE A COUNTING METHOD CALLED FACTORIAL.
12/13/2015MATH 106, Section 41 Section 4 Permutations Questions about homework? Submit homework!
Permutations and Combinations. Objectives:  apply fundamental counting principle  compute permutations  compute combinations  distinguish permutations.
THE NATURE OF COUNTING Copyright © Cengage Learning. All rights reserved. 12.
6.7 Permutations & Combinations. Factorial: 4! = 4*3*2*1 On calculator: math ==> PRB ==> 4 7! = 5040 Try 12!
HAWKES LEARNING Students Count. Success Matters. Copyright © 2015 by Hawkes Learning/Quant Systems, Inc. All rights reserved. Section 7.2 Counting Our.
Discrete Math Section 15.3 Solve problems using permutations and combinations Read page Combinations and permutations.
Algebra-2 Counting and Probability. Quiz 10-1, Which of these are an example of a “descrete” set of data? 2.Make a “tree diagram” showing all.
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 5: Probability: What are the Chances? Section 5.2 Probability Rules.
2/24/20161 One, two, three, we’re… Counting. 2/24/20162 Basic Counting Principles Counting problems are of the following kind: “How many different 8-letter.
Permutations and Combinations
Copyright © Peter Cappello 2011 Simple Arrangements & Selections.
Multiplication Counting Principle How many ways can you make an outfit out of 2 shirts and 4 pants? If there are m choices for step 1 and n choices for.
Section Basic Counting Principles: The Product Rule The Product Rule: A procedure can be broken down into a sequence of two tasks. There are n 1.
CS 104: Discrete Mathematics
Warm Up Evaluate  4  3  2   6  5  4  3  2 
Quiz: Draw the unit circle: Include: (1)All “nice” angles in degrees (2) All “nice” angles in radians (3) The (x, y) pairs for each point on the unit circle.
SECTION 5.4 COUNTING. Objectives 1. Count the number of ways a sequence of operations can be performed 2. Count the number of permutations 3. Count the.
Permutations and Combinations. Fundamental Counting Principle Fundamental Counting Principle states that if an event has m possible outcomes and another.
MAT 2720 Discrete Mathematics
Chapter 10 Counting Methods.
Counting Unit 1.
Multiplication Rule Combinations Permutations
Permutations and Combinations
Discrete Structures for Computer Science
Chapter 5 Probability 5.5 Counting Techniques.
Section 3-4 Permutations
How to Count Things “There are three kinds of people in the world: those who can count and those who cannot.” 11/21/2018.
Warm Up Permutations and Combinations Evaluate  4  3  2  1
Permutations and Combinations
Counting Discrete Mathematics.
Presentation transcript:

Introduction to Counting Discrete Structures

A Multiplication Principle

Example 3 Suppose you're buying equipment for a home office. You wish to purchase a computer, a scanner, and a printer ("3 decisions to make"). If you have narrowed your choices to 3 models of computers, 4 scanners, and 2 printers, how many different overall outcomes are possible?

The Count By the multiplication principle, the product 3 x 4 x 2 = 24 computer scanner printer tells us 24 different systems are possible. “ a branch of a tree”

Decision Tree: 24 branches Total of 24 different systems computer scanner printer

Example 4 Consider a license plate consisting of any 3 single digit numbers followed by any 3 letters. Examples of such license plates include 533 ATZ, 285 VCC, etc. There are 6 decisions to make. For each digit, we have the 10 choices 0, 1,..., 9 and for each letter, we have 26 choices a,b,...,z.

The Plates The total number of different plates is given by 10 x 10 x 10 x 26 x 26 x 26 digit 1 digit 2 digit 3 letter 1 letter 2 letter 3 A total of 17,576,000 different plates!

Example 5 In a deli, suppose we may choose from 4 types of bread, 6 types of meat, and 3 types of cheese. Consider the sandwiches which include one type of meat plus one type of cheese. How many such sandwiches are possible? There are three decisions to make (bread, meat, cheese)

The Sandwiches There are three decisions to make 4 x 6 x 3 = 72 bread meat 1 cheese A total of 72 different sandwiches.

Cardinality of a Set The number of elements in a set A is called the “cardinality” of A, denoted | A |. By the multiplication principle, if | A | = n and | B | = m, then | A x B | = nm. By the multiplication principle, if | A | = n, then

No Overlap? In this special case, count the total elements by counting each set separately. In this case, the sets are said to be "disjoint".

Multiply and Add Consider the license plate example again. This time allow either 3 digits followed by 3 letters or just 6 digits. These two sets of plates are disjoint (no overlap). A total of 18,576,000 license plates

Inclusion/Exclusion and Combinations Discrete Structures

How many elements? Recall our sets A = {2,4,5,8,10} and B = { 2,3,5,7,8,9}. Determine the cardinality, Because the sets are not disjoint.

Avoid Double Counting When adding the 5 elements from A with the 6 elements from B, the 3 elements which lie in both A and B must be counted only once.

Addition Principle For any two sets A and B, In particular, if A and B are disjoint sets, then

Playing Cards The 13 cards in each category or "suit" include a 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King, and an Ace. The Jack, Queen, and King are called "face cards".

Aces or Spades In a deck of playing cards, how many of the cards are Aces or Spades? That's a total of 16 distinct cards.

Using Addition Rule By counting the set of Aces and set of Spades individually and subtracting the overlap…

Solving for other term Given any 3 of the values in the addition rule, we may solve for the remaining unknown value. Find the number of elements in B, given Substitute in the known values…

Elements in B The 85 elements of B includes the 35 in the overlap with A. These regions contain the total of 140 elements.

Example “In a survey of 1000 students, 700 indicate they are enrolled in a math or english class. Of these students, 400 are enrolled in a math class and 650 are enrolled in an english class. How may are enrolled in math and english classes?”

Find Intersection Using the addition principle, setup and solve for the intersection M E

Extended to 3 Sets? May generalize further for any n sets.

Problem 8, page 203 Among 150 students 83 own a car, 97 own a bicycle, 28 own a motorcycle, 53 own car and bicycle, 14 own car and motorcycle, 7 own bicycle and motorcycle, 2 own all three items How many own only a bicycle? How many don’t own any of these items?

Permutations and Combinations Discrete Structures

Arranging Letters When we consider 3 letters on a license plate, the order in which the letters appear is significant. That is, the sequence of letters PHT is different than TPH, even though the same letters are used. Using the “multiplication principle”, there are 26 x 25 x 24 = ways to pick and arrange 3 distinct letters (not using the same letter twice).

“Permutations” When we wish to consider the many different arrangements of the various choices, as with letters on license plates, we use the term "permutations". “Permutations of n objects, taken r at a time” Consider 26 letters, choose and arrange 3. How many ways may this be done?

Permutation Formula When repetitions are not allowed, the number of ways to choose and arrange any r objects chosen from a set of n available objects is denoted P n, r.

Using the Formula For the arrangements of 3 letters recall by “multiplication principle”, there are 26 x 25 x 24 = ways

Same as before! A convenient notation, but why not just use the multiplication principle?

Gold, Silver, Bronze Consider the top 3 winners in a race with 8 contestants. How many results are possible? Or equivalently,

Calculate it Calculators have a built-in feature for these computations (labeled as nPr ). Use the MATH button and PRB submenu. To compute the value P 8,3 = 336 we simply enter: 8 nPr 3

Compare 2 Cases: Case 1: If a president, VP, and treasurer are elected, how many outcomes are possible? (select and arrange 3, order is important) 16 x 15 x 14 = 3360 pres. VP treas. Consider a club with 16 members: Case 2: If a group of 3 members is chosen, how many groups are possible ? (a choice of 3 members, order is not important) Since we don't count the different arrangements, this total should be less.

Case 2 “Combinations” We’re interested in the members of the group, not all the possible arrangements. Think of the group as one "choice of 3” from the 16 members. The number of different combinations is denoted by C 16, 3. “Combinations of 16 objects, taken 3 at a time”

Combinations Formula number of combinations of r items chosen from n available choices, is given by “Combinations of n objects, taken r at a time” Often read as “n, choose r"

Calculate “16, choose 3” Or we may calculate the value C 16,3 = 560 by simply entering: 16 nCr 3 simplifies as

Our Comparison Case 1: Case 2: Given one group of 3 members, such as Joe, Bob, and Sue, 6 arrangements are possible: ( Joe, Bob, Sue), ( Joe, Sue, Bob), ( Bob, Joe, Sue) ( Bob, Sue, Joe), ( Sue, Joe, Bob), ( Sue, Bob, Joe) Each group gets counted 6 times for permutations. Divide by 6 to “remove this redundancy”.

Arranging Letters How many distinct ways can the letters “MISSOURI” be arranged? There are 8 letters, so there are 8! permutations. But not all distinct! RUIS 1 MS 2 OI is equal to RUIS 2 MS 1 OI so don’t count these twice. Same consideration for the letter “I’s”. 8!, reduce by half, and reduce by half again. Perhaps an easier way?

Rearranging Missouri How many distinct ways can the letters “MISSOURI” be arranged? Alternate, choose 2 slots for the M’s, choose 2 slots for the I’s, then arrange the other 4 letters.

Rearranging Mississippi How many distinct ways can the letters “mississippi” be arranged? Alternate, choose 4 slots for the S’s, 4 slots for the I’s, 2 slots for the P’s, then only one slot left to place the M.

More Combinations Discrete Structures

5 card hands? When a hand of cards is drawn from a deck, which cards we receive is important, not the arrangement. How many different 5-card hands are possible ? Consider all combinations of 5 cards, taken from the 52 cards. That is, “52, choose 5”.

Series of Choices Try combining our new counting formulas with our previous counting principles. How many 5-card hands include exactly 3 kings and 2 aces? Here we select kings and select aces. It’s a series of decisions, so we apply the multiplication principle: ? x ? = ??? choose 3 of choose 2 of the 4 kings the 4 aces

3 Kings, 2 Aces “4 kings, choose 3”; there are C 4,3 = 4 possible outcomes. “4 aces, choose 2”; there are C 4,2 = 6 possible outcomes. C 4, 3 x C 4, 2 = (4)(6) = 24 choose 3 of choose 2 of the 4 kings the 4 aces There are 24 hands including 3 kings and 2 aces.

Committee Consider a group of 20 juniors and 25 seniors. Question 1: How many ways can a committee of 4 of these students be selected? "45 available students, choose 4“ C 45,4 = 148,995 possible committees. Question 2: How many ways can a committee with 2 juniors and 2 seniors be selected? Select 2 of the 20 juniors, select 2 of 25 seniors: C 20, 2 x C 25, 2 = (190)(300) = 57,000 committtees.

Continued… Question 3: How many ways can a committee of 4 students be selected, including at least 3 seniors? Adding the two cases yields a total of (20)(2300) = 58,650 committees.

Defective, or not? Among a collection of 20 clocks, 5 are defective. Question 1: How many ways can 3 of the clocks be selected? "20 available clocks, choose any 3“ C 20,3 = 1140 possible selections. Question 2: How many ways can 3 of the clocks be selected such that none are defective? Select 3 from the 15 non-defective clocks C 15,3 = 455 selections don't involve defective clocks

Partition as Disjoint Sets All 5-card hands categorized as: no face cards: C 40, 5 = 658,008 1 face card: C 12,1 C 40, 4 = 1,096,680 2 face cards: C 12,2 C 40, 3 = 652,080 3 face cards: C 12,3 C 40, 2 = 171,600 4 face cards: C 12,4 C 40, 1 = 19,800 all 5 face cards: C 12,5 = 792 Total 5-card hands: 2,598,960

Throw out the rest Sometimes instead of counting the objects we’re interested in… …it’s easier to count “all objects” and subtract out the objects we don’t want. Consider a subset A of a “universal” set S

The LONG Way… To count the 5-card hands with at least one face card… hands with 1 face card + hands with 2 face cards + hands with 3 face cards + hands with 4 face cards + hands with 5 face cards

The Easy Way! But, to count the 5-card hands with at least one face card… …we may instead count all 5-card hands and subtract the hands with no face cards.

Subtract the complement From a group of 15 juniors and 15 seniors… …how many ways is it possible to choose a team of 11 students including at least 2 seniors?