Algorithms to Live by by Tom Griffiths PDF
Algorithms to Live by by Tom Griffiths PDF
Griffiths PDF
Tom Griffiths
Whence 37%?
Lover’s Leap
When to Sell
When to Park
When to Quit
Always Be Stopping
Explore/Exploit Defined
In computer science, "exploration" refers to gathering
information, while "exploitation" means utilizing the
knowledge already acquired to achieve favorable outcomes.
Both approaches are essential, as exploration can lead to
rewarding discoveries, yet constant exploitation leads to life's
cherished moments. However, excessive exploration can be
burdensome.
Win-Stay, Lose-Shift
One simple strategy for handling exploration and
exploitation is Herbert Robbins’ "Win-Stay, Lose-Shift."
This approach suggests sticking with winners or switching
after failures, a principle aligning with human
decision-making tendencies. However, it does not account
for the critical “interval” factor in our choices.
Bandits Online
The digital landscape exemplifies the explore/exploit
Making Order
Sorting is a fundamental task in computer science and
heavily influences how we interact with information. The
chapter discusses the evolution of sorting from historical
contexts, such as Herman Hollerith's invention for census
organization, to modern uses in technology like email sorting
and search engines.
Forget About It
The process of forgetting is essential to effective memory
management, paralleling the organization of physical spaces
like closets. When attempting to organize personal items, it
helps to ask questions regarding their utility and frequency of
use. Various organizing methods exist, illustrating a conflict
between simplicity and effectiveness in managing storage.
Handling Deadlines
Thrashing
- Thrashing occurs when excessive context switching
prevents effective progress on tasks, leading to a state where
no real work gets done.
- Both humans and machines can experience thrashing,
highlighting the need for systems that effectively manage
tasks without overwhelming their capacity.
Interrupt Coalescing
- Scheduling requires balancing responsiveness to
interruptions while maximizing overall productivity; it may
be beneficial to slow down to improve throughput.
- Techniques such as timeboxing help structure time to
address tasks with minimal context switching, allowing for
increased focus and continued progress.
Laplace’s Law
Overfitting Everywhere
Examples of overfitting can be observed in health, fitness,
sports, and business practices where the focus on quantifiable
metrics leads to misguided decisions. Incentive structures can
inadvertently encourage harmful or counterproductive
behaviors, revealing that optimizing for the wrong metrics
often results from overfitting.
Early Stopping
Early stopping is a technique that can help prevent overfitting
by limiting the complexity of models. In decision-making,
sometimes it's advantageous to take a simpler, intuitive
approach rather than overthinking, as demonstrated by
Let It Slide
Meghan Bellows, while working on her PhD in chemical
engineering and planning her wedding, encountered a
complex problem: seating arrangements. Using insights from
her research on protein structures, she applied algorithms to
optimize seating. By quantifying relationships among guests
and setting constraints, she managed to find a satisfying
arrangement despite the sheer number of possible
combinations. This illustrates how some problems may seem
unsolvable, yet relaxing constraints can lead to workable
solutions.
Defining Difficulty
Edmonds and Cobham proposed the Cobham–Edmonds
thesis, establishing that problems solvable in polynomial
time are tractable, while those requiring non-polynomial
(intractable) solutions are not effectively solvable, illustrating
a key concept in computer science.
Just Relax
To tackle hard problems, relaxation techniques provide
alternative approaches. One method is Constraint Relaxation,
where strict rules are temporarily removed to simplify the
problem, followed by reintroducing constraints. For instance,
allowing multiple visits to towns in the traveling salesman
problem simplifies finding the minimum spanning tree,
which serves as a baseline for estimating actual solution
distances.
Learning to Relax
Computational optimization, particularly in discrete contexts,
often leads to hard problems. Reflecting on relaxation
techniques—Constraint, Continuous, and
Lagrangian—highlights their utility in navigating
complexity. Relaxations give bounds on potential solutions
and help frame expectations, offering a strategic way forward
without getting bogged down by the quest for utopian
perfection. By embracing relaxed approaches, we can handle
intractable challenges more effectively, paving the way for
realism and practicality.
Sampling
George-Louis Leclerc's Buffon's Needle problem illustrated
how sampling could provide estimates for complex quantities
like À. The advent of computers transformed sampling from a
labor-intensive process to an efficient algorithmic method,
notably through the development of the Monte Carlo Method
at Los Alamos during the Manhattan Project, which utilized
random sampling to solve challenges in nuclear physics.
Randomized Algorithms
Michael Rabin showcased the utility of randomness in
In Praise of Sampling
Random sampling can yield results where exhaustive
analysis fails. This principle applies to complex societal
decisions, where randomized sampling techniques can help
make sense of intricate policy changes.
How We Connect
The concept of connection encompasses various meanings,
from the physical and logical paths between entities to the
protocols guiding those connections, whether human or
machine. Significant milestones in communication history,
such as the first telegraph, telephone call, and text message,
illustrate how our desire for connection has evolved. The
internet's format for connections relies on protocol and has
redefined these interactions.
Packet Switching
The internet operates on various protocols, with
Transmission Control Protocol (TCP) being primary. Unlike
circuit switching, where a dedicated channel is established,
packet switching divides messages into packets transmitted
independently, allowing flexible communication. This
system enhances bandwidth utilization and network
robustness, especially in dynamic and potentially hazardous
Acknowledgment
Reliability in transmission cannot be guaranteed. The
"Byzantine generals problem" illustrates challenges in
ensuring messages are received. TCP handles
acknowledgment through a "triple handshake" and ACK
(acknowledgment) packets, ensuring that messages reach
their destination despite potential drops or disorganization.
Recursion
John Maynard Keynes emphasized that successful investing
requires anticipating others' anticipations. This recursive
thought process complicates decision-making, as players
must consider not only their views but also those of their
competitors.
Reaching Equilibrium
Game theory aims to identify equilibrium in interactions, a
stable state where no player benefits from changing their
strategy. This concept is exemplified in the Nash