Nepedia
Back to Discover
Fluent Reader
🔢

Algorithm

math Maturity 7-9 Vital Level 3 Next article →

An algorithm is a specific set of rules to solve a problem. These rules are a sequence of steps that a person or machine follows. Every algorithm needs a starting point and some initial inputs. These inputs are the pieces of information given to the algorithm at the beginning. As the steps are followed, the algorithm moves through different states. Finally, it produces an output, which is the result or answer. A true algorithm must eventually stop after a finite number of steps.

GCD through successive subtractions
GCD through successive subtractions

Algorithms work by following instructions very carefully. Some instructions allow for different paths to be taken. This is called automated decision-making. Advanced algorithms can even use automated reasoning to make logical guesses. Most algorithms are deterministic, meaning they follow the same path every time. However, some are called randomized algorithms because they use random input. This is different from a heuristic, which is a way to solve problems without a perfect answer. Social media apps often use heuristics to suggest videos you might like.

People have used step-by-step procedures for thousands of years. The earliest evidence comes from ancient Mesopotamian mathematics. Sumerian clay tablets from near Baghdad show early division algorithms. Babylonian mathematicians also used these steps for astronomy to track stars. Ancient Egyptians used them in the Rhind Mathematical Papyrus. In the 9th century, the Arab mathematician Al-Kindi created a codebreaking algorithm. He used frequency analysis to help decipher secret messages.

Diagram for the computation of Bernoulli numbers
Diagram for the computation of Bernoulli numbers

The word "algorithm" has a very interesting history. It comes from the name of a Persian scientist named Al-Khwarizmi. He lived around 825 AD and wrote books on Indian computation. In the 12th century, Latin translations of his work appeared in Europe. The name was Latinized into "algorismi." By the 15th century, the word changed to "algorithmus" due to Greek influence. Eventually, the English word "algorithm" became the standard term we use today.

Today, algorithms are part of almost everything we do. They help run the apps on our phones and computers. Scientists are even using quantum algorithms to solve problems much faster. We can show algorithms using many different tools. Some people use flowcharts to draw the steps visually. Others use programming languages so a computer can read them. You might also see them written in pseudocode or simple English. These different methods help us understand how the rules work.

391 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (2)
File:GCD_through_successive_subtractions.svg
GCD_through_successive_subtractions.svg
File:Diagram for the computation of Bernoulli numbers.jpg
Diagram for the computation of Bernoulli...
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.