Start free trial
Trending New Genres Authors
EnglishEnglish
EspañolSpanish
简体中文Chinese
繁體中文Chinese (Traditional)
FrançaisFrench
DeutschGerman
日本語Japanese
PortuguêsPortuguese
ItalianoItalian
한국어Korean
РусскийRussian
NederlandsDutch
العربيةArabic
PolskiPolish
हिन्दीHindi
Tiếng ViệtVietnamese
SvenskaSwedish
ΕλληνικάGreek
TürkçeTurkish
ไทยThai
ČeštinaCzech
RomânăRomanian
MagyarHungarian
УкраїнськаUkrainian
IndonesiaIndonesian
DanskDanish
SuomiFinnish
БългарскиBulgarian
עבריתHebrew
NorskNorwegian
HrvatskiCroatian
CatalàCatalan
SlovenčinaSlovak
LietuviųLithuanian
SlovenščinaSlovenian
СрпскиSerbian
EestiEstonian
LatviešuLatvian
فارسیPersian
മലയാളംMalayalam
தமிழ்Tamil
اردوUrdu
Searching...
SoBrief
Algorithms

Algorithms

Learn how algorithms turn messy problems into precise answers, and where their limits begin.
by Panos Louridas 2020 312 pages
4.03
302 ratings
Listen
Immersive
V2.3
Amazon Kindle Audible
Try Full Access for 3 Days
Unlock listening & more!
Continue

Key Takeaways

See algorithms as reusable methods, not computer magic

A recipe for action. An algorithm is a precise set of steps for solving a problem. It need not run on a computer: long division is an algorithm, as is a method for arranging rhythmic beats. Each algorithm must finish, give clear instructions, and produce an output. Its steps are organized through sequence, choices, and repetition, the basic control structures found in programs.

One method, many worlds. A repeated-division procedure related to Euclid’s algorithm can find the greatest common divisor of two numbers. The same pattern can distribute accented beats across a musical rhythm, and it was also used to space neutron pulses in a research facility. The point is not that music, number theory, and physics are identical, but that a shared structure can make one solution useful in very different settings.

Analysis

What's striking is how abstraction converts an apparently domain-specific problem into something reusable. The algorithm does not need to know whether its inputs stand for beats, numbers, or timing slots. It needs only a representation that preserves the relevant relationships. That is a powerful way to think about expertise: not merely collecting answers, but recognizing when different problems share a workable structure. The caution is that abstraction can discard details too. A model is useful only when the features it ignores do not change what counts as a good answer.

Measure an algorithm by how its work grows with the problem

Correct is not enough. An exhaustive search for the shortest route can be correct and still useless. On a small grid, listing every possible path is manageable; as the grid grows, the number of paths balloons beyond practical reach. A better method can find a route without checking them all. Algorithms must therefore be judged not just by whether they work, but by whether they finish in time for the problem at hand.

Compare growth, not machines. Computational complexity measures resources such as time and memory as the input grows. Big O notation describes an upper bound on that growth, abstracting away the speed of a particular computer. Searching an unordered list takes work proportional to its length, while halving a sorted search space takes logarithmic work. That is why a search among a billion ordered items can take roughly 30 checks.

Analysis

Complexity gives people a portable way to compare methods despite changing hardware. It also shifts attention from impressive demonstrations on tiny examples to behavior at realistic scale. That distinction matters wherever a system must meet deadlines or operate with limited memory. Big O is still a simplifying lens: constants, data layout, and implementation details can determine which program feels faster for modest inputs. The useful practice is to combine the growth-rate model with measurements on the actual workload, rather than treating either one as the whole story.

Model connections as graphs to uncover problems' hidden structure

Keep the connections. A graph represents objects as nodes and their relationships as edges. Its power comes from ignoring irrelevant appearance while preserving the connections that determine the problem. Euler used this approach on the Königsberg bridge puzzle: four regions became nodes, and bridges became edges. Because each region had an odd number of bridges, a walk crossing every bridge exactly once was impossible. The map’s geography did not matter to the proof.

Reuse the structure. DNA assembly can also become a graph problem. Short DNA fragments are represented as edges connecting their overlapping letter pairs. Finding a tour that uses each edge once reconstructs a sequence containing the fragments. The same graph idea can describe social connections, web links, and task dependencies. Once a problem is represented this way, algorithms developed for one setting may solve another.

Analysis

