This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 473 Homework 0 (due January 27, 2009) Spring 2009 CS 473: Undergraduate Algorithms, Spring 2009 Homework 0 Due in class at 11:00am, Tuesday, January 27, 2009 This homework tests your familiarity with prerequisite materialbigOh notation, elementary algorithms and data structures, recurrences, graphs, and most importantly, inductionto help you identify gaps in your background knowledge. You are responsible for filling those gaps. The early chapters of any algorithms textbook should be sufficient review, but you may also want consult your favorite discrete mathematics and data structures textbooks. If you need help, please ask in office hours and / or on the course newsgroup. Each student must submit individual solutions for this homework. For all future homeworks, groups of up to three students may submit a single, common solution. Please carefully read the course policies linked from the course web site. If you have any questions, please ask during lecture or office hours, or post your question to the course newsgroup. In particular: Submit five separately stapled solutions, one for each numbered problem, with your name and NetID clearly printed on each page. Please do not staple everything together. You may use any source at your disposalpaper, electronic, or humanbut you must write your solutions in your own words, and you must cite every source that you use. Unless explicitly stated otherwise, every homework problem requires a proof. Answering I dont know to any homework or exam problem (except for extra credit problems) is worth 25% partial credit. Algorithms or proofs containing phrases like and so on or repeat this process for all n , instead of an explicit loop, recursion, or induction, will receive 0 points. Write the sentence I understand the course policies." at the top of your solution to problem 1. 1. Professor George OJungle has a 27node binary tree, in which every node is labeled with a unique letter of the Roman alphabet or the character & . Preorder and postorder traversals of the tree visit the nodes in the following order: Preorder: I Q J H L E M V O T S B R G Y Z K C A & F P N U D W X Postorder: H E M L J V Q S G Y R Z B T C P U D N F W & X A K O I (a) List the nodes in Georges tree in the order visited by an inorder traversal. (b) Draw Georges tree. 1 CS 473 Homework 0 (due January 27, 2009) Spring 2009 2. (a) [ 5 pts ] Solve the following recurrences. State tight asymptotic bounds for each function in the form ( f ( n )) for some recognizable function f ( n ) . Assume reasonable but nontrivial base cases. If your solution requires a particular base case, say so. Do not submit proofs just a list of five functionsbut you should do them anyway, just for practice....
View
Full
Document
This note was uploaded on 01/22/2012 for the course CS 573 taught by Professor Chekuri,c during the Fall '08 term at University of Illinois, Urbana Champaign.
 Fall '08
 Chekuri,C
 Algorithms

Click to edit the document details