# Theory of Computation Lecture Notes - The Eye | Front Page Library/Theory... Theory of Computation...

date post

01-Mar-2021Category

## Documents

view

0download

0

Embed Size (px)

### Transcript of Theory of Computation Lecture Notes - The Eye | Front Page Library/Theory... Theory of Computation...

Theory of Computation Lecture Notes

Theory of Computation Lecture Notes

Abhijat Vichare

August 2005

Contents

● 1 Introduction ● 2 What is Computation ? ● 3 The λ Calculus

�❍ 3.1 Conversions: �❍ 3.2 The calculus in use �❍ 3.3 Few Important Theorems �❍ 3.4 Worked Examples �❍ 3.5 Exercises

● 4 The theory of Partial Recursive Functions

�❍ 4.1 Basic Concepts and Definitions �❍ 4.2 Important Theorems �❍ 4.3 More Issues in Computation Theory �❍ 4.4 Worked Examples �❍ 4.5 Exercises

● 5 Markov Algorithms

�❍ 5.1 The Basic Machinery �❍ 5.2 Markov Algorithms as Language Acceptors and Recognisers �❍ 5.3 Number Theoretic Functions and Markov Algorithms �❍ 5.4 A Few Important Theorems �❍ 5.5 Worked Examples �❍ 5.6 Exercises

● 6 Turing Machines

�❍ 6.1 On the Path towards Turing Machines �❍ 6.2 The Pushdown Stack Memory Machine �❍ 6.3 The Turing Machine �❍ 6.4 A Few Important Theorems �❍ 6.5 Chomsky Hierarchy and Markov Algorithms �❍ 6.6 Worked Examples �❍ 6.7 Exercises

● 7 An Overview of Related Topics

�❍ 7.1 Computation Models and Programming Paradigms �❍ 7.2 Complexity Theory

● 8 Concluding Remarks ● Bibliography

1 Introduction

http://www.cfdvs.iitb.ac.in/~amv/Computer.Science/courses/theory.of.computation/ (1 of 41) [12/23/2006 1:14:53 PM]

Theory of Computation Lecture Notes

Theory of Computation Lecture Notes

Abhijat Vichare

August 2005

Contents

● 1 Introduction ● 2 What is Computation ? ● 3 The λ Calculus

�❍ 3.1 Conversions: �❍ 3.2 The calculus in use �❍ 3.3 Few Important Theorems �❍ 3.4 Worked Examples �❍ 3.5 Exercises

● 4 The theory of Partial Recursive Functions

�❍ 4.1 Basic Concepts and Definitions �❍ 4.2 Important Theorems �❍ 4.3 More Issues in Computation Theory �❍ 4.4 Worked Examples �❍ 4.5 Exercises

● 5 Markov Algorithms

�❍ 5.1 The Basic Machinery �❍ 5.2 Markov Algorithms as Language Acceptors and Recognisers �❍ 5.3 Number Theoretic Functions and Markov Algorithms �❍ 5.4 A Few Important Theorems �❍ 5.5 Worked Examples �❍ 5.6 Exercises

● 6 Turing Machines

�❍ 6.1 On the Path towards Turing Machines �❍ 6.2 The Pushdown Stack Memory Machine �❍ 6.3 The Turing Machine �❍ 6.4 A Few Important Theorems �❍ 6.5 Chomsky Hierarchy and Markov Algorithms �❍ 6.6 Worked Examples �❍ 6.7 Exercises

● 7 An Overview of Related Topics

�❍ 7.1 Computation Models and Programming Paradigms �❍ 7.2 Complexity Theory

● 8 Concluding Remarks ● Bibliography

1 Introduction

In this module we will concern ourselves with the question:

http://www.cfdvs.iitb.ac.in/~amv/Computer.Science/courses/theory.of.computation/toc.html (1 of 37) [12/23/2006 1:17:43 PM]

Theory of Computation Lecture Notes

We first look at the reasons why we must ask this question in the context of the studies on Modeling and Simulation.

