<?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%3Asrag014</id>
	<title>SE250:lab-5:srag014 - 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%3Asrag014"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-5:srag014&amp;action=history"/>
	<updated>2026-04-29T10:23:16Z</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:srag014&amp;diff=6833&amp;oldid=prev</id>
		<title>Mark: 6 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-5:srag014&amp;diff=6833&amp;oldid=prev"/>
		<updated>2008-11-03T05:19:56Z</updated>

		<summary type="html">&lt;p&gt;6 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This lab is asscociated with hash functions and hash tables. I am so lost with this lab, so very confused with this! I got some help from my some people before I knew what I was doing (still am a bit unsure LOL).&lt;br /&gt;
After reading the lab sheet and downloading all the files required, I chose these values:&lt;br /&gt;
  &lt;br /&gt;
 int sample_size = 1000;&lt;br /&gt;
 int n_keys = 1000;&lt;br /&gt;
 int table_size = 1000;&lt;br /&gt;
&lt;br /&gt;
It asked me to choose a sensibile number and I chose 1000 becuase its not too big of a number or too small of a number.&lt;br /&gt;
&lt;br /&gt;
===Testing Buzhash===&lt;br /&gt;
* Low &lt;br /&gt;
&lt;br /&gt;
 &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;
 &lt;br /&gt;
 Buzhash low 1000/1000: llps = 6, expecting 5.51384&lt;br /&gt;
&lt;br /&gt;
===Testing Buzhashn===&lt;br /&gt;
* Low &lt;br /&gt;
 Entropy = 7.823873 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 220.61, 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 127.3730 (127.5 = random).&lt;br /&gt;
 Monte Carlo value for Pi is 3.108433735 (error 1.06 percent).&lt;br /&gt;
 Serial correlation coefficient is -0.007118 (totally uncorrelated = 0.0).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Buzhashn 1000/1000: llps = 5, expecting 5.51384&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Testing Hash_CRC===&lt;br /&gt;
* Low&lt;br /&gt;
 Entropy = 3.965965 bits per byte.&lt;br /&gt;
&lt;br /&gt;
 Optimum compression would reduce the size&lt;br /&gt;
 of this 1000 byte file by 50 percent.&lt;br /&gt;
 &lt;br /&gt;
 Chi square distribution for 1000 samples is 36163.52, 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 93.6860 (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.380754 (totally uncorrelated = 0.0).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Hash CRC low 1000/1000: llps = 11, expecting 5.51384&lt;br /&gt;
&lt;br /&gt;
===Testing Base256 ===&lt;br /&gt;
*Low&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 1000 byte file by 100 percent.&lt;br /&gt;
 &lt;br /&gt;
 Chi square distribution for 1000 samples is 255000.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;
 &lt;br /&gt;
 Base256 low 1000/1000: llps = 1000, expecting 5.51384&lt;br /&gt;
&lt;br /&gt;
===Testing Java Integer===&lt;br /&gt;
*Low&lt;br /&gt;
 Entropy = 2.791730 bits per byte.&lt;br /&gt;
 &lt;br /&gt;
 Optimum compression would reduce the size&lt;br /&gt;
 of this 1000 byte file by 65 percent. &lt;br /&gt;
 &lt;br /&gt;
 Chi square distribution for 1000 samples is 143448.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 31.1250 (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.230200 (totally uncorrelated = 0.0).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Java Integer 1000/1000: llps = 1, expecting 5.51384&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Testing Java Object===&lt;br /&gt;
*Low&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 1000 byte file by 75 percent.&lt;br /&gt;
 &lt;br /&gt;
 Chi square distribution for 1000 samples is 63000.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 95.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.037404 (totally uncorrelated = 0.0).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Java Object low 1000/1000: llps = 1000, expecting 5.51384&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Testing Java String===&lt;br /&gt;
* Low&lt;br /&gt;
 Entropy = 7.916396 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 111.55, 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 129.4710 (127.5 = random).&lt;br /&gt;
 Monte Carlo value for Pi is 3.156626506 (error 0.48 percent).&lt;br /&gt;
 Serial correlation coefficient is 0.009052 (totally uncorrelated = 0.0).&lt;br /&gt;
  &lt;br /&gt;
 &lt;br /&gt;
 Java String low 1000/1000: llps = 4, expecting 5.51384&lt;br /&gt;
&lt;br /&gt;
===Testing Random===&lt;br /&gt;
*Low&lt;br /&gt;
 Entropy = 4.643488 bits per byte.&lt;br /&gt;
 &lt;br /&gt;
 Optimum compression would reduce the size&lt;br /&gt;
 of this 1000 byte file by 41 percent.&lt;br /&gt;
 &lt;br /&gt;
 Chi square distribution for 1000 samples is 64480.70, 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 46.9660 (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.043108 (totally uncorrelated = 0.0).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Testing High Random===&lt;br /&gt;
*Low&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 1000 byte file by 100 percent.&lt;br /&gt;
 &lt;br /&gt;
 Chi square distribution for 1000 samples is 255000.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 0.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;
After doing this I commented out the #define VERBOSE_OUTPUT line and got the results in a table format:&lt;br /&gt;
&lt;br /&gt;
 Buzhash low             7.84379 95.00%  128.086 0.29%   -0.017268&lt;br /&gt;
 Buzhashn low            7.82387 90.00%  127.373 1.06%   -0.007118&lt;br /&gt;
 Hash CRC low            4.04588 0.01%   94.848  27.32%  -0.395249&lt;br /&gt;
 Base256 low             0.00000 0.01%   97.000  27.32%  undefined&lt;br /&gt;
 Java Integer low        2.79173 0.01%   31.125  27.32%  -0.230200&lt;br /&gt;
 Java Object low         2.00000 0.01%   95.500  27.32%  -0.037404&lt;br /&gt;
 Java String low         7.91760 99.99%  126.441 1.25%   0.003240&lt;br /&gt;
 Random low              4.64349 0.01%   46.966  27.32%  -0.043108&lt;br /&gt;
 High Random low         0.00000 0.01%   0.000   27.32%  undefined&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>