Algorithims in C / Edition 1

Hardcover (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 96%)
Other sellers (Hardcover)
  • All (25) from $1.99   
  • New (2) from $70.00   
  • Used (23) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$70.00
Seller since 2014

Feedback rating:

(164)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$115.00
Seller since 2014

Feedback rating:

(164)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by

Overview

This new version of the best-selling book, Algorithms, SecondEdition, provides a comprehensive collection of algorithmsimplemented in C. A variety of algorithms are described in eachofthe following areas: sorting, searching, string-processing,geometric, graph, and mathematical algorithms. These algorithmsare expressed in terms of concise implementations in C, so thatreaders can both appreciate their fundamental properties and testthem on real applications.

The treatment of analysis of algorithms is carefully developed. When appropriate, analytic results are discussed to illustratewhy certain algorithms are preferred, and in some cases, therelationship of the practical algorithms being disussed to purelytheoretical results is also described.

Features

  • Hundreds of detailed, innovative figures clearly demonstratehow important algorithms work.
  • Throughout the book, "properties" sections encapsulatespecific information on the performance characteristics ofalgorithms.
  • Six chapters present fundamental concepts, including a briefintroduction to data structures.

Algorithms in C provides readers with the tools to confidentlyimplement, run, and debug useful algorithms. This book may beuseful for self-study, or as a reference for people engaged inthe development of computer systems for applications programs.

Sedgewick's bestselling book, Algorithms, is now available for C programmers. Algorithms in C describes a variety of algorithms in a number of areas of interest, including: sorting, searching, string-processing, and geometric, graph and mathematical algorithms. The book emphasizes fundamental techniques, providing readers with the tools to confidently implement, run, and debug useful algorithms.

Read More Show Less

Editorial Reviews

Booknews
All of the original algorithms written in Pascal in Algorithms are implemented in the C language. Describes a variety of algorithms in each of a number of areas: sorting, searching, string-processing, geometric, graph and mathematics. Annotation c. Book News, Inc., Portland, OR (booknews.com)
Read More Show Less

Product Details

  • ISBN-13: 9780201514254
  • Publisher: Addison-Wesley
  • Publication date: 6/15/1990
  • Series: Addison-Wesley Series in Computer Science
  • Edition description: Illustrate
  • Edition number: 1
  • Pages: 672
  • Product dimensions: 6.30 (w) x 9.50 (h) x 1.20 (d)

Meet the Author

Robert Sedgewick is the William O. Baker Professor of Computer Science at Princeton University. He is a Director of Adobe Systems and has served on the research staffs at Xerox PARC, IDA, and INRIA. He earned his Ph.D from Stanford University under Donald E. Knuth.

Read More Show Less

Read an Excerpt

This book is intended to survey the most important computeralgorithms in use today and to teach fundamental techniques tothe growing number of people in need of knowing them. It can beused as a textbook for a second, third, for fourth course incomputer science, after students have acquired some programmingskills and familiarity with computer systems, but before theyhave taken specialized courses in advanced areas of computerscience or computer applications. Additionally, the book may beuseful for self-study or as a reference for those engaged in thedevelopment of computer systems or applications programs, sinceit contains a number of implementations of useful algorithms anddetailed information on their performance characteristics. Thebroad perspective taken in the book makes it an appropriateintroduction to the field.

SCOPE

The book contains 45 chapters grouped into 8 major parts: fundamentals, sorting, searching, string processing, geometricalgorithms, graph algorithms, mathematical algorithms andadvanced topics. A major goal in developing this book has beento bring together the fundamental methods from these diverseareas, in order to provide access to the best methods known forsolving problems by computer. Some of the chapters giveintroductory treatments of advanced material. It is hoped thatthe descriptions here can give readers some understanding of thebasic properties of fundamental algorithms ranging from priorityqueues and hashing to simplex and the fast Fourier transform.

One or two previous courses in computer science or equivalentprogramming experience are recommended for a reader to be able toappreciate the material in this book: one course in programmingin a high-level language such as C or Pascal, and perhaps anothercourse which teaches fundamental concepts of programming systems. This book is thus intended for anyone conversant with a modernprogramming language and with the basic features of moderncomputer systems. References that might help fill in gaps inone's background are suggested in the text.

