This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Sabancı University Faculty of Engineering and Natural Sciences CS301 – Algorithms Homework 4 Due: November 17, 2009 (17:40 - Recitation @ FASS 1103) PLEASE NOTE : • Provide only the requested information and nothing more. Unreadable, unintelligible and irrelevant answers will not be considered. • You can collaborate with your friends and discuss the solutions of the problems. However you have to write down the solutions on your own. • Plagiarism will not be tolerated. • You don’t have to typeset your answers but feel free to do so if you want to. • Please hand in the hard copies of your answer sheets to TAs at the beginning of the recitation hour on November 17, 2009. Question 1) Let B [1 ..n ] be an array of n distinct numbers. If i < j and B [ i ] > B [ j ] then the pair ( i,j ) is called an inconsistent pair of B. Explain how to use augmented RBT mentioned in the lecture notes and its rank function to count the number of inconsistent pairs in an array of size n . Comment on the complexity of the proposed algorithm.....
View Full Document
This note was uploaded on 05/11/2010 for the course COMPUTER S 301 taught by Professor . during the Spring '10 term at Kadir Has Üniversitesi.
- Spring '10