More generally, we might talk about algorithms or computational devices that, given an input X, output some function f(X). This is more general, but still, one can think of many problems that don't fit into this kind of relatively static model. For example, dynamic problems (e.g. auto-piloting an airplane in windy conditions, maintaining a search-engine index of web pages). |
For example, we might talk about algorithms or computational devices that, given an input X, output some function f(X). This is more general, but still, one can think of many problems that don't fit into this kind of relatively static model: for example, dynamic problems (e.g. auto-piloting an airplane in windy conditions, maintaining a search-engine index of web pages). |
|
For now we restrict our attention to the following kinds of computational problems: decision problems.
We call any set S of strings over a finite alphabet Σ a language.
(For example, let S be the set of binary strings (strings over the alphabet Σ = {0,1}) with an odd number of 1's.)
The decision problem for S is the following:
An algorithm (or computational device) decides S if it takes any string X ∈ Σ* as input and eventually halts and outputs 'yes' or 'no'. Furthermore, if X∈ S then 'yes' must be the output, and otherwise 'no'.
Theory of computation is about classes of languages, not so much about particular languages. (Also, about the relations between languages.)
Classes of languages are often defined by a computational model. (E.g. "The regular languages are those languages that can be decided by a finite automaton.") In this way, classes of languages delineate what can and cannot be computed under a particular model of computation.
For example, the set of /RegularLanguages is a class of languages.