O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Algorithms For Dummies

Book Description

Discover how algorithms shape and impact our digital world

All data, big or small, starts with algorithms. Algorithms are mathematical equations that determine what we see—based on our likes, dislikes, queries, views, interests, relationships, and more—online. They are, in a sense, the electronic gatekeepers to our digital, as well as our physical, world. This book demystifies the subject of algorithms so you can understand how important they are business and scientific decision making.

Algorithms for Dummies is a clear and concise primer for everyday people who are interested in algorithms and how they impact our digital lives. Based on the fact that we already live in a world where algorithms are behind most of the technology we use, this book offers eye-opening information on the pervasiveness and importance of this mathematical science—how it plays out in our everyday digestion of news and entertainment, as well as in its influence on our social interactions and consumerism. Readers even learn how to program an algorithm using Python!

  • Become well-versed in the major areas comprising algorithms
  • Examine the incredible history behind algorithms
  • Get familiar with real-world applications of problem-solving procedures
  • Experience hands-on development of an algorithm from start to finish with Python

If you have a nagging curiosity about why an ad for that hammock you checked out on Amazon is appearing on your Facebook page, you'll find Algorithm for Dummies to be an enlightening introduction to this integral realm of math, science, and business.

Table of Contents

    1. Cover
    2. Introduction
      1. About This Book
      2. Foolish Assumptions
      3. Icons Used in This Book
      4. Beyond the Book
      5. Where to Go from Here
    3. Part 1: Getting Started
      1. Chapter 1: Introducing Algorithms
        1. Describing Algorithms
        2. Using Computers to Solve Problems
        3. Distinguishing between Issues and Solutions
        4. Structuring Data to Obtain a Solution
      2. Chapter 2: Considering Algorithm Design
        1. Starting to Solve a Problem
        2. Dividing and Conquering
        3. Learning that Greed Can Be Good
        4. Computing Costs and Following Heuristics
        5. Evaluating Algorithms
      3. Chapter 3: Using Python to Work with Algorithms
        1. Considering the Benefits of Python
        2. Looking at the Python Distributions
        3. Installing Python on Linux
        4. Installing Python on MacOS
        5. Installing Python on Windows
        6. Downloading the Datasets and Example Code
      4. Chapter 4: Introducing Python for Algorithm Programming
        1. Working with Numbers and Logic
        2. Creating and Using Strings
        3. Interacting with Dates
        4. Creating and Using Functions
        5. Using Conditional and Loop Statements
        6. Storing Data Using Sets, Lists, and Tuples
        7. Defining Useful Iterators
        8. Indexing Data Using Dictionaries
      5. Chapter 5: Performing Essential Data Manipulations Using Python
        1. Performing Calculations Using Vectors and Matrixes
        2. Creating Combinations the Right Way
        3. Getting the Desired Results Using Recursion
        4. Performing Tasks More Quickly
    4. Part 2: Understanding the Need to Sort and Search
      1. Chapter 6: Structuring Data
        1. Determining the Need for Structure
        2. Stacking and Piling Data in Order
        3. Working with Trees
        4. Representing Relations in a Graph
      2. Chapter 7: Arranging and Searching Data
        1. Sorting Data Using Mergesort and Quicksort
        2. Using Search Trees and the Heap
        3. Relying on Hashing
    5. Part 3: Exploring the World of Graphs
      1. Chapter 8: Understanding Graph Basics
        1. Explaining the Importance of Networks
        2. Defining How to Draw a Graph
        3. Measuring Graph Functionality
        4. Putting a Graph in Numeric Format
      2. Chapter 9: Reconnecting the Dots
        1. Traversing a Graph Efficiently
        2. Sorting the Graph Elements
        3. Reducing to a Minimum Spanning Tree
        4. Finding the Shortest Route
      3. Chapter 10: Discovering Graph Secrets
        1. Envisioning Social Networks as Graphs
        2. Navigating a Graph
      4. Chapter 11: Getting the Right Web page
        1. Finding the World in a Search Engine
        2. Explaining the PageRank Algorithm
        3. Implementing PageRank
        4. Going Beyond the PageRank Paradigm
    6. Part 4: Struggling with Big Data
      1. Chapter 12: Managing Big Data
        1. Transforming Power into Data
        2. Streaming Flows of Data
        3. Sketching an Answer from Stream Data
      2. Chapter 13: Parallelizing Operations
        1. Managing Immense Amounts of Data
        2. Working Out Algorithms for MapReduce
      3. Chapter 14: Compressing Data
        1. Making Data Smaller
    7. Part 5: Challenging Difficult Problems
      1. Chapter 15: Working with Greedy Algorithms
        1. Deciding When It Is Better to Be Greedy
        2. Finding Out How Greedy Can Be Useful
      2. Chapter 16: Relying on Dynamic Programming
        1. Explaining Dynamic Programming
        2. Discovering the Best Dynamic Recipes
      3. Chapter 17: Using Randomized Algorithms
        1. Defining How Randomization Works
        2. Putting Randomness into your Logic
      4. Chapter 18: Performing Local Search
        1. Understanding Local Search
        2. Presenting local search tricks
        3. Solving satisfiability of Boolean circuits
      5. Chapter 19: Employing Linear Programming
        1. Using Linear Functions as a Tool
        2. Using Linear Programming in Practice
      6. Chapter 20: Considering Heuristics
        1. Differentiating Heuristics
        2. Routing Robots Using Heuristics
        3. Explaining Path Finding Algorithms
    8. Part 6: The Part of Tens
      1. Chapter 21: Ten Algorithms That Are Changing the World
        1. Using Sort Routines
        2. Looking for Things with Search Routines
        3. Shaking Things Up with Random Numbers
        4. Performing Data Compression
        5. Keeping Data Secret
        6. Changing the Data Domain
        7. Analyzing Links
        8. Spotting Data Patterns
        9. Dealing with Automation and Automatic Responses
        10. Creating Unique Identifiers
      2. Chapter 22: Ten Algorithmic Problems Yet to Solve
        1. Dealing with Text Searches
        2. Differentiating Words
        3. Determining Whether an Application Will End
        4. Creating and Using One-Way Functions
        5. Multiplying Really Large Numbers
        6. Dividing a Resource Equally
        7. Reducing Edit Distance Calculation Time
        8. Solving Problems Quickly
        9. Playing the Parity Game
        10. Understanding Spatial Issues
    9. About the Authors
    10. Connect with Dummies
    11. End User License Agreement