Skip to main content

Color Coding

1995; Alon, Yuster, Zwick

  • Reference work entry
Encyclopedia of Algorithms

Keywords and Synonyms

Finding small subgraphs within large graphs        

Problem Definition

Color coding [2] is a novel method used for solving, in polynomial time, various subcases of the generally NP-Hard subgraph isomorphism problem. The input for the subgraph isomorphism problem is an ordered pair of (possibly directed) graphs (G, H). The output is either a mapping showing that H is isomorphic to a (possibly induced) subgraph of G, or false if no such subgraph exists. The subgraph isomorphism problem includes, as special cases, the HAMILTON-PATH, CLIQUE, and INDEPENDENT SET problems, as well as many others. The problem is also interesting when H is fixed. The goal, in this case, is to design algorithms whose running times are significantly better than the running time of the naïve algorithm.

Method Description

The color coding method is a randomized method. The vertices of the graph \( { G = (V,E) } \) in which a subgraph isomorphic to \( { H = (V_H,E_H) } \)is sought are randomly...

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
USD 399.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Recommended Reading

  1. Alon, N., Goldreich, O., Håstad, J., Peralta, R.: Simple constructions of almost k-wise independent random variables. Random Struct. Algorithms 3(3), 289–304 (1992)

    Article  MATH  Google Scholar 

  2. Alon, N., Yuster, R., Zwick, U.: Color coding. J. ACM 42, 844–856 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  3. Alon, N., Yuster, R., Zwick, U.: Finding and counting given length cycles. Algorithmica 17(3), 209–223 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  4. Björklund, A., Husfeldt, T.: Finding a path of superlogarithmic length. SIAM J. Comput. 32(6), 1395–1402 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  5. Chen, J., Lu, S., Sze, S., Zhang, F.: Improved algorithms for path, matching, and packing problems. Proceedings of the 18th ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 298–307 (2007)

    Google Scholar 

  6. Eppstein, D.: Subgraph isomorphism in planar graphs and related problems. J. Graph Algorithms Appl. 3(3), 1–27 (1999)

    Article  MathSciNet  Google Scholar 

  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)

    Google Scholar 

  8. Flum, J., Grohe, M.: The Parameterized complexity of counting problems. SIAM J. Comput. 33(4), 892–922 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  9. Fredman, M.L., J.Komlós, Szemerédi, E.: Storing a sparse table with O(1) worst case access time. J. ACM 31, 538–544 (1984)

    Article  Google Scholar 

  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)

    Google Scholar 

  11. Monien, B.: How to find long paths efficiently. Ann. Discret. Math. 25, 239–254 (1985)

    MathSciNet  Google Scholar 

  12. Naor, J., Naor, M.: Small-bias probability spaces: efficient constructions and applications. SIAM J. Comput. Comput. 22(4), 838–856 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  13. Papadimitriou, C.H., Yannakakis, M.: On limited nondeterminism and the complexity of the V-C dimension. J. Comput. Syst. Sci. 53(2), 161–170 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  14. Plehn, J., Voigt, B.: Finding minimally weighted subgraphs. Lect. Notes Comput. Sci. 484, 18–29 (1990)

    Article  MathSciNet  Google Scholar 

  15. Robertson, N., Seymour, P.: Graph minors. II. Algorithmic aspects of tree-width. J. Algorithms 7, 309–322 (1986)

    Google Scholar 

  16. Schmidt, J.P., Siegel, A.: The spatial complexity of oblivious k‑probe hash functions. SIAM J. Comput. 19(5), 775–786 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  17. Scott, J., Ideker, T., Karp, R.M., Sharan, R.: Efficient Algorithms for Detecting Signaling Pathways in Protein Interaction Networks. J. Comput. Biol. 13(2), 133–144 (2006)

    Article  MathSciNet  Google Scholar 

  18. Sharan, R., Ideker, T.: Modeling cellular machinery through biological network comparison. Nat. Biotechnol. 24, 427–433 (2006)

    Article  Google Scholar 

  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)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations


Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag

About this entry

Cite this entry

Alon, N., Yuster, R., Zwick, U. (2008). Color Coding. In: Kao, MY. (eds) Encyclopedia of Algorithms. Springer, Boston, MA.

Download citation

Publish with us

Policies and ethics