AI engineering glossary · Data structures algorithms

What is NP-complete?

NP-complete (also called NP-hard): A class of decision problems that are both checkable in polynomial time and at least as hard as every other problem in that class, so a fast solution to one would give a fast solution to all. Recognising one signals that exact fast algorithms are unlikely.

Level: advancedTopic: Data structures algorithms

NP-complete: an example

Deciding whether a set of items fits the knapsack for a target value is NP-complete, so large exact instances may need heuristics.

Related terms

More Data structures algorithms terms

Where you learn it

NP-complete is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.