Most of the mathematical material supporting the analytic resultsis self contained (or labeled as "beyond the scope" of thisbook), so little specific preparation in mathematics is requiredfor the bulk of the book, though a certain amount ofmathematical maturity is definitely helpful. A number of thelater chapters deal with algorithms related to more advancedmathematical material—these are intended to place the algorithmsin context with other methods throughout the book, not to teachthe mathematical material. Thus the discussion of advancedmathematical concepts is brief, general, and descriptive.

USE IN THE CURRICULUM

There is a great deal of flexibility in how the material here canbe taught. To a large extent, the individual chapters in thebook can be read independently of the others, though in somecases, algorithms in one chapter make use of methods from aprevious chapter. The material can be adapted for use forvarious courses by selecting perhaps 25 or 30 of the 45 chapters,according to the taste of the instructor and the preparation ofthe students.

The book begins with an introductory section on data structuresand the design and analysis of algorithms. This sets the tonefor the rest of the book and provides a framework within whichmore advanced algorithms are treated. Some readers may skip orskim this section; others may learn the basics there.

An elementary course on "data structures and algorithms" mightomit some ofthe mathematical algorithms and some of the advancedtopics, then emphasize how various data structures are used inthe implementations. An intermediate course on "design andanalysis of algorithms" might omit some of the more practicallyoriented sections, then emphasize the identification and study ofthe ways in which algorithms achieve good asymptotic performance. A course on "software tools" might omit the mathematical andalgorithmic material, then emphasize how to integrate theimplementations given here into large programs or systems. Acourse on "algorithms" might take a survey approach and introduceconcepts from all these areas.

Some instructors may wish to add supplementary material to thecourses described above to reflect their particular orientation. For "data structures and algorithms", extra material on basicdata structures could be taught; for "design and analysis ofalgorithms," more mathematical analysis could be added; and for"software tools," software engineering techniques could becovered in more depth. In this book, attention is paid to allthese areas, but the emphasis is on the algorithms themselves.

Earlier versions of this book have been used in recent years atscores of colleges and universities around the country as a textfor the second or third course in computer science and assupplemental reading for other courses. At Princeton, ourexperience has been that the breadth of coverage of material inthis book provides our majors with an introduction to computerscience that can later be expanded upon in later courses onanalysis of algorithms, systems programming and theoreticalcomputer science, while at the same time providing all thestudents with a large set of techniques that they can immediatelyput to good use.

There are 450 exercises, ten following each chapter, thatgenerally divide into two types. Most are intended to teststudents' understanding of material in the text, and ask studentsto work through an example or apply concepts described in thetext. A few of them, however, involve implementing and puttingtogether some of the algorithms, perhaps running empiricalstudies to compare algorithms and to learn their properties.

ALGORITHMS OF PRACTICAL USE

The orientation of the book is toward algorithms likely to be ofpractical use. The emphasis is on teaching students the tools oftheir trade to the point that they can confidently implement, runand debug useful algorithms. Full implementations of the methodsdiscussed are included in the text, along with descriptions ofthe operations of these programs on a consistent set of examples. Indeed, as discussed in the epilog, hundreds of figures areincluded in the book that have been created by the algorithmsthemselves. Many algorithms are brought to light on an intuitivelevel throughout the visual dimension provided by these figures.

Characteristics of the algorithms and situations in which theymight be useful are discussed in detail. Though not emphasized,connections to the analysis of algorithms and theoreticalcomputer science are not ignored. When appropriate, empiricaland analytic results are discussed to illustrate why certainalgorithms are preferred. When interesting, the relationship ofthe practical algorithms being discussed to purely theoreticalresults is described. Specific information on performancecharacteristics of algorithms is encapsulated throughout the"properties," important facts about the algorithms that deservefurther study.

While there is little direct treatment of specific uses of thealgorithms in science and engineering applications, the potentialfor such use is mentioned when appropriate. Our experience hasbeen that when students learn good algorithms in a computerscience context early in their education, they are able to applythem to solve problems when warranted later on.

PROGRAMMING LANGUAGE

