Nepedia
Back to Discover
Fluent Reader
🔢

P (complexity)

math Maturity 11-13 Next article →

Computers solve many different kinds of puzzles every day. Some of these puzzles are easy for a computer to finish quickly. We call these "efficiently solvable" problems. In math, this group of problems is called P.

Complexity-classes-polynomial
Complexity-classes-polynomial

This name comes from the idea of polynomial time. When a task gets bigger, the time it takes to finish does not explode. It grows at a steady, manageable rate. This makes P a very important class in computer science.

Complexity subsets pspace
Complexity subsets pspace

To understand how P works, think about how a machine follows steps. A machine called a deterministic Turing machine can solve these problems. It follows a clear path to find an answer. For every problem in P, the machine must give a simple answer. It says "1" if the answer is yes. It says "0" if the answer is no.

Randomised Complexity Classes 2
Randomised Complexity Classes 2

The machine must do this using a polynomial amount of time. This means the work stays within a certain limit as the input grows.

Complexity-classes-polynomial
Complexity-classes-polynomial

People have studied these ideas for a long time. In 1965, researchers named Cobham and Edmonds helped create this idea. They wanted a way to describe efficient algorithms. Another scientist named Rabin also found this idea around that same time. Even earlier, in 1910, H. C. Pocklington looked at how long math tasks took. He noticed some tasks were much faster than others. He saw a difference between fast math and very slow math.

Complexity subsets pspace
Complexity subsets pspace

There are many famous problems that belong in the P group. For a long time, we did not know if prime numbers were in P. Then, in 2002, scientists proved that checking if a number is prime is in P.

Randomised Complexity Classes 2
Randomised Complexity Classes 2

Other problems like linear programming are also in P. Some problems are even called P-complete. These are the hardest problems within the P group.

Complexity-classes-polynomial
Complexity-classes-polynomial

They help us understand the limits of what is easy for computers.

Scientists also use P to compare different groups of math problems. P is a part of a much larger group called NP. Most experts believe P is smaller than NP, but they have not proven it yet.

Complexity subsets pspace
Complexity subsets pspace

We also know that P is smaller than a group called EXPTIME. Problems in EXPTIME take a huge amount of time to solve. P is also larger than a group called L, which uses very little memory.

Randomised Complexity Classes 2
Randomised Complexity Classes 2

Comparing these groups helps us map out the world of math.

396 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (3)
File:Complexity subsets pspace.svg
Complexity subsets pspace.svg
File:Complexity-classes-polynomial.svg
Complexity-classes-polynomial.svg
File:Randomised Complexity Classes 2.svg
Randomised Complexity Classes 2.svg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.