<?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%3Aasin185</id>
	<title>SE250:lab-5:asin185 - 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%3Aasin185"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-5:asin185&amp;action=history"/>
	<updated>2026-04-29T02:24:05Z</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:asin185&amp;diff=6443&amp;oldid=prev</id>
		<title>Mark: 22 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-5:asin185&amp;diff=6443&amp;oldid=prev"/>
		<updated>2008-11-03T05:19:45Z</updated>

		<summary type="html">&lt;p&gt;22 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;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
The purpose of the lab is to show how &amp;#039;&amp;#039;Hash tables&amp;#039;&amp;#039; functions perform in theory and in practice. We use various integers to  see the randomness of the &amp;#039;&amp;#039;Hash tables&amp;#039;&amp;#039; , and then comparing it to the worst and best cases.&lt;br /&gt;
&lt;br /&gt;
=== Task 1 ===&lt;br /&gt;
&lt;br /&gt;
My sample size for testing the &amp;#039;&amp;#039;&amp;#039;low&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;typical&amp;#039;&amp;#039;&amp;#039; entropy sources was &amp;#039;&amp;#039;&amp;#039;1000&amp;#039;&amp;#039;&amp;#039; as this would exceed and contain the value &amp;#039;&amp;#039;&amp;#039;95%&amp;#039;&amp;#039;&amp;#039; of the time in the chi square distribution.&lt;br /&gt;
&lt;br /&gt;
==== Part a ====&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Low entropy &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*Using rt_add_buzhash with sample size 1000-&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 of this 1000 byte file by 1 percent. &lt;br /&gt;
 &lt;br /&gt;
 Chi square distribution for the 1000 samples is 214.46, and randomly would exceed this value 95.00 percent of the times.&lt;br /&gt;
 &lt;br /&gt;
 Arithmetic mean value of the data bytes is 128.0860 &amp;lt;127.5 = random&amp;gt;.&lt;br /&gt;
 Monte Carlo value for Pi is 3.132530120 &amp;lt;error 0.29 percent&amp;gt;.&lt;br /&gt;
 Serial correlation coefficient is -0.017268 &amp;lt;totally uncorrelated = 0.0&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
 Buzhash low 1000/1000: llps = 6, expecting 5.51384&lt;br /&gt;
&lt;br /&gt;
*using rt_add_buzhashn-&lt;br /&gt;
&lt;br /&gt;
 Testing Buzhashn low on 1000 samples&lt;br /&gt;
 Entropy = 7.823873 bits per byte. &lt;br /&gt;
 &lt;br /&gt;
 Optimum compression would reduce the size of this 1000 byte file by 2 percent.&lt;br /&gt;
 &lt;br /&gt;
 Chi square distribution for the 1000 samples is 220.61, and randomly would exceed this value 90.00 percent of the times.&lt;br /&gt;
 &lt;br /&gt;
 Arithmetic mean value of the data bytes is 127.3730 &amp;lt;127.5 = random&amp;gt;.&lt;br /&gt;
 Monte Carlo value for Pi is 3.108433730 &amp;lt;error 1.06 percent&amp;gt;.&lt;br /&gt;
 Serial correlation coefficient is -0.007118 &amp;lt;totally uncorrelated = 0.0&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
 Buzhashn low 1000/1000: llps = 999, expecting 5.51384&lt;br /&gt;
&lt;br /&gt;
* Using rt_add_hash_CRC-&lt;br /&gt;
&lt;br /&gt;
 Testing hash_CRC low on 1000 samples&lt;br /&gt;
 Entropy = 3.965965 bits per byte.&lt;br /&gt;
 &lt;br /&gt;
 Optimum compression would reduce the size of this 1000 byte file by  50 percent.&lt;br /&gt;
 &lt;br /&gt;
 Chi square distribution for the 1000 samples is 36163.52, and  randomly would exceed this value 0.01 percent of the times.&lt;br /&gt;
 &lt;br /&gt;
 Arithmetic mean value of the data bytes is 93.6860 &amp;lt;127.5 = random&amp;gt;.&lt;br /&gt;
 Monte Carlo value for Pi is 4.000000000 &amp;lt;error 27.32 percent&amp;gt;.&lt;br /&gt;
 Serial correlation coefficient is -0.380754 &amp;lt;totally uncorrelated =  0.0&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
 hash_CRC low 1000/1000: llps = 11, expecting 5.51384&lt;br /&gt;
