SE250:lab-5:twon069
Jump to navigation
Jump to search
Task 1
- Ok, so this is a tough lab indeed, had quite a lot of problem because realizing the code doesn't work on Visual Studio so had to have cygwin set up on my computer at home to finish this lab. (took quite a while because I'm a total newbie at these shell stuff, however bvic helped a lot on the forum, so thanks!)
- During the lab, it took quite a while to figure out what the output meant and understanding the codes, luckily HTTB from last year was great and had explanation to each of the output, so that got my started.
Determining the Sample Size
- Ran a range of sample size to determine when the randomness start to not varie a lot
Results are:
SS = 10 3.584963 55% 50% 126.0833 36.34% -0.341362 SS = 100 6.328758 20% 50% 131.7 4.51% -0.135626 SS = 1000 7.843786 1% 95% 128.0860 0.29% -0.017268 SS = 10000 7.985498 0% 99% 125.8253 1.26% -0.000047 SS = 100000 7.998297 0% 75% 127.5775 0.71% 0.000327 SS = 1000000 7.999876 0% 99.99% 127.5198 0.19% -0.000567
- The randomness starts to not vary as much starting from 10000, so SS I choose will be 100000
Results
buzhash low 7.99829 75.00% 127.577 0.71% 0.000327 buzhashn low 7.99823 50.00% 127.493 0.13% -0.003092 hash_CRC low 5.59830 0.01% 81.7834 24.53% 0.028545 base256 low 0.00000 0.01% 97.000 27.32% undefined Java_Integer low 4.82824 0.01% 43.8834 27.32% -0.092002 Java_Object low 2.00000 0.01% 77.000 27.32% -0.521556 Java_String low 7.99958 99.99% 127.438 0.22% -0.000646 rand low 7.95308 0.01% 111.441 11.17% -0.051837 high rand low 7.99820 50.00% 127.402 0.59% -0.001222 buzhash high 7.99823 2.50% 127.374 0.77% -0.000076 buzhashn high 7.82387 50.00% 127.493 0.13% -0.003092 hash_CRC high 7.84045 0.01% 122.862 1.98% 0.018518 base256 high 4.02297 0.01% 107.853 27.32% 0.034082 Java_Integer high 4.82824 0.01% 43.8834 27.32% -0.092002 Java_Object high 5.70432 0.01% 89.7964 21.50% -0.148185 Java_String high 7.94554 0.01% 126.139 0.27% 0.021181 rand high 7.95315 0.01% 111.468 11.13% -0.048905 high rand high 7.99807 50.00% 127.405 0.07% -0.002226
Conclusion
- It was rather difficult putting up the results in a table, took a long time fiddling through each output.
- Just upon looking at the result of high entropy and low entropy, not a whole lot difference to the randomness of placement, pretty much the same, so it doesn't really matter if the collection of items has a high entropy or not.
- Its very hard to determine a ranking system between each hash function, however it can be clearly shown that buzhash, buzhashn and high random all generate a good randomness in their tables.
- Random does not fall into the above category even though it's Entropy is very close to 8 is due to it's Monte Carlo score, having a high percentage of error.
- Java_String too, did not make it in the above category, due to the low Chi Square mark, even though the overall mark was good.
- base256 is probably the worst out of all, having really low randomness mark in all areas.
Task 2
10/100:
Buzhash low 10/100: llps = 2, expecting 1.39006 Hash CRC low 10/100: llps = 1, expecting 1.39006 Base256 low 10/100: llps = 10, expecting 1.39006 Java Object low 10/100: llps = 10, expecting 1.39006 Java String low 10/100: llps = 1, expecting 1.39006 Buzhash high 10/100: llps = 2, expecting 1.39006 Hash CRC high CRC 10/100: llps = 1, expecting 1.39006 Base256 high 10/100: llps = 2, expecting 1.39006 Java Object high 10/100: llps = 1, expecting 1.39006 Java String high 10/100: llps = 1, expecting 1.39006 Buzhashn 10/100: llps = 1, expecting 1.39006 Java Integer 10/100: llps = 1, expecting 1.39006
100/100:
Buzhash low 100/100: llps = 3, expecting 4.22683 Hash CRC low 100/100: llps = 6, expecting 4.22683 Base256 low 100/100: llps = 100, expecting 4.22683 Java Object low 100/100: llps = 100, expecting 4.22683 Java String low 100/100: llps = 3, expecting 4.22683 Buzhash high 100/100: llps = 3, expecting 4.22683 Hash CRC high CRC 100/100: llps = 4, expecting 4.22683 Base256 high 100/100: llps = 4, expecting 4.22683 Java Object high 100/100: llps = 5, expecting 4.22683 Java String high 100/100: llps = 3, expecting 4.22683 Buzhashn 100/100: llps = 4, expecting 4.22683 Java Integer 100/100: llps = 1, expecting 4.22683
1000/100:
Buzhash low 1000/100: llps = 22, expecting 18.7606 Hash CRC low 1000/100: llps = 43, expecting 18.7606 Base256 low 1000/100: llps = 1000, expecting 18.7606 Java Object low 1000/100: llps = 1000, expecting 18.7606 Java String low 1000/100: llps = 15, expecting 18.7606 Buzhash high 1000/100: llps = 22, expecting 18.7606 Hash CRC high CRC 1000/100: llps = 25, expecting 18.7606 Base256 high 1000/100: llps = 103, expecting 18.7606 Java Object high 1000/100: llps = 47, expecting 18.7606 Java String high 1000/100: llps = 19, expecting 18.7606 Buzhashn 1000/100: llps = 16, expecting 18.7606 Java Integer 1000/100: llps = 10, expecting 18.7606
10000/100:
Buzhash low 10000/100: llps = 125, expecting 125.959 Hash CRC low 10000/100: llps = 409, expecting 125.959 Base256 low 10000/100: llps = 10000, expecting 125.959 Java Object low 10000/100: llps = 10000, expecting 125.959 Java String low 10000/100: llps = 110, expecting 125.959 Buzhash high 10000/100: llps = 127, expecting 125.959 Hash CRC high CRC 10000/100: llps = 146, expecting 125.959 Base256 high 10000/100: llps = 671, expecting 125.959 Java Object high 10000/100: llps = 425, expecting 125.959 Java String high 10000/100: llps = 123, expecting 125.959 Buzhashn 10000/100: llps = 128, expecting 125.959 Java Integer 10000/100: llps = 100, expecting 125.959
- Java_Object, Base256, Hash CRC performed poorly.
- Buzhash and Buzhashn stays with the expected values.