Graph modeling makes relationships visible, and that often matters more than the objects themselves. The Königsberg puzzle is a crisp demonstration: a complicated map reduces to a count of connections. DNA assembly shows the practical payoff, because overlaps become a structure that can be traversed systematically. The intellectual discipline is deciding what to preserve. A graph can capture who is connected to whom while omitting distance, direction, or the meaning of a relationship. Those omissions are harmless only when they do not alter the question being answered.

Use greedy shortcuts only when their worst-case cost is acceptable

Best now, not always best. A greedy algorithm chooses the most attractive available option at each step, without proving that the sequence of choices is globally optimal. For a tournament with eight players, each playing four matches, a simple greedy schedule can fit all matches into four days instead of the 16 days required by holding one match per day. It works especially well in this example, but that result does not generalize to every schedule.

Order can trap you. In graph coloring, greedy choices can use more colors than necessary. A poorly chosen order for coloring connected stars can require many extra colors, while a better order produces a much smaller solution. Exact solutions for difficult coloring problems can require impractical amounts of computation. A greedy method may still be valuable when it is fast, its error is bounded, or decisions must be made as new inputs arrive.

Analysis

Greedy methods are attractive because they are simple, fast, and often easy to explain. The tournament example shows why they are useful in practice, while the star-shaped graph exposes their vulnerability to ordering. This is a general decision-making tension: a local rule can be reliable in a particular environment without being universally optimal. The important question is not whether a shortcut is elegant, but what happens when its assumptions fail. Knowing the size of its worst-case gap can turn an informal hunch into a defensible engineering choice.

For shortest paths, update distance estimates instead of guessing locally

Improve estimates systematically. A tempting route-finding strategy is to choose the nearest next stop at every junction. That can fail: in the book’s example, the locally appealing route from A through C and E to F costs eight, while the shorter route through C and D costs six. Dijkstra’s algorithm avoids this trap by maintaining tentative distances from a starting node and repeatedly improving them when a cheaper route is found. This improvement is called relaxation.

Respect the conditions. The algorithm marks the unvisited node with the smallest current distance, checks its neighbors, and updates their estimates when a shorter route appears. It also records predecessors so the final route can be reconstructed. Dijkstra devised the method while thinking about routes between cities. It works for graphs with nonnegative edge weights. Negative weights require a different method, and a negative cycle can make a shortest path nonexistent.

Analysis

The key move is to separate a promising estimate from a proven answer. Local intuition asks which next step looks best; relaxation asks whether any known route improves the current account of the whole journey. This distinction is useful in planning problems where early choices have consequences several steps away. The algorithm’s conditions matter just as much as its procedure. A method can execute perfectly and still return a meaningless answer when its inputs violate the assumptions it depends on. Verification is part of using an algorithm, not an optional afterthought.

Exploit sorted data: a billion-item search can take about 30 checks

Structure beats scanning. In an unordered list, sequential search checks items one by one and may inspect all of them. If the items are sorted, binary search checks the middle and discards the half that cannot contain the target. Repeating this cut makes the search space shrink rapidly. A billion ordered items can be searched in about 30 probes, provided the ordering is maintained and the comparisons are reliable.

Use frequency when order is absent. If searches repeat and some items are much more popular, a self-organizing search can move each found item toward the front. The move-to-front method places it first; transposition moves it one position forward. Frequent items then become quicker to find. Such methods need a warm-up period, and they do not replace binary search when the data are already ordered.

Analysis

Search performance depends less on cleverness than on what is known about the data. Sorting creates information that binary search can exploit; repeated popularity creates a different kind of structure that self-organizing methods can learn from use. The comparison is a reminder that preparing data may be as important as choosing an algorithm. There is a tradeoff, though: maintaining order takes effort, and popularity can change. A method should be evaluated across the full cycle of preparation, updates, and queries, not by search time alone.

When choices vanish after rejection, reserve the first 37% as a benchmark

Learn before committing. Kepler interviewed several possible brides before choosing, but his story points toward a more formal problem: how to select the best option when each candidate must be accepted or rejected immediately, and rejected options cannot be revisited. This is called the secretary problem, an example of an optimal stopping problem. The challenge is to balance learning what the pool offers against the risk of passing the best candidate.

Use a comparison phase. If the aim is to select the single best candidate, first inspect and reject about 37% of the pool. Remember the best among them as a benchmark. Then choose the first later candidate who exceeds that benchmark. Under the problem’s setup, this strategy selects the overall best in about 37% of cases, the highest success rate any strategy can achieve. It is a probability, not a guarantee.

Analysis

