SE250:lab-5:srag014
Jump to navigation
Jump to search
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). After reading the lab sheet and downloading all the files required, I chose these values:
int sample_size = 1000; int n_keys = 1000; int table_size = 1000;
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.
Testing Buzhash
- Low
Entropy = 7.843786 bits per byte. Optimum compression would reduce the size of this 1000 byte file by 1 percent. Chi square distribution for 1000 samples is 214.46, and randomly would exceed this value 95.00 percent of the times. Arithmetic mean value of data bytes is 128.0860 (127.5 = random). Monte Carlo value for Pi is 3.132530120 (error 0.29 percent). Serial correlation coefficient is -0.017268 (totally uncorrelated = 0.0). Buzhash low 1000/1000: llps = 6, expecting 5.51384
Testing Buzhashn
- Low
Entropy = 7.823873 bits per byte. Optimum compression would reduce the size of this 1000 byte file by 2 percent. Chi square distribution for 1000 samples is 220.61, and randomly would exceed this value 90.00 percent of the times. Arithmetic mean value of data bytes is 127.3730 (127.5 = random). Monte Carlo value for Pi is 3.108433735 (error 1.06 percent). Serial correlation coefficient is -0.007118 (totally uncorrelated = 0.0). Buzhashn 1000/1000: llps = 5, expecting 5.51384
Testing Hash_CRC
- Low
Entropy = 3.965965 bits per byte.
Optimum compression would reduce the size of this 1000 byte file by 50 percent. Chi square distribution for 1000 samples is 36163.52, and randomly would exceed this value 0.01 percent of the times. Arithmetic mean value of data bytes is 93.6860 (127.5 = random). Monte Carlo value for Pi is 4.000000000 (error 27.32 percent). Serial correlation coefficient is -0.380754 (totally uncorrelated = 0.0). Hash CRC low 1000/1000: llps = 11, expecting 5.51384
Testing Base256
- Low
Entropy = 0.000000 bits per byte. Optimum compression would reduce the size of this 1000 byte file by 100 percent. Chi square distribution for 1000 samples is 255000.00, and randomly would exceed this value 0.01 percent of the times. Arithmetic mean value of data bytes is 97.0000 (127.5 = random). Monte Carlo value for Pi is 4.000000000 (error 27.32 percent). Serial correlation coefficient is undefined (all values equal!). Base256 low 1000/1000: llps = 1000, expecting 5.51384
Testing Java Integer
- Low
Entropy = 2.791730 bits per byte. Optimum compression would reduce the size of this 1000 byte file by 65 percent. Chi square distribution for 1000 samples is 143448.00, and randomly would exceed this value 0.01 percent of the times. Arithmetic mean value of data bytes is 31.1250 (127.5 = random). Monte Carlo value for Pi is 4.000000000 (error 27.32 percent). Serial correlation coefficient is -0.230200 (totally uncorrelated = 0.0). Java Integer 1000/1000: llps = 1, expecting 5.51384
Testing Java Object
- Low
Entropy = 2.000000 bits per byte. Optimum compression would reduce the size of this 1000 byte file by 75 percent. Chi square distribution for 1000 samples is 63000.00, and randomly would exceed this value 0.01 percent of the times. Arithmetic mean value of data bytes is 95.5000 (127.5 = random). Monte Carlo value for Pi is 4.000000000 (error 27.32 percent). Serial correlation coefficient is -0.037404 (totally uncorrelated = 0.0). Java Object low 1000/1000: llps = 1000, expecting 5.51384
Testing Java String
- Low
Entropy = 7.916396 bits per byte. Optimum compression would reduce the size of this 1000 byte file by 1 percent. Chi square distribution for 1000 samples is 111.55, and randomly would exceed this value 99.99 percent of the times. Arithmetic mean value of data bytes is 129.4710 (127.5 = random). Monte Carlo value for Pi is 3.156626506 (error 0.48 percent). Serial correlation coefficient is 0.009052 (totally uncorrelated = 0.0). Java String low 1000/1000: llps = 4, expecting 5.51384
Testing Random
- Low
Entropy = 4.643488 bits per byte. Optimum compression would reduce the size of this 1000 byte file by 41 percent. Chi square distribution for 1000 samples is 64480.70, and randomly would exceed this value 0.01 percent of the times. Arithmetic mean value of data bytes is 46.9660 (127.5 = random). Monte Carlo value for Pi is 4.000000000 (error 27.32 percent). Serial correlation coefficient is -0.043108 (totally uncorrelated = 0.0).
Testing High Random
- Low
Entropy = 0.000000 bits per byte. Optimum compression would reduce the size of this 1000 byte file by 100 percent. Chi square distribution for 1000 samples is 255000.00, and randomly would exceed this value 0.01 percent of the times. Arithmetic mean value of data bytes is 0.0000 (127.5 = random). Monte Carlo value for Pi is 4.000000000 (error 27.32 percent). Serial correlation coefficient is undefined (all values equal!).
After doing this I commented out the #define VERBOSE_OUTPUT line and got the results in a table format:
Buzhash low 7.84379 95.00% 128.086 0.29% -0.017268 Buzhashn low 7.82387 90.00% 127.373 1.06% -0.007118 Hash CRC low 4.04588 0.01% 94.848 27.32% -0.395249 Base256 low 0.00000 0.01% 97.000 27.32% undefined Java Integer low 2.79173 0.01% 31.125 27.32% -0.230200 Java Object low 2.00000 0.01% 95.500 27.32% -0.037404 Java String low 7.91760 99.99% 126.441 1.25% 0.003240 Random low 4.64349 0.01% 46.966 27.32% -0.043108 High Random low 0.00000 0.01% 0.000 27.32% undefined