ebook img

Algorithms Sequential & Parallel: A Unified Approach (Electrical and Computer Engineering Series) PDF

401 Pages·2005·1.95 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Algorithms Sequential & Parallel: A Unified Approach (Electrical and Computer Engineering Series)

Algorithms Sequential and Parallel LIMITED WARRANTYAND DISCLAIMER OF LIABILITY CHARLES RIVER MEDIA, INC. (“CRM”) AND/OR ANYONE WHO HAS BEEN IN- VOLVED IN THE WRITING, CREATION OR PRODUCTION OF THE ACCOMPANY- ING CODE IN THE TEXTUAL MATERIAL IN THE BOOK, CANNOT AND DO NOT WARRANTTHE PERFORMANCE OR RESULTS THATMAYBE OBTAINED BYUSING THE CONTENTS OF THE BOOK. THE AUTHOR AND PUBLISHER HAVE USED THEIR BEST EFFORTS TO ENSURE THE ACCURACY AND FUNCTIONALITY OF THE TEXTUALMATERIALAND PROGRAMS DESCRIBED HEREIN. WE HOWEVER, MAKE NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, REGARDING THE PERFORMANCE OF THESE PROGRAMS OR CONTENTS. THE BOOK IS SOLD “AS IS” WITHOUTWARRANTY(EXCEPTFOR DEFECTIVE MATERIALS USED IN MAN- UFACTURING THE BOOK OR DUE TO FAULTYWORKMANSHIP). THE AUTHOR, THE PUBLISHER, AND ANYONE INVOLVED IN THE PRODUCTION AND MANUFACTURING OF THIS WORK SHALLNOTBE LIABLE FOR DAMAGES OF ANY KIND ARISING OUT OF THE USE OF (OR THE INABILITY TO USE) THE PROGRAMS, SOURCE CODE, OR TEXTUALMATERIALCONTAINED IN THIS PUB- LICATION. THIS INCLUDES, BUT IS NOT LIMITED TO, LOSS OF REVENUE OR PROFIT, OR OTHER INCIDENTALOR CONSEQUENTIALDAMAGES ARISING OUT OF THE USE OF THE PRODUCT. THE SOLE REMEDYIN THE EVENTOF ACLAIM OF ANYKIND IS EXPRESSLYLIM- ITED TO REPLACEMENTOF THE BOOK, AND ONLYATTHE DISCRETION OF CRM. THE USE OF “IMPLIED WARRANTY” AND CERTAIN “EXCLUSIONS” VARIES FROM STATE TO STATE, AND MAYNOTAPPLYTO THE PURCHASER OF THIS PRODUCT. Algorithms Sequential and Parallel A Unified Approach Second Edition Russ Miller Laurence Boxer CHARLES RIVER MEDIA, INC. Hingham, Massachusetts Copyright 2005 by CHARLES RIVER MEDIA, INC. All rights reserved. The first edition of this book was previously published by: Pearson Education, Inc. No part of this publication may be reproduced in any way, stored in a retrieval system of any type, or transmitted by any means or media, electronic or mechanical, including, but not limited to, photocopy, recording, or scanning, without prior permission in writing from the publisher. Editor: David Pallai Cover Design: Tyler Creative CHARLES RIVER MEDIA, INC. 10 Downer Avenue Hingham, Massachusetts 02043 781-740-0400 781-740-8816 (FAX) [email protected] www.charlesriver.com This book is printed on acid-free paper. Russ Miller and Laurence Boxer. Algorithms Sequential and Parallel: A Unified Approach,Second Edition. ISBN: 1-58450-412-9 eISBN: 1-58450-652-0 All brand names and product names mentioned in this book are trademarks or service marks of their re- spective companies. Any omission or misuse (of any kind) of service marks or trademarks should not be regarded as intent to infringe on the property of others. The publisher recognizes and respects all marks used by companies, manufacturers, and developers as a means to distinguish their products. Library of Congress Cataloging-in-Publication Data Miller, Russ. Algorithms sequential and parallel : a unified approach / Russ Miller and Laurence Boxer.-- 2nd ed. p. cm. Includes bibliographical references and index. ISBN 1-58450-412-9 (hardcover : alk. paper) 1. Computer algorithms. 2. Computer programming. I. Boxer, Laurence. II. Title. QA76.9.A43M55 2005 005.1--dc22 2005010052 05 7 6 5 4 3 2 1 CHARLES RIVER MEDIA titles are available for site license or bulk purchase by institutions, user groups, corporations, etc. For additional information, please contact the Special Sales Department at 781-740-0400. To my wife, Celeste, and my children, Brian, Amanda, and Melissa. —Russ Miller To my wife, Linda; my daughter and son-in-law, Robin and Mark Waldman; and my son, Matthew. —Laurence Boxer This page intentionally left blank Contents Preface xv 1 Asymptotic Analysis 2 Notation and Terminology 4 Asymptotic Notation 6 More Notation 9 Asymptotic Relationships 11 Asymptotic Analysis and Limits 12 Summations and Integrals 14 Rules for Analysis of Algorithms 21 Limitations of Asymptotic Analysis 27 Common Terminology 29 Summary 29 Chapter Notes 30 Exercises 30 2 Induction and Recursion 34 Mathematical Induction 36 Induction Examples 37 Recursion 40 Binary Search 43 Merging and Mergesort 47 Summary 54 Chapter Notes 54 Exercises 54 vii viii Contents 3 The MasterMethod 58 Master Theorem 61 Proof of the Master Theorem (optional) 61 The General Case 66 Summary 73 Chapter Notes 73 Exercises 73 4 Combinational Circuits 74 Combinational Circuits and Sorting Networks 76 Sorting Networks 76 Bitonic Merge 80 BitonicSort 84 Summary 87 Chapter Notes 88 Exercises 88 5 Models of Computation 90 RAM (Random Access Machine) 92 PRAM (Parallel Random Access Machine) 94 Examples: Simple Algorithms 98 Fundamental Terminology 106 Distributed Memory versus Shared Memory 107 Distributed Address Space versus Shared Address Space 108 Interconnection Networks 108 Processor Organizations 109 Linear Array 110 Ring 118 Mesh 119 Tree 123 Pyramid 125 Mesh-of-trees 127 Hypercube 131 Contents ix Coarse-Grained Parallel Computers 136 Additional Terminology 139 Summary 142 Chapter Notes 142 Exercises 143 6 Matrix Operations 146 Matrix Multiplication 148 Gaussian Elimination 153 Roundoff Error 160 Summary 161 Chapter Notes 161 Exercises 161 7 Parallel Prefix 164 Parallel Prefix 166 Parallel Algorithms 167 Parallel Prefix on the PRAM 167 Mesh 171 Hypercube 174 Analysis 176 Coarse-Grained Multicomputer 176 Application: Maximum Sum Subsequence 176 RAM 176 PRAM 177 Mesh 179 Array Packing 179 RAM 180 PRAM 181 Network Models 181 Interval (Segment) Broadcasting 182 Solution Strategy 182 Analysis 183

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.