Number Cruncher (Contest 8) Results
Hi everybody,

    The results of PHP Programming Contest 8 (Number Cruncher) are finally being announced after a long wait. The contest was held in the month of April-May 2004. Last date for the submission of entries was Sunday 2nd May 2004 at 23.59 (GMT). Sadly, the number of participants was too low, only three. They are :

1) Forum username: cristofv
   Name: Taylor Johnson
2) Forum username: er2er
   Full name: Robert Rychcicki
3) Forum username: quadra23
   Name: Daniel Pronych

    A total of 5 problems were prepared for testing each script, starting from simplest to harder. Each probelm was trialed three times (to take an average of each solution) on each script and various datas were collected during/after the test run.

The 5 problems and their model answers are :
1) 1,2,3,4,5,10,1
Answer Equation => 1*(2-3)+4*5/10

2) 12.22,44.56,13,789.99,56.1,999.99,12.90,455.89,466.67,233.45,733691.1
Answer Equation=> (12.22*44.56)/13+(789.99-56.1)*999.99+12.90/455.89/466.67-233.45

3) 444.56,90,347.53,678.23,789.00,243,789.36,27.8,0.00,12.90,342.76,893.45,343.4,232.43,77.01,277.03,763.92,283.07,889,677.8,582196.58
Answer Equation=> 444.56-90*(347.53/678)/23+789.00/243-(789.36/27.8)*0.00-(12.90-12.90)/342.76+893.45-343.4*(232.43*77.01)/277.03+763.92-283.07+889*677.8

4) 787.48,74.68,476,99.01,899.03,02.01,21.23,345.56,677.78,345.56,768.78,78.78,23.34,78.34,334.04,237.18,937.34,946.33,478.90,476.7,389,849.9,935.4,354.7,947.3,286.3,28.49,253.01,555.92,45.36,937.00,363.01,759.2,38,04.57,0.00,2.83,899.09,699.02,528.29,52,18.28,999,827.09,927.66,666.66,555.55,699.99,82.89,65.95,241235129067.09
Answer Equation=> (787.48*(74.68/476)*99.01+899.03-02.01)/21.23*(345.56+(677.78*345.56)/768.78)*78.78*23.34+78.34/(334.04-237.18)*937.34+946.33/478.90*(476.7-389+849.9+935.4)/354.7+947.3*286.3+28.49/253.01+555.92*45.36+(937.00/363.01)*759.2+38-04.57+(0.00*2.83)/899.09*699.02-528.29/52+18.28*999-827.09+927.66*666.66*(555.55*699.99-82.89/65.95)

5) 82.89,65.95,83.85,12.78,344.5,65.16
Answer Equation=> (82.89*65.95)/83.85-12.78/344.5

     The output produced by the script of each participant are as follows :


     1. Forum username: cristofv

