Synopses & Reviews
Many programmers would love to use Perl for projects that involve heavy lifting, but miss the many traditional algorithms that textbooks teach for other languages. Computer scientists have identified many techniques that a wide range of programs need, such as:
- Fuzzy pattern matching for text (identify misspellings!)
- Finding correlations in data
- Game-playing algorithms
- Predicting phenomena such as Web traffic
- Polynomial and spline fitting
Using algorithms explained in this book, you too can carry out traditional programming tasks in a high-powered, efficient, easy-to-maintain manner with Perl.This book assumes a basic understanding of Perl syntax and functions, but not necessarily any background in computer science. The authors explain in a readable fashion the reasons for using various classic programming techniques, the kind of applications that use them, and -- most important -- how to code these algorithms in Perl.If you are an amateur programmer, this book will fill you in on the essential algorithms you need to solve problems like an expert. If you have already learned algorithms in other languages, you will be surprised at how much different (and often easier) it is to implement them in Perl. And yes, the book even has the obligatory fractal display program.There have been dozens of books on programming algorithms, some of them excellent, but never before has there been one that uses Perl.
The authors include the editor of The Perl Journal and master librarian of CPAN; all are contributors to CPAN and have archived much of the code in this book there."This book was so exciting I lost sleep reading it." Tom Christiansen
Synopsis
Whether one is an amateur programmer or knows a wide range of algorithms in other languages, this book will illustrate how to carry out traditional programming tasks in a high-powered, efficient, easy-to-maintain manner with Perl. Topics range in complexity from sorting and searching to statistical algorithms, numerical analysis, and encryption.
Synopsis
While there are dozens of books on programming algorithms, never before has there been one that uses Perl. Using the algorithms explained here, you'll be able to carry out traditional programming tasks in a high-powered, efficient, easy-to-maintain manner with Perl. This guide assumes a basic understanding of Perl syntax and functions, but not necessarily any background in computer science. The authors clearly explain the reasons for using various classic programming techniques, the kind of applications that use them, and -- most important -- how to code these algorithms in Perl. Topics range in complexity from sorting and searching to statistical algorithms, numerical analysis, and encryption. If you are an amateur programmer, this book will fill you in on the essential algorithms needed to solve problems just like an expert. If you've learned algorithms in other languages, you will be surprised at how much different (and often easier) it is to implement them in Perl. The authors include the editor of "The Perl Journal" and the master librarian of CPAN; all are contributors to CPAN and have archived much of the code in this book there.
Synopsis
Whether one is an amateur programmer or knows a wide range of algorithms in other languages, this book will illustrate how to carry out traditional programming tasks in a high-powered, efficient, easy-to-maintain manner with Perl. Topics range in complexity from sorting and searching to statistical algorithms, numerical analysis, and encryption.
About the Author
Jarkko Hietaniemi is the creator and Master Librarian of CPAN: Comprehensive Perl Archive Network. He has also been known to frequent Perl developer forums. Luckily enough, getting his MSc in CS in the field of parallel computing didn't interfere overly much with his Perl and UNIX hacking. During those savored moments of off-line time, he fancies gobbling up speculative fiction and popular science. His real life employer is Nokia Research Center.
John Macdonald has been using Perl commercially since 1988 for a suite of Unix system administration tools. His background with Unix dates back to the days when Unix was written in PDP-11 assembler and later includes representing the University of Waterloo at the first UNIX Users Meeting at City University of New York in the mid-1970s while finishing his M. Math degree. (In those days before the creation of Usenix, the people at the meeting would sit together around a single table.) In addition, his background includes work on compilers, kernel internals, device drivers and the like. He has also been observed partaking in recreational computing activities.
Jon Orwant, a well-known member of the Perl community, founded The Perl Journal and co-authored OReillys bestseller, Programming Perl, 3rd Edition.
Table of Contents
Preface; About This Book; Acknowledgments; Comments and Questions; Chapter 1: Introduction; 1.1 What Is an Algorithm?; 1.2 Efficiency; 1.3 Recurrent Themes in Algorithms; Chapter 2: Basic Data Structures; 2.1 Perl's Built-in Data Structures; 2.2 Build Your Own Data Structure; 2.3 A Simple Example; 2.4 Perl Arrays: Many Data Structures in One; Chapter 3: Advanced Data Structures; 3.1 Linked Lists; 3.2 Circular Linked Lists; 3.3 Garbage Collection in Perl; 3.4 Doubly-Linked Lists; 3.5 Infinite Lists; 3.6 The Cost of Traversal; 3.7 Binary Trees; 3.8 Heaps; 3.9 Binary Heaps; 3.10 Janus Heap; 3.11 The Heap Modules; 3.12 Future CPAN Modules; Chapter 4: Sorting; 4.1 An Introduction to Sorting; 4.2 All Sorts of Sorts; 4.3 Sorting Algorithms Summary; Chapter 5: Searching; 5.1 Hash Search and Other Non-Searches; 5.2 Lookup Searches; 5.3 Generative Searches; Chapter 6: Sets; 6.1 Venn Diagrams; 6.2 Creating Sets; 6.3 Set Union and Intersection; 6.4 Set Differences; 6.5 Counting Set Elements; 6.6 Set Relations; 6.7 The Set Modules of CPAN; 6.8 Sets of Sets; 6.9 Multivalued Sets; 6.10 Sets Summary; Chapter 7: Matrices; 7.1 Creating Matrices; 7.2 Manipulating Individual Elements; 7.3 Finding the Dimensions of a Matrix; 7.4 Displaying Matrices; 7.5 Adding or Multiplying Constants; 7.6 Transposing a Matrix; 7.7 Multiplying Matrices; 7.8 Extracting a Submatrix; 7.9 Combining Matrices; 7.10 Inverting a Matrix; 7.11 Computing the Determinant; 7.12 Gaussian Elimination; 7.13 Eigenvalues and Eigenvectors; 7.14 The Matrix Chain Product; 7.15 Delving Deeper; Chapter 8: Graphs; 8.1 Vertices and Edges; 8.2 Derived Graphs; 8.3 Graph Attributes; 8.4 Graph Representation in Computers; 8.5 Graph Traversal; 8.6 Paths and Bridges; 8.7 Graph Biology: Trees, Forests, DAGS, Ancestors, and Descendants; 8.8 Edge and Graph Classes; 8.9 CPAN Graph Modules; Chapter 9: Strings; 9.1 Perl Builtins; 9.2 String-Matching Algorithms; 9.3 Phonetic Algorithms; 9.4 Stemming and Inflection; 9.5 Parsing; 9.6 Compression; Chapter 10: Geometric Algorithms; 10.1 Distance; 10.2 Area, Perimeter, and Volume; 10.3 Direction; 10.4 Intersection; 10.5 Inclusion; 10.6 Boundaries; 10.7 Closest Pair of Points; 10.8 Geometric Algorithms Summary; 10.9 CPAN Graphics Modules; Chapter 11: Number Systems; 11.1 Integers and Reals; 11.2 Strange Systems; 11.3 Trigonometry; 11.4 Significant Series; Chapter 12: Number Theory; 12.1 Basic Number Theory; 12.2 Prime Numbers; 12.3 Unsolved Problems; Chapter 13: Cryptography; 13.1 Legal Issues; 13.2 Authorizing People with Passwords; 13.3 Authorization of Data: Checksums and More; 13.4 Obscuring Data: Encryption; 13.5 Hiding Data: Steganography; 13.6 Winnowing and Chaffing; 13.7 Encrypted Perl Code; 13.8 Other Issues; Chapter 14: Probability; 14.1 Random Numbers; 14.2 Events; 14.3 Permutations and Combinations; 14.4 Probability Distributions; 14.5 Rolling Dice: Uniform Distributions; 14.6 Loaded Dice and Candy Colors: Nonuniform Discrete Distributions; 14.7 If the Blue Jays Score Six Runs: Conditional Probability; 14.8 Flipping Coins Over and Over: Infinite Discrete Distributions; 14.9 How Much Snow? Continuous Distributions; 14.10 Many More Distributions; Chapter 15: Statistics; 15.1 Statistical Measures; 15.2 Significance Tests; 15.3 Correlation; Chapter 16: Numerical Analysis; 16.1 Computing Derivatives and Integrals; 16.2 Solving Equations; 16.3 Interpolation, Extrapolation, and Curve Fitting; Further Reading; General References for Algorithms; Graphs, Graphics, and Geometry; String Processing and Parsing; Numerical Methods; General Mathematics; Probability and Statistics; Other References; ASCII Character Set; Colophon;