Algorithms For Dummies

Access to resources Favorite

Disclaimer: Any content in publications that violate the sovereignty, the constitution or regulations of the PRC is not accepted or approved by CNPIEC.

Chapter

Working with special-purpose chips

Leveraging networks

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

Facing hard problems

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

Dividing and Conquering

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

Reaching a good solution

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

Evaluating Algorithms

Simulating using abstract machines

Getting even more abstract

Working with functions

Chapter 3 Using Python to Work with Algorithms

Considering the Benefits of Python

Understanding why this book uses Python

Working with MATLAB

Considering other algorithm testing environments

Looking at the Python Distributions

Obtaining Analytics Anaconda

Considering Enthought Canopy Express

Considering pythonxy

Considering WinPython

Installing Python on Linux

Installing Python on MacOS

Installing Python on Windows

Downloading the Datasets and Example Code

Using Jupyter Notebook

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

Doing arithmetic

Comparing data by using Boolean expressions

Creating and Using Strings

Interacting with Dates

Creating and Using Functions

Creating reusable functions

Calling 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 sets

Creating lists

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

Multiplying matrixes

Defining advanced matrix operations

Creating Combinations the Right Way

Distinguishing permutations

Shuffling combinations

Facing repetitions

Getting the Desired Results Using Recursion

Explaining 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

Ordering in stacks

Using queues

Finding data using dictionaries

Working with Trees

Understanding the basics of trees

Building a tree

Representing Relations in a Graph

Going beyond trees

Building graphs

Chapter 7 Arranging and Searching Data

Sorting Data Using Mergesort and Quicksort

Defining why sorting data is important

Ordering data naïvely

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

Relying on Hashing

Putting everything into buckets

Avoiding collisions

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

Understanding subgraphs

Defining How to Draw a Graph

Distinguishing the key attributes

Drawing the graph

Measuring Graph Functionality

Counting edges and vertexes

Computing centrality

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

Creating the graph

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

Discovering communities

Navigating a Graph

Counting the degrees of separation

Walking a graph randomly

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 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

Finding data everywhere

Getting algorithms into business

Streaming Flows of Data

Analyzing streams with the right recipe

Reserving the right data

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

Inquiring by mapping

Chapter 14 Compressing Data

Making Data Smaller

Understanding encoding

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

Competing for resources

Revisiting Huffman coding

Chapter 16 Relying on Dynamic Programming

Explaining Dynamic Programming

Obtaining a historical basis

Making problems dynamic

Casting recursion dynamically

Leveraging memoization

Discovering the Best Dynamic Recipes

Looking inside the knapsack

Touring around cities

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

Knowing the neighborhood

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

Setting up PuLP at home

Optimizing production and revenue

Chapter 20 Considering Heuristics

Differentiating Heuristics

Considering the goals of heuristics

Going from genetic to AI

Routing Robots Using Heuristics

Scouting in unknown territories

Using distance measures as heuristics

Explaining Path Finding Algorithms

Creating a maze

Looking for a quick best-first route

Going heuristically around by A*

Part 6 The Part of Tens

Chapter 21 Ten Algorithms That Are Changing the World

Using Sort Routines

Looking for Things with Search Routines

Shaking Things Up with Random Numbers

Performing Data Compression

Keeping Data Secret

Changing the Data Domain

Analyzing Links

Spotting Data Patterns

Dealing with Automation and Automatic Responses

Creating Unique Identifiers

Chapter 22 Ten Algorithmic Problems Yet to Solve

Dealing with Text Searches

Differentiating Words

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

Solving Problems Quickly

Playing the Parity Game

Understanding Spatial Issues

Index

EULA

The users who browse this book also browse