float why;We would like to get an answer within 5% of the actual running time of the loop. How many times must you time the loop with the same value of N to be within 5% of the actual value with 95% confidence? What happens when you vary N?
int k, N;
read N
start time
for (k = 0; k < N; k++)
why = sin(k);
end time
Name | Tree | Distribution | Algorithm | |
Al-Shetwey | a-b tree | Zipfian | move-to-front | array |
Barducci | AVL tree | Lotka's | move-to-front | array |
Chen | BB[alpha] | 80% - 20% | move-to-front | array |
Chen | binary search tree | Zipfian | transpose | array |
Cianflone | Hash table | Lotka's | transpose | array |
De Jaco | persistent tree | 80% - 20% | transpose | array |
Dundon | red-black tree | Zipfian | move-to-front | linked-list |
Floyd | random search tree | Lotka's | move-to-front | linked-list |
Gao | skip lists | 80% - 20% | move-to-front | linked-list |
Grab | a-b tree | Zipfian | transpose | linked-list |
Hironaka | AVL tree | Lotka's | transpose | linked-list |
Huss | BB[alpha] | 80% - 20% | transpose | linked-list |
Lee | binary search tree | Zipfian | move-to-front | array |
Leung | Hash table | Lotka's | move-to-front | array |
Lu | persistent tree | 80% - 20% | move-to-front | array |
Ly | red-black tree | Zipfian | transpose | array |
Marcus | random search tree | Lotka's | transpose | array |
Orourke | skip lists | 80% - 20% | transpose | array |
Peker | a-b tree | Zipfian | move-to-front | linked-list |
Pham | AVL tree | Lotka's | move-to-front | linked-list |
Phillips | BB[alpha] | 80% - 20% | move-to-front | linked-list |
Saunders | binary search tree | Zipfian | transpose | linked-list |
Schmit | Hash table | Lotka's | transpose | linked-list |
Scully | persistent tree | 80% - 20% | transpose | linked-list |
Singer | red-black tree | Zipfian | move-to-front | array |
Spydell | random search tree | Lotka's | move-to-front | array |
Sun | skip lists | 80% - 20% | move-to-front | array |
Warlop | a-b tree | Zipfian | transpose | array |
Warrington | AVL tree | Lotka's | transpose | array |
Williams | BB[alpha] | 80% - 20% | transpose | array |
Wong | binary search tree | Zipfian | move-to-front | linked-list |
Worra | Hash table | Lotka's | move-to-front | linked-list |
Xiao | persistent tree | 80% - 20% | move-to-front | linked-list |
Yu | red-black tree | Zipfian | transpose | linked-list |
Yu | random search tree | Lotka's | transpose | linked-list |
Zhang | skip lists | 80% - 20% | transpose | linked-list |