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.

Slides:



Advertisements
Similar presentations
12 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
Advertisements

1 Section 4.3 Permutations & Combinations. 2 Permutation Set of distinct objects in an ordered arrangement An ordered arrangement of r members of a set.
Counting Chapter 6 With Question/Answer Animations.
Recursively Defined Functions
THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph , N.V. Bilous.
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,
Today Today: Reading: –Read Chapter 1 by next Tuesday –Suggested problems (not to be handed in): 1.1, 1.2, 1.8, 1.10, 1.16, 1.20, 1.24, 1.28.
CSE115/ENGR160 Discrete Mathematics 04/17/12
1 Copyright M.R.K. Krishna Rao 2003 Chapter 5. Discrete Probability Everything you have learned about counting constitutes the basis for computing the.
1 Section 5.1 Discrete Probability. 2 LaPlace’s definition of probability Number of successful outcomes divided by the number of possible outcomes This.
Discrete Mathematics Lecture 6 Alexander Bukharovich New York University.
1 More Counting Techniques Possibility trees Multiplication rule Permutations Combinations.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
CS100 : Discrete Structures
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Combinatorics.
Counting Chapter 6 With Question/Answer Animations.
1 Permutations and Combinations. 2 In this section, techniques will be introduced for counting the unordered selections of distinct objects and the ordered.
The Basics of Counting Section 6.1.
Counting. Product Rule Example Sum Rule Pigeonhole principle If there are more pigeons than pigeonholes, then there must be at least one pigeonhole.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.4,
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
Section 7.1. Section Summary Finite Probability Probabilities of Complements and Unions of Events Probabilistic Reasoning.
Chapter 7 With Question/Answer Animations. Section 7.1.
Chapter 6 With Question/Answer Animations 1. Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients.
Permutations and Combinations
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
March 10, 2015Applied Discrete Mathematics Week 6: Counting 1 Permutations and Combinations How many different sets of 3 people can we pick from a group.
2 Permutations and Combinations Lesson 8 HAND OUT REFERENCE SHEET AND GO OVER IT.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Permutations and Combinations
Unit 7 Permutation and Combination IT Disicipline ITD1111 Discrete Mathematics & Statistics STDTLP 1 Unit 7 Permutation and Combination.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 5 Counting.
The Basics of Counting Section 6.1.
The Pigeonhole Principle. The pigeonhole principle Suppose a flock of pigeons fly into a set of pigeonholes to roost If there are more pigeons than pigeonholes,
ICS 253: Discrete Structures I Discrete Probability King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Discrete Mathematics, 1st Edition Kevin Ferland Chapter 6 Basic Counting 1.
Counting Principles Multiplication rule Permutations Combinations.
Counting.
Permutations and Combinations. 2 In this section, techniques will be introduced for counting the unordered selections of distinct objects and the ordered.
1 Discrete Structures - CSIS2070 Text Discrete Mathematics and Its Applications Kenneth H. Rosen Chapter 4 Counting.
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.
Section 7.1. Probability of an Event We first define these key terms: An experiment is a procedure that yields one of a given set of possible outcomes.
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.
3/7/20161 Now it’s time to look at… Discrete Probability.
CS 104: Discrete Mathematics
Section The Pigeonhole Principle If a flock of 20 pigeons roosts in a set of 19 pigeonholes, one of the pigeonholes must have more than 1 pigeon.
Chapter 6 With Question/Answer Animations Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
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.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 5 Counting 歐亞書局.
Section The Product Rule  Example: How many different license plates can be made if each plate contains a sequence of three uppercase English letters.
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
Section 6.3. Section Summary Permutations Combinations.
Example A standard deck of 52 cards has 13 kinds of cards, with four cards of each of kind, one in each of the four suits, hearts, diamonds, spades, and.
Discrete Mathematics Counting.
Now it’s time to look at…
ICS 253: Discrete Structures I
The Pigeonhole Principle
ICS 253: Discrete Structures I
Chapter 5, Section 5.1 The Basics of Counting
COCS DISCRETE STRUCTURES
CS104:Discrete Structures
Counting Chapter 6 With Question/Answer Animations
Discrete Probability Chapter 7 With Question/Answer Animations
CS100: Discrete structures
Now it’s time to look at…
Now it’s time to look at…
Now it’s time to look at…
Agenda Lecture Content: Discrete Probability
Presentation transcript:

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 chosen as a representative to university committee. How many different choices for this representative if there are 37 members of the faculty and 83 students? Solution There are 37+83=120 possible ways to pick this representative. Combinatorics, the study of arrangements of objects, is an important part of discrete mathematics.

Example 2 A student can choose a computer science project from one of three list. The three lists contain 23,15 and 19 possible project, respectively. How many possible projects are there to choose from? Solution There are =57 possible projects to choose from.

Example 2 The chairs are to be labeled with a letter and a positive integer not exceeding 100. What is the largest number of chairs that can be labeled differently? Solution 26×100= 2600 chairs can be labeled differently. Example 3 How many different bit strings are there of length seven? Solution

Example 4 How many different license plates are available if each plate contains a sequence of three letters followed by three digits? Solution

4.3 Permutations and Combinations Select 5 players from 10 members----How many possible choices? Prepare an ordered list of 4 plays to play the four singles matches How many possible choices? Unordered collection Ordered collection Permutations A permutation of a set of distinct objects is an ordered arrangement of these objects. An r-permutation is an ordered arrangement of r elements of a set. Example 1 Let S={1,2,3}. The arrangement 3,1,2 is a permutation of S. The arrangement 3,2 is a 2-permutation of S.

