, Volume 52, Issue 2, pp 226–249 | Cite as

Exact Algorithms for Exact Satisfiability and Number of Perfect Matchings

  • Andreas Björklund
  • Thore HusfeldtEmail author


We present exact algorithms with exponential running times for variants of n-element set cover problems, based on divide-and-conquer and on inclusion–exclusion characterizations.

We show that the Exact Satisfiability problem of size l with m clauses can be solved in time 2 m l O(1) and polynomial space. The same bounds hold for counting the number of solutions. As a special case, we can count the number of perfect matchings in an n-vertex graph in time 2 n n O(1) and polynomial space. We also show how to count the number of perfect matchings in time O(1.732 n ) and exponential space.

We give a number of examples where the running time can be further improved if the hypergraph corresponding to the set cover instance has low pathwidth. This yields exponential-time algorithms for counting k-dimensional matchings, Exact Uniform Set Cover, Clique Partition, and Minimum Dominating Set in graphs of degree at most three.

We extend the analysis to a number of related problems such as TSP and Chromatic Number.


Exact algorithms Set cover Set partition Exact satisfability Number of perfect matchings 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Angelsmark, O., Thapper, J.: Partitioning based algorithms for some colouring problems. In: Recent Advances in Constraints. Lecture Notes in Artificial Intelligence, vol. 3978, pp. 44–58. Springer, Berlin (2005) CrossRefGoogle Scholar
  2. 2.
    Bax, E.T.: Inclusion and exclusion algorithm for the Hamiltonian Path problem. Inf. Process. Lett. 47(4), 203–207 (1993) zbMATHCrossRefMathSciNetGoogle Scholar
  3. 3.
    Björklund, A., Husfeldt, T. Koivisto, M.: Set partitioning via inclusion–exclusion. SIAM J. Comput., to appear. Prelim. versions in Proceedings of the 47th Annual IEEE Symposium on Foundations of Computer Science, Berkeley, CA, 21–24 October 2006, pp. 575–582, 583–590. IEEE Computer Society, Los Alamitos, CA (2006) Google Scholar
  4. 4.
    Bodlaender, H., Kratsch, D.: An exact algorithm for graph coloring with polynomial memory. Technical report UU-CS-2006-015, Utrecht University (2006) Google Scholar
  5. 5.
    Byskov, J.M.: Enumerating maximal independent sets with applications to graph colouring. Oper. Res. Lett. 32, 547–556 (2004) zbMATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    Byskov, J.M.: Exact algorithms for graph colouring and exact satisfiability. Ph.D. thesis, University of Aarhus (2004) Google Scholar
  7. 7.
    Byskov, J.M., Madsen, B.A., Skjernaa, B.: New algorithms for Exact Satisfiability. Theor. Comput. Sci. 332(1–3), 515–541 (2005) zbMATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Chien, S.: A determinant-based algorithm for counting perfect matchings in a general graph. In: Proc. 15th SODA, pp. 728–735 (2004) Google Scholar
  9. 9.
    Christofides, N.: An algorithm for the chromatic number of a graph. Comput. J. 14, 38–39 (1971) zbMATHCrossRefMathSciNetGoogle Scholar
  10. 10.
    Coppersmith, D., Winograd, S.: Matrix multiplication via arithmetic progressions. J. Symb. Comput. 9(3), 251–280 (1990) zbMATHCrossRefMathSciNetGoogle Scholar
  11. 11.
    Downey, R.G., Fellows, M.R.: Parameterized Complexity. Springer, New York (1999). ISBN 0-387-94883-X Google Scholar
  12. 12.
    Dahllöf, V., Jonsson, P., Beigel, R.: Algorithms for four variants of exact satisfiability. Theor. Comput. Sci. 320(2–3), 373–394 (2004) zbMATHCrossRefGoogle Scholar
  13. 13.
    Davis, M., Logemann, G., Loveland, D.: A machine program for theorem proving. Commun. ACM 5(7), 394–397 (1962) zbMATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    Eppstein, D.: Small maximal independent sets and faster exact graph coloring. J. Graph Algorithms Appl. 7(2), 131–140 (2003) zbMATHMathSciNetGoogle Scholar
  15. 15.
    Fomin, F.V., Grandoni, F., Kratsch, D.: Some new techniques in design and analysis of exact (exponential) algorithms. In: Bull. EATCS, vol. 87 (2005) Google Scholar
  16. 16.
    Fomin, F.V., Grandoni, F., Kratsch, D.: Measure and conquer: domination—a case study. In: Proceedings of the 32nd ICALP, pp. 191–203 (2005) Google Scholar
  17. 17.
    Fomin, F.V., Höie, K.: Pathwidth of cubic graphs and exact algorithms. Inf. Process. Lett. 97(5), 191–196 (2006) CrossRefGoogle Scholar
  18. 18.
    Feder, T., Motwani, R.: Worst-case time bounds for coloring and satisfiability problems. J. Algorithms 45(2), 192–201 (2002) zbMATHCrossRefMathSciNetGoogle Scholar
  19. 19.
    Feige, U., Kilian, J.: Exponential time algorithms for computing the bandwidth of a graph. Manuscript. Cited in [38] Google Scholar
  20. 20.
    Gurevich, Y., Shelah, S.: Expected computation time for Hamiltonian path problem. SIAM J. Comput. 16(3), 486–502 (1987) zbMATHCrossRefMathSciNetGoogle Scholar
  21. 21.
    Hujter, M., Tuza, Z.: On the number of maximal independent sets in triangle-free graphs. SIAM J. Discrete Math. 6(2), 284–288 (1993) zbMATHCrossRefMathSciNetGoogle Scholar
  22. 22.
    Jerrum, M., Sinclair, A., Vigoda, E.: A polynomial-time approximation algorithm for the permanent of a matrix with non-negative entries. In: Proc. 33rd STOC, pp. 712–721 (2001) Google Scholar
  23. 23.
    Karp, R.M.: Dynamic programming meets the principle of inclusion-exclusion. Oper. Res. Lett. 1, 49–51 (1982) zbMATHCrossRefMathSciNetGoogle Scholar
  24. 24.
    Kohn, S., Gottlieb, A., Kohn, M.: A generating function approach to the Traveling Salesman Problem. In: ACM ’77: Proceedings of the 1977 annual conference, pp. 294–300. ACM Press, New York (1977) CrossRefGoogle Scholar
  25. 25.
    Kneis, J., Mölle, D., Richter, S., Rossmanith, P.: Algorithms based on the treewidth of sparse graphs. In: Proceedings of the 31st International Workshop on Graph-Theoretic Concepts in Computer Science, pp. 385–396 (2005) Google Scholar
  26. 26.
    Lawler, E.L.: A note on the complexity of the chromatic number problem. Inf. Process. Lett. 5(3), 66–67 (1976) zbMATHCrossRefMathSciNetGoogle Scholar
  27. 27.
    Lovász, L., Plummer, M.D.: Matching Theory. North-Holland, Amsterdam (1986) zbMATHGoogle Scholar
  28. 28.
    Madsen, B.A.: An algorithm for exact satisfiability analysed with the number of clauses as parameter. Inf. Process. Lett. 97(1), 28–30 (2006) CrossRefMathSciNetGoogle Scholar
  29. 29.
    Moon, J.W., Moser, L.: On cliques in graphs. Isr. J. Math. (1965) Google Scholar
  30. 30.
    Monien, B., Speckenmeyer, E., Vornberger, O.: Upper bounds for covering problems. Methods Oper. Res. 43, 419–431 (1981) zbMATHMathSciNetGoogle Scholar
  31. 31.
    Porschen, S.: On some weighted satisfiability and graph problems. In: Proc. 31st SOFSEM. Lecture Notes in Computer Science, vol. 3381, pp. 278–287 (2005) Google Scholar
  32. 32.
    Ryser, H.J.: Combinatorial Mathematics. Carus Math. Monographs, no. 14. Math. Assoc. of America, Washington, DC (1963) zbMATHGoogle Scholar
  33. 33.
    Tsukiyama, S., Ide, M., Ariyoshi, H., Shirakawa, I.: A new algorithm for generating all the maximal independent sets. SIAM J. Comput. 6(3), 505–517 (1977) zbMATHCrossRefMathSciNetGoogle Scholar
  34. 34.
    Vadhan, S.P.: The complexity of counting in sparse, regular, and planar graps. SIAM J. Comput. 32(2), 398–427 (2001) CrossRefMathSciNetGoogle Scholar
  35. 35.
    Valiant, L.G.: The complexity of computing the permanent. Theor. Comput. Sci. 8, 189–201 (1979) zbMATHCrossRefMathSciNetGoogle Scholar
  36. 36.
    Williams, R.: A new algorithm for optimal 2-constraint satisfaction and its implications. Theor. Comput. Sci. 348(1–2), 357–365 (2005) zbMATHCrossRefGoogle Scholar
  37. 37.
    Woeginger, G.J.: Exact algorithms for NP-hard problems: a survey. In: Combinatorial Optimization: Eureka, You Shrink!, pp. 185–207. Springer, Berlin (2003) CrossRefGoogle Scholar
  38. 38.
    Woeginger, G.J.: Space and time complexity of exact algorithms: Some open problems. In: Proc. 1st IWPEC. Lecture Notes in Computer Science, vol. 3162, pp. 281–290 (2004) Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2007

Authors and Affiliations

  1. 1.Department of Computer ScienceLund UniversityLundSweden

Personalised recommendations