Sunteți pe pagina 1din 4

THE ROLE OF MATHEMATICS IN THE COMPUTER SCIENCE CURRICULUM James Bradley Calvin College of Mathematics & Computer

Department Grand

Science

Papids,

Michigan

49506

Abstract There has been much debate in the past few years about the appropriate mathematics requirements for an undergraduate computer science major. The discussion has focused primarily on two issues; (1) the underlying mathematical content of computer science courses and (2) the content of mathematics courses which would serve as appropriate cognate requirements for computer science major programs. Chile this discussion has been it has been too narrowly focused--it has helpful, not started from an understanding of the relationship between the disciplines of mathematics and

I.e., discrete mathematics is seen as playing similar role in the computer science major to that played by calculus in the physics major.

computer

science,

but rather

has sought

to iden-

tify mathematical prerequisites that computer science majors need in order to take existing computer science courses. This paper is a small step in seeking to apply an understanding of the relationship between the disciplines of mathematics and computer science to the undergraduate computer science curriculum. 1. Eackground

Curriculum 78 (<3>) has been wideiy criticized for not addressing the mathematical content of computer science adequately. Ralston and others have advocated the development of a discrete mathematics cognate for the computer science major, typically providing a mathematical treatment at the freshman level of topics such as sets, probability, relogic, elementary number theory, lations, graphs, and trees. A large number of institutions now offer such a course, typically one semester in length, although Ralston advocated a two semester course. The addition of such a cognate requirement to the computer science major suggests the following comparison: discrete computer mathematics science = calculus physics.

The role of discrete mathematics in computer science is quite different, however, than the role of calulus in physics. This suggests that the cognate model discussed above may also be inadecalculus provides a symbolic quate. In physics, tool which the physicist can use to model physical entities. The mathematics used is not the object of study but is a language and tool which enables the physicist to study something else. For example, Schroedinger's equation is not studied because it is representative of a certain class of partial differential equations, but because of its importance for quantum mechanics. In computer science, however, the mathematics used is itself the object of study as well as being a modeling For instance, binary trees are not studied tool. as models of some physical entities. Rather the is an abstration that can concept of binary tree be rigorously defined and which can be used to organize data in many different settings. Theorems such as those relating the height of a balanced binary tree to the number of its nodes are integral to the study of binary trees. Thus, in computer science, the binary tree is not simply a tool to help us understand some other phenomenon, tree is itself but the abstract notion of binary the object of study. On a more advanced level, the formal study of algorithms leads one into a study of Turing machines. The formal study of data structures leads one to the axiomatic definition of abstract data types. However, mathematics is also used for modeling in computer sciFor instance, queueing models are an essenence. tial part of operating systems and networks. The matics at least (1) In inition Tucker, degree depth of the relationship between matheand computer science can be highlighted in the following four ways: a definition of computer science. One defof computer science is given in Gibbs and "A Model Curriculum for a Liberal Arts in Computer Science" (<4>): is the systematic study structures, specifically of

Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. TO copy otherwise, or to republish, requires a fee and/or specfic permission.

Computer science algorithms and data 1. 2.

their formal properties their mechanical and linguistic zations, and

reali-

@ 1988 ACM 0-89791-256-X/88/0002/0100

$1.50

100

3.

their

applications.

proven

correct.

Gibbs and Tucker add that the three components are listed in their order of importance and that formal properties must be first in priority in order for the discipline to be called computer science rather than computer engineering or information systems. The study of the "formal properties" of algorithms and data structures is intrinsically mathematical in that it involves formal definitions and the proof of theorems. The comparison to physics is again helpful here. Even in theoretical physics (which is highly mathematical), the mathematics is always a means to an end. The emphasis on formal properties of algorithms and data structures in computer science points up the intrinsically mathematical character of the discipline of computer science. (2) Historically. The invention of the digital computer owes a great deal to the work of Frege and of Russell and Whitehead in formalizing logic. Propositional logic served as a foundation for the development of logic circuits and ultimately electronic computers. Turing's work in the 1930's demonstrated that a computation can be carried out if it can be carried out on an idealized machine. The stored program concept which was so fundamental to the advancement of digital computers in the late 1940's and 1950's was already implicit in Turing's notion of a machine developed earlier. Newell and Simon (152) have commented: "We should marvel that two of our deepest insights into information processing were achieved in the thirties, before modern computers came into being. It is a tribute to the genius of Alan Turing. It is also a tribute to the development of mathematical logic at the time, and testimony to the depth of computer science's obligation to it. More recently, the development of higher level languages has its roots in mathematical linguistics and the development of structured languages owes much to mathematical studies of the logical structure of algorithms. Thus the historical and contemporary roots of computer science are in mathematics and progress in computer science frequently draws heavily upon these roots. (3) In the content of current computer science courses. Lists of the extensive mathematical content of introductory computer science courses have been published elsewhere (see, for example, <6> and <7>). Upper division computer science courses often include a number of advanced topics in graph theory, automata, abstract algebra, probability, Just the presnumber theory and logic. ence of this content would not distinguish computer science from any other science in its use of mathematics. However, the approach that is typically taken in the upper division courses has considerable mathematical rigor--formal definitions are stated, theorems proven, the complexity of algorithms is carefully analyzed, and algorithms are

