The idea for Baker's technique is to break the graph into layers, such that the problem can be solved optimally on each layer, then combine the solutions from each layer in a reasonable way that will result in a feasible solution. This technique has given PTASs for the following problems: subgraph isomorphism, maximum independent set, minimum vertex cover, minimum dominating set, minimum edge dominating set, maximum triangle matching, and many others.
The example that we will use to demonstrate Baker's technique is the maximum weight independent set problem.
Algorithm
INDEPENDENT-SET(, , )
Choose an arbitrary vertex
find the breadth-first search levels for rooted at : for
find the components of after deleting for
compute , the maximum-weight independent set of
let be the solution of maximum weight among return
Notice that the above algorithm is feasible because each is the union of disjoint independent sets.
Dynamic programming
Dynamic programming is used when we compute the maximum-weight independent set for each . This dynamic program works because each is a -outerplanar graph. Many NP-complete problems can be solved with dynamic programming on -outerplanar graphs. Baker's technique can be interpreted as covering the given planar graphs with subgraphs of this type, finding the solution to each subgraph using dynamic programming, and gluing the solutions together.
References
Baker, Brenda S. (1983), "Approximation algorithms for NP-complete problems on planar graphs (preliminary version)", 24th Annual Symposium on Foundations of Computer Science, Tucson, Arizona, USA, 7–9 November 1983, IEEE Computer Society, pp. 265–273, doi:10.1109/SFCS.1983.7
Demaine, Erik D.; Hajiaghayi, MohammadTaghi; Kawarabayashi, Ken-ichi (2011), "Contraction decomposition in J-minor-free graphs and algorithmic applications", in Fortnow, Lance; Vadhan, Salil P. (eds.), Proceedings of the 43rd ACM Symposium on Theory of Computing, STOC 2011, San Jose, CA, USA, 6–8 June 2011, ACM, pp. 441–450, doi:10.1145/1993636.1993696, hdl:1721.1/73855, ISBN9781450306911, S2CID16516718
Demaine, E.; Hajiaghayi, M.; Nishimura, N.; Ragde, P.; Thilikos, D. (2004), "Approximation algorithms for classes of graphs excluding single-crossing graphs as minors.", J. Comput. Syst. Sci., 69 (2): 166–195, doi:10.1016/j.jcss.2003.12.001.