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

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

View Full Document Right Arrow Icon
1 1. Pigeonhole Principle 2. Inclusion-Exclusion Principle CSE 20 Lecture Notes CK Cheng 3/4/2010
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
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.
Background image of page 3

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

View Full DocumentRight Arrow Icon
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
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

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 Right Arrow Icon
Ask a homework question - tutors are online