The programming language used throughout the book is C (a Pascalversion of the book is also available). Any particular languagehas advantages and disadvantages; we use C because it is widelyavailable and provides the features needed for ourimplementations. The programs can easily be translated to othermodern programming languages, since relatively few C constructsare used. Indeed, many of the programs have been translated fromPascal and other languages, though we try to use standard Cidioms when appropriate.

Some of the programs can be simplified by using more advancedlanguage features, but this is true less often than one mightthink. Although language features are discussed whenappropriate, this book is not intended to be a reference work onC programming. When forced to make a choice, we concentrate onthe algorithms, not implementation details.

A goal of this book is to present the algorithms in as simple anddirect a form as possible. The programs are intended to be readnot by themselves, but as part of the surrounding text. Thisstyle was chosen as an alternative, for example, to having inlinecomments. the style is consistent whenever possible, so thatprograms that are similar look similar.

ACKNOWLEDGEMENTS

Many people gave me helpful feedback on earlier versions of thisbook. In particular, students at Princeton and Brown sufferedthrough preliminary versions of the material in this book in the1980's. Special thanks are due to Trina Avery, Tom Freeman, andJanet Incerpi for their help in producing the fist edition. Iwould particularly like to thank Janet for converting the bookinto TeX format, adding the thousands of changes I made after the"last draft" of the first edition, guiding the files throughvarious systems to produce printed pages and even writing thescan-conversion routine for TeX used to produce draftmanuscripts, among many other things. Only after performing manyof these tasks myself for later versions do I truly appreciateJanet's contribution. I would also like to thank the manyreaders who provided me with detailed comments about the secondedition, including Guy Almes, Jay Gischer, Kennedy Lemke, UdiManber, Dana Richards, John Reif, M. Rosenfeld, Stephen Seidman,and Michael Quinn.

Many of the designs in the figures are based on joint work withMarc Brown in the "electronic classroom" project at BrownUniversity in 1983. Marc's support and assistance in creatingthe designs (not to mention the system with which we worked) aregratefully acknowledged. I also would like to acknowledgeSarantos Kapidakis' help in producing the endpapers.

This C version owes its existence tot he persistent questions ofseveral readers about C code for ALGORITHMS and to the support ofKeith Wollman at Addison-Wesley, who convinced me to proceed. Dave Hanson's willingness to answer questions about ANSI C wasinvaluable. I also would like to thank Darcy Cotten and SkipPlank for their help in producing the book, and Steve Beck forfinding the "last bug" in the printing software.

Much of what I've written here I've learned from the teaching andwritings of Don Knuth, my advisor at Stanford. Though Don had nodirect influence on this work, his presence may be felt in thebook, for it was he who put the study of algorithms on ascientific footing that makes a work such as this possible.

I am very thankful for the support of Brown University and INRIAwhere I did most of the work on the book, and the Institute forDefense Analyses and the Xerox Palo Alto Research Center, where Idid some work on the book while visiting. Many parts of book aredependent on research that has been generously supported by theNational Science Foundation and the Office of Naval Research. Finally, I would like to thank Bill Bowen, Aaron Lemonick, andNeil Rudenstine at Princeton University for their support inbuilding an academic environment in which I was able to preparethis book, despite numerous other responsibilities.

Read More Show Less

Table of Contents

Ch. 1 Introduction 3
Ch. 2 Principles of Algorithm Analysis 27
Ch. 3 Elementary Data Structures 69
Ch. 4 Abstract Data Types 127
Ch. 5 Recursion and Trees 187
Ch. 6 Elementary Sorting Methods 253
Ch. 7 Quicksort 303
Ch. 8 Mergesort 335
Ch. 9 Priority Queues and Heapsort 361
Ch. 10 Radix Sorting 403
Ch. 11 Special-Purpose Sorts 439
Ch. 12 Symbol Tables and BSTs 477
Ch. 13 Balanced Trees 529
Ch. 14 Hashing 573
Ch. 15 Radix Search 609
Ch. 16 External Searching 655
Index 693
Read More Show Less

Preface

This book is intended to survey the most important computeralgorithms in use today and to teach fundamental techniques tothe growing number of people in need of knowing them. It can beused as a textbook for a second, third, for fourth course incomputer science, after students have acquired some programmingskills and familiarity with computer systems, but before theyhave taken specialized courses in advanced areas of computerscience or computer applications. Additionally, the book may beuseful for self-study or as a reference for those engaged in thedevelopment of computer systems or applications programs, sinceit contains a number of implementations of useful algorithms anddetailed information on their performance characteristics. Thebroad perspective taken in the book makes it an appropriateintroduction to the field.

