

Quicksort 145 7.1 Description of quicksort 145 7.2 Performance of quicksort 149 7.3 A randomized version of quicksort 7.4 Analysis of quicksort 155 Sorting in Linear Time 165 8.1 Lower bounds for sorting 8.2 Counting sort 168 8.3 Radix sort 170 8.4 Bucket sort 174 Heapsort 127 6.1 Heaps 127 6.2 Maintaining the heap property 6.3 Building a heap 132 6.4 The heapsort algorithm 135 6.5 Priority queues 138 II Sorting and Order Statistics Introduction 6

Recurrences 62 4.1 The substitution method 63 4.2 The recursion-tree method 67 4.3 The master method 73 4.4 Proof of the master theorem 76 Probabilistic Analysis and Randomized Algorithms 91 5.1 The hiring problem 91 5.2 Indicator random variables 94 5.3 Randomized algorithms 99 5.4 Probabilistic analysis and further uses of indicator random variables 106

Growth of Functions 41 3.1 Asymptotic notation 41 3.2 Standard notations and common functions Getting Started 15 2.1 Insertion sort 15 2.2 Analyzing algorithms 21 2.3 Designing algorithms 27 The Role of Algorithms in Computing 5 1.1 Algorithms 5 1.2 Algorithms as a technology 10 Includes bibliographical references and index. Library of Congress Cataloging-in-Publication Data Introduction to algorithms / Thomas H. This book was printed and bound in the United States of America. No part of this book may be reproduced in any form or by any electronic or mechanical means (including photocopying, recording, or information storage and retrieval) without permission in writing from the publisher. Third printing, 2002 c 2001 by The Massachusetts Institute of Technology First edition 1990 All rights reserved. Outside North America All orders should be addressed to The MIT Press or its local distributor. All other orders should be addressed to The MIT Press. Ordering Information: North America Text orders should be addressed to the McGraw-Hill Book Company. It was edited and produced by The MIT Press under a joint production-distribution agreement with the McGraw-Hill Book Company. This book is one of a series of texts written by faculty of the Electrical Engineering and Computer Science Department at the Massachusetts Institute of Technology. McGraw-Hill Book Company Boston Burr Ridge, IL New York San Francisco Introduction to Algorithms Second Edition