&lt;br /&gt;
* Using rt_add_Java_Integer-&lt;br /&gt;
&lt;br /&gt;
 Testing Java_Integer low on 1000 samples&lt;br /&gt;
 Entropy = 2.791730 bits per byte.&lt;br /&gt;
 &lt;br /&gt;
 Optimum compression would reduce the size of this 1000 byte file by   65 percent.&lt;br /&gt;
 &lt;br /&gt;
 Chi square distribution for the 1000 samples is 143448.00, and  randomly would exceed this value 0.01 percent of the times.&lt;br /&gt;
 &lt;br /&gt;
 Arithmetic mean value of the data bytes is 31.1250 &amp;lt;127.5 = random&amp;gt;.&lt;br /&gt;
 Monte Carlo value for Pi is 4.000000000 &amp;lt;error 27.32 percent&amp;gt;.&lt;br /&gt;
 Serial correlation coefficient is -0.230200 &amp;lt;totally uncorrelated =  0.0&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
 Java_Integer low 1000/1000: llps = 4, expecting 5.51384&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Typical entropy &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*Using rt_add_buzhash-&lt;br /&gt;
&lt;br /&gt;
 Testing Buzhash typical on 1000 samples&lt;br /&gt;
 Entropy = 7.797775bits per byte.&lt;br /&gt;
 &lt;br /&gt;
 Optimum compression would reduce the size of this 1000 byte file by 2 percent.&lt;br /&gt;
 &lt;br /&gt;
 Chi square distribution for the 1000 samples is 250.82, and randomly would exceed this value 50.00 percent of the times.&lt;br /&gt;
 &lt;br /&gt;
 Arithmetic mean value of the data bytes is 126.5740 &amp;lt;127.5 = random&amp;gt;.&lt;br /&gt;
 Monte Carlo value for Pi is 3.277108434 &amp;lt;error 4.31 percent&amp;gt;.&lt;br /&gt;
 Serial correlation coefficient is -0.007005 &amp;lt;totally uncorrelated = 0.0&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
 Buzhash typical 1000/1000: llps = 7, expecting 5.51384&lt;br /&gt;
&lt;br /&gt;
* Using  rt_add_buzhashn-&lt;br /&gt;
&lt;br /&gt;
 Testing Buzhashn typical on 1000 samples&lt;br /&gt;
 Entropy = 7.823873 bits per byte.&lt;br /&gt;
 &lt;br /&gt;
 Optimum compression would reduce the size of this 1000 byte file by 2 percent.&lt;br /&gt;
 &lt;br /&gt;
 Chi square distribution for the 1000 samples is 220.61, and randomly would exceed this value 90.00 percent of the times.&lt;br /&gt;
 &lt;br /&gt;
 Arithmetic mean value of the data bytes is 127.3730 &amp;lt;127.5 = random&amp;gt;.&lt;br /&gt;
 Monte Carlo value for Pi is 3.108433730 &amp;lt;error 1.06 percent&amp;gt;.&lt;br /&gt;
 Serial correlation coefficient is -0.007118 &amp;lt;totally uncorrelated = 0.0&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
 Buzhashn typical 1000/1000: llps = 999, expecting 5.51384&lt;br /&gt;
&lt;br /&gt;
* Using rt_add_hash_CRC-&lt;br /&gt;
&lt;br /&gt;
 Testing hash_CRC typical on 1000 samples&lt;br /&gt;
 Entropy = 7.202459 bits per byte.&lt;br /&gt;
 &lt;br /&gt;
 Optimum compression would reduce the size of this 1000 byte file by 9 percent.&lt;br /&gt;
 &lt;br /&gt;
 Chi square distribution for the 1000 samples is 1660.86, and randomly would exceed this value 0.01 percent of the times.&lt;br /&gt;
 &lt;br /&gt;
 Arithmetic mean value of the data bytes is 114.9320 &amp;lt;127.5 = random&amp;gt;.&lt;br /&gt;
 Monte Carlo value for Pi is 3.204819277 &amp;lt;error 2.01 percent&amp;gt;.&lt;br /&gt;
 Serial correlation coefficient is -0.032076 &amp;lt;totally uncorrelated = 0.0&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
 hash_CRC typical 1000/1000: llps = 7, expecting 5.51384&lt;br /&gt;
&lt;br /&gt;
*Using rt_add_Java_Integer-&lt;br /&gt;
&lt;br /&gt;
 Testing Java_Integer typical on 1000 samples&lt;br /&gt;
 Entropy = 2.791730 bits per byte.&lt;br /&gt;
 &lt;br /&gt;
 Optimum compression would reduce the size of this 1000 byte file by 65 percent.&lt;br /&gt;
 &lt;br /&gt;
 Chi square distribution for the 1000 samples is 143448.00, and randomly would exceed this value 0.01 percent of the times.&lt;br /&gt;
 &lt;br /&gt;
 Arithmetic mean value of the data bytes is 31.1250 &amp;lt;127.5 = random&amp;gt;.&lt;br /&gt;
 Monte Carlo value for Pi is 4.000000000 &amp;lt;error 27.32 percent&amp;gt;.&lt;br /&gt;
 Serial correlation coefficient is -0.230200 &amp;lt;totally uncorrelated = 0.0&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
 Java_Integer low 1000/1000: llps = 91, expecting 5.51384&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>