(4) The activities of matnematicians and computer scientists are often similar. For instance, writing a proof in some formal axiom system and writing an algorithm are much alike. Both involve a clearly specified starting point (the premises or the pre-conditions), a clearly defined goal (the conclusions or the post-conditions), a set of properties one may utilize (the axioms of the formal system or the properties of a particular and a set of rules governing the data structure), steps one may take (the laws of deductive logic or the logical structures for algorithms). In the case of an algorithm, there are real constraints imposed by machinery. But, in terms of the process of writing an algorithm, they differ little from the constraints imposed on a mathematician by the axioms. Another similarity is that a thorough understanding of the mathematical character of a problem is often the precursor to the discovery of a new algorithm for its solution. For instance, Robert Floyd recently developed an improved algorithm for random sampling (cl>). In describing this algorithm Jon Bentley writes "Floyd's key rule in this problem was, in his own words, to 'look for a mathematical characterization of the solution before you think about an algorithm to obtain it.'" However, computer science is also an empirical science in two senses. (1) the performance of algorithms is tested on machines, both to debug them and to measure their efficiency. Much learning about algorithms takes place through this concrete, physical experience. No matter how adept we might become at analyzing the complexity of algorithms and verifying their correctness, the ultimate test of an algorithm's worth is how it performs when realized on a physical machine. (2) Human behavior is often observed and used as a paradigm for the development of algorithms, particularly by workers in cognitive science. One form of this is expert systems a more common form arises whenever, in attempting to construct a new algorithm for finding the solution of some class of problems, we say '%ow would I solve a problem like this if I were doing it by hand?" Thus, computer science is not only a new discipline, it is a new type of discipline. It is very much like mathematics and overlaps mathematics considerably in that it is rigorous and its objects of study are abstract, not concrete entities in the material world. However, it is also empirical. Thus we cannot expect curricular models derived from either mathematics or the natural sciences necessarily to apply in computer science. 2. Curricular the implications following of computer implications science for of this curriculum

We see understanding development.

(1) Mathematics needs to be more fully integrated into the computer science curriculum. One noteworthy example of a mathematically oriented computer science curriculum is 12>. Even short of adopting such a curriculum, much can be done to

101

more fully riculai. points.

integrate mathematics Some specifics follow

into existing curin the next few

