



















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




















Presenter: Kishen Maloor Dept of Computer & Information Sciences University of Delaware
Matthew J. Bridges Neil Vachharajani Yun Zhang Thomas Jablin David I. August Department of Computer Science Princeton University
dict = start_dictionary(); while ((char = read(1)) != EOF) { profitable = compress(char, dict) @YBRANCH(probability=.00001) if (!profitable) dict = restart_dictionary(dict); } finish_dictionary(dict); Use of a y-branch #define CUTOFF 100000 dict = start_dictionary(); int count = 0; while ((char = read(1)) != EOF) { profitable = compress(char, dict) if (!profitable) { dict = restart_dictionary(dict); } else if (count == CUTOFF) { dict = restart_dictionary(dict); count = 0; } count++; } finish_dictionary(dict);
static int seed; @Commutative int Yacm_random() { int temp = seed / 127773L; seed = 16807L * (seed - temp * 127773L) - (temp * 2836L); if( seed < 0 ) seed += 2147483647L; Return seed; } Use of commutative