This document provides an introduction to formal languages. It defines formal languages as sets of strings formed from an alphabet according to specific rules. Formal languages are classified by Chomsky and include languages like C, C++, and Pascal that have well-defined syntax that allows them to be processed by computers. Natural languages differ from formal languages in that they are more expressive but also more ambiguous and difficult to define with strict rules. Formal languages trade off some expressiveness for the advantages of being unambiguous and amenable to processing by machines.
This document provides an introduction to formal languages. It defines formal languages as sets of strings formed from an alphabet according to specific rules. Formal languages are classified by Chomsky and include languages like C, C++, and Pascal that have well-defined syntax that allows them to be processed by computers. Natural languages differ from formal languages in that they are more expressive but also more ambiguous and difficult to define with strict rules. Formal languages trade off some expressiveness for the advantages of being unambiguous and amenable to processing by machines.
This document provides an introduction to formal languages. It defines formal languages as sets of strings formed from an alphabet according to specific rules. Formal languages are classified by Chomsky and include languages like C, C++, and Pascal that have well-defined syntax that allows them to be processed by computers. Natural languages differ from formal languages in that they are more expressive but also more ambiguous and difficult to define with strict rules. Formal languages trade off some expressiveness for the advantages of being unambiguous and amenable to processing by machines.
Computer Science HUB Formal Language UNIT II (10T)
Formal languages: Definitions and examples,
Chomsky classification of languages, Languages and their relation, Recursive and Recursively enumerable sets, Languages and automata. Formal Language A formal language consists of words whose letters are taken from an alphabet and are well-formed according to a specific set of rules. Formal Language is a set of strings or symbols together with a set of rules that are specific to it The alphabet of a formal language is the set of symbols , letters or tokens from which the string of languages may be formed. The strings formed from this alphabets is called words and the words that belong to particular formal language are called well-formed words Definition A formal language L over an alphabet Σ is a subset of Σ*, that is, a set of words over that alphabet Σ . Set of words are grouped into expressions where as rules and constraints may be formulated for the creation of well formed expression Natural and Formal Languages
Natural Language Formal Language
Ex. English, Malayalam C,C++,Pascal..
+ High Expressiveness + Well Defined syntax
+ No extra learning + Unambiguous semantics
-Ambiguity + Can be processed by a computer
-Vagueness +Large problems can be solved
- Consistency hard to check - High learning effort