Algorithm Basics, Fundamental Data Structures - Midterm Exam | CSC 3102, Exams of Computer Science

Material Type: Exam; Professor: Karki; Class: ADV DATA STRUCTURES; Subject: Computer Science; University: Louisiana State University; Term: Fall 2008;

Typology: Exams

Pre 2010

Uploaded on 08/31/2009

koofers-user-qyu
koofers-user-qyu 🇺🇸

10 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
B.B. Karki, LSU
0.1
CSC 3102
CSC 3102: Mid-Semester Exam
(30 points)
October 16, 2008, Thursday
1:40 PM to 3:00 PM
213 Tureaud Hall
pf3
pf4
pf5

Partial preview of the text

Download Algorithm Basics, Fundamental Data Structures - Midterm Exam | CSC 3102 and more Exams Computer Science in PDF only on Docsity!

CSC 3102: Mid-Semester Exam

(30 points)

October 16, 2008, Thursday

1:40 PM to 3:00 PM

213 Tureaud Hall

Algorithm Basics

(Chapters: 1 and 2)

! Notion of algorithm: Section 1. ! Fundamentals of algorithmic problem solving: Section 1. ! Important problem types: Section 1. ! Analysis of algorithmic efficiency: Sections 2.1 and 2. ! Non-recursive algorithms: Section 2. ! Recursive algorithms: Section 2.

Sample Questions: Type 1 Answer “True” or “False” to the following statements: ! The quadratic basic efficiency class has greater order of growth than the factorial efficiency class. ! Big O is used to represent an upper bound on order of growth of a given function. ! Stack operates in the LIFO fashion. ! The basic operation in computing n! is the addition. ! The worst-case efficiency of an AVL tree is !(n). ! The algorithm’s overall efficiency is determined by the part with a smaller order of growth. ! All leaves of a B-Tree do not need to be at the same level.

Sample Questions: Type 2 ! Compare the orders of growth of nlogn and n3/2. Show your work. ! Construct a 2-3 tree for the list 9, 5, 8, 3, 2, 4 and 7 by successive insertions. ! Solve the following recurrence relation: x(n) = 3x(n-1) for n > 1, x(1) = 4. ! Calculate the minimum and maximum total number of keys you can store in a 2- tree of height equal to 3. Show your work. ! Consider the following algorithm. ALGORITHM Q(n) //Input: A nonnegative integer n if n = 1 return 1 else return Q(n – 1) + 2 * n - 1 a. Set up a recurrence relation for this function’s values and solve it to determine what this algorithm computes b. Set up a recurrence relation for the number of multiplications made by this algorithm and solve it. c. Set up a recurrence relation for the number of additions/subtractions made by this algorithm and solve it.