We use cookies to distinguish you from other users and to provide you with a better experience on our websites. Close this message to accept cookies or find out how to manage your cookie settings.
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 [email protected]
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 going to finish our study of recursion in Pascal programming by seeing how to eliminate it. This may seem a curious thing to do given that for seven chapters we have strongly pressed the case for using recursion, but there are a number of reasons for doing so.
Firstly, it may be that the system we are using does not allow recursion. Such a restriction will not arise with Pascal, of course, but sometimes we are obliged to write in Fortran where such a restriction is part of the language definition. If we can translate a recursive procedure into a non-recursive one, then we can still retain the advantages of designing our programs recursively.
Secondly, where there are two or more forms of recursion in a procedure, its readability may be improved by the removal of one of the recursive aspects. We discussed this idea in Chapter 2 and used it in Chapters 5 and 6. For improved readability, the recursion to be eliminated must be of the preorder, linear type.
Thirdly, we may have tight space constraints or very tight time constraints and it may be that the replacement of a recursive procedure by an iterative one allows us to satisfy those constraints.
Finally, and most importantly, we may wish to consider the elimination of recursion purely to increase our understanding of recursive procedures.
One of the achievements of modern science has been the realization that very few things in the world are completely static. The behaviour of many systems, both organic and synthetic, is influenced greatly by environmental changes. This interaction between a system and its environment can be vastly complicated and yet it is an area that we must try to understand if we are going to be in a position to predict the behaviour of the system and its effect on its environment.
The particular type of analysis that we present here is based on techniques that are generally referred to as algebraic. In some cases we will draw on established algebraic results but in general it is a new type of algebra that has arisen from a desire to understand the behaviour of a system in an environment. This is perhaps the most refreshing aspect of the theory. Here, for a change, is a subject whose motivation can be linked to very real problems in the modern world, a subject that has a short but dramatic history and one which has played a large role in the development of the fundamentals of computer science. However its achievements have not been restricted to this case alone and we hope to illustrate this when we examine the examples at the end of this chapter.
In many of the systems environmental changes alter the behaviour of the system and these changes in behaviour then affect the environment in some way.
In recent years there has been a growing awareness that many complex processes can be regarded as behaving rather like machines. The theory of machines that has developed in the last twenty or so years has had a considerable influence, not only on the development of computer systems and their associated languages and software, but also in biology, psychology, biochemistry, etc. The so-called ‘cybernetic view’ has been of tremendous value in fundamental research in many different areas. Underlying all this work is the mathematical theory of various types of machine. It is this subject that we will be studying here, along with examples of its applications in theoretical biology, etc.
The area of mathematics that is of most use to us is that which is known as modern (or abstract) algebra. For a hundred years or more, algebra has developed enormously in many different directions. These all had origins in difficult problems in the theory of equations, number theory, geometry, etc. but in many areas the subject has taken on its own momentum, the problems arising from within the subject, and as a result there has been a general feeling that much of abstract algebra is of little practical value. The advent of the theory of machines, however, has provided us with new motivation for the development of algebra since it raises very real practical problems that can be examined using many of the abstract tools that have been developed in algebra.
The aim of this chapter is the description of a method for decomposing an arbitrary transformation semigroup into a wreath product of ‘simpler’ transformation semigroups, namely aperiodic ones and transformation groups. The origin of this theory is the theorem due to Krohn and Rhodes which gave an algorithmic procedure for such a decomposition. There are now various proofs of this result extant, some are set in the theory of transformation semigroups and others are concerned with the theory of state machines. In the light of the close connections between the two theories forged in chapter 2 we can expect a similar correspondence between the two respective decomposition theorems. The proof of the decomposition theorem for state machines has the advantage that it can be motivated the more easily, but at the expense of some elegance. Recently Eilenberg has produced a new, and much more efficient, decomposition and it is this theory that we will now study. It is set in the world of transformation semigroups.
Before we embark on the details let us pause for a moment and consider how we could approach the problem of finding a suitable decomposition. Let M = (Q, Σ,F) be a state machine and let |Q| = n. Consider the collection π of all subsets of Q of order n−1. Then π is an admissible subset system, and we may construct a well-defined quotient machine M/π.
We may as well begin at the beginning and this will involve us in a brief excursion through some of the fundamental concepts essential for any algebraic subject. It will also enable us to become acquainted with the notation used, although the experienced reader could easily skip through this chapter. We will assume that the reader has a knowledge of elementary set theory.
Relations
One of the fundamental concepts in mathematics is that of a relation. It can be introduced in a variety of ways but the most useful one for us is the following abstract approach.
Let A be a non-empty set. A relation, ℛ, on A is a subset ℛ ⊆ A × A. If (a, a′) ∈ A × A and (a, a′) ∈ ℛ we say that a is ℛ-related to a′. Sometimes a natural notation is used in mathematics to express this relationship between two elements of a set, for example if A = ℤ, the set of all integers, then there is a relation ≤ that can be defined on ℤ. We write a ≤ a′ if the number a′ − a is not negative and the set ℛ ⊆ ℤ × ℤ defining this relation consists of all ordered pairs (a, a′)∈ ℤ × ℤ such that a < a≤.
A relation ℛ on the set A is an equivalence relation if:
Over the past fifty years there have been many proposals for a precise mathematical characterisation of the intuitive idea of effective computability. The URM approach is one of the more recent of these. In this chapter we pause in our investigation of URM-computability itself to consider two related questions.
How do the many different approaches to the characterisation of computability compare with each other, and in particular with URM-computability?
How well do these approaches (particularly the URM approach) characterise the informal idea of effective computability?
The first question will be discussed in §§ 1-6; the second will be taken up in § 7. The reader interested only in the technical development of the theory in this book may omit §§ 3-6; none of the development in later chapters depends on these sections.
Other approaches to computability
The following are some of the alternative characterisations that have been proposed:
(a) Gödel-Herbrand-Kleene (1936). General recursive functions defined by means of an equation calculus. (Kleene [1952], Mendelson [1964].)
(b) Church (1936). λ-definable functions. (Church [1936] or [1941].)
(c) Gödel-Kleene (1936). μrecursive functions and partial recursive functions (§ 2 of this chapter.).
(d) Turing (1936). Functions computable by finite machines known as Turing machines. (Turing [1936]; § 4 of this chapter.)
(e) Post (1943). Functions defined from canonical deduction systems. (Post [1943], Minsky [1967]; § 5 of this chapter.)
(f) Markov (1951). Functions given by certain algorithms over a finite alphabet. (Markov [1954], Mendelson [1964]; § 5 of this chapter.)
There is great diversity among these various approaches; each has its own rationale for being considered a plausible characterisation of computability. The remarkable result of investigation by many researchers is the following:
The Fundamental result
Each of the above proposals for a characterisation of the notion of effective computability gives rise to the same class of functions, the class that we have denoted ℘.