cse310-sum10-a03

cse310-sum10-a03 - CSE 310: Algorithms and Data Structures...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 310: Algorithms and Data Structures Assignment 3: Timing Analysis ( Due Date: June 28, 2010) Question 1: Show that for any real constants a and b, where b>0, (n+a) b = Ѳ(n b ). Question 2: Prove that f(n) = Ѳ( g(n) ) iff g(n) = Ѳ( f(n) ) Question 3: Prove that max( f(n), g(n) ) = Ѳ( f(n) + g(n) ) Question 4: Show that log (n!) = Ѳ (n log n) Question 5: A palindrome is a sequence of characters or numbers that looks the same forwards and backwards. For example, "Madam, I'm Adam" is a palindrome (ignore the while spaces) because it is spelled the same reading it from front to back as from back to front. The number 12321 is a numerical palindrome. Define a recursive function to determine whether a string is a palindrome. What is the recurrence relation for the timing complexity of your palindrome algorithm? What is the timing complexity of your solution? Question 6: Consider a tree data structure constructed using the nodes defined as: typedef struct _tree_t_ { int data; struct _tree_t_ *left; struct _tree_t_ *right; } tree_t;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
a. Write a recursive routine to traverse the tree and print out the data so that the data in the
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/03/2010 for the course CS CSE310 taught by Professor Aviralshrivastava during the Summer '10 term at ASU.

Page1 / 2

cse310-sum10-a03 - CSE 310: Algorithms and Data Structures...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online