Data Structures and Algorithms - Assignment I Problem | CMPSC 465, Assignments of Computer Science

Material Type: Assignment; Class: Data Structures and Algorithms; Subject: Computer Science; University: Penn State - Main Campus; Term: Spring 2008;

Typology: Assignments

Pre 2010

Uploaded on 09/24/2009

koofers-user-wed
koofers-user-wed 🇺🇸

9 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CMPSC 465, Spring 2008, Homework 1
Due: Friday,January 23, in class or by 10 am next day in 346H IST (slide under the door).
Problem 1.
Foreach 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 1248
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: TA(n)has order of growth n,the ratio TA(n)
nis between 1
1000 and 1
1000.
In some of the other cases, this ratio will not be exactly constant, more like“between 53 and 55”.
Remaining problems: problems 3, 5 and 7 from page 60 of the textbook.
Other notes. In class, we covered asymptotic notation, chapter 2.2 and we will continue with chapters 2.3 and
2.4 next week.

Partial preview of the text

Download Data Structures and Algorithms - Assignment I Problem | CMPSC 465 and more Assignments Computer Science in PDF only on Docsity!

CMPSC 465, Spring 2008, Homework 1

Due: Friday, January 23, in class or by 10 am next day in 346H IST (slide under the door).

Problem 1.

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”.

Remaining problems: problems 3, 5 and 7 from page 60 of the textbook.

Other notes. In class, we covered asymptotic notation, chapter 2.2 and we will continue with chapters 2.3 and 2.4 next week.