CSE390D Notes for Wednesday, 11/27/24

This lecture is about a field known as computability. We study different models of computation. Each model has limitations on what can be expressed in that model. There are parallels to linguistics (different kinds of languages that can be recognized by the different models) and mathematics (different numeric functions that can be described using the different models). Noam Chomsky was a pioneer in this field and he defined what we call the Chomsky Hierarchy. We looked at a table from the wikipedia page for Chomsky Hierarchy that showed different languages and their machine model (linked on the calendar). We used a program called JFlap to build machines (linked on the calendar). We first build a Finite State Automaton that recognized the following language: L = {<empty>, aaa, aaaaaa, aaaaaaaaa, aaaaaaaaaaaa, ...} You can think of this as a machine that is computing the number of values of a in mod 3. Our machine had three states to keep track of the current count mod 3. We designated the state for 0 as the accepting state. I mentioned that this model corresponds to what are known as regular expressions. We can use this model to recognize languages like a^nb^m, but it isn't powerful enough to recognize a^nb^n because there is no notion of counting. For that you would need what is known as a Pushdown Automaton or PDA. It is a finite state machine plus a stack. To recognize a^nb^n we can push values onto the stack as we see a's and then pop the stack as we see b's to make sure that we have the same number of each. But even a PDA isn't powerful enough to recognize a language like a^nb^nc^n. It's like having one counter when we'd need two. Turing Machines give us the full range of possibilities. We developed a Turing Machine that determines whether a sequence of a's and b's is a palindrome. The initial state has the read/write head at the leftmost a or b: abababbababa ^ I said that the machine should erase the a's and b's (that makes the task easier) and if it finds that it was a palindrome, it should leave a 1 on the tape with the read/write head positioned to the left of that: 1 ^ And if it finds that it wasn't a palindrome, it should leave a 0 on the tape with the read/write head positioned to the left of that: 0 ^ The way we solved this is by erasing the initial character and then going to the far right to see if the last character was a match. If so, we'd erase it as well and then come back to the leftmost letter left to check. So from this initial state: abababbababa ^ we erased the leading and trailing a and were back to the original state: bababbabab ^
Stuart Reges
Last modified: Wed Nov 27 15:41:44 PST 2024