SCOPE

The book contains 45 chapters grouped into 8 major parts: fundamentals, sorting, searching, string processing, geometricalgorithms, graph algorithms, mathematical algorithms andadvanced topics. A major goal in developing this book has beento bring together the fundamental methods from these diverseareas, in order to provide access to the best methods known forsolving problems by computer. Some of the chapters giveintroductory treatments of advanced material. It is hoped thatthe descriptions here can give readers some understanding of thebasic properties of fundamental algorithms ranging from priorityqueues and hashing to simplex and the fast Fourier transform.

One or two previous courses in computer science or equivalentprogramming experience are recommended for a reader to be able toappreciate the material in thisbook: one course in programmingin a high-level language such as C or Pascal, and perhaps anothercourse which teaches fundamental concepts of programming systems. This book is thus intended for anyone conversant with a modernprogramming language and with the basic features of moderncomputer systems. References that might help fill in gaps inone's background are suggested in the text.

Most of the mathematical material supporting the analytic resultsis self contained (or labeled as "beyond the scope" of thisbook), so little specific preparation in mathematics is requiredfor the bulk of the book, though a certain amount ofmathematical maturity is definitely helpful. A number of thelater chapters deal with algorithms related to more advancedmathematical material—these are intended to place the algorithmsin context with other methods throughout the book, not to teachthe mathematical material. Thus the discussion of advancedmathematical concepts is brief, general, and descriptive.

USE IN THE CURRICULUM

There is a great deal of flexibility in how the material here canbe taught. To a large extent, the individual chapters in thebook can be read independently of the others, though in somecases, algorithms in one chapter make use of methods from aprevious chapter. The material can be adapted for use forvarious courses by selecting perhaps 25 or 30 of the 45 chapters,according to the taste of the instructor and the preparation ofthe students.

The book begins with an introductory section on data structuresand the design and analysis of algorithms. This sets the tonefor the rest of the book and provides a framework within whichmore advanced algorithms are treated. Some readers may skip orskim this section; others may learn the basics there.

An elementary course on "data structures and algorithms" mightomit some ofthe mathematical algorithms and some of the advancedtopics, then emphasize how various data structures are used inthe implementations. An intermediate course on "design andanalysis of algorithms" might omit some of the more practicallyoriented sections, then emphasize the identification and study ofthe ways in which algorithms achieve good asymptotic performance. A course on "software tools" might omit the mathematical andalgorithmic material, then emphasize how to integrate theimplementations given here into large programs or systems. Acourse on "algorithms" might take a survey approach and introduceconcepts from all these areas.

Some instructors may wish to add supplementary material to thecourses described above to reflect their particular orientation. For "data structures and algorithms", extra material on basicdata structures could be taught; for "design and analysis ofalgorithms," more mathematical analysis could be added; and for"software tools," software engineering techniques could becovered in more depth. In this book, attention is paid to allthese areas, but the emphasis is on the algorithms themselves.

Earlier versions of this book have been used in recent years atscores of colleges and universities around the country as a textfor the second or third course in computer science and assupplemental reading for other courses. At Princeton, ourexperience has been that the breadth of coverage of material inthis book provides our majors with an introduction to computerscience that can later be expanded upon in later courses onanalysis of algorithms, systems programming and theoreticalcomputer science, while at the same time providing all thestudents with a large set of techniques that they can immediatelyput to good use.

There are 450 exercises, ten following each chapter, thatgenerally divide into two types. Most are intended to teststudents' understanding of material in the text, and ask studentsto work through an example or apply concepts described in thetext. A few of them, however, involve implementing and puttingtogether some of the algorithms, perhaps running empiricalstudies to compare algorithms and to learn their properties.

ALGORITHMS OF PRACTICAL USE

The orientation of the book is toward algorithms likely to be ofpractical use. The emphasis is on teaching students the tools oftheir trade to the point that they can confidently implement, runand debug useful algorithms. Full implementations of the methodsdiscussed are included in the text, along with descriptions ofthe operations of these programs on a consistent set of examples. Indeed, as discussed in the epilog, hundreds of figures areincluded in the book that have been created by the algorithmsthemselves. Many algorithms are brought to light on an intuitivelevel throughout the visual dimension provided by these figures.

