• No results found

How is software related to mathematics?

by which to understand the relationship. Courts considering the copyright of software have not been so restrained. There are two reasons why the algorithm has taken centre stage, one historical, one practical. Historically, software was written in a way different to that described earlier in this chapter – programs were written as one long sequence of code, or one algorithm. This remained the dominant approach until the late 1980s, when the top down methodology took hold. However, all of the US Supreme Court cases on the patentability of software took place before this point. But this historical justification is limited in its usefulness, since there have been a substantial number of cases in other courts since this time, none of which have con- sidered this change. Further, the same courts when considering copyright have demonstrated a clear understanding of that change.50

Practically then, the reason algorithms are so important is because it is primarily in algorithms that the function, rather than the structure of software is to be found. Since functionality is what the patent regime tries to protect, it is to be expected that courts have kept algorithms at the centre of their focus.51 The organisation of code, although important forms part of the “mere

scheme or plan”52for carrying out the implementation of the software by programmers, and is

thus beyond the operation of patent law.53 Thus it is both sufficient and useful to consider the

relationship of software and mathematics through the lens of the algorithm.

Algorithms, as a formalised description of a process, give a clue as to the relationship of soft- ware and mathematics. In the early part of the 20thcentury, the mathematician David Hilbert

sought to prove that the truth of mathematical principles could be formally demonstrated.54

A formal proof is in effect a formalised version of the mathematical algorithm as described above. A formalised notion of mathematics seeks to prove the truth of a mathematical theorem as follows:

Figure 1.4: Deducing theorems from axioms

The formalist deductive process takes as its starting point a set of foundational truths, or ax- ioms.55 Each step of the deductive process involves the application of any one of a set of rules, 50 See for example the progression from the approach of the court inWhelan Associates v Jaslow Dental Lab Inc797

F.2d 1222 (1986) to that inComputer Associates International, Inc. v Altai, Inc.982 F.2d 693 (1992).

51 It should be noted however that data structures have sought to be protected as well. See for exampleIn re Alappat33 F.3d 1526 (1994);Welcome Real-Time v Catuity(2001) 113 FCR 110.

52 Cooper’ s Application(1902) 19 RPC 53.

53 Alternatively, it may be considered part of the non-patentable idea rather than a substantive part of the

invention. Finally, the organisation of the code may be too far removed from the “useful product”required by the court inGrant v Commissioner of Patents[2006] FCAFC 120.

54 Hilbert’ s formalist programme is discussed in greater detail in Chapter 4.

Chapter 1: The Nature of Software

whose truth can also be considered axiomatic. The idea is that if you agree with the truth of the starting point, and the truth of each step along the way, it follows that the truth of the des- tination must also be accepted. Thus any theorem that can be deduced from the axioms using the rules of the system, then the theorem must also be true. Although the formalist programme was ultimately unsuccessful, the notion of the reduction of reasoning to a series of mechanical steps lead to a number of formal models of computation, which despite their diversity have been shown to be equivalent “in the sense that each analysis offered has been proved to pick out the same class of functions”56The most famous of these is the Turing machine. The formal

equivalence of mathematics, the Turing machine and modern computers is considered below.

Formal equivalence: the Turing machine

The Turing machine was conceived by Alan Turing in 1936 as a way of formal statement of computability, in other words, a definition of what could be computed. At the heart of this definition was a device called the Turing machine. A Turing machine consists of the following components:

1. a control unit, which can assume any one of a finite number of possible states;

2. [an infinitely long] tape, marked off into discrete squares, each of which can store a single symbol taken from a finite set of possible symbols; and

3. a read-write head, which moves along the tape and transmits information to and from the control unit”57

On each iteration of a cycle, the Turing machine’s next action will be determined by a table of “transition rules”.58 For example, in the image above, the symbol ‘A’ and the state ‘q3’

determine the next step taken by the machine. These actions might include: • writing or erasing the current symbol in the current position of the tape; • moving the tape left or right, or leaving the tape where it is; or

• changing the internal control state.59

detail in Chapter 4. Russell and Whitehead used formalism in what might be considered to be reverse order, attempting to deduce the whole of mathematics from the rules and axioms of logic in order to prove that logic was the proper foundation of mathematics.

