Skip to content

Latest commit

 

History

History
370 lines (240 loc) · 17.9 KB

File metadata and controls

370 lines (240 loc) · 17.9 KB

Testing with array size 1000:

[1] Selection Sort 9.96578 Vector's Entropy, (Sorted) with size 1000 : 499500 Comparisons, 1000000 Model Expected, 999 Swaps, 1.4936 ms Elapsed

[2] Insertion Sort 9.96578 Vector's Entropy, (Sorted) with size 1000 : 243472 Comparisons, 1000000 Model Expected, 243472 Swaps, 1.0407 ms Elapsed

[3] Merge Sort 9.96578 Vector's Entropy, (Sorted) with size 1000 : 8689 Comparisons, 9965 Model Expected, 4276 Swaps, 0.4242 ms Elapsed

[4] Quick Sort First Pivot 9.96578 Vector's Entropy, (Sorted) with size 1000 : 10449 Comparisons, 9965 Model Expected, 7309 Swaps, 0.1353 ms Elapsed

[5] Quick Sort Random Pivot 9.96578 Vector's Entropy, (Sorted) with size 1000 : 12379 Comparisons, 9965 Model Expected, 9399 Swaps, 0.1577 ms Elapsed

[6] Quick Sort Median Pivot 9.96578 Vector's Entropy, (Sorted) with size 1000 : 9459 Comparisons, 9965 Model Expected, 5979 Swaps, 0.1582 ms Elapsed

[7] Bubble Sort 9.96578 Vector's Entropy, (Sorted) with size 1000 : 499500 Comparisons, 1000000 Model Expected, 244668 Swaps, 3.6288 ms Elapsed

[8] Counting Sort 9.96578 Vector's Entropy, (Sorted) with size 1000 : 2000 Comparisons, 2000 Model Expected, 2000 Swaps, 0.0424 ms Elapsed

[9] Heap Sort 9.96578 Vector's Entropy, (Sorted) with size 1000 : 19132 Comparisons, 9965 Model Expected, 9066 Swaps, 0.1992 ms Elapsed

[10] Tree Sort 9.96578 Vector's Entropy, (Sorted) with size 1000 : 11408 Comparisons, 9965 Model Expected, 10408 Swaps, 0.2528 ms Elapsed

[11] Shell Sort 9.96578 Vector's Entropy, (Sorted) with size 1000 : 7204 Comparisons, 1000 Model Expected, 15210 Swaps, 0.1632 ms Elapsed


Testing with array size 2000:

[1] Selection Sort 10.9658 Vector's Entropy, (Sorted) with size 2000 : 2498500 Comparisons, 4000000 Model Expected, 2998 Swaps, 5.9531 ms Elapsed

[2] Insertion Sort 10.9658 Vector's Entropy, (Sorted) with size 2000 : 1234339 Comparisons, 4000000 Model Expected, 1234339 Swaps, 6.5145 ms Elapsed

[3] Merge Sort 10.9658 Vector's Entropy, (Sorted) with size 2000 : 28061 Comparisons, 21931 Model Expected, 13908 Swaps, 1.4024 ms Elapsed

[4] Quick Sort First Pivot 10.9658 Vector's Entropy, (Sorted) with size 2000 : 33643 Comparisons, 21931 Model Expected, 21588 Swaps, 0.3445 ms Elapsed

[5] Quick Sort Random Pivot 10.9658 Vector's Entropy, (Sorted) with size 2000 : 35531 Comparisons, 21931 Model Expected, 24042 Swaps, 0.3688 ms Elapsed

[6] Quick Sort Median Pivot 10.9658 Vector's Entropy, (Sorted) with size 2000 : 31169 Comparisons, 21931 Model Expected, 19250 Swaps, 0.3934 ms Elapsed

[7] Bubble Sort 10.9658 Vector's Entropy, (Sorted) with size 2000 : 2498500 Comparisons, 4000000 Model Expected, 1253927 Swaps, 12.831 ms Elapsed

[8] Counting Sort 10.9658 Vector's Entropy, (Sorted) with size 2000 : 6000 Comparisons, 4000 Model Expected, 6000 Swaps, 0.0838 ms Elapsed

[9] Heap Sort 10.9658 Vector's Entropy, (Sorted) with size 2000 : 61494 Comparisons, 21931 Model Expected, 29247 Swaps, 0.3705 ms Elapsed

[10] Tree Sort 10.9658 Vector's Entropy, (Sorted) with size 2000 : 38530 Comparisons, 21931 Model Expected, 35530 Swaps, 0.3817 ms Elapsed