Characteristics of the algorithms and situations in which theymight be useful are discussed in detail. Though not emphasized,connections to the analysis of algorithms and theoreticalcomputer science are not ignored. When appropriate, empiricaland analytic results are discussed to illustrate why certainalgorithms are preferred. When interesting, the relationship ofthe practical algorithms being discussed to purely theoreticalresults is described. Specific information on performancecharacteristics of algorithms is encapsulated throughout the"properties," important facts about the algorithms that deservefurther study.

While there is little direct treatment of specific uses of thealgorithms in science and engineering applications, the potentialfor such use is mentioned when appropriate. Our experience hasbeen that when students learn good algorithms in a computerscience context early in their education, they are able to applythem to solve problems when warranted later on.

PROGRAMMING LANGUAGE

The programming language used throughout the book is C (a Pascalversion of the book is also available). Any particular languagehas advantages and disadvantages; we use C because it is widelyavailable and provides the features needed for ourimplementations. The programs can easily be translated to othermodern programming languages, since relatively few C constructsare used. Indeed, many of the programs have been translated fromPascal and other languages, though we try to use standard Cidioms when appropriate.

Some of the programs can be simplified by using more advancedlanguage features, but this is true less often than one mightthink. Although language features are discussed whenappropriate, this book is not intended to be a reference work onC programming. When forced to make a choice, we concentrate onthe algorithms, not implementation details.

A goal of this book is to present the algorithms in as simple anddirect a form as possible. The programs are intended to be readnot by themselves, but as part of the surrounding text. Thisstyle was chosen as an alternative, for example, to having inlinecomments. the style is consistent whenever possible, so thatprograms that are similar look similar.

ACKNOWLEDGEMENTS

Many people gave me helpful feedback on earlier versions of thisbook. In particular, students at Princeton and Brown sufferedthrough preliminary versions of the material in this book in the1980's. Special thanks are due to Trina Avery, Tom Freeman, andJanet Incerpi for their help in producing the fist edition. Iwould particularly like to thank Janet for converting the bookinto TeX format, adding the thousands of changes I made after the"last draft" of the first edition, guiding the files throughvarious systems to produce printed pages and even writing thescan-conversion routine for TeX used to produce draftmanuscripts, among many other things. Only after performing manyof these tasks myself for later versions do I truly appreciateJanet's contribution. I would also like to thank the manyreaders who provided me with detailed comments about the secondedition, including Guy Almes, Jay Gischer, Kennedy Lemke, UdiManber, Dana Richards, John Reif, M. Rosenfeld, Stephen Seidman,and Michael Quinn.

Many of the designs in the figures are based on joint work withMarc Brown in the "electronic classroom" project at BrownUniversity in 1983. Marc's support and assistance in creatingthe designs (not to mention the system with which we worked) aregratefully acknowledged. I also would like to acknowledgeSarantos Kapidakis' help in producing the endpapers.

This C version owes its existence tot he persistent questions ofseveral readers about C code for ALGORITHMS and to the support ofKeith Wollman at Addison-Wesley, who convinced me to proceed. Dave Hanson's willingness to answer questions about ANSI C wasinvaluable. I also would like to thank Darcy Cotten and SkipPlank for their help in producing the book, and Steve Beck forfinding the "last bug" in the printing software.

Much of what I've written here I've learned from the teaching andwritings of Don Knuth, my advisor at Stanford. Though Don had nodirect influence on this work, his presence may be felt in thebook, for it was he who put the study of algorithms on ascientific footing that makes a work such as this possible.

I am very thankful for the support of Brown University and INRIAwhere I did most of the work on the book, and the Institute forDefense Analyses and the Xerox Palo Alto Research Center, where Idid some work on the book while visiting. Many parts of book aredependent on research that has been generously supported by theNational Science Foundation and the Office of Naval Research. Finally, I would like to thank Bill Bowen, Aaron Lemonick, andNeil Rudenstine at Princeton University for their support inbuilding an academic environment in which I was able to preparethis book, despite numerous other responsibilities.



Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)