home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
MATH
/
NONLIN31.ZIP
/
AVLTIME.NLR
< prev
next >
Wrap
Text File
|
1994-01-24
|
1KB
|
66 lines
Title "Time to create AVL tree vs. number of entries";
Variable Entries; // Number of tree entries
Variable Time; // Number of seconds to build tree
Parameter a; // Constant term
Parameter b; // Growth coefficient
Function Time = a + b*Entries*log2(Entries);
Plot xlabel="Number of entries in tree",ylabel="Tree creation time (seconds)";
rplot xlabel="Number of entries in tree";
nplot;
Data;
100 .060
200 .110
300 .110
400 .110
500 .220
600 .210
700 .280
800 .270
900 .390
1000 .380
1100 .440
1200 .440
1300 .440
1400 .550
1500 .600
1600 .600
1700 .720
1800 .710
1900 .770
2000 .760
2100 .820
2200 .940
2300 .930
2400 .930
2500 1.050
2600 1.050
2700 1.150
2800 1.210
2900 1.160
3000 1.260
3100 1.260
3200 1.320
3300 1.370
3400 1.430
3500 1.430
3600 1.480
3700 1.590
3800 1.590
3900 1.650
4000 1.700
4100 1.760
4200 1.810
4300 1.810
4400 1.810
4500 1.930
4600 1.920
4700 1.980
4800 2.080
4900 2.080
5000 2.150
5100 2.190
5200 2.260
5300 2.310
5400 2.300
5500 2.480