Chapter
Working with special-purpose chips
Leveraging available data
Distinguishing between Issues and Solutions
Being correct and efficient
Discovering there is no free lunch
Adapting the strategy to the problem
Describing algorithms in a lingua franca
Structuring Data to Obtain a Solution
Understanding a computer’s point of view
Arranging data makes the difference
Chapter 2 Considering Algorithm Design
Starting to Solve a Problem
Modeling real-world problems
Finding solutions and counterexamples
Standing on the shoulders of giants
Avoiding brute-force solutions
Starting by making it simpler
Breaking down a problem is usually better
Learning that Greed Can Be Good
Applying greedy reasoning
Computing Costs and Following Heuristics
Representing the problem as a space
Going random and being blessed by luck
Using a heuristic and a cost function
Simulating using abstract machines
Getting even more abstract
Chapter 3 Using Python to Work with Algorithms
Considering the Benefits of Python
Understanding why this book uses Python
Considering other algorithm testing environments
Looking at the Python Distributions
Obtaining Analytics Anaconda
Considering Enthought Canopy Express
Installing Python on Linux
Installing Python on MacOS
Installing Python on Windows
Downloading the Datasets and Example Code
Defining the code repository
Understanding the datasets used in this book
Chapter 4 Introducing Python for Algorithm Programming
Working with Numbers and Logic
Performing variable assignments
Comparing data by using Boolean expressions
Creating and Using Strings
Creating and Using Functions
Creating reusable functions
Using Conditional and Loop Statements
Making decisions using the if statement
Choosing between multiple options using nested decisions
Performing repetitive tasks using the for loop
Using the while statement
Storing Data Using Sets, Lists, and Tuples
Creating and using tuples
Defining Useful Iterators
Indexing Data Using Dictionaries
Chapter 5 Performing Essential Data Manipulations Using Python
Performing Calculations Using Vectors and Matrixes
Understanding scalar and vector operations
Performing vector multiplication
Creating a matrix is the right way to start
Defining advanced matrix operations
Creating Combinations the Right Way
Distinguishing permutations
Getting the Desired Results Using Recursion
Eliminating tail call recursion
Performing Tasks More Quickly
Considering divide and conquer
Distinguishing between different possible solutions
Part 2 Understanding the Need to Sort and Search
Chapter 6 Structuring Data
Determining the Need for Structure
Making it easier to see the content
Matching data from various sources
Considering the need for remediation
Stacking and Piling Data in Order
Finding data using dictionaries
Understanding the basics of trees
Representing Relations in a Graph
Chapter 7 Arranging and Searching Data
Sorting Data Using Mergesort and Quicksort
Defining why sorting data is important
Employing better sort techniques
Using Search Trees and the Heap
Considering the need to search effectively
Building a binary search tree
Performing specialized searches using a binary heap
Putting everything into buckets
Creating your own hash function
Part 3 Exploring the World of Graphs
Chapter 8 Understanding Graph Basics
Explaining the Importance of Networks
Considering the essence of a graph
Finding graphs everywhere
Showing the social side of graphs
Defining How to Draw a Graph
Distinguishing the key attributes
Measuring Graph Functionality
Counting edges and vertexes
Putting a Graph in Numeric Format
Adding a graph to a matrix
Using sparse representations
Using a list to hold a graph
Chapter 9 Reconnecting the Dots
Traversing a Graph Efficiently
Applying breadth-first search
Applying depth-first search
Determining which application to use
Sorting the Graph Elements
Working on Directed Acyclic Graphs (DAGs)
Relying on topological sorting
Reducing to a Minimum Spanning Tree
Discovering the correct algorithms to use
Introducing priority queues
Leveraging Prim’s algorithm
Testing Kruskal’s algorithm
Determining which algorithm works best
Finding the Shortest Route
Defining what it means to find the shortest path
Explaining Dijkstra’s algorithm
Chapter 10 Discovering Graph Secrets
Envisioning Social Networks as Graphs
Clustering networks in groups
Counting the degrees of separation
Chapter 11 Getting the Right Web page
Finding the World in a Search Engine
Searching the Internet for data
Considering how to find the right data
Explaining the PageRank Algorithm
Understanding the reasoning behind the PageRank algorithm
Explaining the nuts and bolts of PageRank
Implementing a Python script
Struggling with a naive implementation
Introducing boredom and teleporting
Looking inside the life of a search engine
Considering other uses of PageRank
Going Beyond the PageRank Paradigm
Introducing semantic queries
Using AI for ranking search results
Part 4 Struggling with Big Data
Chapter 12 Managing Big Data
Transforming Power into Data
Understanding Moore’s implications
Getting algorithms into business
Analyzing streams with the right recipe
Sketching an Answer from Stream Data
Filtering stream elements by heart
Demonstrating the Bloom filter
Finding the number of distinct elements
Learning to count objects in a stream
Chapter 13 Parallelizing Operations
Managing Immense Amounts of Data
Understanding the parallel paradigm
Distributing files and operations
Employing the MapReduce solution
Working Out Algorithms for MapReduce
Setting up a MapReduce simulation
Chapter 14 Compressing Data
Considering the effects of compression
Choosing a particular kind of compression
Choosing your encoding wisely
Encoding using Huffman compression
Remembering sequences with LZW
Part 5 Challenging Difficult Problems
Chapter 15 Working with Greedy Algorithms
Deciding When It Is Better to Be Greedy
Understanding why greedy is good
Keeping greedy algorithms under control
Considering NP complete problems
Finding Out How Greedy Can Be Useful
Arranging cached computer data
Revisiting Huffman coding
Chapter 16 Relying on Dynamic Programming
Explaining Dynamic Programming
Obtaining a historical basis
Casting recursion dynamically
Discovering the Best Dynamic Recipes
Looking inside the knapsack
Approximating string search
Chapter 17 Using Randomized Algorithms
Defining How Randomization Works
Considering why randomization is needed
Understanding how probability works
Understanding distributions
Simulating the use of the Monte Carlo method
Putting Randomness into your Logic
Calculating a median using Quickselect
Doing simulations using Monte Carlo
Ordering faster with Quicksort
Chapter 18 Performing Local Search
Understanding Local Search
Presenting local search tricks
Explaining hill climbing with n-queens
Discovering simulated annealing
Avoiding repeats using Tabu Search
Solving satisfiability of Boolean circuits
Solving 2-SAT using randomization
Implementing the Python code
Realizing that the starting point is important
Chapter 19 Employing Linear Programming
Using Linear Functions as a Tool
Grasping the basic math you need
Learning to simplify when planning
Working with geometry using simplex
Understanding the limitations
Using Linear Programming in Practice
Optimizing production and revenue
Chapter 20 Considering Heuristics
Differentiating Heuristics
Considering the goals of heuristics
Routing Robots Using Heuristics
Scouting in unknown territories
Using distance measures as heuristics
Explaining Path Finding Algorithms
Looking for a quick best-first route
Going heuristically around by A*
Chapter 21 Ten Algorithms That Are Changing the World
Looking for Things with Search Routines
Shaking Things Up with Random Numbers
Performing Data Compression
Dealing with Automation and Automatic Responses
Creating Unique Identifiers
Chapter 22 Ten Algorithmic Problems Yet to Solve
Dealing with Text Searches
Determining Whether an Application Will End
Creating and Using One-Way Functions
Multiplying Really Large Numbers
Dividing a Resource Equally
Reducing Edit Distance Calculation Time
Understanding Spatial Issues