
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Data Structures and Algorithms; Subject: Computer Science; University: Penn State - Main Campus; Term: Spring 2008;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Due: Friday, January 23, in class or by 10 am next day in 346H IST (slide under the door).
For each program find a plausible nice function that it describes of growth of the running time. The table pro- vides the running time in miliseconds for several input sizes:
input size 1000 2000 4000 8000
program
Program A 1 2 4 8 Program B 15 20 25 30 Program C 10 40 160 650 Program D 15 80 400 1300 Program E 55 290 1550 8200
Example: T (^) A ( n ) has order of growth n , the ratio
T (^) A ( n ) n
is between
and
In some of the other cases, this ratio will not be exactly constant, more like “between 53 and 55”.
Other notes. In class, we covered asymptotic notation, chapter 2.2 and we will continue with chapters 2.3 and 2.4 next week.