A k-streak starts at toss i in a sequence of n coin flips


Problem

1. Given a stream of n numbers, show how to select one uniformly at random using only constant storage. What if you don't know n in advance?

2. A k-streak starts at toss i in a sequence of n coin flips when the outcome of the ith flip and the next k - 1 flips are identical. For example, sequence HTTTHH contains 2-streaks starting at the second, third, and fifth tosses. What are the expected number of k-streaks that you will see in n tosses of a fair coin?

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: A k-streak starts at toss i in a sequence of n coin flips
Reference No:- TGS02738141

Expected delivery within 24 Hours