
160 C Color Coding
As mentioned above, all these theorems can be derandom-
ized at the price of a log |V| factor. The algorithms are also
easily to parallelize.
Applications
The initial goal was to obtain efficient algorithms for find-
ing simple paths and cycles in graphs. The color cod-
ing method turned out, however, to have a much wider
range of applicability. The linear time (i. e., 2
O(k)
jEj
for directed graphs and 2
O(k)
jVj for undirected graphs)
bounds for simple paths apply in fact to any forest on k
vertices. The 2
O(k)
jVj
!
bound for simple cycles applies
in fact to any series-parallel graph on k vertices. More
generally, if G =(V; E) contains a subgraph isomorphic
to a graph H =(V
H
; E
H
)whosetree-width is at most
t,thensuchasubgraphcanbefoundin2
O(k)
jVj
t+1
expected time, where k = jV
H
j. This improves an algo-
rithm of Plehn and Voigt [14] that has a running time
of k
O(k)
jVj
t+1
. As a very special case, it follows that the
LOG PATH problem is in P. This resolves in the affirma-
tive a conjecture of Papadimitriou and Yannakakis [13].
The exponential dependence on k in the above bounds is
probably unavoidable as the problem is NP-complete if k
is part of the input.
The color coding method has been a fruitful method
in the study of parametrized algorithms and parametrized
complexity [7,8]. Recently, the method has found inter-
esting applications in computational biology, specifically
in detecting signaling pathways within protein interaction
networks, see [10,17,18,19].
Open Problems
Several problems, listed below, remain open.
Is there a polynomial time (deterministic or random-
ized) algorithm for deciding if a given graph G =(V; E)
contains a path of length, say, log
2
jVj? (This is un-
likely, as it will imply the existence of an algorithm that
decides in time 2
O(
p
n)
whether a given graph on n ver-
ticesisHamiltonian.)
Can the log jVj factor appearing in the derandomiza-
tion be omitted?
Is the problem of deciding whether a given graph
G =(V; E) contains a triangle as difficult as the
Boolean multiplication of two jVjjVj matrices?
Experimental Results
Results of running the basic algorithm on biological data
have been reported in [17,19].
Cross References
Approximation Schemes for Planar Graph Problems
Graph Isomorphism
Treewidth of Graphs
Recommended Reading
1. Alon, N., Goldreich, O., Håstad, J., Peralta, R.: Simple construc-
tions of almost k-wise independent random variables. Random
Struct. Algorithms 3(3), 289–304 (1992)
2. Alon,N.,Yuster,R.,Zwick,U.:Colorcoding.J.ACM42, 844–856
(1995)
3. Alon, N., Yuster, R., Zwick, U.: Finding and counting given
length cycles. Algorithmica 17(3), 209–223 (1997)
4. Björklund, A., Husfeldt, T.: Finding a path of superlogarithmic
length.SIAMJ.Comput.32(6), 1395–1402 (2003)
5. Chen,J.,Lu,S.,Sze,S.,Zhang,F.:Improvedalgorithmsfor
path, matching, and packing problems. Proceedings of the
18th ACM-SIAM Symposium on Discrete Algorithms (SODA),
pp. 298–307 (2007)
6. Eppstein, D.: Subgraph isomorphism in planar graphs and re-
lated problems. J. Graph Algorithms Appl. 3(3), 1–27 (1999)
7. Fellows, M.R.: New Directions and new challenges in algorithm
design and complexity, parameterized. In: Lecture Notes in
Computer Science, vol. 2748, p. 505–519 (2003)
8. Flum, J., Grohe, M.: The Parameterized complexity of counting
problems. SIAM J. Comput. 33(4), 892–922 (2004)
9. Fredman, M.L., J.Komlós, Szemerédi, E.: Storing a sparse ta-
ble with O(1) worst case access time. J. ACM 31, 538–544
(1984)
10. Hüffner, F., Wernicke, S., Zichner, T.: Algorithm engineering
for Color Coding to facilitate Signaling Pathway Detection. In:
Proceedings of the 5th Asia-Pacific Bioinformatics Conference
(APBC), pp. 277–286 (2007)
11. Monien, B.: How to find long paths efficiently. Ann. Discret.
Math. 25, 239–254 (1985)
12. Naor, J., Naor, M.: Small-bias probability spaces: efficient con-
structions and applications. SIAM J. Comput. Comput. 22(4),
838–856 (1993)
13. Papadimitriou, C.H., Yannakakis, M.: On limited nondetermin-
ism and the complexity of the V-C dimension. J. Comput. Syst.
Sci. 53(2), 161–170 (1996)
14. Plehn, J., Voigt, B.: Finding minimally weighted subgraphs.
Lect. Notes Comput. Sci. 484, 18–29 (1990)
15. Robertson, N., Seymour, P.: Graph minors. II. Algorithmic as-
pects of tree-width. J. Algorithms 7, 309–322 (1986)
16. Schmidt, J.P., Siegel, A.: The spatial complexity of oblivi-
ous k-probe hash functions. SIAM J. Comput. 19(5), 775–786
(1990)
17. Scott, J., Ideker, T., Karp, R.M., Sharan, R.: Efficient Algorithms
for Detecting Signaling Pathways in Protein Interaction Net-
works. J. Comput. Biol. 13(2), 133–144 (2006)
18. Sharan, R., Ideker, T.: Modeling cellular machinery through bi-
ological network comparison. Nat. Biotechnol. 24, 427–433
(2006)
19. Shlomi, T., Segal, D., Ruppin, E., Sharan, R.: QPath: a method for
querying pathways in a protein-protein interaction network.
BMC Bioinform. 7, 199 (2006)