Quiz highlights Probability of the song coming up after one press: 1/N. Two times? Gets difficult. The first or second? Or both? USE THE MAIN HEURISTICS:

Slides:



Advertisements
Similar presentations
The Pigeonhole Principle:
Advertisements

Practice Quiz 3 Recursive Definitions Relations Basic Counting Pigeonhole Principle Permutations & Combinations Discrete Probability.
Breakfast Bytes: Pigeons, Holes, Bridges and Computers Alan Kaylor Cline November 24, 2009.
Probability Three basic types of probability: Probability as counting
COUNTING AND PROBABILITY
Application: The Pigeonhole Principle Lecture 37 Section 7.3 Wed, Apr 4, 2007.
The Pigeonhole Principle
Warm Up The lengths of three sides of a triangle are given. Classify the triangle , 12, , 10, , 15, 26 equilateral scalene isosceles.
PIGEONHOLE PRINCIPLE. Socks You have a drawer full of black and white socks. Without looking in the drawer, how many socks must you pull out to be sure.
The Pigeonhole Principle 6/11/ The Pigeonhole Principle In words: –If n pigeons are in fewer than n pigeonholes, some pigeonhole must contain at.
Discrete Structures Chapter 5 Pigeonhole Principle Nurul Amelina Nasharuddin Multimedia Department.
The Pigeonhole Principle
Copyright © Zeph Grunschlag, Counting Techniques Zeph Grunschlag.
CSE115/ENGR160 Discrete Mathematics 04/10/12
Pigeonhole.
Discrete Mathematics Lecture 7 Harper Langston New York University.
1 CSE 20 Lecture 13 Analysis: Counting with Pigeonhole Principle CK Cheng, May 17, 2011.
1 The Pigeonhole Principle CS/APMA 202 Rosen section 4.2 Aaron Bloomfield.
Functions A B f( ) =. This Lecture We will define a function formally, and then in the next lecture we will use this concept in counting. We will also.
1 9/8/2015 MATH 224 – Discrete Mathematics Basic finite probability is given by the formula, where |E| is the number of events and |S| is the total number.
Fall 2015 COMP 2300 Discrete Structures for Computation
The Pigeonhole (Dirichlet’s box) Principle
1 9/23/2015 MATH 224 – Discrete Mathematics Basic finite probability is given by the formula, where |E| is the number of events and |S| is the total number.
1 Lecture 3 (part 2) Functions – Pigeonhole Principle Reading: Epp Chp 7.4.
(Important to algorithm analysis )
September1999 CMSC 203 / 0201 Fall 2002 Week #8 – 14/16 October 2002 Prof. Marie desJardins.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
A powerful strategy: Symmetry The world is full of symmetry, so use it!
Quiz highlights 1.Probability of the song coming up after one press: 1/N. Two times? Gets difficult. The first or second? Or both? USE THE MAIN HEURISTICS:
Symmetry Problem What is the sum of the values 1 to 100? Hint: Look for the symmetry!
Psych 5500/6500 Probability Fall, Gambler’s Fallacy The “gambler’s fallacy” is to think that the “law of averages” makes independent events no longer.
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,
5.2 The Pigeonhole Principle
Combinatorics (Important to algorithm analysis ) Problem I: How many N-bit strings contain at least 1 zero? Problem II: How many N-bit strings contain.
Quiz highlights 1.Probability of the song coming up after one press: 1/N. Two times? Gets difficult. The first or second? Or both? USE THE MAIN HEURISTICS:
Independent and Dependent Events. Independent Events Two events are independent if the outcome of one event does not affect the outcome of a second event.
1 Chapter 2 Pigeonhole Principle. 2 Summary Pigeonhole principle –simple form Pigeonhole principle –strong form Ramsey’s theorem.
Area & Perimeter An Introduction. AREA The amount of space inside a 2-dimensional object. Measured in square units cm 2, m 2, mm 2 Example: 1 cm 2 cm.
Hashes Lesson Introduction ●The birthday paradox and length of hash ●Secure hash function ●HMAC.
CS Lecture 26 Monochrome Despite Himself. Pigeonhole Principle: If we put n+1 pigeons into n holes, some hole must receive at least 2 pigeons.
1 The Pigeonhole Principle CS 202 Epp section 7.3.
Introduction Suppose that a password on a computer system consists of 6, 7, or 8 characters. Each of these characters must be a digit or a letter of the.
The Pigeonhole Principle Alan Kaylor Cline. The Pigeonhole Principle Statement Children’s Version: “If k > n, you can’t stuff k pigeons in n holes without.
1 The Pigeonhole Principle CS 202 Epp section ??? Aaron Bloomfield.
Unit 4 Probability Day 3: Independent and Dependent events.
EXAMPLE 2 Find measures in a triangle Find the measures of P, Q, and R. The diagram shows that PQR is equilateral. Therefore, by the Corollary to the Base.
The Pigeonhole Principle. Pigeonhole principle The pigeonhole principle : If k is a positive integer and k+1 or more objects are placed into k boxes,
Pigeonhole Principle – Page 1CPTR311 – Discrete Structures CPTR311 Discrete Structures Pigeonhole Principle Reading: Kolman, Section 3.3.
Pigeonhole Principle. If n pigeons fly into m pigeonholes and n > m, then at least one hole must contain two or more pigeons A function from one finite.
Discrete Mathematics. Exercises Exercise 1:  There are 18 Computer Science (CS) majors and 325 Business Administration (BA) majors at a college.
Chance We will base on the frequency theory to study chances (or probability).
Week 10 - Monday.  What did we talk about last time?  Combinations  Binomial theorem.
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
Week 9 - Friday.  What did we talk about last time?  Permutations  Counting elements in sets  Brief introduction to combinations.
Independent and Dependent Events. Learning Targets Determine when events are dependent or independent. Learn to use the multiplication rule of probability.
PIGEONHOLE PRINCIPLE.
The Pigeonhole Principle
Probability of Multiple Events
PIGEONHOLE PRINCIPLE.
PIGEONHOLE PRINCIPLE.
Pigeonhole Principle and Ramsey’s Theorem
Mathematics for Computer Science MIT 6.042J/18.062J
COUNTING AND PROBABILITY
The Pigeonhole Principle
PIGEONHOLE PRINCIPLE.
The Pigeonhole (Dirichlet’s box) Principle
The Pigeon hole problem
Events are independent events if the occurrence of one event does not affect the probability of the other. If a coin is tossed twice, its landing heads.
The Pigeonhole Principle
Probability – Single Event – Higher – GCSE Questions
Presentation transcript:

