To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
We are now in a position to give a unified treatment of some of the central negative results of logic: Tarski's theorem on the indefinability of truth, Church's theorem on the undecidability of logic, and Gödel's first incompleteness theorem, according to which, roughly speaking, any sufficiently strong formal system of arithmetic must be incomplete (if it is consistent). These theorems can all be seen as more or less direct consequences of a single exceedingly ingenious lemma, the Gödel diagonal lemma. This lemma, and the various negative results on the limits of logic that follow from it, will be presented in section 17.1. This presentation will be followed by a discussion in section 17.2 of some classic particular examples of sentences that can be neither proved nor disproved in theories of arithmetic like Q or P. Further such examples will be presented in the optional section 17.3. According to Gödel's second incompleteness theorem, the topic of the next chapter, such examples also include the sentence stating that P is consistent.
The Diagonal Lemma and the Limitative Theorems
By the results in the preceding chapter on the representability of recursive functions, we can ‘talk about’ such functions within a formal system of arithmetic. By the results of the chapter before that on the arithmetization of syntax, we can ‘talk about’ sentences and proofs in a formal system of arithmetic in terms of recursive functions.
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
‘Welcome to the wonderful world of finite state machines.’
Introduction
Computation is a concept common to all computing machines, regardless of the messy details associated with their hardware implementation. However, actual computing machines/computers are too complicated (due to the several constraints caused by physical reality) for a manageable mathematical theory to be ascribed to them. Therefore, in order to fully understand the power and limitation of real machines, idealised computers or computational models are designed and studied. These idealised computers may be accurate in some ways but perhaps not in others.
There are several computational models and the purpose of a computational model is to capture the computational aspects that are relevant to the particular problem under consideration while hiding the other unimportant aspects. Thus, a computational model can be thought of as a custom machine designed to suit particular needs. Some of the important computational models are – deterministic finite automaton (DFA), the non-deterministic finite automaton (NFA), the deterministic pushdown automaton (DPDA), the nondeterministic pushdown automation (NPDA), the deterministic Turing machine (DTM) and the nondeterministic Turing machine (NTM). Undoubtedly each of these models has a special significance in the theory of computation. The most basic computational model is the deterministic finite automaton (DFA).
Finite Automata
As discussed in chapter 1, finite automaton is a mathematical model of a system with discrete inputs and outputs. Such a system can be in any one of the finite number of internal configurations or ‘states’ and each state of the system provides sufficient information concerning the past inputs so that the behaviour of the system could be studied on the provision of subsequent inputs.
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
In the previous chapters, an abstract model of a machine that accepts input values but doesn't produce any output values, was discussed. Some machines, however, produce output values after accepting input values. In the case of FSA (finite state automata), movements from state qi to qj depend on the input at qi and no output emerges. However, in the case of FSM, a move from a state qi to state qj results in an output. Consequently, a FSM possesses two special features: a finite set Γ of output symbols and an output function λ :Q × ∑ → Γ, where ∑ is the input alphabet. Thus, one major limitation of finite automata is that its output is limited to a binary signal: ‘accept’ or ‘don't accept’, to indicate the acceptance or rejection of an input string respectively. In order to make finite automata to have output capabilities, two classical machines are designed that transform input strings into output strings. They are
a. Moore machine and
b. Mealy machine.
A Moore machine is a FSM – M0, named after Edward Moore, who introduced it in 1956.
A Mealy machine is a FSM – Me, named after George H.Mealy, who introduced it in 1955.
These machines are basically DFAs, except that they associate an output symbol with each state or with each state transition. However, there are no final states, because there is no acceptance or rejection involved.
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
In today's world of intense information dissemination and globalisation, the need of the hour is to bring out a well-structured and authentic textbook, especially in the field of computer science and technology. Our humble effort in this regard is to make a sincere value addition through this textbook.
This book is the culmination of our fascination for the subject of computation and its applications. It has been designed for students of computer science at the postgraduate level and is logically conceived, self-contained, well-organised and user-friendly.
The book contains an in-depth coverage of all the topics related to the theory of computation as mentioned in the syllabuses of B.E., M.C.A. and M.Sc. (Computer Science) of various universities. Sufficient amount of theoretical inputs supported by a number of illustrations are included for those who take deep interest in the subject.
The book includes 15 chapters, segregated into three sections. Part one ‘Fundamentals of Computation’, contains chapters 1 to 3. Chapter 1 is introductory in nature and gives a broad picture of the subject. Chapters 2 and 3 discuss Formal Language Theory and Regular Expressions and Languages. Part two ‘Models and Principles of Computation’, comprises chapters 4 to 7, and discusses topics like Finite State Machine, Equivalent Automata, Optimisation/Minimisation of DFA, Finite Automata and Regular Expressions, Transducers et cetera in a systematic way. Finally, part three ‘Advanced Models and Principles of Computation’ includes chapter 9 to 15, and addresses issues of Context- Free Grammar and Context-Free Languages, Simplification of Context-Free Grammar, Pushdown Automata, Pumping Lemma, Turing Machine, TM Extensions and Languages and Formal Languages/Grammar Hierarchy .
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
‘Enjoy the power of problem-solving techniques; get optimal results.’
Introduction
In this chapter, we briefly sample a few additional topics in DFA, which are of interest.
Optimum DFA
It is possible to have more than one DFAs that accept the same language. Among these equivalent DFAs, it is often useful to find the smallest, i.e., the DFA with the minimum possible number of states. This is especially important, when DFAs are used for designing computer hardware circuits.
Definition
Minimisation/optimisation of a deterministic finite automaton refers to the detection of those states of a DFA, whose presence or absence in a DFA does not affect the language accepted by the automata.
The states that can be eliminated from automata, without affecting the language accepted
by automata, are:
▪Unreachable or inaccessible states.
▪Dead states.
▪Non-distinguishable or indistinguishable state or equivalent states.
Unreachable States
These are the states that cannot possibly be reached from the initial state. Unreachable states of a DFA are not reachable from the initial state of DFA, by any possible input sequence.
EXAMPLE 6.1.1: (Unreachable states)
i. Here, state 5 is unreachable, from the initial state 0, with any input string (either b or a).
ii. Here, states q2 and q4 are unreachable, from the initial state q0, with any input string (0 or 1).
Dead State or Trap State
A state is dead, if it is not an accepting state and has no out-going transitions, except to itself. Alternatively, a dead state is a nonfinal state of a DFA, whose transitions on every input symbol terminates on itself.
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
Consider the problem of heating a room. Assume that the thermostat is used as a controller and we do not have the exact model of how the the thermostat functions. It is only known that the thermostat turns on the radiator when temperature is between 68 and 70 degrees and it turns off the radiator when temperature is between 80 and 82 degrees. This heating system can be modelled as an automaton shown in the figure below, where X denotes the temperature.
The automaton shown is a non deterministic automaton, in the sense that for a given initial condition it accepts the whole family of different executions (solutions).
Elevator Controller
Consider an elevator that serves two floors. Inputs to elevator are calls to a floor, either from inside the elevator or from the floor itself.
The following are the 3 possible inputs:
i) no calls (a)
ii) call to floor one (b)
iii) call to floor two. (c)
The following are the 6 possible states:
q1 – waiting on first floor
q2 – about to go up
q3 – going up
q4 – going down
q5 – waiting on second floor
q6 – about to go down.
The above transition diagram is without the accepting and rejecting states because the elevator design is simple and acceptance is not an issue. In designing a more complex elevator, with states like overloading, breakdown etc., accepting and rejecting states become significant.
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University
P. K. Srimani, Professor, Department of Computer Science, Bangalore University,S. F. B. Nasir, Professor, Department of Computer Science, Bangalore University