Nepedia
Back to Discover
Fluent Reader
💻

Space complexity

technology Maturity 11-13 Next article →

Computers need room to think. This room is called memory space. Scientists study space complexity to measure it. It tells us how much memory a job needs. This amount depends on the input size. The job must finish completely to measure it.

Space complexity has two main parts. First is the input space. This is the info you start with. Second is the auxiliary space. This is the extra room used to work. Think of it like a chef. The ingredients are the input space. The extra bowls used are auxiliary space.

Experts use Big O notation to describe space. This math shows how memory grows. They use terms like DSPACE and NSPACE. These describe different types of Turing machines. These machines are models for how computers work. Some machines are deterministic. Others are non-deterministic.

There are special groups called complexity classes. One group is called PSPACE. This group includes any polynomial amount of space. Another group is LOGSPACE. This uses very little memory. It is useful for huge data. This data might not fit in a computer's RAM.

Rules help us understand these groups. Savitch's theorem is a famous rule. It says non-determinism only saves a little space. This is different from how time works. The space hierarchy theorem is another rule. It says some problems need more space. You cannot solve them with less.

230 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

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.