1 / 21

University of Palestine Faculty of Applied Engineering and Urban Planning

University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction to Discrete Mathematics More About Counting Techniques. Outlines. The three fundamental principles. Permutations and Combinations. Probability.

Télécharger la présentation

University of Palestine Faculty of Applied Engineering and Urban Planning

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction to Discrete Mathematics More About Counting Techniques Instructor: Tasneem Darwish

  2. Outlines • The three fundamental principles. • Permutations and Combinations. • Probability Instructor: Tasneem Darwish

  3. The three fundamental principles Theorem 1.1The Pigeonhole Principle If a set of pigeons is placed into pigeonholes and there are more pigeons than pigeonholes, then some pigeonholes must contain at least two pigeons. Example 1.1 Among any group of 367 people, there must be at least two with the same birthday, because there are only 366 possible birthday. Instructor: Tasneem Darwish

  4. The three fundamental principles Example 1.3 How many students must be in a class to guarantee that at least two students receive the same score on the final exam, if the exam score is graded on a scale from 0 to 100 points? There are 101 possible scores on the final. The pigeonhole principle shows that among any 102 students there must be at least 2 students with the same score. Example 1.4 What is the minimum number of students required in a discrete mathematics class to be sure that at least six will receive the same grade, if there are five possible grades, A, B, C, D and F? The smallest number is 26, 26= 5*5 +1 Instructor: Tasneem Darwish

  5. The three fundamental principles Theorem 1.2The Multiplication Principle Consider a procedure that is composed of a sequence of k steps. Suppose that the first step can be preformed in n1 ways, the second step can be performed in n2 ways and each step can be performed in ni ways where i= 1,2,3…..k. Procedure {Step 1 can be performed in n1 ways Step 2 can be performed in n2 ways . . Step k can be performed in nk ways} The number of different ways in which the entire procedure can be performed is n1*n2*…..*nk Instructor: Tasneem Darwish

  6. The three fundamental principles Example 1.5 How many different license plates are available if each plate contains a sequence of three letters followed by three digits? There are 26 choices for each of the three letters and 10 choices for each of the digits. By the product rule there are a total of 26*26*26*10*10*10=17576000 possible license plates. Instructor: Tasneem Darwish

  7. The three fundamental principles • Example 1.6 • Consider an Id card number of the form (ID: XYZ) • Where • X can be any letter except D and F, • Y can be any number except 3 and 5, • and Z can be any of the symbols (µ,α,β,ω), • what is the number of the possible Id cards? • There are 24 choices for X, eight choices for Y and four choices for Z. hence, the possible number of Id cards is: 24*8*4=768 card. Instructor: Tasneem Darwish

  8. The three fundamental principles Theorem 1.3The Addition Principle Suppose that there are k sets of elements with n1 elements in the first set, n2 elements in the second set, etc. if all of the elements are distinct, then the number of elements in the union of the sets is n1+n2+…..+nk Example 1.7 A student can choose a computer project from one of three lists. The three project lists contain 23, 15, 19 possible projects, respectively. How many possible projects are there to choose from?? There are: 23+15+19= 57. Instructor: Tasneem Darwish

  9. The three fundamental principles • Example 1.8 • How many 8 bit strings begin with 1011 or 01? • The 8 bit strings that begin with 1011 has the form of 1011_ _ _ _, • The number of eight bit strings that begin with 1011 is equal to the number of ways that the four unknown bits can be chosen. • By the product rule we have 2*2*2*2= 16 ways. • Likewise, the number of 8 bit strings that begin with 01 is 2*2*2*2*2*2= 64. • Since the set of strings beginning with 01 is disjoint from the set of strings beginning with 1011, the addition principle shows that the number of strings beginning with 1011 or 01 is : 16+64=80. Instructor: Tasneem Darwish

  10. Permutations and Combinations • Two types of counting problems occur so frequently These problems are: • 1) How many arrangements (ordered lists) of r objects can be formed from a set of n distinct objects? • 2) How many different selections (unordered lists) of r objects can be made from a set of n distinct objects? Instructor: Tasneem Darwish

  11. Permutations • An arrangement of n distinct objects is called a permutation of the objects. • If r ≤ n, then an arrangement using r of the n distinct objects is called an r-permutation. • 3124 is a permutation of the digits 1,2,3 and 4, and 412 is a • 3-permutation of these digits. • The number of different r-permutations of a set of n distinct elements is denoted by P(n,r), this number can be found using the formula: Instructor: Tasneem Darwish

  12. Permutations Example 2.1 How many different three-digit numbers can be formed using the digits 5,6,7,8 and 9 without repetition? We need to find the number of 3-permutation from a set of 5 digits. This number is P(5,3) Example 2.2 In how many different orders can 4 persons be seated in a row of 4 chairs?? The answer is the number of permutations of a set of 4 elements. Instructor: Tasneem Darwish

  13. Combination • if r ≤ n, then an unordered selection of r objects chosen from of a set of n distinct objects is called r-combination of the objects. • Thus {1,4}and{2,3} are both 2-combinations of the digits 1,2,3 and 4. • Note that since the combinations are unordered selections, the 2-combination {1,4} and {4,1} are the same. • The number of different r-combinations of a set of n distinct elements is C(n.r): Instructor: Tasneem Darwish

  14. Combination Example 2.3 How many different 4-member committees can be formed from a delegation of 7 member? Since a 4-member committee is just a selection of 4 members from the delegation of 7, the answer is: Instructor: Tasneem Darwish

  15. Combination Example 2.4 An investor is going to invest $16000 in four stocks chosen from a list of twelve prepared by her secretary. How many different investments are possible if: (a) $4000 is to be invested in each stock? (b) $6000 is to be invested in one stock, $5000 in another, $3000 in the third, and $2000 in the fourth? (a) Since each stock is to be treated the same, we need an unordered list of four stocks. Hence the number of investments in this case is (b) Since each stock is to be treated differently, we need an ordered list of four stocks. Hence the number of investments in this case is Instructor: Tasneem Darwish

  16. Probability • Probability is the ratio of the number of favourable cases to the total number of cases, assuming that all the various cases are equally possible. • An experiment:is any procedure that results in an observable outcome. Thus, we may speak of the experiment of flipping a coin or the experiment of tossing a die. • A sample space: is a set containing all the possible outcome of an experiment. • An event: is any subset of a sample space. Thus, in the die-tossing experiment with sample space {1, 2, 3, 4, 5, 6}, the following sets are events: • A= {1, 2, 4, 6} B= {n: n is an even positive integer less than 7} Instructor: Tasneem Darwish

  17. Probability • The probability of E: where E is any event in a finite sample space S consisting of equally likely outcomes • Example 3.1 • In the experiment of flipping a probably balanced coin what is the probability of obtaining a head? • Since there is only two possible results head (H) or tail (T) • The sample space is S= {H, T} • The event of obtaining a head E= {H} • The probability of obtaining head is Instructor: Tasneem Darwish

  18. Probability Example 3.2 In the experiment of flipping a probably balanced coin three times, what is the probability of obtaining exactly two heads? The sample space is S= {HHH, HHT, HTH, THH, TTH, THT, HTT, TTT} The event of obtaining exactly two heads E= {HHT, HTH, THH} The probability of obtaining exactly two heads is Instructor: Tasneem Darwish

  19. Probability • Example 3.3 • Suppose that there are six applicants for a particular job, four men and two women, who are to be interviewed in a random order. • What is the probability that the four men are interviewed before any of the women? • Since the ordering of the interviews is important, the set S of all possible arrangements of the six interviews is P(6,6). • Let E denote the subset of S in which the men are interviewed before women. • The six interviews is going to be a procedure of interviewing the four men and then the two women which can be found out by using the multiplication principle Instructor: Tasneem Darwish

  20. Probability Example 3.4 Suppose that there are two defective pens in a box of 12 pens. If we choose three pens at random, what is the probability that we do not select a defective pen? In this problem the set of selections of three pens chosen from among the 12 in the box will be our sample space S. The set of all selections of three pens chosen from among the 10 nondefective pens is the event E in which we are interested. Thus, the probability is: Instructor: Tasneem Darwish

  21. Any questions???? Instructor: Tasneem Darwish

More Related