Theorem 1 The number of r-permutation of a set with n distinct elements is P(n,r)=n(n-1)(n-2)…(n-r+1)=n!/(n-r)! Proof The first element can be selected from n elements. The second element can be selected from the remaining n-1 elements. The third element can be selected from the remaining n-2 elements...…. The rth element can be selected from the remaining n-(r-1) elements. By using the product rule, P(n,r)=n(n-1)(n-2)…(n-r+1). Example 2 How many different ways are there to select 4 different players from 10 players on a team to play four tennis matches, where the matches are ordered?

Example 3 Suppose there are eight runners in a race. The winner receives a gold metal, the second-place finisher receives a silver metal, and the third-place finisher receives a bronze medal. How many different ways are there to award these medals, if all possible outcomes of the race can occur? Example 4 Suppose that a saleswoman has to visit eight different cities.She must begin her trip in a specified city, but she can visit the other seven cities in any order she wishes. How many possible orders can the saleswoman use when visiting these cities?

Combinations An r-combination of elements of a set is an unordered selection of r elements from the set. The number of r-combinations of a set with n distinct elements is denoted by C(n,r). Example 5 Let S={1,2,3,4}. Then {1,2,3} is a 3-combination from S. Example 6 We see that C(4,2)=6, since 2-combination of {a,b,c,d} are the six subsets {a,b},{a,c},{a,d},{b,a},{b,c},{b,d}.

Example 7 How many ways are there to select 5 players from a 10- member tennis team to make a trip to a match at another school? Example 8 How many ways are there to select a committee to develop a discrete mathematics course at a school if the committee is to consist of 3 faculty members from the mathematics department and 4 from the computer science department, if there are 9 faculty members in the mathematics department and 11 of the computer science department?

4.4 Discrete Probability Finite Probability Experiment: a procedure that yields one of outcomes. Sample space of the experiment S: the set of possible outcomes. Event E: a subset of the sample space. Definition 1. The probability of an event E, which is a subset of a finite sample space S of equally likely outcomes, is p(E)=|E|/|S|. Example 1 An urn contains 4 blue balls and 5 red balls. What is the probability that a ball chosen from the urn is blue? There are 9 possible outcomes, and 4 of them produce a blue ball. Hence, the probability that a blue ball is chosen is P(E) = |E|/|S|= 4/9. Solution Experiment: Chose a ball from the urn. Sample space S = {b,b,b,b,r,r,r,r,r}. |S| = 9. Event E = {b,b,b,b}. |E| = 4

Example 2 What is the probability that when two dice are rolled, the sum of the numbers on the two dice is 7? There are 36 possible outcomes. Among them there 36 successful outcomes: (1,6),(2,5),(3,4),(4,3),(5,2),(6,1 ). Hence, the probability is P(E) = |E|/|S| = 6/36=1/6 . Solution Experiment: Roll two dice. Sample space S = {(x,y) | 1 ≤ x,y ≤ 6}. |S| = 6×6=36. Event E = { (x,y) | x + y = 7}. |E| = 6.

Example 3 In a lottery, players win a large prize when they pick four digits that match, in the correct order, four digits selected by a random mechanical process. A smaller prize is won if only three digits are matched. What is the probability that a player wins the large prize? What is the probability that a play wins the small prize? (1) There are to choose four digits. Hence, the probability that a player wins the large prize is P(E1) = |E1|/|S| = 1/ (2) To win the small prize, exactly one digit must be wrong to get three digits correct. There are 36 ways to choose four digits like this. Hence, the probability that a player wins the small prize is P(E2) = |E2|/|S| = 36/10000= Solution Suppose that the 4 digits for the large prize are (u,v,x,y). Experiment: Select 4 digits. Sample space S = {(a,b,c,d) | 0 ≤ a,b,c,d≤ 9}. |S| = 10×10×10×10 Event 1 (large prize) E1 = { (u,v,x,y)}. |E| = 1. Event 2 (smaller prize) E2 = { (a,b,c,d) | a ≠ u or b ≠ v or c ≠ x or d ≠ y} |E2| = = 36

Example 4 There are lotteries that award enormous prizes to people who correctly choose a set of six numbers out of the first n positive integers, where n between 30 and 50. What is the probability that a person picks the correct six numbers out of 40? The total number of ways to choose 6 numbers out of 40 is P(E) = |E|/|S| = C(40,6)=40!/(34!6!)= Hence, the probability is 1/ Solution Suppose that the 6 numbers from 1 to 40 for the prize are {u,v,w,x,y,z}. Experiment: Select 6 numbers from 1 to 40. Sample space S = {{a,b,c,d,e,f} | 0 ≤ a,b,c,d,e,f ≤ 40}. |S| = C(40,6) Event 1 (large prize) E = { {u,v,w,x,y,z} }. |E| = 1.

Example 5 Find the probability that a hand of five cards in poker contains three cards of one kind (same kind of character: 2, 3, …, K, A). The probability is P(E) = |E|/|S| = Solution Experiment: Pick 5 cards from 52 cards. Sample space S = {{a,b,c,d,e} | a,b,c,d,e are picked from 52 cards}. |S| = C(52,5) Event E = { {a,b,c,d,e} | three of them are same kind}. |E| = C(13,1)C(4,3)C(49,2).