SE250:lab-5:rbha033

From Marks Wiki
Jump to navigation Jump to search

Lab 5

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.

Task 1

After a little bit of prior preperation, i've selected these numbers.

 int sample_size = 1000;
 int n_keys = 250000;
 int table_size = 400000;

Low Entropy Results

Buzhash

Testing Buzhash low on 500 samples Entropy = 7.606529 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 4 percent.

Chi square distribution for 500 samples is 255.71, and randomly would exceed this value 50.00 percent of the times.

Arithmetic mean value of data bytes is 131.8860 (127.5 = random). Monte Carlo value for Pi is 3.036144578 (error 3.36 percent). Serial correlation coefficient is -0.033469 (totally uncorrelated = 0.0).

Buzhashn

Testing Buzhashn low on 500 samples Entropy = 7.684438 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 3 percent.

Chi square distribution for 500 samples is 178.91, and randomly would exceed this value 99.95 percent of the times.

Arithmetic mean value of data bytes is 125.4580 (127.5 = random). Monte Carlo value for Pi is 3.180722892 (error 1.25 percent). Serial correlation coefficient is 0.025355 (totally uncorrelated = 0.0).

Hash_CRC

Testing Hash_CRC low on 500 samples Entropy = 3.741407 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 53 percent.

Chi square distribution for 500 samples is 18208.48, and randomly would exceed this value 0.01 percent of the times.

Arithmetic mean value of data bytes is 92.9200 (127.5 = random). Monte Carlo value for Pi is 4.000000000 (error 27.32 percent). Serial correlation coefficient is -0.372104 (totally uncorrelated = 0.0).

Base 256

Testing Base256 low on 500 samples Entropy = 0.000000 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 100 percent.

Chi square distribution for 500 samples is 127500.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!).

Java_Integer

Testing Java_Integer low on 500 samples Entropy = 2.532733 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 68 percent.

Chi square distribution for 500 samples is 71948.00, and randomly would exceed this value 0.01 percent of the times.

Arithmetic mean value of data bytes is 15.5000 (127.5 = random). Monte Carlo value for Pi is 4.000000000 (error 27.32 percent). Serial correlation coefficient is -0.229630 (totally uncorrelated = 0.0).

Java_Object

Testing Java_Object low on 500 samples Entropy = 2.000000 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 75 percent.

Chi square distribution for 500 samples is 31500.00, and randomly would exceed this value 0.01 percent of the times.

Arithmetic mean value of data bytes is 77.0000 (127.5 = random). Monte Carlo value for Pi is 4.000000000 (error 27.32 percent). Serial correlation coefficient is -0.521556 (totally uncorrelated = 0.0).

Java_String

Testing Java_String low on 500 samples Entropy = 7.737340 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 3 percent.

Chi square distribution for 500 samples is 153.31, and randomly would exceed this value 99.99 percent of the times.

Arithmetic mean value of data bytes is 128.4260 (127.5 = random). Monte Carlo value for Pi is 3.277108434 (error 4.31 percent). Serial correlation coefficient is -0.068098 (totally uncorrelated = 0.0).

Rand

Testing Rand low on 500 samples Entropy = 7.530516 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 5 percent.

Chi square distribution for 500 samples is 305.89, and randomly would exceed this value 2.50 percent of the times.

Arithmetic mean value of data bytes is 107.6640 (127.5 = random). Monte Carlo value for Pi is 3.566265060 (error 13.52 percent). Serial correlation coefficient is -0.034205 (totally uncorrelated = 0.0).

High_rand

Testing High_rand low on 500 samples Entropy = 7.568083 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 5 percent.

Chi square distribution for 500 samples is 265.95, and randomly would exceed this value 50.00 percent of the times.

Arithmetic mean value of data bytes is 132.7680 (127.5 = random). Monte Carlo value for Pi is 2.554216867 (error 18.70 percent). Serial correlation coefficient is 0.057176 (totally uncorrelated = 0.0).

Typical Entropy results

Buzhash

