Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (757.95 KB, 6 trang )
Random Warmup
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.
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?
To What Kind of Story Is a Random
Page Likely to Belong
• To be concrete, suppose there are 20 stories