The following is a checklist which provides a summary of the assignment. This is meant only as a supplement; please read the original assignment description.
For this assignment, it is helpful to be able to
generate different random trials, by changing the seed used
for the random number generator.
One way to do so is to use random(), and thus have the following
two lines at the top:
#include <sys/types.h>and the following two lines in the main routine:
#include <sys/timeb.h>
long seed=time(NULL);
srandom(seed);
Inputfile | Source | N | |||
princeton.txt | A Packet article about Princeotn | 7959 | |||
aesopshort.txt | collection of Aesop's fables | 10280 | |||
moby1.txt | Moby Dick - Chapter 1 | 12218 | |||
amendments.txt | Constitutional Amendments | 18369 | |||
y2kintro.txt | Introduction of the recent Senate report on Y2K | 21224 | |||
baby.txt | How baby's learn language | 22200 | |||
manifesto.txt | Communist Party Manifesto | 72955 | |||
muchado.txt | Much Ado about Nothing | 123413 | |||
aesop.txt | collection of Aesop's fables | 191945 | |||
starr.txt | The Starr Report narrative | 234378 | (warning: explicit language) | ||
lilwomen.txt | Little Women | 1042048 | |||
mobydick.txt | Moby Dick | 1191463 |
Inputfile | k=3 | k=7 | k=12 | k=20 |
princeton.txt | 0.02 | 0.10 | 0.17 | 0.27 |
aesopshort.txt | 0.05 | 0.15 | 0.22 | 0.34 |
moby1.txt | 0.04 | 0.16 | 0.26 | 0.42 |
amendments.txt | 0.05 | 0.18 | 0.29 | 0.50 |
y2kintro.txt | 0.08 | 0.24 | 0.42 | 0.70 |
baby.txt | 0.08 | 0.25 | 0.39 | 0.70 |
manifesto.txt | 0.17 | 0.67 | 1.20 | 2.14 |
muchado.txt | 0.28 | 1.18 | 2.20 | 3.70 |
aesop.txt | 0.38 | 1.70 | 3.40 | 5.89 |
starr.txt | 0.41 | 1.85 | 3.60 | 6.60 |
lilwomen.txt | 1.86 | 9.45 | 18.75 | 31.03 |
mobydick.txt | 2.38 | 11.69 | 22.04 | 37.34 |