Discrete Structures Chapter 4 Counting and Probability Nurul Amelina Nasharuddin Multimedia Department.

Slides:



Advertisements
Similar presentations
Lecture Discrete Probability. 5.2 Recap Sample space: space of all possible outcomes. Event: subset of of S. p(s) : probability of element s of.
Advertisements

12 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
Basic Terms of Probability Section 3.2. Definitions Experiment: A process by which an observation or outcome is obtained. Sample Space: The set S of all.
Mathematics.
Section 2 Union, Intersection, and Complement of Events, Odds
Union, Intersection, Complement of an Event, Odds
Chapter Two Probability
Copyright © Cengage Learning. All rights reserved. 8.6 Probability.
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,
Probability Probability Principles of EngineeringTM
Discrete Structures Chapter 4 Counting and Probability Nurul Amelina Nasharuddin Multimedia Department.
1 Copyright M.R.K. Krishna Rao 2003 Chapter 5. Discrete Probability Everything you have learned about counting constitutes the basis for computing the.
Discrete Mathematics Lecture 6 Alexander Bukharovich New York University.
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000 LIND MASON MARCHAL 1-1 Chapter Five Discrete Probability Distributions GOALS When you have completed.
CHAPTER 10: Introducing Probability
Stat 1510: Introducing Probability. Agenda 2  The Idea of Probability  Probability Models  Probability Rules  Finite and Discrete Probability Models.
Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProbability.
Chapter 3 Section 3.2 Basic Terms of Probability.
Counting and Probability. Counting Elements of Sets Theorem. The Inclusion/Exclusion Rule for Two or Three Sets If A, B, and C are finite sets, then N(A.
Copyright © 2015 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 C H A P T E R F I V E Discrete Probability Distributions.
College Algebra Fifth Edition James Stewart Lothar Redlin Saleem Watson.
College Algebra Sixth Edition James Stewart Lothar Redlin Saleem Watson.
Chapter 6, Counting and Probability
Probability The calculated likelihood that a given event will occur
Copyright © Cengage Learning. All rights reserved. 8.6 Probability.
Chapter 3 Probability Larson/Farber 4th ed. Chapter Outline 3.1 Basic Concepts of Probability 3.2 Conditional Probability and the Multiplication Rule.
CHAPTER 10: Introducing Probability ESSENTIAL STATISTICS Second Edition David S. Moore, William I. Notz, and Michael A. Fligner Lecture Presentation.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.1,
Section 2 Union, Intersection, and Complement of Events, Odds
Introduction  Probability Theory was first used to solve problems in gambling  Blaise Pascal ( ) - laid the foundation for the Theory of Probability.
Basic Concepts of Probability
Binomial Probabilities IBHL, Y2 - Santowski. (A) Coin Tossing Example Take 2 coins and toss each Make a list to predict the possible outcomes Determine.
+ Chapter 5 Overview 5.1 Introducing Probability 5.2 Combining Events 5.3 Conditional Probability 5.4 Counting Methods 1.
Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University.
Discrete Math Section 16.3 Use the Binomial Probability theorem to find the probability of a given outcome on repeated independent trials. Flip a coin.
Basic Concepts of Discrete Probability 1. Sample Space When “probability” is applied to something, we usually mean an experiment with certain outcomes.
Math 145 September 18, Terminologies in Probability  Experiment – Any process that produces an outcome that cannot be predicted with certainty.
3/7/20161 Now it’s time to look at… Discrete Probability.
1 DISCRETE STRUCTURES DISCRETE STRUCTURES SSK3003 DR. ALI MAMAT 1.
Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University.
Binomial Probability Theorem In a rainy season, there is 60% chance that it will rain on a particular day. What is the probability that there will exactly.
Math 1320 Chapter 7: Probability 7.1 Sample Spaces and Events.
1 What Is Probability?. 2 To discuss probability, let’s begin by defining some terms. An experiment is a process, such as tossing a coin, that gives definite.
Terminologies in Probability
Now it’s time to look at…
ICS 253: Discrete Structures I
Random Variables.
PROBABILITY AND PROBABILITY RULES
CS104:Discrete Structures
Math 145 September 25, 2006.
9. Counting and Probability 1 Summary
Conditional Probability
Unit 1: Probability and Statistics
Warm Up Which of the following are combinations?
Terminologies in Probability
Now it’s time to look at…
Statistical Inference for Managers
CHAPTER 10: Introducing Probability
Terminologies in Probability
Terminologies in Probability
Combination and Permutations Quiz!
Chapter 4 Section 1 Probability Theory.
Now it’s time to look at…
Terminologies in Probability
Now it’s time to look at…
Math 145 June 26, 2007.
Terminologies in Probability
Math 145 February 12, 2008.
Terminologies in Probability
Presentation transcript:

Discrete Structures Chapter 4 Counting and Probability Nurul Amelina Nasharuddin Multimedia Department

Outline Rules of Sum and Product Permutations Combinations: The Binomial Theorem Combinations with Repetition: Distribution Probability 2

Combinations with Repetition Example: How many ways are there to select 4 pieces of fruits from a bowl containing apples, oranges, and pears if the order does not matter, only the type of fruit matters, and there are at least 4 pieces of each type of fruit in the bowl 3

Answer Some of the results: 4 Possible SelectionRepresentation A A A OX X X | X | A A X X X X | | A A O PX X | X | X P P | | X X X X

Answer The number of ways to select 4 pieces of fruit = The number of ways to arrange 4 X’s and 2 |’s, which is given by = 6! / 4!(6-4)! = C(6,4) = 15 ways. 5

Combinations with Repetition In general, when we wish to select, with repetition, r of n distinct elements, we are considering all arrangements of r X’s and n- 1 |’s and that their number is 6

Combinations with Repetition An r-combination of a set of n elements is an unordered selection of r elements from the set, with repetition is: 7

Example (1) A person throwing a party wants to set out 15 assorted cans of drinks for his guests. He shops at a store that sells five different types of soft drinks. How many different selections of 15 cans can he make? (Here n = 5, r = 15) 8

Example (1) 4 |’s (to separate the categories of soft drinks) 15 X’s (to represent the cans selected) = 19! / 15!(19-15)! = C(19,15) = 3876 ways. 9

Example (2) A donut shop offers 20 kinds of donuts. Assuming that there are at least a dozen of each kind when we enter the shop, we can select a dozen donuts in (Here n = 20, r = 12). = C(31, 12) = 141,120,525 ways. 10

Example (3) A restaurant offers 4 kinds of food. In how many ways can we choose six of the food? C( , 6) = C(9, 6) = C(9, 3) = 9! = 84 ways. 3! 6! 11

Which formula to use? Order RelevantOrder Does Not Relevant Repetition is Allowed nknk Repetition is Not Allowed P(n, k) 12 Different ways of choosing k elements from n

Counting and Probability

Discrete Probability The probability of an event is the likelihood that event will occur. “Probability 1” means that it must happen while “probability 0” means that it cannot happen Eg: The probability of… –“Manchester United defeat Liverpool this season” is 1 –“Liverpool win the Premier League this season” is 0 Events which may or may not occur are assigned a number between 0 and 1.

Discrete Probability Consider the following problems: What’s the probability of tossing a coin 3 times and getting all heads or all tails? What’s the probability that a list consisting of n distinct numbers will not be sorted?

Discrete Probability An experiment is a process that yields an outcome A sample space is the set of all possible outcomes of a random process An event is an outcome or combination of outcomes from an experiment An event is a subset of a sample space Examples of experiments: - Rolling a six-sided die - Tossing a coin

Example Experiment 1: Tossing a coin. Sample space: S = {Head or Tail} or we could write: S = {0, 1} where 0 represents a tail and 1 represents a head. Experiment 2: Tossing a coin twice S = {HH, TT, HT, TH} where some events: –E 1 = {Head}, –E 2 = {Tail}, –E 3 = {All heads} 17

Definition of Probability Suppose an event E can happen in r ways out of a total of n possible equally likely ways. Then the probability of occurrence of the event (called its success) is denoted by The probability of non-occurrence of the event (called its failure) is denoted by Thus, 18

Definition of Probability using Sample Spaces If S is a finite sample space in which all outcomes are equally likely and E is an event in S, then the probability of E, P(E), is where N(E) is the number of outcomes in E N(S) is the total number of outcomes in S 19

Example (1) What’s the probability of tossing a coin 3 times and getting all heads or all tails? Can consider set of ways of tossing coin 3 times: Sample space, S = {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT} Next, consider set of ways of tossing all heads or all tails:Event, E = {HHH, TTT} Assuming all outcomes equally likely to occur  P(E) = 2/8 = 0.25

Example (2) Five microprocessors are randomly selected from a lot of 1000 microprocessors among which 20 are defective. Find the probability of obtaining no defective microprocessors. There are C(1000,5) ways to select 5 micros. There are C(980,5) ways to select 5 good micros. The prob. of obtaining no defective micros is C(980,5)/C(1000,5) = 0.904

Probability of Combinations of Events Theorem: Let E 1 and E 2 be events in the sample space S. Then P(E 1  E 2 ) = P(E 1 ) + P(E 2 ) – P(E 1  E 2 ) Eg: What is the probability that a positive integer selected at random from the set of positive integers not greater than 100 is divisible by either 2 or 5 E 1 : Event that the integer selected is divisible by 2 E 2 : Event that the integer selected is divisible by 5 P(E 1  E 2 ) = 50/ /100 – 10/100 = 3/5

Exercise a)If any seven digits could be used to form a telephone number, how many seven-digits telephone numbers would not have repeated digits? b)How many seven-digit telephone numbers would have at least one repeated digit? c)What is the probability that a randomly chosen seven-digit telephone number would have at least one repeated digit? 23

