The Role of Algorithms in Everyday Life: From Google to Netflix 🤖📺
Every time you Google something, scroll through Instagram, or watch a movie…
The Simplex Method
We have already encountered linear programming (see Section 6.6)—the general problem of…
Iterative Improvement
The greedy strategy, considered in the preceding chapter, constructs a solution to…
Dijkstra’s Algorithm
In this section, we consider the single-source shortest-paths problem: for a given vertex…
Kruskal’s Algorithm
In the previous section, we considered the greedy algorithm that “grows” a…
Prim’s Algorithm
The following problem arises naturally in many practical situations: given n points, connect them…
Greedy Technique
Let us revisit the change-making problem faced, at least subconsciously, by millions of cashiers…
The Knapsack Problem and Memory Functions
We start this section with designing a dynamic programming algorithm for the…
Warshall’s and Floyd’s Algorithms
In this section, we look at two well-known algorithms: Warshall’s algorithm for…
Knapsack Problem
Here is another well-known problem in algorithmics. Given n items of known weights w1, w2,…




