The document discusses basic counting principles including the product rule, sum rule, and pigeonhole principle. It provides examples of how to use each principle to solve counting problems. It also covers permutations and combinations when selecting and arranging objects.
The document discusses basic counting principles including the product rule, sum rule, and pigeonhole principle. It provides examples of how to use each principle to solve counting problems. It also covers permutations and combinations when selecting and arranging objects.
• The sum rule THE PRODUCT RULE • Suppose that a procedure can be broken down into a sequence of two tasks. • If there are n1 ways to do the first task and for each of these ways of doing the first task. • There are n2 ways to do the second task. • Then there are n1n2 ways to do the procedure EXAMPLE:How the product rule is used. • A new company with just two employees, Sanchez and Patel, rents a floor of a building with 12 offices. How many ways are there to assign different offices to these two employees? • There are 32 microcomputers in a computer center. Each microcomputer has 24 ports. How many different ports to a microcomputer in the center are there? • How many different bit strings of length seven are there? Practice • How many different license plates can be made if each plate contains a sequence of three uppercase English letters followed by three digits (and no sequences of letters are prohibited, even if they are obscene)? Counting Functions • How many functions are there from a set with m elements to a set with n elements? THE SUM RULE • If a task can be done either in one of n1 ways or in one of n2 ways, where none of the set of n1 ways is the same as any of the set of n2 ways, then there are n1 + n2 ways to do the task. EXAMPLE :How the sum rule is used • Suppose that either a member of the mathematics faculty or a student who is a mathematics major is chosen as a representative to a university committee. How many different choices are there for this representative if there are 37 members of the mathematics faculty and 83 mathematics majors and no one is both a faculty member and a student? • A student can choose a computer project from one of three lists. The three lists contain 23, 15, and 19 possible projects, respectively. No project is on more than one list. How many possible projects are there to choose from? The subtraction rule is also known as the principle of inclusion–exclusion • If a task can be done in either n1 ways or n2 ways, then the number of ways to do the task is n1 + n2 minus the number of ways to do the task that are common to the two different ways. EXAMPLE : How the formulation of the principle of inclusion– exclusion can be used to solve counting problems. • A computer company receives 350 applications from computer graduates for a job planning a line of new Web servers. Suppose that 220 of these applicants majored in computer science, 147 majored in business, and 51 majored both in computer science and in business. How many of these applicants majored neither in computer science nor in business? The Pigeonhole Principle • If there are more pigeons than pigeonholes, then there must be at least one pigeonhole with at least two pigeons in it.
• 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.
• The pigeonhole principle is also called the Dirichlet drawer principle
Examples: How the pigeonhole principle is used • Among any group of 367 people, there must be at least two with the same birthday, because there are only 366 possible birthdays.
• In any group of 27 English words, there must be at least two that begin with the same letter, because there are 26 letters in the English alphabet
• 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? GENERALIZED PIGEONHOLE PRINCIPLE • If n pigeons are accommodated in m pigeonholes and n>m, then one of the pigeonholes must contain at least pigeons, Example • A man hiked for 10 hours and covered a total distance of 45km. It is known that he hiked 6 km in the first hour and only 3 km in the last hour. Show that he has hiked at least 9 km within a certain period of 2 consecutive hours.
• If we select 10 points in the interior of an equilateral triangle of side1,
show that there must be at least two points whose distance apart is less than 1/3. Contd… Prove that in any group of six people, at least three must be mutual friends or at least three must be mutual strangers. Problem There are 250 students in an engineering college, of these 188 have taken a course in Fortran, 100 have taken a course in C, and 35 have taken a course in Java. Further 88 have taken courses in both FORTRAN and C. 23 have taken courses in both C and Java and 29 have taken courses in both Fortran and Java. If 19 of these students have taken all three courses, how many of these 250 students have not taken a course in any of these three programming languages? Problems 1. If we select any group of 1000 students on campus show that at least three of them must have the same birthday. 2. 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? 3. Prove that in any group of six people, there must be at least 3 mutual friends or at least 3 mutual enemies. 4. Show that if seven colours are used to paint 50 bicycles, atleast 8 bicycles will have the same colour. Problems • Show that if any 11 numbers from 1 to 20 are chosen, then two of them will add up to 21. Permutations & Combinations Introduction • Suppose we have 50 mathematics books of different titles and we have to arrange it in a shelf which can hold only 25 books. We have to choose 25 books out of 50 books and then arrange them on the shelf. We can take any 25 books as we like and then arrange them on the shelf in whatever manner we like. Thus the process of arranging 25 books out of 50 books involves the following steps. 1. First we select 25 books out of 50 books according to our interest 2. After selecting 25 books out of 50 books we proceed to arrange them on the shelf. We can arrange them on the shelf in any manner. • Selection • Arrangement
• The process of selecting things is a Combination