1 / 19

Discrete Structures and Counting Applications

This section explores the Pigeonhole principle, permutations, and combinations in counting problems. It covers examples related to birthdays, English words, grades, cards, phone numbers, computer connections, baseball games, and group relationships.

frankmyrick
Télécharger la présentation

Discrete Structures and Counting Applications

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. King Fahd University of Petroleum & Minerals Information & Computer Science Department ICS 253: Discrete Structures I Counting and Applications

  2. Section 5.2: The Pigeonhole Principle • Theorem: If k is a positive integer and k + 1 or more objects are placed into k boxes, then there is at least one box containing two or more of the objects. Proof: • Corollary: A function f from a set with k + 1 or more elements to a set with k elements is not one-to-one.

  3. Examples • Example 1: How many people do you need to ensure that two of them have the same birthday (day and month) • Example 2: How many English words do you need to ensure that two of them begin with the same letter. • Example 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 is graded on a scale from 0 to 100 points?

  4. The Generalized Pigeonhole Principle • Theorem If N objects are placed into k boxes, then there is at least one box containing at least N/k objects.

  5. Examples • Example 1: 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?

  6. Examples • Example 2: How many cards must be selected from a standard deck of 52 cards to guarantee that at least • three cards of the same suit are chosen? • three hearts are selected?

  7. Examples • Example 3: What is the least number of area codes needed to guarantee that the 25 million phones in a state can be assigned distinct 10-digit telephone numbers? • Assume that telephone numbers are of the form NXX-NXX-XXXX, where the first three digits form the area code, N represents a digit from 2 to 9 inclusive, and X represents any digit.

  8. Examples • Example 4: Suppose that a computer science laboratory has 15 workstations and 10 servers. A cable can be used to directly connect a workstation to a server. For each server, only one direct connection to that server can be active at any time. We want to guarantee that at any time any set of 10 or fewer workstations can simultaneously access different servers via direct connections. what is the minimum number of direct connections needed to achieve this goal? • Note that we could do this by connecting every workstation directly to every server (using 150 connections),

  9. Examples • Example 5: During a month with 30 days, a baseball team plays at least one game a day, but no more than 45 games. Show that there must be a period of some number of consecutive days during which the team must play exactly 14 games.

  10. Examples • Example 6: Assume that in a group of six people, each pair of individuals consists of two friends or two enemies. Show that there are either three mutual friends or three mutual enemies in the group.

  11. Section 5.3: Permutations and Combinations • Introduction • Many counting problems can be solved by finding the number of ways to arrange a specified number of distinct elements of a set of a particular size, where the order of these elements matters. • Many other counting problems can be solved by finding the number of ways to select a particular number of elements from a set of a particular size, where the order of the elements selected does not matter. • In how many ways can we select three students from a group of five students to stand in line for a picture? • How many different committees of three students can be formed from a group of four students?

  12. Permutations • A permutation of a set of distinct objects is an ordered arrangement of these objects. • An ordered arrangement of r elements of a set is called an r-permutation. • Let S = {1, 2, 3}. • An ordered permutation of S is …… • A 2-permutation of S is …… • The number of r-permutations of a set with n elements is denoted by P(n, r) • Which we can compute using the product rule!

  13. P(n,r) • If n is a positive integer and r is an integer with 1  r  n, then, there are __________________ r-permutations of a set with n distinct elements. • Note that P(n,0) = 1. • Corollary: If n and r are integers with 0  r  n then

  14. Examples • Example 1: How many ways are there to select a first-prize winner, a second-prize winner, and a third-prize winner from 100 different people who have entered a contest? • Example 2: 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? • Example 3: How many permutations of the letters ABCDEFGH contain the string ABC?

  15. Combinations • An r-combination of elements of a set is an unordered selection of r elements from the set. • an r-combination is simply a subset of the set with r elements. • The number of r-combinations of a set with n distinct elements is denoted by C(n, r). • Note that C(n, r) is also denoted by and is called a binomial coefficient.

  16. Example • What is C(4,2)?

  17. Important Results on Combinations • Theorem: The number of r-combinations of a set with n elements, where n is a nonnegative integer and r is an integer with 0  r  n , equals • Corollary: Let n and r be nonnegative integers with r  n. Then C(n, r) = C (n, n – r).

  18. Examples • Example 1: How many ways are there to select five players from a 10-member tennis team to make a trip to a match at another school? • Example 2: A group of 30 people have been trained as astronauts to go on the first mission to Mars. How many ways are there to select a crew of six people to go on this mission (assuming that all crew members have the same job)?

  19. Examples • Example 3: How many bit strings of length n contain exactly r 1s? • Example 4: Suppose that there are 9 faculty members in the mathematics department and 11 in the computer science department. 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 three faculty members from the mathematics department and four from the computer science department?

More Related