Outline
- What is automata theory?
- What is computability theory?
Why are we studying Formal Languages?
- Computer science is about how to make software to make a computer do what we want it to do.
- One important component to this is the study of algorithms.
- Formal Languages are interesting for two main reasons: (1) It gives us a framework for developing algorithms for strings
(2) It gives us insights into what it is possible to make a computer do in principle with any algorithm.
Why are we interested in strings?
- Frequently, we want to be able to search for things.
- For instance, find all the web pages that contain Chris Pollett.
- Here "Chris Pollett" is a string and it appears in the context of much larger strings called web pages.
- Sometimes though we misspell things, or maybe we have more than a single space between say Chris and Pollett, so we want to be able to have algorithms which are more general and do not need an exact match.
How are algorithms for strings developed?
- Just like in CS146 where data structures like queues, trees, etc are developed for storing and retrieving data, in CS154, we will develop an abstract model for dealing with strings.
- This model comes in several flavors, but is generally known as an automata.
- We will also come up with a succinct notation for expressing things like inexact matches known as regular expressions.
More Things we'd like to do with Strings
- Another task that one sometimes needs to solve is that of compiling a program.
- How do we tell what makes a valid C or Java program?
- We'll use another abstract model to solve this problem called a context free grammar (CFG).
- CFGs have many uses besides writing compilers. For instance, grammars also play a role in string compression algorithms.
- CFGs are used widely on the web. For example, the web language, XML, is essentially a language for specifying context free grammars.
What is it possible to program a computer to do?
- This is the central question of a branch of computer science known as computability theory.
- It turns out a slight generalization of our automata model called a Turing Machine can be used to give us some insight on this question.