Building Bigger Machines From Smaller Ones




CS154

Chris Pollett

Apr. 3, 2013

Outline

Transducers

Ways of Building Larger Turing Machines

A Simple Turing Machine

Building Bigger TMs

More on Diagrams

Examples

More Examples

Here is a machine which when started with a string `w` on the tape halts with `w\square w` on the tape.

Doubling TM

Homework Problems

Problem 1. Show step-by-step how the string 0001010001 would be compressed by the SEQUITUR algorithm.

Answer. The following table shows the state of `mbox(Aux)` and the productions table after each letter is read:

Letter`mbox(Aux)`Production Table`mbox(Hash)`
00`{}``{}`
000`{}``{00}`
0000 becomes 0A`{A->00}`{0A}
10A1`{A->00}``{0A, A1}`
00A10`{A->00}``{0A, A1, 10}`
10A101`{A->00}``{0A, A1, 10, 01}`
00A1010 becomes 0ABB`{A->00, B->10}``{0A, \B\B}`
00ABB0`{A->00, B->10}``{0A, \B\B, \B0}`
00ABB00 becomes 0ABBA`{A->00` marked, `B->10}``{0A, \B\B, \B\A}`
10ABBA1`{A->00` marked, `B->10}``{0A, \B\B, \B\A, A1}`

We next remove any rule used only once (an unmarked rule), and add a rule `S -> mbox(Aux)`. This gives the grammar. `{S->0A0101A1, A->00}`. This could be represented as the string R\0\0R\0#0\0\1\0\1#0\1.

Problem 2. Draw a PDA for the language L over `{0,1}` consisting of strings with an equal number of 0's and 1's. So 010011 would be in this language. Next draw a DFA recognizing `0^\star1^\star`. Use the algorithm from class to draw a PDA for the intersection of these two languages.

Here is an image of the relevant diagrams and resulting construction:

Cartesian product of PDA with DFA

JFLAP

JFLAP Example

The Church-Turing Thesis