Problem no. operators used time taken(sec) solution deviation % * repetation > 2 ***all digits used equation
1) 5 0.136 0% 0 y ((((((1) - 2) + 3) / 4) / 5) * 10) = 1
1) 5 0.37 0% 0 y ((((((1) * 2) - 3) * 4) - 5) + 10) = 1
1) 5 0.681 0% 0 y ((((((1) + 2) -3) - 4) - 5) + 10) = 1
2) 9 54.805 0.94% 0 y ((((((((((12.22) / 44.56) * 13) / 789.99) + 56.1) * 999.99) * 12.90) / 455.89) * 466.67) - 233.45) = 740563.17
2) 9 54.732 0.003% 0 y ((((((((((12.22) / 44.56) / 13) + 789.99) - 56.1) * 999.99) - 12.90) - 455.89) + 466.67) - 233.45) = 733667.09
2) 9 54.785 0.18% 0 y ((((((((((12.22) * 44.56) + 13) + 789.99) * 56.1) / 999.99) / 12.90) * 455.89) + 466.67) * 233.45) = 732610.46
3) 19 54.798 0.5% 0 y ((((((((((((((((((((444.56) * 90) - 347.53) + 678.23) - 789.00) / 243) + 789.36) + 27.8) + 0.00) * 12.90) / 342.76) + 893.45) - 343.4) + 232.43) - 77.01) / 277.03) * 763.92) * 283.07) - 889) + 677.8) = 579320.84
3) 19 54.903 0.9% 0 y ((((((((((((((((((((444.56) + 90) * 347.53) / 678.23) + 789.00) / 243) / 789.36) / 27.8) + 0.00) - 12.90) * 342.76) * 893.45) - 343.4) / 232.43) - 77.01) / 277.03) / 763.92) * 283.07) + 889) * 677.8) = 587212.03
3) 19 54.459 0.36% 0 y ((((((((((((((((((((444.56) * 90)/347.53) / 678.23) * 789.00) / 243) * 789.36) - 27.8) + 0.00) + 12.90) + 342.76) * 893.45) + 343.4) - 232.43) + 77.01)-277.03) * 763.92) + 283.07) / 889) - 677.8) = 584274.52
4) 49 54.663 0.83% 0 y ((((((((((((((((((((((((((((((((((((((((((((((((((787.48) * 74.68) + 476) - 99.01) + 899.03) * 02.01) + 21.23) / 345.56) / 677.78) + 345.56) - 768.78) - 78.78) + 23.34) / 78.34) + 334.04) / 237.18) / 937.34) / 946.33) * 478.90) + 476.7) / 389) * 849.9) + 935.4) * 354.7) * 947.3) + 286.3) - 28.49) + 253.01) * 555.92) * 45.36) - 937.00) * 363.01) / 759.2) * 38) / 04.57) + 0.00) / 2.83) + 899.09) / 699.02) - 528.29) * 52) / 18.28) * 999) / 827.09) * 927.66) + 666.66) / 555.55) + 699.99) * 82.89) / 65.95) = 243230078964.46
4) 49 54.33 3.95% 0 y ((((((((((((((((((((((((((((((((((((((((((((((((((787.48) + 74.68) / 476) - 99.01) * 899.03) + 02.01) / 21.23) + 345.56) / 677.78) - 345.56) + 768.78) * 78.78) / 23.34) - 78.34) + 334.04) * 237.18) - 937.34) / 946.33) * 478.90) * 476.7) * 389) / 849.9) - 935.4) * 354.7) * 947.3) - 286.3) / 28.49) * 253.01) - 555.92) - 45.36) + 937.00) * 363.01) - 759.2) + 38) * 04.57) + 0.00) + 2.83) / 899.09) / 699.02) * 528.29) + 52) / 18.28) - 999) - 827.09) * 927.66) + 666.66) / 555.55) - 699.99) - 82.89) / 65.95) = 250770859842.04
4) 49 54.431 0.66% 0 y ((((((((((((((((((((((((((((((((((((((((((((((((((787.48) / 74.68) - 476) + 99.01) - 899.03) - 02.01) / 21.23) + 345.56) + 677.78) + 345.56) - 768.78) * 78.78) * 23.34) + 78.34) * 334.04) - 237.18) / 937.34) - 946.33) - 478.90) * 476.7) * 389) + 849.9) - 935.4) / 354.7) * 947.3) * 286.3) * 28.49) + 253.01) + 555.92) * 45.36) - 937.00) / 363.01) / 759.2) * 38) / 04.57) + 0.00) + 2.83) - 899.09) - 699.02) / 528.29) * 52) + 18.28) * 999) / 827.09) + 927.66) / 666.66) * 555.55) + 699.99) * 82.89) / 65.95) = 242818927960.21
5) 4 54.395 17.69% 0 y (((((82.89) * 65.95) - 83.85) / 12.78) - 344.5) = 76.69
5) 4 54.687 17.69% 0 y (((((82.89) * 65.95) - 83.85) / 12.78) - 344.5) = 76.69
5) 4 54.274 17.69% 0 y (((((82.89) * 65.95) - 83.85) / 12.78) - 344.5) = 76.69




     2. Forum username: er2er

