Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University.

Slides:



Advertisements
Similar presentations
Fall 2014 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Advertisements

1 Counting Techniques: Possibility Trees, Multiplication Rule, Permutations.
Counting and Probability The outcome of a random process is sure to occur, but impossible to predict. Examples: fair coin tossing, rolling a pair of dice,
Multiplication Rule. A tree structure is a useful tool for keeping systematic track of all possibilities in situations in which events happen in order.
Discrete Structures Chapter 4 Counting and Probability Nurul Amelina Nasharuddin Multimedia Department.
Discrete Mathematics Lecture 7 More Probability and Counting Harper Langston New York University.
Combinations We should use permutation where order matters
Discrete Mathematics Lecture 5
Discrete Mathematics Lecture 6 Alexander Bukharovich New York University.
1 More Counting Techniques Possibility trees Multiplication rule Permutations Combinations.
Counting Elements in a List How many integers in the list from 1 to 10? How many integers in the list from m to n? (assuming m
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
Chapter 5 Section 5 Counting Techniques.
5.5 Counting Techniques. More Challenging Stuff  The classical method, when all outcomes are equally likely, involves counting the number of ways something.
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 and Probability Sets and Counting Permutations & Combinations Probability.
Fall 2015 COMP 2300 Discrete Structures for Computation
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
7 Further Topics in Algebra © 2008 Pearson Addison-Wesley. All rights reserved Sections 7.4–7.7.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.4,
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Generalized Permutations and Combinations
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
9.3 Addition Rule. The basic rule underlying the calculation of the number of elements in a union or difference or intersection is the addition rule.
Permutations and Combinations. Objectives:  apply fundamental counting principle  compute permutations  compute combinations  distinguish permutations.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
13-1 Permutations and Combinations
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
1 Lecture 4 (part 1) Combinatorics Reading: Epp Chp 6.
Lesson Counting Techniques. Objectives Solve counting problems using the Multiplication Rule Solve counting problems using permutations Solve counting.
Chapter 6, Counting and Probability
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Sullivan Algebra and Trigonometry: Section 14.2 Objectives of this Section Solve Counting Problems Using the Multiplication Principle Solve Counting Problems.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.1,
CSNB143 – Discrete Structure
Aaron Tan October Counting and Probability 1 IntroductionPossibility Trees and Multiplication RuleCounting Elements of Disjoint SetsThe Pigeonhole.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Discrete Mathematics, 1st Edition Kevin Ferland Chapter 6 Basic Counting 1.
Counting Principles Multiplication rule Permutations Combinations.
Spring 2016 COMP 2300 Discrete Structures for Computation
Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University.
COUNTING Permutations and Combinations. 2Barnett/Ziegler/Byleen College Mathematics 12e Learning Objectives for Permutations and Combinations  The student.
CS 104: Discrete Mathematics
Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University.
Permutations and Combinations. Fundamental Counting Principle If there are r ways of performing one operation, s ways of performing a second operation,
Copyright © Cengage Learning. All rights reserved. Probability and Statistics.
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
The Multiplication Rule
Discrete Mathematics Lecture 8 Probability and Counting
Permutations and Combinations
Counting Methods and Probability Theory
12.2 Permutations and Combinations
Copyright © Cengage Learning. All rights reserved.
1. In how many ways can six people sit in a six-passenger car?
9. Counting and Probability 1
CS100: Discrete structures
COUNTING AND PROBABILITY
COUNTING AND PROBABILITY
COUNTING AND PROBABILITY
COUNTING AND PROBABILITY
Discrete Structures Counting.
Counting Methods and Probability Theory
Presentation transcript:

Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 9.2 Possibility Trees and the Multiplication Rule

Possibilities for Tournament Play Teams A and B are to play each other repeatedly until one wins two games in a row or a total of three games. 2 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

Possibilities for Tournament Play Teams A and B are to play each other repeatedly until one wins two games in a row or a total of three games. a.How many ways can the tournament be played? 10 b.Assuming that all the ways of playing the tournament are equally likely, what is the probability that five games are needed to determine the tournament winner? 4/10 3 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

The Multiplication Rule If an operation consists of k steps and the first step can be performed in ways, the second step can be performed in ways, (regardless of how the first step was performed) the k th step can be performed in ways, (regardless of how the preceding steps was performed) Example What is the number of the possible outcomes of rolling 3 dices in a row? 6 x 6 x 6. 4 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

Number of Personal Identification Numbers (PINs) A typical PIN (personal identification number) is a sequence of any four symbols chosen from the 26 letters in the alphabet and the ten digits, with repetition allowed. a.How many different PINs are possible? : 36 x 36 x 36 x 36 = 1,679,616 PINs. b.If all PINs are equally likely, what is the probability that a PIN chosen at random contains no repeated symbol? : 36 x 35 x 34 x 33 / 36 x 36 x 36 x 36 = Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

Counting the Number of Iterations of a Nested Loop Consider the following nested loop: How many times will the inner loop be iterated when the algorithm is implemented and run? 12 6 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

When the Multiplication Rule Is Difficult or Impossible to Apply Three officers – a president, a treasurer, and a secretary – are to be chosen from among four people: Ann, Bob, Cyd, and Dan. Suppose Ann became a president Ann (P), Bob (T), Cyd (S) / Ann (P), Bob (S), Cyd (T) Ann (P), Cyd (T), Dan (S) / Ann (P), Cyd (S), Dan (T) Ann (P), Bob (T), Dan (S) / Ann (P), Bob (S), Dan (T) # of possible choices for President = 4 # of possible cases: 4 * 6 = 24 Suppose that, for various reasons, Ann cannot be president and either Cyd or Dan must be secretary. How many ways can the officers be chosen? 7 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

When the Multiplication Rule Is Difficult or Impossible to Apply – cont’ Three officers – a president, a treasurer, and a secretary – are to be chosen from among four people: Ann, Bob, Cyd, and Dan. Suppose that, for various reasons, Ann cannot be president and either Cyd or Dan must be secretary. How many ways can the officers be chosen? 8 # of possible choices for President = 3 Cyd is the president Cyd (P), Ann (T), Bob (S) / Cyd (P), Ann (S), Bob (T) Cyd (P), Ann (T), Dan (S) / Cyd (P), Ann (S), Dan (T) Cyd (P), Bob (T), Dan (S) / Cyd (P), Bob (S), Dan (T) Dan is the president Dan (P), Ann (T), Bob (S) / Dan (P), Ann (S), Bob (T) Dan (P), Ann (T), Cyd (S) / Dan (P), Ann (S), Cyd (T) Dan (P), Bob (T), Cyd (S) / Dan (P), Bob (S), Cyd (T) Bob is the president Bob (P), Ann (T), Cyd (S) / Bob (P), Ann (S), Cyd (T) Bob (P), Cyd (T), Dan (S) / Bob (P), Cyd (S), Dan (T) Bob (P), Ann (T), Dan (S) / Bob (P), Ann (S), Dan (T) 8 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

More Subtle Use of the Multiplication Rule Three officers – a president, a treasurer, and a secretary – are to be chosen from among four people: Ann, Bob, Cyd, and Dan. Suppose that, for various reasons, Ann cannot be president and either Cyd or Dan must be secretary. How many ways can the officers be chosen? Possible Secretary = 2 (Cyd or Dan) Possible President = 2 (Bob or Dan if Cyd is P, Bod or Cyd if Dan is P) Possible Treasuer = 2 (Reminders) Total possible cases: 2 * 2 * 2 = 8. 9 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

Permutations A permutation of a set of objects is an ordering of the objects in a row. For example, the set of elements a, b, and c has six permutations. Theorem For any integer n with, the number of permutations of a set with n elements is n !. 10 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

Permutations of the Letters in a Word How many ways can the letters in the word COMPUTER be arranged in a row? 8! How many ways can the letters in the word COMPUTER be arranged if the letter CO must remain next to each other (in order) as a unit? 7! If letters of the word COMPUTER are randomly arranged in a row, what is the probability that the letters CO remain next to each other (in order) as a unit? 7!/8! = 1/8 11 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

Permutations of Objects Around a Circle At a meeting of diplomats, the six participants are to be seated around a circular table. Since the table has no ends to confer particular status, it doesn’t matter who sits in which chair. But it does matter how the diplomats are seated relative to each other. In other words, two seatings are considered the same if one is a rotation of the other. How many different ways can the diplomats be seated? 12 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

Permutations of Objects Around a Circle – cont’ Solution Fix one diplomat and consider all possible arrangement for the rest of diplomats. Then, we have 5! cases. If confused, consider a smaller instance. 13 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

Permutations of Selected Elements Given the set { a, b, c }, there are six ways to select two letters from the set and write them in order. Each such ordering of two elements of { a, b, c } is called a 2-permutation of { a, b, c }. An r -permutation of a set of n elements is an ordered selection of r elements taken from the set of n elements. The number of r-permutations of a set of n elements is denoted 14 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

Theorem If n and r are integers and, then the number of r -permutations of a set of n elements is given by the formula Example – Evaluating r -Permutations Evaluate P (5, 2) = 20 How many 4-permutations are there of a set of seven objects? P (7, 4) = 840 How many 5-permutations are there of a set of five objects? P (5, 5) = Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

Permutations of Selected Letters of a Word How many different ways can three of the letters of the word BYTES be chosen and written in a row? How many different ways can this be done if the first letter must be B ? 16 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University

Proving a Property of P ( n, r ) Prove that for all integers 17 Spring 2016 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University