56 Jack Copeland, “The Church-Turing Thesis” onAlanTuring.net(2000)

<http://www.alanturing.net/turing_archive/pages/Reference%20Articles/The%20Turing-

Church%20Thesis.html>(accessed 22 May 2007). See also Todd Rowland, “Church-Turing Thesis”Wolfram

MathWorld(2002)<http://mathworld.wolfram.com/Church-TuringThesis.html>(accessed 23 April 2007) at 3.

For a comprehensive survey, see Stephen C KleeneIntroduction to Metamathematics(North-Holland, 1980) at 12-13. 57 “Turing Machine” in Anthony Ralston, Edwin D Reilly and David Hemmendinger (eds),Encyclopedia of

Computer Science(4thed, Wiley, 2003).

58 David Barker-Plummer “Turing Machines”Stanford Encyclopedia of Philosophy <http://plato.stanford.edu/entries/turing-machine/> (19 July 2008).

59 Alan M Turing, “On Computable Numbers, with an Application to the Entscheidungsproblem” (1937) 47 Proceedings of the London Mathematical Society230.

How is software related to mathematics?

Figure 1.5: The Turing machine

When the machine reaches a state for which there is no transition rule (or more than one), it is taken to have completed its computations, and the machine halts. An example of a transition table is given below:60

Configuration Behaviour

Control state Tape symbol Tape operations Final control state

b blank Print “0”, Move right c

c blank Move right e

e blank Print “1”, Move right z

z blank Move right b

Table 1.4: A Turing machine transition table

This example works as follows. This program endlessly loops through each of the control states b,c,e and z in order, and can be represented diagrammatically as follows:

The effect on the tape is to print alternating ones and zeros with a blank space in between, as shown below:

0 1 0 1 0 1 ...

Table 1.5: Turing machine output tape

Recalling the make-up of a typical machine-language instruction in Table 1.1, the visual sim- ilarity with the above illustration gives a sense of how the Turing machine relates to modern computers. Despite the apparent simplicity of this machine, it is capable of much more complex calculations than the above example suggests. In fact, Turing proposed that “[Turing machines] can do anything that could be described as ‘rule of thumb’ or ‘purely mechanical’ .”61In other 60 Adapted from Alan M Turing, “On Computable Numbers, with an Application to the Entscheidungsproblem”

(1937) 47Proceedings of the London Mathematical Society230 at 233.

61 Alan M Turing, “Intelligent Machinery” in Jack Copeland (ed),The essential Turing: seminal writings in computing, logic, philosophy(Oxford University Press, 2004) at 414.

Chapter 1: The Nature of Software

Figure 1.6: Turing machine control state flow diagram

words, “[w]henever there is an effective method for obtaining the values of a mathematical function, the function can be computed by a Turing machine.”62This statement can not how-

ever be proved in a precise fashion because what is computable and what is not is something which is largely intuitive. As such it is more of a “working hypothesis”,63but nonetheless one

which continues to be applicable. For this reason, the group of functions which are computable are also known as functions that are “intuitively calculable”(or computable).

It is however possible to note a common feature of all known calculable functions with more precision. Alonzo Church was able to show that they have the quality of being general recur- sive.64 Church was also able to demonstrate that any such algorithms could be written in a

mathematical notation called the lambda calculus (λ-calculus). Theλ-calculus and Turing ma- chine “turned out to be equivalent, in the sense that each picks out the same set of mathematical functions”.65 As such, the notion that all known effectively calculable mathematical algorithms

can be calculated by a Turing machine is known as the Church-Turing thesis.

62 B Jack Copeland, “The Church-Turing Thesis”Stanford Encyclopedia of Philosophy <http://plato.stanford.edu/entries/church-turing/> (20 July 2008).

63 Emil L Post, “Finite Combinatory Processes - Formulation 1” (1936) 1Journal of Symbolic Logic103, cited in B Jack Copeland, “The Church-Turing Thesis”Stanford Encyclopedia of Philosophy

<http://plato.stanford.edu/entries/church-turing/> (20 July 2008).

