They introduce a number of problems which will be used for illustration in the later chapters.
They show how these problems are related.
They show how subtle changes in the problems lead to radically more difficult problems.
A quick side note: The knapsack problem.
A thief breaks into a museum with a fixed size knapsack. They want to steal the maximum amount of treasure that will fit into this knapsack.
Items can be measured in a single dimension (weight for example)
This problem is probably $O(n!)$ when each item has a distinct size and value. (The 0-1 knapsack problem)
This problem not bad when there an unlimited number of each item type.
This is the unbounded knapsack problem.
Think piles of coins in a dragon horde, where there is no chance to exhaust the supply.
There are n different types of items.
Each item i has a weight, wi
Each item i has a price, pi
for each item i
compute the value, vi = pi/wi
sort items by value
for each item type ordered by the value until the knapksack is full
take as many of that item as will fit into the knapsack
Do the big three
How does this work?
Is it correct?
What is the performance?
Notice how a slight change in the problem changes the performance?
The stable matching problem.
This is a problem "discovered" in the 60s by economists.
Can they design a process where college admissions, job recruiting or even dating can be self enforcing?
For this problem we consider
a set of n men $M = \{m_1, m_2, ... m_n\}$
a set of n women $W = \{w_1, w_2, ... w_n\}$.
For each man and woman
there is an ordered list of there preferences from the other set.
$m_1: w_1, w_2, w_3$
$m_2: ...$
$w_1: m_2, m_1, m_3$
they wish to be paired with exactly one member of the other set.
they wish to be pared with the highest choice from their ordered list possible.
A matching S is a set of ordered pairs of the form (mi, w
A match is perfect for each element M each element from W appear exactly once in a pair in the match.
An instability with respect to S occurs when (m,w) and (m',w') are matches within S, but m prefers w' to w and w' prefers m to m'
Or A pair (m,w') is an instability with respect to S: (m,w') is not an element of S, but but both m and w' prefer each other to their partner is in S.
Finally a match is stable if
It is perfect (or 1 to 1)
There is no instability
Does an algorithm exist to find a stable match for a given set of men and women?