Author: Hayden Smith 2021
Why?
What?
When it comes to problems we have to solve in computing, there are two key ways we can look at the difficult of the problem:
| Problem to solve | Solving | Verifying |
|---|---|---|
| Sudoku | Hard | Easy |
| Hamiltonian Path | Hard | Easy |
| Euler Path | Easy | Easy |
| Traveling Salesman (H.P) | Hard | Easy |
| Spanning Tree | Easy | Easy |
| Sorting a list | Easy O(n^2) | Easy O(n) |
| Combination Lock | Hard O(k^n) | Easy O(n) |
Problems that are hard to solve often take a ridiculous amount of time to solve with standard computers we all use on this planet.
Most of these problems have time complexities of O(n!) or O(k^n) or worse - essentially exponential-like problems that require extreme amounts of time and processing to get the right answer for large values of n.
These problems generally can't be solved by large data sets.
These problems generally can't be solved by large data sets by standard computers. We describe the algorithms required to solve hard problems as a non-deterministic polynomial time problem.
Problems that are easy we say is a polynomial time problem.
These problems can only be solved in a reasonable amount of time by some theoretical computer (that doesn't exist) that can simulate many-to-all possibilities at the same time, or guess the correct answer perfectly right away.
Problems we solve can generally be described in one of some categories of problems:
NP
P
NP-Complete