Presentation is loading. Please wait.

Presentation is loading. Please wait.

Formal Language. A formal language is defined by two components: -Alphabet -Rules of syntax.

Similar presentations


Presentation on theme: "Formal Language. A formal language is defined by two components: -Alphabet -Rules of syntax."— Presentation transcript:

1 Formal Language

2 A formal language is defined by two components: -Alphabet -Rules of syntax

3 Formal Language ‘Alphabet’ The alphabet is a precisely defined as a finite set. Elements of the set are called, ‘symbols’. (Similar to words in natural language)

4 Formal Language ‘Rules of syntax’ This defines how to construct ‘strings’ of the language out of ‘symbols’ (Equivalent of sentences in a natural language)

5 Formal Language Example: pencil notation Alphabet {H, B, 1, 2, 3, 4} (Equivalent of sentences in a natural language) Strings {“4B”, “3B”, “2B”, “B”, “HB”, “4H”, “3H”, “2H”, “H”} (Note, the above are strings not symbols, strings are in double quotes) It is not usual to be able to list all the strings in a language. Therefore, there needs to be someway of describing the ‘rules’ that are linked to the language.

6 Formal Language Example: pencil notation Alphabet {H, B, 1, 2, 3, 4} (Equivalent of sentences in a natural language) Strings {“4B”, “3B”, “2B”, “B”, “HB”, “4H”, “3H”, “2H”, “H”} (Note, the above are strings not symbols, strings are in double quotes) It is not usual to be able to list all the strings in a language. Therefore, there needs to be someway of describing the ‘rules’ that are linked to the language.


Download ppt "Formal Language. A formal language is defined by two components: -Alphabet -Rules of syntax."

Similar presentations


Ads by Google