(2) Mathematics courses for computer science It is important students need to be rigorous. that the introductory discrete mathematics course not degenerate into a "cookbook" course. The goal of this course needs to be the development of "mathematical maturity" (qualities such as modeling and reasoning skills plus ability to estimate, generalize, simplify, detect sloppy reasoning, and appreciate the need for proof) as well as mastery of content. Attention needs to be paid to careful formulation of definitions and the axiomatic approach. Most theorems should be proven and students should be expected to do simple proofs as well. Exercises should not just be routine. This course is also an excellent place to introduce analysis and verification of algorithms as these topics provide a particularly strong link between mathematics and computer science. (3) Computer science courses need to fully inCSl and tegrate mathematics into their content. CS2 have well formulated curricula at this point. liowever , it is important that they do give adequate attention to the mathematical topics they address. For instance, CSl involves elementary mathematical matrices and propositional topics such as arrays, The terms involved logic (used in conditionals). should be carefully defined and properties (such as DeMorgan's Laws) should be carefully stated and Stressing at least the necessity perhaps proven. of proof helps demonstrate to students that the mathematics is intrinsic to computer science, CSl also involves more advanced mathematical topics such as an introduction to recursion and The connection between algorithm verification. these topics and mathematical induction should at least be mentioned in CSl, although it may not be possible to go further as students may not have CS2 involves completed discrete mathematics yet. mathematical topics such as the formal definition assertions and invariants, of data structures, efficiency of algorithms, hashing and formal In each of these topics, defispecifications. Although nitions need to be carefully stated. proofs may often be referred to the discrete theorems need to be stated mathematics course, carefully and attention needs to be paid to the premises so that theorems are not applied inUpper division computer science appropriately. courses with explicit mathematical content such as the courses C02, Algorithms, and C03, Principles of Computation in the model curriculum cited earlier, need to be taught from a mathematically rigorous perspective which would include proofs Even in courses which of the major theorems. are not as explicitly mathematical, such as CO4, Principles of Programming Languages, relationships with mathematics such as the similarity between a formal axiom system and a formal description of a language should be emphasized. (4) Textbooks for computer science courses, especially CSl and CS2, need to become more exIt is difficult for an inplicitly mathematical. structor to give proper attention to the mathemaof computer science if he or she tical dimensions must be constantly supplementing the text to do so.

Thus the texts themselves need to be more careful to integrate mathematics in their presentation. Also, there has been a tendency in recent years for elementary texts to simplify their presentaTh.is tion by being as unmathematical as possible. does a disservice to students by giving them a wrong impression as to the nature of the discipline of computer science and by passing up an important opportunity to begin to lay a rigorous foundation for their understanding. science majors should take at The Calculus of Calculus. course they take should be the same one taken by There have been many reasons Mathematics majors. advanced why computer science majors should take Some of these are; without calculus, calculus. computer science majors are cut off from many subsequent courses in mathematics they might want to take; calculus is very effective in developing modeling skills and the ability to handle and manipulate symbolic representations: calculus is essential for an understanding of continuous phenomena and not all phenomena computer scientists encounter are discrete; calculus concepts such as limits and infinite series are essential for understanding discrete topics such as, respectively, asymptotic behavior of functions and generating functions; calculus is essential if one is ever to be involved in scientific computing; withcomputer scientists are severely out calculus, limited in their communication with other scienand employers of computer tists and engineers; science graduates often regard a computer science It has been program without calculus as weak. suggested that calculus and discrete mathematics be integrated into a single three semester sequence allowing students to benefit from both discrete and continuous approaches to the same topics. This suggestion deserves serious consideration by everyone concerned with undergraduate mathematics education.
least two semesters

(5)

Computer

3.

Conclusion

Because mathematics is so central to the discipline of computer science, (1) programs in computer science should set the attainment of "mathas a goal for their computer ematical maturity" science majors and (2) the flavor of mathematics should permeate all computer science courses. 4. Acknowledgements

This paper benefited greatly from discussions with Dr. Russel W. Howell of Westmont College and with several members of the Liberal Arts Computer Science Consortium. References 1. Bentley, Jon, Programming Pearls -3 30, 9 (Sept. 1987), 754-757. 2. Bertziss, Alfs, A Mathematically Curriculum for ---y Gputer Science .ACM 30, 5 (May 1987), 356-365. Commun. ACM

Focused Commun.

3.

Curriculum '78, ---___ Recommendations for -the -under~ program science, Commun. graduate -------in computer ACM 22, 3 (March 1979) 147-166.

102

4.

Gibbs, Norman and Tucker, Allen B., -- A model curriculum liberal arts degree -~ comin -----c_ -for -a ____ --puter science, Commun. ACM 29,3 (March 1986) ..-~ 202-210. Newell, Science ----Search -----I 113-126. Allen and Simon, Herbert A., Computer Inquiry: Symbols and ---As Empirical --_-_ Commun. ACM 19,3 (March 1976),

5.

6.

Ralston, Anthony, The first --course .- -comin puter science needs a mathematics corequisite 1984), --- -9 Commun. ACM 27, 10 (October 1002-1005. Sigman, puting
Siguse

7.

Scott, Mathematics mrt a college degrees:-- -_I_small Bulletin 19,l (February

-v-- for comperspective, 1987), 70-75.

103

S-ar putea să vă placă și