{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MIT6_851S10_assn01_sol

# MIT6_851S10_assn01_sol - 6.851 Advanced Data...

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

6.851 Advanced Data Structures (Spring’10) Prof. Erik Demaine Dr. Andr´ e Schulz TA: Aleksandar Zlateski Problem 1 Sample Solutions Transposing a matrix. Consider a point set { ( x i , i ) } of k 2 points on a k 2 × k 2 lattice representing the access sequence. For each point ( x i , i ) we introduce three new points at ( x i 1 , i ), k x i , i k and k x k i , i . The newly formed set is Aborally Satisfied , hence it represents a valid BST execution. The set contains O ( k 2 ), giving amortized cost of O (1) per access. Logarithmic redux. Consider the access sequence, the point set X = { ( x i , i ) } of m points on a n × m lattice. Let ˆ x be the median of all x X . Inserting m points x, i ) will ensure that each rectangle connecting a point left of or at ˆ x and a point right of or at ˆ x contains a point. Now consider the two subsets of X , X x x ˆ and X x x ˆ , each with at most

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}