[11] Shell Sort 10.9658 Vector's Entropy, (Sorted) with size 2000 : 25153 Comparisons, 2000 Model Expected, 51165 Swaps, 0.325 ms Elapsed


Testing with array size 3000:

[1] Selection Sort 11.5507 Vector's Entropy, (Sorted) with size 3000 : 6997000 Comparisons, 9000000 Model Expected, 5997 Swaps, 12.4834 ms Elapsed

[2] Insertion Sort 11.5507 Vector's Entropy, (Sorted) with size 3000 : 3476368 Comparisons, 9000000 Model Expected, 3476368 Swaps, 11.371 ms Elapsed

[3] Merge Sort 11.5507 Vector's Entropy, (Sorted) with size 3000 : 58967 Comparisons, 34652 Model Expected, 29130 Swaps, 2.0521 ms Elapsed

[4] Quick Sort First Pivot 11.5507 Vector's Entropy, (Sorted) with size 3000 : 74060 Comparisons, 34652 Model Expected, 45394 Swaps, 0.4138 ms Elapsed

[5] Quick Sort Random Pivot 11.5507 Vector's Entropy, (Sorted) with size 3000 : 76755 Comparisons, 34652 Model Expected, 48281 Swaps, 0.4032 ms Elapsed

[6] Quick Sort Median Pivot 11.5507 Vector's Entropy, (Sorted) with size 3000 : 65943 Comparisons, 34652 Model Expected, 38321 Swaps, 0.3693 ms Elapsed

[7] Bubble Sort 11.5507 Vector's Entropy, (Sorted) with size 3000 : 6997000 Comparisons, 9000000 Model Expected, 3540496 Swaps, 30.7807 ms Elapsed

[8] Counting Sort 11.5507 Vector's Entropy, (Sorted) with size 3000 : 12000 Comparisons, 6000 Model Expected, 12000 Swaps, 0.1471 ms Elapsed

[9] Heap Sort 11.5507 Vector's Entropy, (Sorted) with size 3000 : 128474 Comparisons, 34652 Model Expected, 61237 Swaps, 0.6138 ms Elapsed

[10] Tree Sort 11.5507 Vector's Entropy, (Sorted) with size 3000 : 82909 Comparisons, 34652 Model Expected, 76909 Swaps, 0.5618 ms Elapsed

[11] Shell Sort 11.5507 Vector's Entropy, (Sorted) with size 3000 : 54315 Comparisons, 3000 Model Expected, 110334 Swaps, 0.5106 ms Elapsed


Testing with array size 5000:

[1] Selection Sort 12.2877 Vector's Entropy, (Sorted) with size 5000 : 19494500 Comparisons, 25000000 Model Expected, 10996 Swaps, 37.8634 ms Elapsed

[2] Insertion Sort 12.2877 Vector's Entropy, (Sorted) with size 5000 : 9662996 Comparisons, 25000000 Model Expected, 9662996 Swaps, 28.8667 ms Elapsed

[3] Merge Sort 12.2877 Vector's Entropy, (Sorted) with size 5000 : 114213 Comparisons, 61438 Model Expected, 56156 Swaps, 1.9264 ms Elapsed

[4] Quick Sort First Pivot 12.2877 Vector's Entropy, (Sorted) with size 5000 : 146473 Comparisons, 61438 Model Expected, 90293 Swaps, 0.6537 ms Elapsed

[5] Quick Sort Random Pivot 12.2877 Vector's Entropy, (Sorted) with size 5000 : 144761 Comparisons, 61438 Model Expected, 87049 Swaps, 0.6132 ms Elapsed

[6] Quick Sort Median Pivot 12.2877 Vector's Entropy, (Sorted) with size 5000 : 126046 Comparisons, 61438 Model Expected, 75476 Swaps, 0.6306 ms Elapsed

[7] Bubble Sort 12.2877 Vector's Entropy, (Sorted) with size 5000 : 19494500 Comparisons, 25000000 Model Expected, 9817352 Swaps, 94.6467 ms Elapsed

[8] Counting Sort 12.2877 Vector's Entropy, (Sorted) with size 5000 : 22000 Comparisons, 10000 Model Expected, 22000 Swaps, 0.3264 ms Elapsed

[9] Heap Sort 12.2877 Vector's Entropy, (Sorted) with size 5000 : 247576 Comparisons, 61438 Model Expected, 118288 Swaps, 1.4723 ms Elapsed

[10] Tree Sort 12.2877 Vector's Entropy, (Sorted) with size 5000 : 153001 Comparisons, 61438 Model Expected, 142001 Swaps, 1.2475 ms Elapsed