The strategy turns a familiar regret into a deliberate two-stage process: gather information first, then act using a threshold. Its value lies partly in making the cost of waiting explicit. Too little observation produces weak comparisons; too much observation leaves fewer options. The 37% result depends on a narrow setup, including irreversible choices and a fixed pool, so it should not be applied mechanically to every hiring or purchasing decision. Real decisions often allow negotiation, return visits, or multiple acceptable outcomes, all of which change the mathematics.

Pick sorting methods by data flow, memory, and expected scale

Sorting has a toolbox. In the 1890 US census, Herman Hollerith’s punched-card machines helped reduce the time needed to process the count from the eight years taken by the previous census to six. The machines sorted cards by distributing them into bins one digit at a time, an early form of radix sort. It works especially well when keys have a manageable sequence of characters or digits and does not depend on comparing every item with every other one.

Match the method to the job. Insertion sort keeps a growing collection in order as new items arrive, much like arranging cards in a hand. Quicksort partitions items around a pivot and is typically fast, while merge sort repeatedly combines sorted groups and can be parallelized. Simple methods such as selection sort are easy to understand but scale poorly. There is no single best sort for every input, implementation, or constraint.

Analysis

The sorting examples make algorithm choice feel like engineering rather than a contest for one universally superior method. A live stream of records favors a method that can act incrementally; a large batch may favor a method with better growth or parallel structure. The Hollerith story also connects algorithms to institutions: a new procedure changed how a government could process a census. Performance claims should still be treated contextually, because memory limits, data characteristics, and the cost of moving records can alter the practical winner.

Links carry unequal weight. PageRank treats a web page’s links as endorsements. A page gains importance from pages linking to it, but a highly ranked page passes more value than an obscure one. Each page divides its contribution among the pages it links to, so a link from a page that points to many destinations carries a smaller share. The calculation is repeated until the page scores stabilize.

Prevent trapped importance. Some pages have no outgoing links, and groups of pages may link only among themselves. Either pattern can trap or drain scores. PageRank addresses this with a random-surfer model: the surfer usually follows links, but sometimes jumps to any page. This makes the ranking process converge to meaningful values across the network. The method demonstrates how a vast web can be modeled as a graph, though a link-based score is not a complete measure of truth or quality.

Analysis

PageRank’s conceptual leap is to treat the web’s structure as evidence about importance, rather than relying only on a page’s contents or a human-curated directory. That approach scales because many independent linking decisions contribute to the score. Yet the score answers a particular question: what importance follows from this link network and its rules? It cannot by itself establish accuracy, relevance to a specific reader, or public value. A useful ranking is a measurement model, not a neutral revelation of what deserves attention.

Neural networks learn through repeated error correction, not human-like insight

Tune simple components. An artificial neuron combines inputs using adjustable weights, adds a bias, and passes the result through an activation function. During supervised learning, the system receives examples paired with desired answers. It measures the difference between its output and the target, then adjusts its weights to reduce that error. In a network, backpropagation carries information about the error backward from the output layer so that parameters throughout the network can be updated.

Test beyond the examples. A simple clothing-recognition system in the book trains on 60,000 labeled images and is evaluated on 10,000 separate images. It classifies about 86% of the test images correctly. Repeating training can improve performance on the examples, but excessive fitting can harm performance on unfamiliar data. That failure is called overfitting. Deeper networks build successive representations, from simpler patterns toward more abstract ones.

Analysis

The account demystifies machine learning without denying its engineering difficulty. The basic operations are straightforward; the challenge lies in arranging them, training them, and ensuring that success on examples carries over to new cases. The separate test set is therefore not a ceremonial extra. It probes whether the system has learned a reusable pattern or merely adapted to the examples it has seen. Even strong test performance remains tied to the data and task chosen, so accuracy should be interpreted in context rather than treated as intelligence in general.

Turing machines mark what computation can do, not what it can do quickly

Reduce computation to elementary moves. Alan Turing’s theoretical machine uses a tape of symbols, a head that reads and writes one cell at a time, and a finite table of instructions. Despite this humble design, it can represent any algorithmic computation that an ordinary computer can perform. The Church-Turing thesis expresses this as a claim about the limits of effective computation, though the thesis is not a mathematical proof.

Separate possibility from speed. A more powerful computer may solve some problems much faster, but that does not mean it can solve problems outside the Turing machine’s computational reach. Quantum computers, for example, may offer speed advantages for some tasks without expanding the set of computable problems. This distinction echoes the book’s central concern: algorithms are finite, explicit processes, and their limits are as real as their achievements.

Analysis

