Academic Publishing Wiki
Line 1: Line 1:
== Check Sort ==
== Check Sort ==
==== Regression Analysis ====
'''Console output - ''(constraints)'''''
RESULTS: (Check sort)
1.) Total number of items sorted:...................... 1542936
2.) Total primary array size to accomodate the sort:... 10000000
3.) Total secondary array size to accomodate the sort:. 1542936
4.) Total length of key:............................... 8 decimal digits.
5.) Total time for setup per 100,000 items:............ 1.109 seconds.
6.) Total time for sort per 100,000 items:............. 0.078 seconds.
7.) Total time for program:............................ 59.14 seconds.
Press any key to continue
==== Class Determination ====
[[Image:Checksort 14599 image001.png|400px|right]]
'''''Class''''' notated sort routines are categorized according to the [ Chi Square] analysis of linear ('''L'''), parabolic {'''P'''), logarithmic ('''Ln''') and exponential ('''E''') [ best fit] [[Wikipedia:Regression analysis|regression analysis]] applied to their performance data produced under a specified set of constraints. '''''Class''''' notation is used instead of [[Wikipedia:Big O notation|Big O notation]] since the advantage '''''Class''''' notation offers is to provide the values of the equation parameters obtained from [[Wikipedia:Regression analysis|regression analysis]] of the performance data such as in the case of a [[Wikipedia:Linear equation|linear equation]] best [ Chi Square] fit of the value for slope (or seconds per item) in the case of a '''Class L''' (''linear equation'') category [ best fit]. This additional information allows the programmer or user to select the best sort routine for his own application based upon the actual number of items which must be sorted per unit time or the time limit to sort a specific number of items. Since the Check sort performance [ best fits] the '''Class L''' category the values for slope '''''m''''' and constant '''''c''''' for the [[Wikipedia:Linear equation|linear equation]] <big> '''''f(x)= m*x+c''''' </big> can be determined by a [ best fit] [[Wikipedia:Linear regression|linear regression]] analysis and provided in the table below:
{| class="wikitable" style="tesxt-align:left"
|+ '''Class L'''
! Routine !! Slope !! c
! Setup
| 0.011481868 || 0
! Sort
| 0.000677576 || 0
This method of representation allows performance to be projected for any number of items or time limit. An accurate projection of sort routine performance for any [[Wikipedia:Programming language|programming language]] or [[Wikipedia:Computer|machine]] can be made using the time required to initialize an array by calculating the ratio of sort time to setup time (which in this case is <math>{0.000677576 \choose 0.011481868}</math> or 0.0597 ) or a percentage value of 5.97%. Thus on a different [[Wikipedia:Computer|machine]] providing a setup time slope value of 0.025 the projected sort time would be .025 * 0.0597 or 0.00147531 seconds per item or the ability to sort 67,782,364 items per second.

Revision as of 06:37, 15 June 2006

Check Sort