[11] Shell Sort 12.2877 Vector's Entropy, (Sorted) with size 5000 : 118259 Comparisons, 5000 Model Expected, 229283 Swaps, 1.5106 ms Elapsed


Testing with array size 7000:

[1] Selection Sort 12.7731 Vector's Entropy, (Sorted) with size 7000 : 43991000 Comparisons, 49000000 Model Expected, 17995 Swaps, 75.4978 ms Elapsed

[2] Insertion Sort 12.7731 Vector's Entropy, (Sorted) with size 7000 : 21940194 Comparisons, 49000000 Model Expected, 21940194 Swaps, 56.2716 ms Elapsed

[3] Merge Sort 12.7731 Vector's Entropy, (Sorted) with size 7000 : 194909 Comparisons, 89411 Model Expected, 95795 Swaps, 2.6752 ms Elapsed

[4] Quick Sort First Pivot 12.7731 Vector's Entropy, (Sorted) with size 7000 : 248813 Comparisons, 89411 Model Expected, 150579 Swaps, 0.9268 ms Elapsed

[5] Quick Sort Random Pivot 12.7731 Vector's Entropy, (Sorted) with size 7000 : 266833 Comparisons, 89411 Model Expected, 162608 Swaps, 1.0061 ms Elapsed

[6] Quick Sort Median Pivot 12.7731 Vector's Entropy, (Sorted) with size 7000 : 213602 Comparisons, 89411 Model Expected, 123702 Swaps, 0.8556 ms Elapsed

[7] Bubble Sort 12.7731 Vector's Entropy, (Sorted) with size 7000 : 43991000 Comparisons, 49000000 Model Expected, 22047586 Swaps, 212.63 ms Elapsed

[8] Counting Sort 12.7731 Vector's Entropy, (Sorted) with size 7000 : 36000 Comparisons, 14000 Model Expected, 36000 Swaps, 0.3378 ms Elapsed

[9] Heap Sort 12.7731 Vector's Entropy, (Sorted) with size 7000 : 421318 Comparisons, 89411 Model Expected, 201659 Swaps, 1.4928 ms Elapsed

[10] Tree Sort 12.7731 Vector's Entropy, (Sorted) with size 7000 : 260076 Comparisons, 89411 Model Expected, 242076 Swaps, 1.4157 ms Elapsed

[11] Shell Sort 12.7731 Vector's Entropy, (Sorted) with size 7000 : 208913 Comparisons, 7000 Model Expected, 396944 Swaps, 1.3606 ms Elapsed


Testing with array size 10000:

[1] Selection Sort 13.2877 Vector's Entropy, (Sorted) with size 10000: 93986000 Comparisons, 100000000 Model Expected, 27994 Swaps, 162.577 ms Elapsed

[2] Insertion Sort 13.2877 Vector's Entropy, (Sorted) with size 10000: 46851665 Comparisons, 100000000 Model Expected, 46851665 Swaps, 123.302 ms Elapsed

[3] Merge Sort 13.2877 Vector's Entropy, (Sorted) with size 10000: 315305 Comparisons, 132877 Model Expected, 155004 Swaps, 6.6436 ms Elapsed

[4] Quick Sort First Pivot 13.2877 Vector's Entropy, (Sorted) with size 10000: 409103 Comparisons, 132877 Model Expected, 247420 Swaps, 2.5085 ms Elapsed

[5] Quick Sort Random Pivot 13.2877 Vector's Entropy, (Sorted) with size 10000: 428631 Comparisons, 132877 Model Expected, 259516 Swaps, 3.6759 ms Elapsed

[6] Quick Sort Median Pivot 13.2877 Vector's Entropy, (Sorted) with size 10000: 345795 Comparisons, 132877 Model Expected, 199714 Swaps, 2.3926 ms Elapsed

[7] Bubble Sort 13.2877 Vector's Entropy, (Sorted) with size 10000: 93986000 Comparisons, 100000000 Model Expected, 47337340 Swaps, 434.888 ms Elapsed

[8] Counting Sort 13.2877 Vector's Entropy, (Sorted) with size 10000: 56000 Comparisons, 20000 Model Expected, 56000 Swaps, 0.8215 ms Elapsed

[9] Heap Sort 13.2877 Vector's Entropy, (Sorted) with size 10000: 679554 Comparisons, 132877 Model Expected, 325777 Swaps, 5.4048 ms Elapsed

[10] Tree Sort 13.2877 Vector's Entropy, (Sorted) with size 10000: 429153 Comparisons, 132877 Model Expected, 401153 Swaps, 3.5798 ms Elapsed

[11] Shell Sort 13.2877 Vector's Entropy, (Sorted) with size 10000: 356816 Comparisons, 10000 Model Expected, 664852 Swaps, 2.5193 ms Elapsed