Quiz highlights Probability of the song coming up after one press: 1/N. Two times? Gets difficult. The first or second? Or both? USE THE MAIN HEURISTICS: Compute probability of the opposite event. P(song never played after k presses) = P(not after 1)*P(not after 2)…. = (1 - 1/N) * (1 - 1/N)*… = (1 - 1/N)^k. Thus, P(k) = 1 - (1 - 1/N)^k 2. X = (1 - 1/N)^k . What do we do with products? Take a ln(X) = k*ln(1 - 1/N). Now, N >> 1 (N=100). So ln(1 - 1/N) ~ -1/N. Thus ln(X) ~ k*(-1/N) = -1 for k=N=100. Hence X ~ e^-1 ~ 1/3. Thus P(k) = 1 - X 3. Just use the MISSISSIPI formula, but don’t divide by 4!

HW highlight http://tinyurl.com/dbbkkv

The Pigeonhole (Dirichlet’s box) Principle If you have more pigeons than pigeonholes, when the pigeons fly into the holes at night, at least one hole has more than one pigeon.

The Pigeonhole (Dirichlet’s box) Principle often arises in computer science. For example, collisions are inevitable in a hash table because the number of possible keys exceeds the number of indices in the array. No hashing algorithm, no matter how clever, can avoid these collisions. 4

The Pigeonhole Principle Problem: Prove that there are at least 2 people in Roanoke that have the same number of hairs on their heads. Medical fact: people have up to 150,000 hairs. Census Bureau: Roanoke population is 200,000 5

The Pigeonhole Principle Problem: Prove that there are at least 2 people in Roanoke that have the same number of hairs on their heads. Holes = heads with N hairs, N from 0 to 150,000. Total: 150,001 Pigeons = Roanokeans = 200,000 6

The Pigeonhole Principle Problem: In a box there are 10 black socks and 12 blue socks and you need to get one pair of socks of the same colour. Supposing you can take socks out of the box only once and only without looking, what is the minimum number of socks you'd have to pull out at the same time in order to guarantee a pair of the same color? 7

The Pigeonhole Principle Problem: In a box there are 10 black socks and 12 blue socks and you need to get one pair of socks of the same colour. Supposing you can take socks out of the box only once and only without looking, what is the minimum number of socks you'd have to pull out at the same time in order to guarantee a pair of the same color? Answer: 3. To have at least one pair of the same colour (m = 2 holes, one per colour), using one pigeonhole per colour, you need only three socks (n = 3 pigeons). In this example, if the first and second sock drawn are not of the same colour, the very next sock drawn would complete at least one same colour pair. (m = 2) 8

The Pigeonhole (Dirichlet’s box) Principle If you have more pigeons than pigeonholes, when the pigeons fly into the holes at night, at least one hole has more than one pigeon. Problem: Every point on the plane is coloured either red or blue. Prove that no matter how the colouring is done, there must exist two points, exactly a mile apart, that are the same color. 9

The Pigeonhole Principle Problem: Every point on the plane is coloured either red or blue. Prove that no matter how the colouring is done, there must exist two points, exactly a mile apart, that are the same colour. 3 vertices of an equilateral triangle with the side of 1. Pigeons: Number of vertices: 3 Holes: Number of colours available: 2. 10

Pigeonhole Problem Given a unit square, show that if 5 pigeons land anywhere inside or on this square, then two of them must be at most sqrt(2)/2 units apart.

Pigeonhole Problem Given a unit square, show that if five points are placed anywhere inside or on this square, then two of them must be at most sqrt(2)/2 units apart. Sqrt(2)/2 12