Lably
Skip to content

♯P

Complexity class

  • 3 min read
  • 4 chapters

Related on Lably

Through Turing machine and Square matrix

Relation to decision problems

An NP decision problem can often be stated in the form "Are there any solutions that satisfy certain constraints?" For example:

Corresponding #P function problems ask "how many" rather than "are there any". For example:

  • How many subsets of a list of integers add up to zero?
  • How many Hamiltonian cycles in a given graph have cost less than 100?
  • How many variable assignments satisfy a given CNF formula?
  • How many roots of a univariate real polynomial are positive?

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication

Source and licence. Adapted from the Wikipedia article “♯P” (this version, 2026-08-18) by its contributors, shared under CC BY-SA 4.0. Lablypedia has left out its tables, references and most pictures, and linked it to other Lablypedia articles.