Languages Fall 2018
Language: a set of strings String: a sequence of symbols from some alphabet Example: Strings: cat, dog, house Language: {cat, dog, house} Alphabet: Fall 2018
Languages are used to describe computation problems: Alphabet: Fall 2018
Alphabets and Strings An alphabet is a set of symbols Example Alphabet: A string is a sequence of symbols from the alphabet Example Strings Fall 2018
Decimal numbers alphabet Binary numbers alphabet Fall 2018
Unary numbers alphabet Decimal number: Fall 2018
String Operations Concatenation Fall 2018
Reverse Fall 2018
String Length Length: Examples: Fall 2018
Length of Concatenation Example: Fall 2018
Empty String A string with no letters is denoted: Observations: Fall 2018
Substring Substring of string: a subsequence of consecutive characters Fall 2018
Prefix and Suffix Prefixes Suffixes prefix suffix Fall 2018
Another Operation Example: Definition: Fall 2018
The * Operation : the set of all possible strings from alphabet
The + Operation : the set of all possible strings from alphabet except
Languages A language over alphabet is any subset of Examples: Fall 2018
More Language Examples An infinite language Alphabet Fall 2018
Prime numbers Alphabet Language: Fall 2018
Even and odd numbers Alphabet Fall 2018
Unary Addition Alphabet: Language: Fall 2018
Squares Alphabet: Language: Fall 2018
Note that: Sets Set size Set size String length Fall 2018
Operations on Languages The usual set operations Complement: Fall 2018
Reverse Definition: Examples: Fall 2018
Concatenation Definition: Example: Fall 2018
Another Operation Definition: Special case: Fall 2018
Fall 2018
Star-Closure (Kleene *) All strings that can be constructed from Definition: Example: Fall 2018
Positive Closure Definition: Same with but without the Fall 2018