238 OTHER ALGORITHMIC TECHNIQUES
For example, with a set of items of sizes {27, 22, 14, 11, 7, 1} and an upper
limit on the size of the subset sum of 55, the process would have the series of
passes as given in the table in Fig. 9.2. We see that this algorithm has found an
optimal solution of 55 on the third pass.■ 9.1.5 Graph Coloring Approximation
Graph coloring is an unusual problem because, as opposed to the previous
cases, it has been shown that getting an approximate coloring that is even close
to the optimal coloring is as complex as getting the optimal coloring. The best
of the approximation algorithms that run in polynomial time will use more
than twice as many colors as optimal. Research has also shown that if there wasPass Subsets of Item added Sum
size pass
0 27,22,127,2227,11,1
27,14,1
27,14,122,1
27,1114
11
727
225053
53
49505050111, 7, 1
14, 7, 1
14, 11, 114,1
14,1
22271
11,127,1
27,127,127,1127,14
27,1422, 14
22, 11
22, 7
22, 111, 1
7, 114, 11
14, 711, 714, 127, 11
27, 7
27, 127, 22
27, 14555055
5553535349494653
49
5050
532∅■FIGURE 9.2
Results of first
three passes of
subset sum
approximation
algorithm