<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE250%3Alab-5%3Arbha033</id>
	<title>SE250:lab-5:rbha033 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE250%3Alab-5%3Arbha033"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-5:rbha033&amp;action=history"/>
	<updated>2026-06-15T11:53:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.kram.nz/index.php?title=SE250:lab-5:rbha033&amp;diff=6725&amp;oldid=prev</id>
		<title>Mark: 9 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-5:rbha033&amp;diff=6725&amp;oldid=prev"/>
		<updated>2008-11-03T05:19:53Z</updated>

		<summary type="html">&lt;p&gt;9 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Lab 5 =&lt;br /&gt;
To begin with, I must confess, this lab does not make any sense to me as of yet. Apart from the fact that we are using a number of different tests (which i know nothing about, and only consider them as a black box) to measure how effective each of the different types of hash functions are.&lt;br /&gt;
&lt;br /&gt;
== Task 1 ==&lt;br /&gt;
After a little bit of prior preperation, i&amp;#039;ve selected these numbers.&lt;br /&gt;
&lt;br /&gt;
  int sample_size = 1000;&lt;br /&gt;
  int n_keys = 250000;&lt;br /&gt;
  int table_size = 400000;&lt;br /&gt;
&lt;br /&gt;
=== Low Entropy Results ===&lt;br /&gt;
&lt;br /&gt;
==== Buzhash ====&lt;br /&gt;
Testing Buzhash low on 500 samples&lt;br /&gt;
Entropy = 7.606529 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 4 percent. &lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 255.71, and randomly&lt;br /&gt;
would exceed this value 50.00 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 131.8860 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 3.036144578 (error 3.36 percent).&lt;br /&gt;
Serial correlation coefficient is -0.033469 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
==== Buzhashn ====&lt;br /&gt;
Testing Buzhashn low on 500 samples&lt;br /&gt;
Entropy = 7.684438 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 3 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 178.91, and randomly&lt;br /&gt;
would exceed this value 99.95 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 125.4580 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 3.180722892 (error 1.25 percent).&lt;br /&gt;
Serial correlation coefficient is 0.025355 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
==== Hash_CRC ====&lt;br /&gt;
Testing Hash_CRC low on 500 samples&lt;br /&gt;
Entropy = 3.741407 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 53 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 18208.48, and randomly&lt;br /&gt;
would exceed this value 0.01 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 92.9200 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 4.000000000 (error 27.32 percent).&lt;br /&gt;
Serial correlation coefficient is -0.372104 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
==== Base 256 ====&lt;br /&gt;
Testing Base256 low on 500 samples&lt;br /&gt;
Entropy = 0.000000 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 100 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 127500.00, and randomly&lt;br /&gt;
would exceed this value 0.01 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 97.0000 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 4.000000000 (error 27.32 percent).&lt;br /&gt;
Serial correlation coefficient is undefined (all values equal!).&lt;br /&gt;
&lt;br /&gt;
==== Java_Integer ====&lt;br /&gt;
Testing Java_Integer low on 500 samples&lt;br /&gt;
Entropy = 2.532733 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 68 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 71948.00, and randomly&lt;br /&gt;
would exceed this value 0.01 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 15.5000 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 4.000000000 (error 27.32 percent).&lt;br /&gt;
Serial correlation coefficient is -0.229630 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
==== Java_Object ====&lt;br /&gt;
Testing Java_Object low on 500 samples&lt;br /&gt;
Entropy = 2.000000 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 75 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 31500.00, and randomly&lt;br /&gt;
would exceed this value 0.01 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 77.0000 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 4.000000000 (error 27.32 percent).&lt;br /&gt;
Serial correlation coefficient is -0.521556 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
==== Java_String ====&lt;br /&gt;
Testing Java_String low on 500 samples&lt;br /&gt;
Entropy = 7.737340 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 3 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 153.31, and randomly&lt;br /&gt;
would exceed this value 99.99 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 128.4260 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 3.277108434 (error 4.31 percent).&lt;br /&gt;
Serial correlation coefficient is -0.068098 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
==== Rand ====&lt;br /&gt;
Testing Rand low on 500 samples&lt;br /&gt;
Entropy = 7.530516 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 5 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 305.89, and randomly&lt;br /&gt;
would exceed this value 2.50 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 107.6640 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 3.566265060 (error 13.52 percent).&lt;br /&gt;
Serial correlation coefficient is -0.034205 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
==== High_rand ====&lt;br /&gt;
Testing High_rand low on 500 samples&lt;br /&gt;
Entropy = 7.568083 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 5 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 265.95, and randomly&lt;br /&gt;
would exceed this value 50.00 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 132.7680 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 2.554216867 (error 18.70 percent).&lt;br /&gt;
Serial correlation coefficient is 0.057176 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
=== Typical Entropy results ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Buzhash ====&lt;br /&gt;
Testing Buzhash typical on 500 samples&lt;br /&gt;
Entropy = 7.529310 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 5 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 287.46, and randomly&lt;br /&gt;
would exceed this value 10.00 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 125.7860 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 3.325301205 (error 5.85 percent).&lt;br /&gt;
Serial correlation coefficient is 0.006752 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
==== Buzhashn ====&lt;br /&gt;
Testing Buzhashn typical on 500 samples&lt;br /&gt;
Entropy = 7.684438 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 3 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 178.91, and randomly&lt;br /&gt;
would exceed this value 99.95 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 125.4580 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 3.180722892 (error 1.25 percent).&lt;br /&gt;
Serial correlation coefficient is 0.025355 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
==== Hash_CRC ====&lt;br /&gt;
&lt;br /&gt;
Testing Hash_CRC typical on 500 samples&lt;br /&gt;
Entropy = 6.769234 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 15 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 1261.28, and randomly&lt;br /&gt;
would exceed this value 0.01 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 104.4000 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 3.373493976 (error 7.38 percent).&lt;br /&gt;
Serial correlation coefficient is -0.034608 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
==== Base 256 ====&lt;br /&gt;
&lt;br /&gt;
Testing Base256 typical on 500 samples&lt;br /&gt;
Entropy = 3.929009 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 50 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 10130.14, and randomly&lt;br /&gt;
would exceed this value 0.01 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 104.8520 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 4.000000000 (error 27.32 percent).&lt;br /&gt;
Serial correlation coefficient is 0.263097 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
==== Java_Integer ====&lt;br /&gt;
Testing Java_Integer typical on 500 samples&lt;br /&gt;
Entropy = 2.532733 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 68 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 71948.00, and randomly&lt;br /&gt;
would exceed this value 0.01 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 15.5000 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 4.000000000 (error 27.32 percent).&lt;br /&gt;
Serial correlation coefficient is -0.229630 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
==== Java_Object ====&lt;br /&gt;
Testing Java_Object typical on 500 samples&lt;br /&gt;
Entropy = 4.045873 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 49 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 16446.18, and randomly&lt;br /&gt;
would exceed this value 0.01 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 87.9180 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 4.000000000 (error 27.32 percent).&lt;br /&gt;
Serial correlation coefficient is -0.744332 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
==== Java_String ====&lt;br /&gt;
Testing Java_String typical on 500 samples&lt;br /&gt;
Entropy = 6.940142 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 13 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 1177.31, and randomly&lt;br /&gt;
would exceed this value 0.01 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 113.3500 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 3.421686747 (error 8.92 percent).&lt;br /&gt;
Serial correlation coefficient is -0.018572 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
==== Rand ====&lt;br /&gt;
Testing Rand typical on 500 samples&lt;br /&gt;
Entropy = 7.530516 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 5 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 305.89, and randomly&lt;br /&gt;
would exceed this value 2.50 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 107.6640 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 3.566265060 (error 13.52 percent).&lt;br /&gt;
Serial correlation coefficient is -0.034205 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
==== High_rand ====&lt;br /&gt;
Testing High_rand typical on 500 samples&lt;br /&gt;
Entropy = 7.568083 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 500 byte file by 5 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 500 samples is 265.95, and randomly&lt;br /&gt;
would exceed this value 50.00 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 132.7680 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 2.554216867 (error 18.70 percent).&lt;br /&gt;
Serial correlation coefficient is 0.057176 (totally uncorrelated = 0.0).&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>