Download presentation
Presentation is loading. Please wait.
Published byKristina Page Modified over 9 years ago
1
Random Warmup
2
Finding a Short Story Suppose a book of short stories has both shorter short stories and longer short stories. Their order within the book is random. You want to pick a random story to read, but you would prefer it is a shorter one.
3
Finding a Short Story Two Strategies –Strategy #1: Flip to a random page, back up to the beginning of that story, and start reading –Strategy #2: Flip to a random page, go forward to the beginning of the next story, and start reading (Go to first story if you are at the end of the book) Does it matter which strategy you use?
4
To What Kind of Story Is a Random Page Likely to Belong To be concrete, suppose there are 20 stories –10 of them are 10 pages long –10 of them are 20 pages lon So book is 300 pages long The Expected #pages in the story on a random page is (200∙20+100∙10)/300 = 16.7 When you pick a random page, it will belong to a longer story with probability 2/3
5
The Second Strategy Works Better! Strategy #1 will have you reading a longer story with probability 2/3 and a shorter story with probability 1/3 Strategy #2 will take you to the beginning of a random STORY So Strategy #2 will take you to the beginning of a longer story with probability ½ and a shorter story with probability ½
6
FINIS
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.