16 January 2017 07:19:11 PM HIGH_CARD_SIMULATION_PRB C version. Test the HIGH_CARD_SIMULATION library. TEST01 Estimate the chances of picking the high card by skipping a given number of initial cards, using a deck of 100 cards and simulating 100 trials. Skip Deck Size Chance of Winning 1 100 0.03 11 100 0.26 21 100 0.4 31 100 0.36 41 100 0.33 51 100 0.32 61 100 0.33 71 100 0.29 81 100 0.17 91 100 0.09 TEST02 Compute the changes of picking the high card after skipping 0 through 99 cards, using a deck with 100 cards and taking 1000 trials. Created graphics data file 'test02_data.txt' Created graphics command file 'test02_commands.txt' TEST03 HIGH_CARD_PROBABILITY computes the exact probability of winning a high card game with a deck of 100 cards assuming we skip the first K cards and select the next card that is bigger. K Prob(K) 0 0.0100 1 0.0518 2 0.0835 3 0.1103 4 0.1338 5 0.1547 6 0.1736 7 0.1909 8 0.2068 9 0.2214 10 0.2348 11 0.2473 12 0.2589 13 0.2696 14 0.2796 15 0.2889 16 0.2975 17 0.3054 18 0.3128 19 0.3196 20 0.3259 21 0.3317 22 0.3370 23 0.3419 24 0.3463 25 0.3504 26 0.3540 27 0.3572 28 0.3601 29 0.3626 30 0.3647 31 0.3665 32 0.3680 33 0.3692 34 0.3701 35 0.3707 36 0.3710 37 0.3710 38 0.3708 39 0.3703 40 0.3695 41 0.3685 42 0.3673 43 0.3658 44 0.3640 45 0.3621 46 0.3599 47 0.3575 48 0.3549 49 0.3521 50 0.3491 51 0.3459 52 0.3425 53 0.3388 54 0.3351 55 0.3311 56 0.3269 57 0.3226 58 0.3181 59 0.3134 60 0.3085 61 0.3035 62 0.2983 63 0.2929 64 0.2874 65 0.2818 66 0.2759 67 0.2700 68 0.2639 69 0.2576 70 0.2512 71 0.2446 72 0.2379 73 0.2311 74 0.2241 75 0.2170 76 0.2098 77 0.2024 78 0.1949 79 0.1873 80 0.1795 81 0.1716 82 0.1636 83 0.1555 84 0.1473 85 0.1389 86 0.1304 87 0.1218 88 0.1131 89 0.1043 90 0.0953 91 0.0863 92 0.0771 93 0.0678 94 0.0585 95 0.0490 96 0.0394 97 0.0297 98 0.0199 99 0.0100 Created graphics data file 'test03_data.txt' Created graphics command file 'test03_commands.txt' HIGH_CARD_SIMULATION_PRB Normal end of execution. 16 January 2017 07:19:11 PM