Testing with array size 13000:

[1] Selection Sort 13.6662 Vector's Entropy, (Sorted) with size 13000: 178479500 Comparisons, 169000000 Model Expected, 40993 Swaps, 260.826 ms Elapsed

[2] Insertion Sort 13.6662 Vector's Entropy, (Sorted) with size 13000: 89092497 Comparisons, 169000000 Model Expected, 89092497 Swaps, 229.033 ms Elapsed

[3] Merge Sort 13.6662 Vector's Entropy, (Sorted) with size 13000: 476799 Comparisons, 177660 Model Expected, 234363 Swaps, 8.2548 ms Elapsed

[4] Quick Sort First Pivot 13.6662 Vector's Entropy, (Sorted) with size 13000: 607747 Comparisons, 177660 Model Expected, 358702 Swaps, 2.8 ms Elapsed

[5] Quick Sort Random Pivot 13.6662 Vector's Entropy, (Sorted) with size 13000: 632611 Comparisons, 177660 Model Expected, 384141 Swaps, 2.0115 ms Elapsed

[6] Quick Sort Median Pivot 13.6662 Vector's Entropy, (Sorted) with size 13000: 522607 Comparisons, 177660 Model Expected, 305775 Swaps, 1.8524 ms Elapsed

[7] Bubble Sort 13.6662 Vector's Entropy, (Sorted) with size 13000: 178479500 Comparisons, 169000000 Model Expected, 89275285 Swaps, 749.23 ms Elapsed

[8] Counting Sort 13.6662 Vector's Entropy, (Sorted) with size 13000: 82000 Comparisons, 26000 Model Expected, 82000 Swaps, 0.9878 ms Elapsed

[9] Heap Sort 13.6662 Vector's Entropy, (Sorted) with size 13000: 1025430 Comparisons, 177660 Model Expected, 492215 Swaps, 4.7444 ms Elapsed

[10] Tree Sort 13.6662 Vector's Entropy, (Sorted) with size 13000: 662327 Comparisons, 177660 Model Expected, 621327 Swaps, 4.631 ms Elapsed

[11] Shell Sort 13.6662 Vector's Entropy, (Sorted) with size 13000: 560101 Comparisons, 13000 Model Expected, 1024143 Swaps, 3.2415 ms Elapsed


Testing with array size 16000:

[1] Selection Sort 13.9658 Vector's Entropy, (Sorted) with size 16000: 306471500 Comparisons, 256000000 Model Expected, 56992 Swaps, 407.038 ms Elapsed

[2] Insertion Sort 13.9658 Vector's Entropy, (Sorted) with size 16000: 152542101 Comparisons, 256000000 Model Expected, 152542101 Swaps, 311.774 ms Elapsed

[3] Merge Sort 13.9658 Vector's Entropy, (Sorted) with size 16000: 680055 Comparisons, 223452 Model Expected, 335328 Swaps, 8.6436 ms Elapsed

[4] Quick Sort First Pivot 13.9658 Vector's Entropy, (Sorted) with size 16000: 867934 Comparisons, 223452 Model Expected, 512259 Swaps, 2.3126 ms Elapsed

[5] Quick Sort Random Pivot 13.9658 Vector's Entropy, (Sorted) with size 16000: 897033 Comparisons, 223452 Model Expected, 532790 Swaps, 2.3688 ms Elapsed

[6] Quick Sort Median Pivot 13.9658 Vector's Entropy, (Sorted) with size 16000: 759558 Comparisons, 223452 Model Expected, 451409 Swaps, 2.3037 ms Elapsed

[7] Bubble Sort 13.9658 Vector's Entropy, (Sorted) with size 16000: 306471500 Comparisons, 256000000 Model Expected, 152742976 Swaps, 1121.98 ms Elapsed

[8] Counting Sort 13.9658 Vector's Entropy, (Sorted) with size 16000: 114000 Comparisons, 32000 Model Expected, 114000 Swaps, 0.5549 ms Elapsed

[9] Heap Sort 13.9658 Vector's Entropy, (Sorted) with size 16000: 1460012 Comparisons, 223452 Model Expected, 701506 Swaps, 4.1227 ms Elapsed

[10] Tree Sort 13.9658 Vector's Entropy, (Sorted) with size 16000: 952907 Comparisons, 223452 Model Expected, 895907 Swaps, 3.4806 ms Elapsed

[11] Shell Sort 13.9658 Vector's Entropy, (Sorted) with size 16000: 869033 Comparisons, 16000 Model Expected, 1525081 Swaps, 3.8984 ms Elapsed