Problem no. operators used time taken(sec) solution deviation % * repetation > 2 ***all digits used equation
1) 8 51.934 0% 0 y ((((((((1.00 + 1.00) + 2.00) + 2.00) + 3.00) + 3.00) + 4.00) - 5.00) - 10.00) = 1.00
1) 8 51.303 0% 0 y ((((((((1.00 + 1.00) + 2.00) + 2.00) + 3.00) + 3.00) + 4.00) - 5.00) - 10.00) = 1.00
1) 8 51.819 0% 0 y ((((((((1.00 + 1.00) + 2.00) + 2.00) + 3.00) + 3.00) + 4.00) - 5.00) - 10.00) = 1.00
2) - - - - - Error - input out of range (58219658)!
2) - - - - - Error - input out of range (58219658)!
2) - - - - - Error - input out of range (58219658)!
3) - - - - - Error - input out of range (58219658)!
3) - - - - - Error - input out of range (58219658)!
3) - - - - - Error - input out of range (58219658)!
4) - - - - - Error - input out of range (-1318394923)!
4) - - - - - Error - input out of range (-1318394923)!
4) - - - - - Error - input out of range (-1318394923)!
5) 8 51.975 0.03% 0 y ((12.78 + 12.78) * (((((65.95 + 65.95) + 82.89) + 82.89) / 83.85) - (344.50 / 344.50))) = 65.18
5) 8 51.268 0.03% 0 y ((12.78 + 12.78) * (((((65.95 + 65.95) + 82.89) + 82.89) / 83.85) - (344.50 / 344.50))) = 65.18
5) 8 51.423 0.03% 0 y ((12.78 + 12.78) * (((((65.95 + 65.95) + 82.89) + 82.89) / 83.85) - (344.50 / 344.50))) = 65.18




     3. Forum username: quadra23

Problem no. operators used time taken(sec) solution deviation % * repetation > 2 ***all digits used equation
1) 8 0.238 0% 0 y 1 + 2 + 3 + 4 + 5 + 10 - 2 * 3 * 4 = 1
1) 8 0.205 0% 0 y 1 + 2 + 3 + 4 + 5 + 10 - 2 * 3 * 4 = 1
1) 8 0.191 0% 0 y 1 + 2 + 3 + 4 + 5 + 10 - 2 * 3 * 4 = 1
2) - 61.234 - - - The operation could not be completed due to overrunning the time limit. It appears that the calculation took exponentially more time than the script was allowed to run for while calculating the correct answer.
2) - 61.896 - - - The operation could not be completed due to overrunning the time limit. It appears that the calculation took exponentially more time than the script was allowed to run for while calculating the correct answer.
2) - 61.399 - - - The operation could not be completed due to overrunning the time limit. It appears that the calculation took exponentially more time than the script was allowed to run for while calculating the correct answer.
3) - 61.402 - - - The operation could not be completed due to overrunning the time limit. It appears that the calculation took exponentially more time than the script was allowed to run for while calculating the correct answer.
3) - 61.162 - - - The operation could not be completed due to overrunning the time limit. It appears that the calculation took exponentially more time than the script was allowed to run for while calculating the correct answer.
3) - 61.986 - - - The operation could not be completed due to overrunning the time limit. It appears that the calculation took exponentially more time than the script was allowed to run for while calculating the correct answer.
4) - 61.475 - - - The operation could not be completed due to overrunning the time limit. It appears that the calculation took exponentially more time than the script was allowed to run for while calculating the correct answer.
4) - 61.125 - - - The operation could not be completed due to overrunning the time limit. It appears that the calculation took exponentially more time than the script was allowed to run for while calculating the correct answer.
4) - 61.953 - - - The operation could not be completed due to overrunning the time limit. It appears that the calculation took exponentially more time than the script was allowed to run for while calculating the correct answer.
5) 8 10.008 0% 0 y 82.89 - 65.95 / 83.85 + 12.78 + 344.5 - 82.89 + 65.95 - 12.78 - 344.5 = 65.16
5) 8 9.794 0% 0 y 82.89 - 65.95 / 83.85 + 12.78 + 344.5 - 82.89 + 65.95 - 12.78 - 344.5 = 65.16
5) 8 10.008 0% 0 y 82.89 - 65.95 / 83.85 + 12.78 + 344.5 - 82.89 + 65.95 - 12.78 - 344.5 = 65.16

*(repetation > 2) -> How many times more than 3 repetition of a digit is there in derived answer?
***all no. used (y/n) -> Whether all the given numbers are used or not to reach the result?


Results: er2er's script gives error for problem number: 2, 3 and 4, and quadra23's script is exceeding the time limit and giving error for problem number: 2, 3 and 4. cristofv's script is able to produce output with some deviation in results. The winner is cristofv.


© Copyright 2003-2014 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.