<?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%3Asbas046</id>
	<title>SE250:lab-5:sbas046 - 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%3Asbas046"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-5:sbas046&amp;action=history"/>
	<updated>2026-06-04T19:06:37Z</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:sbas046&amp;diff=6760&amp;oldid=prev</id>
		<title>Mark: 2 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-5:sbas046&amp;diff=6760&amp;oldid=prev"/>
		<updated>2008-11-03T05:19:53Z</updated>

		<summary type="html">&lt;p&gt;2 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Task1 ==&lt;br /&gt;
&lt;br /&gt;
Results of comparisons between the different hash functions:&lt;br /&gt;
What this demonstrated is the Buzzhash low function is the most suitable. &lt;br /&gt;
The only thing thats is unfavorable is its compression and linked list lengths.&lt;br /&gt;
It does however have the most random results.&lt;br /&gt;
&lt;br /&gt;
In descending order of randomness:&lt;br /&gt;
&lt;br /&gt;
1)Buzhash low&lt;br /&gt;
2)Buzhash typical&lt;br /&gt;
3)High Rand typical&lt;br /&gt;
4)High Rand low&lt;br /&gt;
5)Rand typical&lt;br /&gt;
6)Rand low&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INPUT VALUES:     &lt;br /&gt;
&lt;br /&gt;
int sample_size = 1000;&lt;br /&gt;
int n_keys = 100;&lt;br /&gt;
int table_size = 100;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;	&lt;br /&gt;
------------------------------------------------------------------------&lt;br /&gt;
Testing Buzhash low on 1000 samples&lt;br /&gt;
Entropy = 7.843786 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 1000 byte file by 1 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 1000 samples is 214.46, and randomly&lt;br /&gt;
would exceed this value 95.00 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 128.0860 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 3.132530120 (error 0.29 percent).&lt;br /&gt;
Serial correlation coefficient is -0.017268 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
Buzhash low 100/100: llps = 4, expecting 4.22683&lt;br /&gt;
------------------------------------------------------------------------&lt;br /&gt;
Testing Buzhash typical on 1000 samples&lt;br /&gt;
Entropy = 7.797775 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 1000 byte file by 2 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 1000 samples is 250.82, 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 126.5740 (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.007005 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
Buzhash typical 100/100: llps = 3, expecting 4.22683&lt;br /&gt;
------------------------------------------------------------------------&lt;br /&gt;
Testing Rand low on 1000 samples&lt;br /&gt;
Entropy = 7.718445 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 1000 byte file by 3 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 1000 samples is 368.06, 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 110.5410 (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.048389 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
Rand low 100/100: llps = 5, expecting 4.22683&lt;br /&gt;
------------------------------------------------------------------------&lt;br /&gt;
Testing Rand typical on 1000 samples&lt;br /&gt;
Entropy = 7.748395 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 1000 byte file by 3 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 1000 samples is 338.88, and randomly&lt;br /&gt;
would exceed this value 0.05 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 112.8910 (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.081749 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
Rand typical 100/100: llps = 3, expecting 4.22683&lt;br /&gt;
------------------------------------------------------------------------&lt;br /&gt;
Testing High Rand low on 1000 samples&lt;br /&gt;
Entropy = 7.805220 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 1000 byte file by 2 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 1000 samples is 265.15, 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.9390 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 3.132530120 (error 0.29 percent).&lt;br /&gt;
Serial correlation coefficient is -0.041236 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
High Rand low 100/100: llps = 5, expecting 4.22683&lt;br /&gt;
------------------------------------------------------------------------&lt;br /&gt;
Testing High Rand typical on 1000 samples&lt;br /&gt;
Entropy = 7.827559 bits per byte.&lt;br /&gt;
&lt;br /&gt;
Optimum compression would reduce the size&lt;br /&gt;
of this 1000 byte file by 2 percent.&lt;br /&gt;
&lt;br /&gt;
Chi square distribution for 1000 samples is 221.12, and randomly&lt;br /&gt;
would exceed this value 90.00 percent of the times.&lt;br /&gt;
&lt;br /&gt;
Arithmetic mean value of data bytes is 128.9990 (127.5 = random).&lt;br /&gt;
Monte Carlo value for Pi is 3.084337349 (error 1.82 percent).&lt;br /&gt;
Serial correlation coefficient is -0.025330 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
High Rand typical 100/100: llps = 3, expecting 4.22683&lt;br /&gt;
------------------------------------------------------------------------&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task 2 ==&lt;br /&gt;
&lt;br /&gt;
It seems that High Rand typical has the best output of the linked list length.&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>