Strings and languages
| Lecture #2: Review of Relevant Mathematics |
Strings and languages | 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 |
| Lecture #2: Review of Relevant Mathematics |
Strings and languages | Symbols as abstract "signs" |
| 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* |
| Lecture #2: Review of Relevant Mathematics |
Strings and languages | Symbols as abstract "signs" |
| Strings as sequences of symbols |
| 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 |
| Lecture #2: Review of Relevant Mathematics |
Strings and languages | Symbols as abstract "signs" |
| Strings as sequences of symbols |
| Special notation for strings |
| 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? |
| Lecture #2: Review of Relevant Mathematics |
Strings and languages | Symbols as abstract "signs" |
| Strings as sequences of symbols |
| Special notation for strings |
| Operations on strings |
| 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? |
| Lecture #2: Review of Relevant Mathematics |
Strings and languages | Symbols as abstract "signs" |
| Strings as sequences of symbols |
| Special notation for strings |
| Operations on strings |
| Languages as subsets of strings |
| 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 |
| Lecture #2: Review of Relevant Mathematics |
Strings and languages | Symbols as abstract "signs" |
| Strings as sequences of symbols |
| Special notation for strings |
| Operations on strings |
| Languages as subsets of strings |
| Languages as properties of strings |
| Object language vs. meta-language
Note! it is easy to confuse "use" with "mention" whenever we use language to speak about language |