Testing Buzhash typical on 500 samples Entropy = 7.529310 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 5 percent.

Chi square distribution for 500 samples is 287.46, and randomly would exceed this value 10.00 percent of the times.

Arithmetic mean value of data bytes is 125.7860 (127.5 = random). Monte Carlo value for Pi is 3.325301205 (error 5.85 percent). Serial correlation coefficient is 0.006752 (totally uncorrelated = 0.0).

Buzhashn

Testing Buzhashn typical on 500 samples Entropy = 7.684438 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 3 percent.

Chi square distribution for 500 samples is 178.91, and randomly would exceed this value 99.95 percent of the times.

Arithmetic mean value of data bytes is 125.4580 (127.5 = random). Monte Carlo value for Pi is 3.180722892 (error 1.25 percent). Serial correlation coefficient is 0.025355 (totally uncorrelated = 0.0).

Hash_CRC

Testing Hash_CRC typical on 500 samples Entropy = 6.769234 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 15 percent.

Chi square distribution for 500 samples is 1261.28, and randomly would exceed this value 0.01 percent of the times.

Arithmetic mean value of data bytes is 104.4000 (127.5 = random). Monte Carlo value for Pi is 3.373493976 (error 7.38 percent). Serial correlation coefficient is -0.034608 (totally uncorrelated = 0.0).

Base 256

Testing Base256 typical on 500 samples Entropy = 3.929009 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 50 percent.

Chi square distribution for 500 samples is 10130.14, and randomly would exceed this value 0.01 percent of the times.

Arithmetic mean value of data bytes is 104.8520 (127.5 = random). Monte Carlo value for Pi is 4.000000000 (error 27.32 percent). Serial correlation coefficient is 0.263097 (totally uncorrelated = 0.0).

Java_Integer

Testing Java_Integer typical on 500 samples Entropy = 2.532733 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 68 percent.

Chi square distribution for 500 samples is 71948.00, and randomly would exceed this value 0.01 percent of the times.

Arithmetic mean value of data bytes is 15.5000 (127.5 = random). Monte Carlo value for Pi is 4.000000000 (error 27.32 percent). Serial correlation coefficient is -0.229630 (totally uncorrelated = 0.0).

Java_Object

Testing Java_Object typical on 500 samples Entropy = 4.045873 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 49 percent.

Chi square distribution for 500 samples is 16446.18, and randomly would exceed this value 0.01 percent of the times.

Arithmetic mean value of data bytes is 87.9180 (127.5 = random). Monte Carlo value for Pi is 4.000000000 (error 27.32 percent). Serial correlation coefficient is -0.744332 (totally uncorrelated = 0.0).

Java_String

Testing Java_String typical on 500 samples Entropy = 6.940142 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 13 percent.

Chi square distribution for 500 samples is 1177.31, and randomly would exceed this value 0.01 percent of the times.

Arithmetic mean value of data bytes is 113.3500 (127.5 = random). Monte Carlo value for Pi is 3.421686747 (error 8.92 percent). Serial correlation coefficient is -0.018572 (totally uncorrelated = 0.0).

Rand

Testing Rand typical on 500 samples Entropy = 7.530516 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 5 percent.

Chi square distribution for 500 samples is 305.89, and randomly would exceed this value 2.50 percent of the times.

Arithmetic mean value of data bytes is 107.6640 (127.5 = random). Monte Carlo value for Pi is 3.566265060 (error 13.52 percent). Serial correlation coefficient is -0.034205 (totally uncorrelated = 0.0).

High_rand

Testing High_rand typical on 500 samples Entropy = 7.568083 bits per byte.

Optimum compression would reduce the size of this 500 byte file by 5 percent.

Chi square distribution for 500 samples is 265.95, and randomly would exceed this value 50.00 percent of the times.

Arithmetic mean value of data bytes is 132.7680 (127.5 = random). Monte Carlo value for Pi is 2.554216867 (error 18.70 percent). Serial correlation coefficient is 0.057176 (totally uncorrelated = 0.0).