The Turing machine supplies a boundary concept: it distinguishes questions about what can be computed from questions about the resources required. That distinction prevents both technological fatalism and technological mysticism. Faster hardware can transform a practically impossible task into a feasible one without making every conceivable problem computable. The model is powerful precisely because it strips computation to a few operations. It does not settle broader questions about intelligence or meaning, which require concepts beyond the mechanics of executing instructions.

Analysis

The book’s strongest achievement is to replace the aura around algorithms with a practical vocabulary for inspecting them. Its examples move from rhythm and division to graph structure, search, sorting, ranking, and learning. Across these settings, the recurring intellectual act is representation: identify the parts of a problem that matter, encode them, and then devise operations that transform the encoding into a useful answer. Algorithmic literacy is therefore more than knowing technical names. It is the ability to ask what a procedure assumes, what resources it consumes, and whether its output actually answers the question posed.

The distinction between correctness and practicality is especially consequential. A brute-force procedure may establish that a solution exists, yet its growth rate can make it unusable. Conversely, a fast heuristic may produce a workable answer without proving that it is best. These are not merely programming concerns. They describe choices familiar in planning, science, and public administration: certainty costs resources, while speed may require tolerating error.

The book also invites a useful extension. Computational success depends on the quality of the model and objective, not only on the elegance of the algorithm. PageRank can consistently calculate importance from links while leaving open whether link-derived importance is the right proxy for relevance or authority. Neural networks can score well on a test set while remaining limited by the examples and categories selected for evaluation. Once a proxy becomes a target, people may also alter their behavior to improve the score rather than the underlying value. This does not undermine the algorithms; it clarifies where human judgment remains essential.

The resulting civic lesson is modest but important. Algorithms are human-designed procedures, not independent authorities. Understanding their mechanics makes it easier to scrutinize their assumptions, limits, and intended use. The book explains how computation works; its deeper implication is that responsibility cannot be delegated to the machinery.

Summary in 30 Seconds
Algorithms are explicit procedures that transform inputs into useful outputs, but correctness alone does not make a method practical. Complexity measures how time and memory demands grow as problems get larger. Representing connections as graphs reveals structure that can simplify routing, scheduling, and sequence reconstruction. Sorted data lets repeated halving find a target among a billion items in about 30 checks. Machine learning adjusts model weights from errors, but strong training results do not guarantee performance on unfamiliar examples.
Contains spoilers

Last updated:

Report Issue

Review Summary

4.03 out of 5
Average of 302 ratings from Goodreads and Amazon.

Algorithms by Panos Louridas receives generally positive reviews, with an average rating of 4.04/5. Readers appreciate its comprehensive overview and real-world examples, making it accessible for those new to the subject. The book is praised for its clear explanations and engaging writing style. Some readers found the last two chapters more challenging, and a few wished for more mathematical detail. Overall, it's recommended as an excellent introduction to algorithms, particularly for those with some prior knowledge in the field.

Your rating:
4.47
95 ratings
Want to read the full book?

Glossary

big O

Upper bound on growth

Big O notation describes how an algorithm’s resource use grows as its input gets larger, usually focusing on time or memory. It abstracts away from the speed of a particular computer and emphasizes the broad growth pattern. For example, linear growth increases in proportion to input size, while logarithmic growth increases much more slowly.

graph

Nodes joined by edges

A graph is a structure made of nodes, also called vertices, and edges that connect them. It can represent roads between places, links between web pages, or relationships among people. Graphs help expose the structure of problems involving connections, allowing algorithms to find paths, schedules, or other useful patterns.

greedy algorithm

Chooses the best next move

A greedy algorithm selects the option that appears best at the current step, then continues from the result. This can produce a fast, useful solution, but it does not generally guarantee the best overall outcome. Its suitability depends on the problem, the quality of its result, and whether its possible error is acceptable.

Dijkstra’s algorithm

Finds shortest weighted paths

Dijkstra’s algorithm finds shortest paths from a starting node to other nodes in a graph whose edge weights are nonnegative. It keeps tentative distance estimates, repeatedly examines the unvisited node with the smallest estimate, and improves neighboring estimates when it discovers a cheaper route. It records predecessors so the final paths can be reconstructed.

secretary problem

Selects without revisiting

The secretary problem asks how to choose the best candidate from a sequence when each person must be accepted or rejected immediately, and rejected candidates cannot be reconsidered. A classic strategy observes and rejects roughly 37% of the pool, then selects the first later candidate who exceeds the best observed so far. The strategy maximizes the chance of choosing the overall best under the problem’s assumptions.

PageRank

Ranks pages through links