We view a model of an event (or a phenomenon) as a ``list'' of the essential features that characterize it. For instance, to model a traffic jam, we try to identify the essential characteristics of a traffic jam. Overcrowding is one principal feature of traffic jams. Yet another feature is the lack of any movement of the vehicles trapped in a jam. To avoid traffic jams we need to study it and develop solutions perhaps in the form of a few traffic rules that can avoid jams. However, it would not be feasible to study a jam by actually trying to create it on a road. Either we study jams that occur by themselves ``naturally'' or we can try to simulate them. The former gives us ``live'' information, but we have no way of knowing if the information has a ``universal'' applicability - all we know is that it is applicable to at least one real life situation. The latter approach - simulation - permits us to experiment with the assumptions and collate information from a number of live observations so that good general, universal ``principles'' may be inferred. When we infer such principles, we gain knowledge of the issues that cause a traffic jam and we can then evolve a list of traffic rules that can avoid traffic jams.

To simulate, we need a model of the phenomenon under study. We also need another well known system which can incorporate the model and ``run'' it. Continuing the traffic jam example, we can create a simulation using the principles of mechanical engineering (with a few more from other branches like electrical and chemical engineering thrown in if needed). We could create a sufficient number of toy vehicles. If our traffic jam model characterizes the vehicles in terms of their speed and size, we must ensure that our toy vehicles can have varying masses, dimensions and speeds. Our model might specify a few properties of the road, or the junction - for example the length and width of the road, the number of roads at the junction etc. A toy mechanical model must be crafted to simulate the traffic jam!

Naturally, it is required that we be well versed with the principles of mechanical engineering - what it can do and what it cannot. If road conditions cannot be accurately captured in the mechanical model1, then the mechanical model would be correct only within a limited range of considerations that the simulation system - the principles of mechanical engineering, in our example - can capture.

Today, computers are predominantly used as the system to perform simulation. In some cases usual engineering is still used - for example the test drive labs that car manufacturers use to test new car designs for, say safety. Since computers form the main system on which models are implemented for simulation, we need to study computation theory - the basic science of computation. This study gives us the knowledge of what computers can and cannot do.

2 What is Computation ?

Perhaps it may surprise you, but the idea of computation has emerged from deep investigation into the foundations of Mathematics. We will, however, motivate ourselves intuitively without going into the actual Mathematical issues. As a consequence, our approach in this module would be to know the Mathematical results in theory of Computation without regard to their proofs. We will treat excursions into the Mathematical foundations for historical perspectives, if necessary. Our definitions and statements will be rigorous and accurate.

Historically, at the beginning of the 20 century, one of the questions that bothered mathematicians was about what an algorithm actually is. We informally know an algorithm: a certain sort of a general method to solve a family of related questions. Or a bit more precisely: a finite sequence of steps to be performed to reach a desired result. Thus, for instance, we have an addition algorithm of integers represented in the decimal form: Starting from the least significant place, add the corresponding digits and carry forward to the next place if needed, to obtain the sum. Note that an algorithm is a recipe of operations to be performed. It is an appreciation of the process, independent of the actual objects that it acts upon. It therefore must use the information about the nature (properties) of the objects rather than the objects themselves. Also, the steps are such that no intelligence is required - even a machine2 can do it! Given a pair of numbers to be added, just mechanically perform the steps in the algorithm to obtain the sum. It is this demand of not requiring any intelligence that makes computing machines possible. More important: it defines what computation is!

Let me illustrate the idea of an algorithm more sharply. Consider adding two natural numbers3. The process of addition generates a third natural number given a pair of them. A simple way to mechanically perform addition is to tabulate all the pairs and their sum, i.e. a table of triplets of natural number with the first two being the numbers to be added and the third their sum. Of course, this table is infinite and the tabulation process cannot be completed. But for the purposes of mechanical - i.e. without ``intelligence'' - addition, the tabulation idea can work except for the inability to ``finish'' tabulation. What we would really like to have is some kind of a ``black box machine'' to which we ``give'' the two numbers to be added, and ``out'' comes their sum. The kind of operations that such a box would essentially contain is given by the addition algorithm above: for integers represented in the decimal form, start from the least significant place, add the corresponding digits and carry forward to the next place if needed, for all the digits, to obtain the sum. Notice that the ``algorithm'' is not limited by issues like our inability to finish the table. Any natural number, howsoever large, is represented by a finite number of digits and the algorithm will eventually stop! Further, the algorithm is not particularly concerned about the pair of numbers that it receives to be processed. For any, and every, pair of natural numbers it works. The algorithm captures the computation process of addition, while the tabulat

Recommended

*View more*