Preview

Introduction to the Design & Analysis of Algorithms

Satisfactory Essays
Open Document
Open Document
56467 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Introduction to the Design & Analysis of Algorithms
The Design &
Analysis o f A lgorithms
~~ I_ND EDIIIQN ~

I ntroduction t o

*

The Design &
Analysis o f Algorithms
I ND EDITION "

I ntroduction t o
~

~

~

Anany Levitin
Villanova University

B oston San Francisco N ew York
L ondon T oronto S ydney Tokyo Singapore Madrid
M exico City M unich Paris C ape Town H ong K ong M ontreal

Publisher
Acquisitions E ditor
P roject E ditor
P roduction Supervisor
M arketing Manager
P roject Management & Composition
Technical A rt
C opyeditor
C over Design
C over Illustration
S enior P re press Supervisor

Greg Tobin
Matt Goldstein
Katherine Harutunian
Marilyn L loyd
Michelle Brown
Windfall Software, using Z zT£X
George Nichols
Richard Camp
Joyce Cosentino Wells
Jennifer M. K ohnke
Caroline Fell

Access the latest information a bout Addison-Wesley titles from o ur World Wide Web site: http://www.aw-bc.com/cornputing Many o f t he designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, a nd AddisonWesley was aware o f a t rademark claim, the designations have been printed in initial caps o r all caps.
I f y ou purchased this book within the United S tates o r C anada you should b e a ware that

i t has been wrongfully imported without the approval o f t he Publisher o r t he Author.
C opyright© 2007 by P earson E ducation, Inc.
All rights reserved. N o p art o f this publication may b e r eproduced, stored in a retrieval system, o r t ransmitted, in any form o r by any means, electronic, mechanical, photocopying, recording, o r otherwise, without the prior written permission of the publisher. P rinted i n t he U nited States o f America.

ISBN 0-321-36413-9
3 4 5 6 7 8 9 1 0-DOH-09 08 07

B rief C ontents

Preface
1 I ntroduction

2 F undamentals o f t he A nalysis o f A lgorithm E fficiency
3 B rute Force

4 D ivide-and-Conquer
5 D ecrease-and-Conquer
6

You May Also Find These Documents Helpful

  • Powerful Essays

    This paper discusses the proposal package for Riordan, which handles each step of electric fans from inception to production. The paper also includes the material requirement-planning phase of fans being manufactured at the China Plant. An analysis of the existing production process of the Riordan electric fans provides the basic outline for designing the new process to remove bottlenecks. In addition, the production…

    • 1778 Words
    • 8 Pages
    Powerful Essays
  • Satisfactory Essays

    Annotated Bibliography

    • 1543 Words
    • 7 Pages

    labels exist on all kinds of products, and there is the potential for companies and producers to…

    • 1543 Words
    • 7 Pages
    Satisfactory Essays
  • Satisfactory Essays

    chapter 13

    • 28504 Words
    • 270 Pages

    Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system,…

    • 28504 Words
    • 270 Pages
    Satisfactory Essays
  • Powerful Essays

    Undp Women

    • 26120 Words
    • 105 Pages

    All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by…

    • 26120 Words
    • 105 Pages
    Powerful Essays
  • Powerful Essays

    All terms mentioned in this text that are known to be trademarks or service marks…

    • 15730 Words
    • 75 Pages
    Powerful Essays
  • Best Essays

    Use CTRL + F to search the titles you looking for , if the title you searching is not in the list, do not worry, send us an email at solvedanswers@gmail.com and we shall try to provide you requested data.…

    • 19238 Words
    • 77 Pages
    Best Essays
  • Better Essays

    Ba 301 Revised.

    • 12963 Words
    • 52 Pages

    © September 2005 All rights reserved. No part of this work may be reproduced or utilized in any form or by any means, electronic or…

    • 12963 Words
    • 52 Pages
    Better Essays
  • Satisfactory Essays

    Due first class back in August/ September: Draft of Introduction and Design of Psychology Experiment.…

    • 570 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    companies. Where appropriate they are based on, or reference is made to, national and international standards and…

    • 11494 Words
    • 46 Pages
    Good Essays
  • Powerful Essays

    You may not copy, forward, or transfer this publication or any part of it, whether in…

    • 4869 Words
    • 20 Pages
    Powerful Essays
  • Powerful Essays

    Sociology Essay

    • 20432 Words
    • 82 Pages

    rights are granted without permission in writing from the publisher or under licence from the…

    • 20432 Words
    • 82 Pages
    Powerful Essays
  • Good Essays

    Due: February 4, 2008. 1. In the bin packing problem, the input consists of a sequence of items I = {1, . . . , n} where each item i has a size, which is a real number 0 ≤ ai ≤ 1. The goal is to “pack” the items in the smallest possible number of bins of unit size. Formally, the items should be partitioned in disjoint subsets (bins), such that the total size in each bin is at most 1. The first fit heuristic scans the items one by one, and each item is assigned to the first bin that it can fit in. Prove that first-fit is a 2-approximation algorithm for bin packing. Hint. Bound from below the number of bins used by an optimal solution; and bound from above the number of bins used by first fit, using the observation that nearly all bins are at least half-full. 2. Suppose now that you want to pack as much as possible in a single bin. Formally, the input consists of a set of items I = {1, . . . , n}, where each item i has a size 0 < ai ≤ 1. A solution is a set of items S ⊂ I such that i∈S ai ≤ 1 (i.e., the size of the bag is 1). The value of a solution S is the total size of the items in the solution, i.e., i∈S ai . (a) Describe an optimal solution to the problem. What is the time complexity of your algorithm? (b) Give a polynomial-time algorithm with approximation ratio 2 (i.e., it guarantees that you fill at least half of the optimal value). What is the time complexity of your algorithm? Warning. The simplest solution doesn’t work! 3. Consider the following algorithm for the m-machine load-balancing problem (S is the set of jobs): Repeat: (a) Let A be the sum of weights of all jobs in S (b) Find a subset S1 ⊆ S whose sum of weights is close to A/m (c) S ← S \ S1 ; m ← m − 1 until m = 0. Suppose that the subset sum step above is implemented using an approximation algorithm, which guarantees that its result is within a factor of 1 − ǫ from the optimal subset sum, for some 0 < ǫ < 1. What can you say…

    • 777 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Licensing Notes

    • 565 Words
    • 3 Pages

    * A word symbol, or advice used by a person, generally a manufacturer or merchant, to identify and distinguish its good from those manufactured and sold by others…

    • 565 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    E-Commerce Usability

    • 21175 Words
    • 85 Pages

    E-commerce Usability Essential readings from Taylor & Francis: Designing Usable Electronic Text Andrew Dillon, University of Texas, USA ISBN 0–7484–0112–1 (hb) ISBN 0–7484–0113–X (pb) Inclusive Design Guidelines for Human–Computer Interaction Edited by Colette Nicolle, HUSAT, UK and Julio Abascal, University of the Basque Country, Spain ISBN 0–7484–0948–3 (hb) User Interface Design for Electronic Appliances Edited by Konrad Baumann, Philips Consumer Communications, Vienna, Austria and Bruce Thomas, Philips Design, Vienna, Austria ISBN 0–415–24335–1 (hb)…

    • 21175 Words
    • 85 Pages
    Powerful Essays
  • Powerful Essays

    * Names, words, terms, or expressions used to designated or distinguish, or suggestive of quality of any class of goods, articles, merchandise, or service…

    • 4739 Words
    • 19 Pages
    Powerful Essays

Related Topics