When a fair coin is tossed, the only posssible outcomes are Heads (H) and Tails (T). When a coin is tossed many times, the outcomes can be represented as a sequence of Hs and Ts. In this project, we will analyze the sequence of outcomes from tossing a fair coin. You should note that this analysis applies to computer data as well since we could denote Heads using 1 and Tails using 0 rather than H and T. Such analysis can be applied to message encoding and compression.
One important aspect of analyzing such a sequence is the number and lengths of the embedded "runs". A "run" is a sequence of consecutive Heads or Tails. For example, in the sequence HHHHTTHHTTTHT, there is a run of 4 Hs, a run of 2 Ts, a run of 2 Hs, a run of 3 Ts, a run of 1 H and finally a run of 1 T.
We will count the number of runs of each length for both Heads and Tails. In theory, if we toss a fair coin N times, there is a (very small, teeny, tiny) non-zero probability that all N tosses will be Heads or all N tosses will be Tails. Therefore, in theory the longest possible run for N tosses is N. In an award-winning paper (College Math Journal, Vol 21, 1990), Mark Schilling calculates that the expected longest run for N tosses is the integer closest to log2(N / 2) plus or minus 3, which is much less than N. Our program will help validate Mark's theory.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).
4) Please Take a look at the Attached File for the Description.
Unix, C++, Using a Makefile...Read the attached Document.