Testing with array size 20000:

[1] Selection Sort 14.2877 Vector's Entropy, (Sorted) with size 20000: 506461500 Comparisons, 400000000 Model Expected, 76991 Swaps, 626.044 ms Elapsed

[2] Insertion Sort 14.2877 Vector's Entropy, (Sorted) with size 20000: 252866289 Comparisons, 400000000 Model Expected, 252866289 Swaps, 494.588 ms Elapsed

[3] Merge Sort 14.2877 Vector's Entropy, (Sorted) with size 20000: 940985 Comparisons, 285754 Model Expected, 463612 Swaps, 8.3298 ms Elapsed

[4] Quick Sort First Pivot 14.2877 Vector's Entropy, (Sorted) with size 20000: 1201408 Comparisons, 285754 Model Expected, 705877 Swaps, 2.8618 ms Elapsed

[5] Quick Sort Random Pivot 14.2877 Vector's Entropy, (Sorted) with size 20000: 1224946 Comparisons, 285754 Model Expected, 727133 Swaps, 3.0693 ms Elapsed

[6] Quick Sort Median Pivot 14.2877 Vector's Entropy, (Sorted) with size 20000: 1043569 Comparisons, 285754 Model Expected, 622726 Swaps, 3.1036 ms Elapsed

[7] Bubble Sort 14.2877 Vector's Entropy, (Sorted) with size 20000: 506461500 Comparisons, 400000000 Model Expected, 253290479 Swaps, 1770.76 ms Elapsed

[8] Counting Sort 14.2877 Vector's Entropy, (Sorted) with size 20000: 154000 Comparisons, 40000 Model Expected, 154000 Swaps, 1.5259 ms Elapsed

[9] Heap Sort 14.2877 Vector's Entropy, (Sorted) with size 20000: 2016426 Comparisons, 285754 Model Expected, 969713 Swaps, 7.5844 ms Elapsed

[10] Tree Sort 14.2877 Vector's Entropy, (Sorted) with size 20000: 1305575 Comparisons, 285754 Model Expected, 1228575 Swaps, 6.7625 ms Elapsed

[11] Shell Sort 14.2877 Vector's Entropy, (Sorted) with size 20000: 1220140 Comparisons, 20000 Model Expected, 2136193 Swaps, 6.9682 ms Elapsed


Testing with array size 24000:

[1] Selection Sort 14.5507 Vector's Entropy, (Sorted) with size 24000: 794449500 Comparisons, 576000000 Model Expected, 100990 Swaps, 919.018 ms Elapsed

[2] Insertion Sort 14.5507 Vector's Entropy, (Sorted) with size 24000: 397483576 Comparisons, 576000000 Model Expected, 397483576 Swaps, 744.271 ms Elapsed

[3] Merge Sort 14.5507 Vector's Entropy, (Sorted) with size 24000: 1260320 Comparisons, 349217 Model Expected, 621097 Swaps, 13.361 ms Elapsed

[4] Quick Sort First Pivot 14.5507 Vector's Entropy, (Sorted) with size 24000: 1599867 Comparisons, 349217 Model Expected, 940461 Swaps, 3.7 ms Elapsed

[5] Quick Sort Random Pivot 14.5507 Vector's Entropy, (Sorted) with size 24000: 1660493 Comparisons, 349217 Model Expected, 969140 Swaps, 5.2565 ms Elapsed

[6] Quick Sort Median Pivot 14.5507 Vector's Entropy, (Sorted) with size 24000: 1381171 Comparisons, 349217 Model Expected, 818787 Swaps, 5.8796 ms Elapsed

[7] Bubble Sort 14.5507 Vector's Entropy, (Sorted) with size 24000: 794449500 Comparisons, 576000000 Model Expected, 397929768 Swaps, 2526.87 ms Elapsed

[8] Counting Sort 14.5507 Vector's Entropy, (Sorted) with size 24000: 202000 Comparisons, 48000 Model Expected, 202000 Swaps, 0.7031 ms Elapsed

[9] Heap Sort 14.5507 Vector's Entropy, (Sorted) with size 24000: 2697640 Comparisons, 349217 Model Expected, 1298320 Swaps, 8.3393 ms Elapsed

[10] Tree Sort 14.5507 Vector's Entropy, (Sorted) with size 24000: 1756363 Comparisons, 349217 Model Expected, 1655363 Swaps, 5.645 ms Elapsed

[11] Shell Sort 14.5507 Vector's Entropy, (Sorted) with size 24000: 1652266 Comparisons, 24000 Model Expected, 2880326 Swaps, 5.8799 ms Elapsed