64 A simple example of a partially recursive function is the Fibonacci number series (1,2,3,5,8,...), where the next number in the series is the sum of the previous two numbers in the series. Although the series is defined by reference to itself (this is what makes it recursive) we know that working out. say, the 15th element in the series can be broken down into a fixed sequence of steps. A general recursive function is also defined by reference to itself, but in such a way that it creates an infinite loop. The classic example of this is Epimenides’ liar paradox, which can be put in the form “This phrase is false”. To assess the truth value of the statement. It is interesting to note that Gödel’s Incompleteness Theorem relies on a variation of the Liar paradox. The Liar paradox, Gödel’s theorem and other “strange loops”are expertly dealt with in Douglas R HofstadterGödel, Escher, Bach: An Eternal Golden Braid(Basic Books, 1980).

65 B Jack Copeland, “The Church-Turing Thesis”Stanford Encyclopedia of Philosophy <http://plato.stanford.edu/entries/church-turing/> (20 July 2008).

How is software related to mathematics?

Although the focus of the Church-Turing thesis is on determining the boundaries of com- putability, the formal equivalence of mathematics and software follows from the equivalence of λ-calculus and Turing machine programs. λ-calculus is clearly mathematics, and can be used to describe all known mathematical algorithms. Similarly, Turing machine transition tables are a form of software. Thus it follows that all computable functions can be solved either by mathematical methods, or by a Turing machine program.

But before a true equivalence can be reliably claimed, a further link must be made between real-world computers, and the abstract definition of a Turing machine. If real computers and Turing machines are equivalent, then it follows that software and mathematics must be identi- cal, because anything that can be written in software, can be described in theλ-calculus.

Are computers and the Turing machine equivalent?

The Strong Church-Turing thesis holds that a Turing machine can do whatever a computer can do. A certain level of support for this proposition is to be found in similarities between theλ- calculus and programming languages. For example, theλ-calculus has been referred to as “the smallest universal programming language.”66Theλ-calculus has also influenced the design of

a number of functional programming languages such as Lisp, ISWIM and ML.67

One obvious difficulty in accepting the equivalence of Turing machines and computers is the Turing machine’s unlimited storage. The importance of unlimited storage in the model is that it allows a broader notion of effective computability which “ensures that no computable func- tion will fail to be Turing-computable solely because there is insufficient time or memory to complete the computation.”68For practical purposes, this difference can be worked around by

assuming that the storage space of a real computer could be infinitely extended if required.69 It

would also be sufficient to show that anything calculable by a real world computer was at the very least a subset of the functions effectively calculable by a Turing machine since it would still lead to a conclusion that the overlap between mathematics and real world computers was a complete one.

The major difference between the Turing machine and modern computers is the way in which data is accessed. The Turing machine is a sequential-access machine, since it processes the memory (tape) one square at a time. Modern computer memory is not sequential. Any position

66 Wikipedia, “Lambda calculus”<http://en.wikipedia.org/wiki/Lambda_calculus> (5 November 2008). For a thorough account of the use of theλ-calculus as a programming language itself, see John R Harrison “Chapter 3 - Lambda calculus as a programming language”Introduction to Functional Programming(Lecture Notes, Cambridge University, 1997) <http://www.cl.cam.ac.uk/teaching/Lectures/funprog-jrh-1996/> (5 November 2008). 67 See John R Harrison “Chapter 3 - Lambda calculus as a programming language”Introduction to Functional

Programming(Lecture Notes, Cambridge University, 1997)

<http://www.cl.cam.ac.uk/teaching/Lectures/funprog-jrh-1996/> (5 November 2008) at 25-26. 68 David Barker-Plummer “Turing Machines”Stanford Encyclopedia of Philosophy

<http://plato.stanford.edu/entries/turing-machine/> (19 July 2008).

69 Given the continued exponential growth in storage space evident throughout the whole history of computing, this does not seem an overly unrealistic assumption to make. For example, when the first hard drive was shipped by IBM in 1956, it was 5Mb in size. By 1980, IBM had introduced a 1,000Mb hard drive. By 2007, Seagate had built a 1,000,000 Mb hard drive. See Jon Wuebben, “The History of the Floppy and Hard Disk Drive” (20 March 2007) <http://www.patantconsult.com/articlesvault/Article/The-History-of-the-Floppy-and-Hard- Disk-Drive/11501> (11 September 2011) ; Wikipedia, “Moore’s Law”,

