CSE20 Lecture 14

# CSE20 Lecture 14 - CSE 20 Lecture Notes 1 Pigeonhole...

This preview shows pages 1–5. Sign up to view the full content.

1 1. Pigeonhole Principle 2. Inclusion-Exclusion Principle CSE 20 Lecture Notes CK Cheng 3/4/2010

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Pigenhole Principle A team plays 12 games in a 10 day period and at least one game per day. There is a period of days in which exactly 8 games were played. Day 0 1 2 3 4 5 6 7 8 9 10 Game 0 1 2 1 1 1 1 1 1 2 1 Si 0 1 3 4 5 6 7 8 9 11 12 Ti 8 9 11 12 13 14 15 16 17 19 20 For the case that Si = Tj, we have Tj = Sj + 8 by definition of Tj. Thus, Si – Sj = 8. In other words, 8 games are played from day j+1 to day i # Pigeons 22 # Holes 21
3 Example 6: Lossless Compression An algorithm that compress n-bit string to m-bits and then recover the n-bit string Compress Decompress Input n n m m A lossless compression for all possible inputs with n>m does not exist. If n>m, then 2 n > 2 m # Pigeons 2 n # Holes 2 m Two different strings map to an identical m-bit storage.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Inclusion-Exclusion Principle Theorem#1: Example: Find number of integers in {1 … 100} which is either divisible by 3 or 5. A: divisible by 3
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 06/12/2011 for the course CS 1 taught by Professor Staff during the Fall '08 term at Cornell.

### Page1 / 10

CSE20 Lecture 14 - CSE 20 Lecture Notes 1 Pigeonhole...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online