Nepedia
Back to Discover
Independent Reader
🔢

Formal language

math Maturity 11-13 Next article →

Think about a box of letter blocks.

Formal languages
Formal languages

You can pick any block to make a word. These blocks come from a set called an alphabet. In a formal language, we use these letters to make strings. A string is just a sequence of letters. Some strings are called well-formed. This means they follow specific rules.

Syntax tree
Syntax tree

These rules are often called a grammar. A grammar tells us how to build words the right way.

People use these ideas in many ways. Computer scientists use them to make programming languages. These languages help computers follow instructions. Mathematicians use them to study the patterns in math. In the 17th century, Leibniz imagined a universal language. He wanted to use symbols to represent ideas. Later, Noam Chomsky created a way to group these languages. He called this the Chomsky hierarchy. This helps us see how complex a language is. We can also use these rules to describe machines. Even simple math rules are a type of formal language. They show us how symbols can fit together.

173 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (2)
File:Syntax tree.svg
Syntax tree.svg
File:Formal languages.svg
Formal languages.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.