Mastering Algorithms with Perl
Practical Programming Through Computer Science
Publisher: O'Reilly Media
Release Date: April 2011
Pages: 701
Read on O'Reilly Online Learning with a 10day trial
Start your free trial now Buy on AmazonWhere’s the cart? Now you can get everything with O'Reilly Online Learning. To purchase books, visit Amazon or your favorite retailer. Questions? See our FAQ or contact customer service:
18008898969 / 7078277019
support@oreilly.com
 Fuzzy pattern matching for text (identify misspellings!)
 Finding correlations in data
 Gameplaying algorithms
 Predicting phenomena such as Web traffic
 Polynomial and spline fitting
Table of Contents

Chapter 1 Introduction

What Is an Algorithm?

Efficiency

Recurrent Themes in Algorithms


Chapter 2 Basic Data Structures

Perl’s Builtin Data Structures

Build Your Own Data Structure

A Simple Example

Perl Arrays: Many Data Structures in One


Chapter 3 Advanced Data Structures

Linked Lists

Circular Linked Lists

Garbage Collection in Perl

DoublyLinked Lists

Infinite Lists

The Cost of Traversal

Binary Trees

Heaps

Binary Heaps

Janus Heap

The Heap Modules

Future CPAN Modules


Chapter 4 Sorting

An Introduction to Sorting

All Sorts of Sorts

Sorting Algorithms Summary


Chapter 5 Searching

Hash Search and Other NonSearches

Lookup Searches

Generative Searches


Chapter 6 Sets

Venn Diagrams

Creating Sets

Set Union and Intersection

Set Differences

Counting Set Elements

Set Relations

The Set Modules of CPAN

Sets of Sets

Multivalued Sets

Sets Summary


Chapter 7 Matrices

Creating Matrices

Manipulating Individual Elements

Finding the Dimensions of a Matrix

Displaying Matrices

Adding or Multiplying Constants

Transposing a Matrix

Multiplying Matrices

Extracting a Submatrix

Combining Matrices

Inverting a Matrix

Computing the Determinant

Gaussian Elimination

Eigenvalues and Eigenvectors

The Matrix Chain Product

Delving Deeper


Chapter 8 Graphs

Vertices and Edges

Derived Graphs

Graph Attributes

Graph Representation in Computers

Graph Traversal

Paths and Bridges

Graph Biology: Trees, Forests, DAGS, Ancestors, and Descendants

Edge and Graph Classes

CPAN Graph Modules


Chapter 9 Strings

Perl Builtins

StringMatching Algorithms

Phonetic Algorithms

Stemming and Inflection

Parsing

Compression


Chapter 10 Geometric Algorithms

Distance

Area, Perimeter, and Volume

Direction

Intersection

Inclusion

Boundaries

Closest Pair of Points

Geometric Algorithms Summary

CPAN Graphics Modules


Chapter 11 Number Systems

Integers and Reals

Strange Systems

Trigonometry

Significant Series


Chapter 12 Number Theory

Basic Number Theory

Prime Numbers

Unsolved Problems


Chapter 13 Cryptography

Legal Issues

Authorizing People with Passwords

Authorization of Data: Checksums and More

Obscuring Data: Encryption

Hiding Data: Steganography

Winnowing and Chaffing

Encrypted Perl Code

Other Issues


Chapter 14 Probability

Random Numbers

Events

Permutations and Combinations

Probability Distributions

Rolling Dice: Uniform Distributions

Loaded Dice and Candy Colors: Nonuniform Discrete Distributions

If the Blue Jays Score Six Runs: Conditional Probability

Flipping Coins Over and Over: Infinite Discrete Distributions

How Much Snow? Continuous Distributions

Many More Distributions


Chapter 15 Statistics

Statistical Measures

Significance Tests

Correlation


Chapter 16 Numerical Analysis

Computing Derivatives and Integrals

Solving Equations

Interpolation, Extrapolation, and Curve Fitting


Appendix Further Reading

General References for Algorithms

Graphs, Graphics, and Geometry

String Processing and Parsing

Numerical Methods

General Mathematics

Probability and Statistics

Other References


Appendix ASCII Character Set

Colophon