Chapter 1: The Nature of Software

in memory can be accessed at any time. A computer based on such a design is called a random access machine (RAM). Despite these design differences however, it has been shown that both designs are of equivalent power. Since a Turing machine can simulate a RAM, and a RAM can simulate a Turing machine,70it follows that anything which can be designed for one machine

can be run on the other (via the simulator, if not directly). Since these machine-level simulations of a modern computer are possible on a modern computer, our discussion of the development of assembler and higher level languages above makes it clear that software written in modern computer languages can be made to run on a Turing machine, and vice versa, so all modern software is equivalent to Turing machine programs.

Criticisms of the Church-Turing thesis

The Church-Turing thesis has its critics who suggest that it may well owe more the “mathemat- ics worldview”,71 prevalent at the inception of computer science as a discipline, rather than

to any intellectual rigour. In particular, the definition of a Turing machine cannot account for interaction between the program and its environment, suggesting it “may no longer be fully appropriate to capture all features of present-day computing”72such as artificial intelligence,

graphics and the Internet. The difficulty with the Turing model, based as it is in mathematics, is in accounting for input after the program has started. As Tseytin puts it:

An algorithm in the mathematical sense is completely self-contained and as soon as the data have [sic] been specified it needs no further information. In contrast to this, a realistic procedure (and, to some extent, a modern computer program) can draw information from the environment in a way thatneed not be specified in advance.73

Despite this, the continued applicability of the Turing model is illustrated by the fact that the Turing model can be extended rather than replaced in order to overcome such limitations.74

Whilst these extended models might not be equivalent to the original, there is currently no evidence to suggest they are more powerful. So the Turing machine still remains central in the theory of computer science. In any event, there is nothing about these extensions that nec- essarily breaks the equivalence between mathematics and software, since there is no reason why similar extensions could not be made to mathematics to encompass interactivity. In any event, an algorithm which collects all data beforehand is functionally equivalent to an algo- rithm which collects data interactively so any difference does not alter the formal equivalence of mathematics and software.

70 Marvin L Minsky,Computation: finite and infinite machines(Prentice Hall, 1967), Chapter 11.

71 Dina Q Goldin and Peter Wegner “The Church-Turing Thesis: Breaking the Myth” inProceedings of CiE 2005152 at 154-155.

72 Jan van Leeuwen and Jirí Wiedermann, “The Turing Machine Paradigm in Contemporary Computing” in B Enquist and W Schmidt (eds),Mathematics Unlimited - 2001 and Beyond(Springer Verlag, 2000).

73 Gregory S Tseytin “From Logicism to Proceduralism (An Autobiographical Account)” inAlgorithms in Modern Mathematics and Computer Science(Springer Verlag: Berlin 1979) 390 at 395.

74 See for example the Persistent Turing Machine put forward in Dina Q Goldin and Peter Wegner “The Church-Turing Thesis: Breaking the Myth” inProceedings of CiE 2005152. Van Leeuwin offers an Interactive Turing Machine for the same purpose – see Jan van Leeuwen and Jirí Wiedermann, “Beyond the Turing Limit: Evolving Interactive Systems,” inSOFSEM 2001: Theory and Practice of Informatics(2001)

How is software related to mathematics?

Others have criticised the relevance of the Turing machine on the basis of industry practice. Dryja notes that the Turing machine fit neatly with computer software when it was primar- ily written by computer scientists, in a largely sequential form, almost a one-algorithm-per- program approach. Dryja claims that software development is now primarily the domain of engineers since it is centred around the top-down object-oriented programming approach de- scribed above. There is some truth in this contention, in that programs are not written as one long series of instructions any more. But objects themselves merely “perform computations and save local state”75are basically Turing machines. This in turn means that an object-oriented

program is a collection of inter-related Turing machines. On this basis it is hard to accept that the Turing machine, and hence mathematics is no longer relevant to an understanding of what software is. A collection of mathematical objects is no less mathematical in nature than its constituent parts.

What the above criticisms do suggest is that the Turing machine model is not a complete ac-

Related documents