PageRank assigns importance scores to web pages using the pattern of links between them. Pages receive contributions from pages that link to them, with stronger contributions from important sources and smaller shares when a source links to many destinations. Iteration and a random-surfer model address dead ends and link structures that would otherwise trap the calculation.

backpropagation algorithm

Updates network parameters

Backpropagation is a method for training neural networks. The network first calculates an output and its error, moving from the input layer toward the output layer. It then uses information about that error to adjust weights and biases, working backward through the layers so that future outputs are more likely to match the desired results.

overfitting

Fits examples, fails elsewhere

Overfitting occurs when a machine-learning model adapts too closely to its training examples and performs poorly on unfamiliar data. It resembles memorizing practice questions instead of learning how to solve new ones. A separate test data set helps reveal whether a model’s learned patterns generalize beyond the examples used to train it.

Turing machine

Model of computation

A Turing machine is an idealized model consisting of a tape divided into cells, a head that reads and writes symbols, a finite set of states, and instructions governing each move. Its operations are deliberately elementary. The model provides a formal way to describe algorithmic computation and to reason about what computers can compute.

Church-Turing thesis

Claim about computable problems

The Church-Turing thesis holds that anything computable by an effective algorithm can also be computed by a Turing machine. It connects an intuitive notion of an algorithm with a precise theoretical model. It is a thesis rather than a proved mathematical theorem, and it concerns what can be computed, not how quickly computation can be done.

About the Author

Panos Louridas is an Associate Professor in the Department of Management Science and Technology at the Athens University of Economics and Business. He has authored "Real World Algorithms: A Beginner's Guide," published by MIT Press. Louridas specializes in algorithmic theory and its practical applications. His work focuses on making complex algorithmic concepts accessible to a wider audience, bridging the gap between theoretical computer science and real-world problem-solving. Through his teaching and writing, Louridas aims to demystify algorithms and demonstrate their relevance in various fields beyond computer science.

Download PDF

To save this Algorithms summary for later, download the free PDF. You can print it out, or read offline at your convenience.
Download PDF
File size: 0.36 MB     Pages: 18

Download EPUB

To read this Algorithms summary on your e-reader device or app, download the free EPUB. The .epub digital book format is ideal for reading ebooks on phones, tablets, and e-readers.
Download EPUB
File size: 1.42 MB     Pages: 22
Want to read the full book?
Follow
Listen2 mins
Home
Swipe
Library
Get App
Try Full Access for 3 Days
Listen, bookmark, and more
Compare Features Free Pro
📖 Read Summaries
Read unlimited summaries. Free users get 3 per month
🎧 Listen to Summaries
Listen to unlimited summaries in 40 languages
—
❤️ Unlimited Bookmarks
Free users are limited to 4
—
📜 Unlimited History
Free users are limited to 4
—
📥 Unlimited Downloads
Free users are limited to 1
—
Risk-Free Timeline
Today: Get Instant Access
Listen to full summaries of 26,000+ books. That's 12,000+ hours of audio!
Day 2: Trial Reminder
We'll send you a notification that your trial is ending soon.
Day 3: Your subscription begins
You'll be charged on Nov 24,
cancel anytime before.
Consume 2.8× More Books
2.8× more books Listening Reading
Our users love us
1M+ readers
Trustpilot Rating
TrustPilot
4.6 Excellent
This site is a total game-changer. I've been flying through book summaries like never before. Highly, highly recommend.
— Dave G
Worth my money and time, and really well made. I've never seen this quality of summaries on other websites. Very helpful!
— Em
Highly recommended!! Fantastic service. Perfect for those that want a little more than a teaser but not all the intricate details of a full audio book.
— Greg M
Save 62%
Yearly
$119.88 $44.99/year/yr
$3.75/mo
Monthly
$9.99/mo
Start a 3-Day Free Trial
3 days free, then $44.99/year. Cancel anytime.
Unlock a world of fiction & nonfiction books
26,000+ books for the price of 2 books
Read any book in 10 minutes
Discover new books like Tinder
Request any book if it's not summarized
Read more books than anyone you know
#1 app for book lovers
Lifelike & immersive summaries
30-day money-back guarantee
Download summaries in EPUBs or PDFs
Cancel anytime in a few clicks

Why one summary?

Scanner
Find a barcode to scan

⭐
⭐
⭐
We have a special gift for you
Open
38% off
DISCOUNT FOR YOU
⭐
⭐
⭐
$79.99
$49.99/year
Only $4.16 per month
Continue
2 taps to start, super easy to cancel
Settings
General
Widget
Loading...