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: Design and Analysis of Algorithms CSE 101 Final Examination August 3, 2007 Time: 2 hours and 45 minutes Maximum Points: 40 NAME: Student ID: Answer the following questions: 1. 8 points Describe an efficient algorithm to find a directed path that has the maximum number of edges among all directed paths in a given directed acyclic graph G . Present the main ideas, write the pseudo code. Determine the time complexity of your algorithm. 2. 10 points We are given a sequence of integers, say (5 , 3 , 6 , 3 , 7 , 3 , 11 , 4 , 9 , 5). We are asked to find its longest bitonic subsequence . A sequence b 1 , . . . , b k is bitonic if there is an 1 i k such that the sequence is strictly increasing up to b i and then it is strictly decreasing, that is, b 1 < b 2 < b i and b i > b i +1 > b k . If i = 1, the sequence degen erates into a strictly decreasing sequence. If i = k , the sequence is a strictly increasing one. In other words, strictly increasing or decreasing sequences are also bitonic.sequences are also bitonic....
View
Full
Document
This note was uploaded on 03/16/2010 for the course CSE 101 taught by Professor Staff during the Winter '08 term at UCSD.
 Winter '08
 staff
 Algorithms

Click to edit the document details