Top "Np" questions

NP ("nondeterministic polynomial") is a complexity class of decision problems that can be solved by a nondeterministic Turing machine in polynomial time.

What are the differences between NP, NP-Complete and NP-Hard?

What are the differences between NP, NP-Complete and NP-Hard? I am aware of many resources all over the web. I'd …

computer-science complexity-theory np np-complete np-hard
Algorithm for creating a school timetable

I've been wondering if there are known solutions for algorithm of creating a school timetable. Basically, it's about optimizing "hour-dispersion" (…

algorithm language-agnostic np
Proof that the halting problem is NP-hard?

In this answer to a question about the definitions of NP, NP-hard, and NP-complete, Jason makes the claim that The …

theory proof halting-problem np
How to use numpy.all() or numpy.any()?

I am trying to search in a 2D numpy array for a specific value, the get_above method returns a …

python arrays numpy np any
Sum-subset with a fixed subset size

The sum-subset problem states: Given a set of integers, is there a non-empty subset whose sum is zero? This problem …

algorithm language-agnostic np
Whats the difference between NP and co-NP

I know their complete counterparts mean that NP - complete is the hardest in the NP problems and co-NP-complete means …

algorithm code-analysis np
How is 2-CNF SAT is in P, while 3-CNF SAT is in NPC?

I am really confused why 2-CNF SAT is in P, while 3-CNF SAT is in NPC. I Read CLRS, and …

algorithm np-complete np
NP-Complete VS NP-Hard

I am trying to understand the difference between NP-Complete and NP-Hard. Below is my understanding An NP-Hard problem is one …

algorithm computer-science np-complete np np-hard
Why is P ⊆ co-NP?

I've seen several places that have simply stated that it's known that P is a subset of the intersection of …

algorithm complexity-theory theory np
What is fixed-parameter tractability? Why is it useful?

Some problems that are NP-hard are also fixed-parameter tractable, or FPT. Wikipedia describes a problem as fixed-parameter tractable if there's …

algorithm big-o time-complexity np