Answer a)10 x 9 x 8 x 7 x 6 x 5 x 4 = b)[no of PN with at least one digit] = [total no of PN] – [no of PN with no repeated digit] = 10 7 – = c) / 10 7 =

Counting Elements of Sets The Principle of Inclusion/Exclusion Rule for Two or Three Sets If A, B, and C are finite sets, then N(A  B) = N(A) + N(B) – N(A  B) and N(A  B  C) = N(A) + N(B) + N(C) – N(A  B) – N(A  C) – N(B  C) + N(A  B  C)

Example (1) In a class of 50 college freshmen, 30 are studying BASIC, 25 studying PASCAL, and 10 are studying both. How many freshmen are not studying either computer language? A: set of freshmen study BASIC B: set of freshmen study PASCAL N(A  B) = N(A)+N(B)-N(A  B) = – 10 = 45  Not studying either: 50 – 45 =

Example (2) A professor takes a survey to determine how many students know certain computer languages. The finding is that out of a total of 50 students in the class, 30 know Java; 18 know C++; 26 know SQL; 9 know both Java and C++; 16 know both Java and SQL; 8 know both C++ and SQL; 47 know at least one of the 3 languages.

Example (2) a. How many students know none of the three languages? b. How many students know all three languages? c. How many students know Java and C++ but not SQL? How many students know Java but neither C++ nor SQL Answer: a.50 – 47 = 3 b.? c.?

Example (2) J = the set of students who know Java C = the set of students who know C++ S = the set of students who know SQL Use Inclusion/Exclusion rule.