mid_sol - CS300 Algorithms 2008 Fall semester Mid-term...

This preview shows pages 1–3. Sign up to view the full content.

CS300 Algorithms 2008 Fall semester Mid-term Solution 1 1.1 Since our algebraic decision tree T is linear, (i.e. f ( x 1 ,x 2 , ··· ,x n ) for all nodes i is linear), L r node of T divides the space into two convex spaces (ex. f > 0, f 0). Let S j be the selected space from j th L r node which you pass through until the leaf node l i . Then, D i = S 1 S 2 ∩ ··· ∩ S d , where d is the depth of T . Since each S j is convex and the intersection of a ﬁnite number of convex sets is also convex, D i is also convex. 1.2 We show that if Y ( w i ), 1 i p , are distinct then || W || > || L || : We know that if an algorithm A represented by a linear decision tree solves a problem D then for all i , w i D j 6 = for some 1 j d . Therefore, by the pigeonhole principal, it holds. 1.3 Suppose that Y ( w i ), 1 i p , are not distinct. Then, Y ( w i ) = Y ( w j ) = h , for 1 i < j p , 1 h d . By deﬁnition, Y ( w i ) = h w i D h 6 = . Y ( w j ) = h w j D h 6 = . Take two points q 1 ,q 2 D h such that q 1 w i D h and q 2 w j D h . Since D h is convex, the line segment joining q 1 and q 2 must be contained in D h . However, w i w j = since w i are disjoint connected components. Therefore, the line segment joining q 1 and q 2 exits w i and enters w j again, which means that ﬁrst it gives an answer ”yes”, then ”no”, and ”yes” again. But since the segment is contained in a domain D h , it is supposed to give only one answer. A contradiction! 1.4 Because || L || ≥ || W || from 1.2 and 1.3, the time complexity for solving π of the input size n is T ( n ) c log 2 || L || ≥ c log 2 || W || . Therefore, T ( n ) = Ω(log 2 || W || ). 1

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

View Full Document
2 2.1 Since N elements are all distinct, the space of input is divided by N ! subsets. Each subset represents a disjoint connected component of W which eventually leads to ”halt and yes, all the elements are unique”. Therefore, the number of disjoint connected components of W is N !. i.e., | W | = N !. 2.2 A lower bound is determined by | W | , i.e., c log 2 | W | = c log 2 N ! Ω( N log N ) . This bound is tight (i.e. Θ( N log N )) because there is an algorithm to solve EUP in O ( N log N ); we ﬁrst sort N elements in O ( N log N ) and then compare whether consecutive elements are equal in O ( N ). 2.3 First, we transform the input of EUP , I EUP = { x 1 ,x 2 , ··· ,x N } , into the one of 2 CPP , I 2 CPP = { ( x 1 , 0) , ( x 2 , 0) , ··· , ( x N , 0) } , in O ( N ). Then compute the solution for 2 CPP . If the solution of 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/04/2010 for the course COMPUTER S cs300 taught by Professor Unkown during the Spring '08 term at Korea Advanced Institute of Science and Technology.

Page1 / 8

mid_sol - CS300 Algorithms 2008 Fall semester Mid-term...

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

View Full Document
Ask a homework question - tutors are online