Science  People  Locations  Timeline
Index: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Home > Formal language


In mathematics, logic and computer science, a formal language is a set of finite-length words (i.e. character strings) drawn from some finite alphabet, and the scientific theory that deals with these entities is known as formal language theory. Note that we can talk about formal language in many contexts (scientific, legal, linguistic and so on), meaning a mode of expression more careful and accurate, or more mannered than everyday speech. The sense of formal language dealt with in this article is the precise sense studied in formal language theory.

A typical alphabet would be {a, b}, and a typical string over that alphabet would be

ababba.

A typical language over that alphabet, containing that string, would be the set of all strings which contain the same number of symbols a and b.

The empty word (that is, length-zero string) is allowed and is often denoted by e, ε or Λ. While the alphabet is a finite set and every string has finite length, a language may very well have infinitely many member strings (because the length of words in it may be unbounded).

Some examples of formal languages:

A formal language can be specified in a great variety of ways, such as:

Several operations can be used to produce new languages from given ones. Suppose L1 and L2 are languages over some common alphabet.

A typical question asked about a formal language is how difficult it is to decide whether a given word belongs to the language. This is the domain of computability theoryComputation Discrete mathematics Computation can be defined as finding a solution to a problem from given inputs by means of an algorithm. This is what the theory of computation a subfield of computer science and mathematics, deals with. For thousands of and complexity theoryComplexity theory is part of the theory of computation dealing with the resources required during computation to solve a given problem. The most common resources are time (how many steps does it take to solve a problem) and space (how much memory does it.

Formal languages

Read more »

Non User