Strings and languages

 

CS 446: Automata Theory
Lecture #2: Review of Relevant Mathematics

Strings and languages
bullet Symbols as abstract "signs" we take as primitive a notion of symbol: the usual intuitions about letters, numerals, ASCII or Unicode characters will do, but formally we need only to be able to identify and distinguish symbols

Control bar


















































 

CS 446: Automata Theory
Lecture #2: Review of Relevant Mathematics

Strings and languages
bullet Symbols as abstract "signs"
bullet Strings as sequences of symbols a string is just a (finite) sequence of symbols, i.e., for symbols in a set S, just a member of S*

Control bar


















































 

CS 446: Automata Theory
Lecture #2: Review of Relevant Mathematics

Strings and languages
bullet Symbols as abstract "signs"
bullet Strings as sequences of symbols
bullet Special notation for strings since we will work with strings often, we abuse notation a bit and write strings without delimiting parentheses or intervening spaces or commas; we will try to use a special font when writing literal strings
Ex: the string abc and the string xyzw

Control bar


















































 

CS 446: Automata Theory
Lecture #2: Review of Relevant Mathematics

Strings and languages
bullet Symbols as abstract "signs"
bullet Strings as sequences of symbols
bullet Special notation for strings
bullet Operations on strings the most important operations on strings we will need are those of length (defined as for other sequences) and concatenation, i.e., the joining of two (or more) strings, in order, to form a longer string

Q: what is the length of the concatenation of two strings?

Control bar


















































 

CS 446: Automata Theory
Lecture #2: Review of Relevant Mathematics

Strings and languages
bullet Symbols as abstract "signs"
bullet Strings as sequences of symbols
bullet Special notation for strings
bullet Operations on strings
bullet Languages as subsets of strings given a fixed set of symbols A (called the alphabet), a language is a just subset of A*

Q: how many langauges are there over a finite alphabet? over a countably infinite alphabet?

Control bar


















































 

CS 446: Automata Theory
Lecture #2: Review of Relevant Mathematics

Strings and languages
bullet Symbols as abstract "signs"
bullet Strings as sequences of symbols
bullet Special notation for strings
bullet Operations on strings
bullet Languages as subsets of strings
bullet Languages as properties of strings another way to view a language is as defined by a property of strings; this allows us to use, e.g., ZF set notation to describe a language

Control bar


















































 

CS 446: Automata Theory
Lecture #2: Review of Relevant Mathematics

Strings and languages
bullet Symbols as abstract "signs"
bullet Strings as sequences of symbols
bullet Special notation for strings
bullet Operations on strings
bullet Languages as subsets of strings
bullet Languages as properties of strings
bullet Object language vs. meta-language
Note! it is easy to confuse "use" with "mention" whenever we use language to speak about language

Control bar