El Rol de La as Discretas

download El Rol de La as Discretas

of 4

Transcript of El Rol de La as Discretas

  • 8/3/2019 El Rol de La as Discretas

    1/4

    THE ROLE OF MATHEMATICS IN THECOMPUTER SCIENCE CURRICULUMJames BradleyCalvin CollegeDepartment of Mathematics & Computer ScienceGrand Papids, Michigan 49506

    AbstractThere has been much debate in the past fewyears about the appropriate mathematics require-ments for an undergraduate computer science major.The discussion has focused primarily on twoissues; (1) the underlying mathematical content ofcomputer science courses and (2) the content ofmathematics courses which would serve as approp-riate cognate requirements for computer sciencemajor programs. Chile this discussion has beenhelpful, it has been too narrowly focused--it hasnot started from an understanding of the relation-ship between the disciplines of mathematics andcomputer science, but rather has sought to iden-tify mathematical prerequisites that computerscience majors need in order to take existingcomputer science courses. This paper is a smallstep in seeking to apply an understanding of therelationship between the disciplines of mathem a-tics and computer science to the undergraduatecomputer science curriculum.

    1. EackgroundCurriculum 78 () has been wideiy criti-cized for not addressing the mathematical contentof compu ter science adequately. Ralston andothers have advocated the development of a dis-crete mathematics cognate for the computer sciencemajor, typically providing a mathem atical treat-ment at the freshman level of topics such as sets,logic, elementary number theory, probability, re-lations, graphs, and trees. A large number ofinstitutions now offer such a course, typicallyone semester in length, although Ralston advo-cated a two semester course. The addition ofsuch a cognate requirement to the computer sci-ence major suggests the following comparison:

    discrete mathematics = calculuscomputer science physics.

    Permission to copy without fee all or part of this material is grantedprovided that the copies are not made or distributed for directcommercial advantage, the ACM copyright notice and the title ofthe publication and its date appear, and notice is given that copyingis by permission of the Association for Computing Machinery. TOcopy otherwise, o r to republish, requires a fee and/or specficpermission.

    I.e., discrete mathematics is seen as playing asimilar role in the computer science major tothat played by calculus in the physics major.The role of discrete mathematics in computerscience is quite different, however, than the roleof calulus in physics. This suggests that thecognate model discussed above may also be inade-quate. In physics, calculus provides a symbolictool which the physicist can use to model physicalentities. The mathematics used is not the objectof study but is a language and tool which enablesthe physicist to study someth ing else. For ex-ample, Schroedinger's equation is not studied be-cause it is representative of a certain class ofpartial differential equations, but because ofits importance for quantum mechanics. In computerscience, however, the mathem atics used is itselfthe object of study as well as being a modelingtool. For instance, binary trees are not studiedas models of some physical entities. Rather theconcept of binary tree is an abstration that canbe rigorously defined and which can be used to

    organize data in many different settings. Theo-rems such as those relating the height of a bal-anced binary tree to the number of its nodes areintegral to the study of binary trees. Thus, incomputer science, the binary tree is not simply atool to help us understand some other phenomenon,but the abstract notion of binary tree is itselfthe object of study. On a more advanced level,the formal study of algorithms leads one into astudy of Turing machines. The formal study ofdata structures leads one to the axiomatic defin-ition of abstract data types. However, mathema-tics is also used for modeling in computer sci-ence. For instance, queueing models are an essen-tial part of operating systems and networks.

    The depth of the relationship between mathe-matics and computer science can be highlighted inat least the following four ways:(1) In a definition of computer science. One def-inition of compu ter science is given in Gibbs andTucker, "A Model Curriculum for a Liberal Artsdegree in Computer Science" ():

    Computer science is the systematic study ofalgorithms and data structures, specifically1. their formal properties2. their mechanica l and linguistic reali-zations, and

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

  • 8/3/2019 El Rol de La as Discretas

    2/4

    3. their applications.Gibbs and Tucker add that the three components arelisted in their order of importance and thatformal properties mus t be first in priority inorder for the discipline to be called computerscience rather than compu ter engineering or in-formation systems.

    The study of the "formal properties" of al-gorithms and data structures is intrinsicallymathem atical in that it involves formal defini-tions and the proof of theorems. The comparisonto physics is again helpful here. Even in theo-retical physics (which is highly ma thematical),the mathematics is always a means to an end. Theemphas is on formal properties of algorithms anddata structures in computer science points up theintrinsically mathem atical character of the disci-pline of computer science.(2) Historically. The invention of the digitalcomputer owes a great deal to the work of Fregeand of Russell and Whitehead in formalizing logic.Propositional logic served as a foundation for thedevelopment of logic circuits and ultimately elec-tronic computers. Turing's work in the 1930'sdemonstrated that a computation can be carried outif it can be carried out on an idealized machine.The stored program concept which was so fundamentalto the advancement of digital computers in thelate 1940's and 1950's was already implicit inTuring's notion of a machine developed earlier.Newell and Simon (152) have commented:

    "We should marvel that two of our deepestinsights into information processing wereachieved in the thirties, before moderncomputers came into being. It is atribute to the genius of Alan Turing. Itis also a tribute to the developmen t ofmathematical logic at the time, and testi-mony to the depth of computer science'sobligation to it.More recently, the developmen t of higher levellanguages has its roots in mathematical linguist-ics and the development of structured languagesowes much to mathematical studies of the logical

    structure of algorithms.Thus the historical and contemporary rootsof computer science are in mathematics and pro-gress in computer science frequently drawsheavily upon these roots.

    (3) In the content of current computer sciencecourses. Lists of the extensive mathematicalcontent of introductory computer science courseshave been published elsewhere (see, for example, and ). Upper division computer sciencecourses often include a number of advanced topicsin graph theory, automata, abstract algebra, prob-ability, number theory and logic. Just the pres-ence of this content would not distinguish computerscience from any other science in its use of mathe-matics . However, the approach that is typicallytaken in the upper division courses has considera-ble mathem atical rigor--formal definitions arestated, theorems proven, the complexity of algor-ithms is carefully analyzed, and algorithms are

    proven correct.(4) The activities of matnematicians and computerscientists are often similar. For instance,writing a proof in some formal axiom system andwriting an algorithm are much alike. Both involvea clearly specified starting point (the premisesor the pre-conditions ), a clearly defined goal(the conclusions or the post-condit ions), a set ofproperties one may utilize (the axioms of theformal system or the properties of a particulardata structure), and a set of rules governing thesteps one may take (the laws of deductive logic orthe logical structures for algorithms). In thecase of an algorithm , there are real constraintsimposed by machinery. But, in terms of the pro-cess of writing an algorithm, they differ littlefrom the constraints imposed on a mathematician bythe axioms. Another similarity is that a thoroughunderstanding of the mathematical character of aproblem is often the precursor to the discovery ofa new algorithm for its solution. For instance,Robert Floyd recently developed an improved algor-ithm for random sampling (cl>). In describingthis algorithm Jon Bentley writes "Floyd's keyrule in this problem was, in his own words, to'look for a mathem atical characterization of thesolution before you think about an algorithm toobtain it.'"

    However, compu ter science is also an empiricalscience in two senses. (1) the performance of al-gorithms is tested on machines, both to debug themand to measure their efficiency. Much learningabout algorithms takes place through this con-crete, physical experience. No matter how adeptwe migh t become at analyzing the complexity of al-gorithms and verifying their correctness, the ul-timate test of an algorithm's worth is how it per-forms when realized on a physical machine .(2) Human behavior is often observed and used asa paradigm for the developmen t of algorithms, par-ticularly by workers in cognitive science. Oneform of this is expert systems a more common formarises whenever, in attempting to construct a newalgorithm for finding the solution of some classof problems, we say '%ow would I solve a problemlike this if I were doing it by hand?"

    Thus, computer science is not only a new dis-cipline, it is a new type of discipline. It isvery much like mathem atics and overlaps mathema-tics considerably in that it is rigorous and itsobjects of study are abstract, not concrete enti-ties in the material world. However, it is alsoempirical. Thus we cannot expect curricularmodels derived from either mathematics or thenatural sciences necessarily to apply in computerscience.2. Curricular implications

    We see the following implications of thisunderstanding of computer science for curriculumdevelopment.(1) Mathematics needs to be more fully inte-grated into the computer science curriculum. Onenoteworthy example of a mathematically orientedcomputer science curriculum is 12>. Even short ofadopting such a curriculum, much can be done to

    101

  • 8/3/2019 El Rol de La as Discretas

    3/4

    more fully integrate mathem atics into existing cur-riculai. Some specifics follow in the next fewpoints.(2) Mathematics courses for computer sciencestuden ts need to be rigorous. It is importantthat the introductory discrete mathematics coursenot degenerate into a "cookbook" course. The goalof this course needs to be the developmen t of"mathematical maturity" (qualities such as model-ing and reasoning skills plus ability to estimate,generalize, simplify, detect sloppy reasoning,and appreciate the need for proof) as well asmastery of content. Attention needs to be paid tocareful formulation of definitions and the axioma-tic approach. Most theorems should be proven andstudents should be expected to do simple proofs aswell. Exercises should not just be routine. Thiscourse is also an excellent place to introduceanalysis and verification of algorithms as thesetopics provide a particularly strong link betweenmathematics and computer science.(3) Computer science courses need to fully in-tegrate mathematics into their content. CSl and

    CS2 have well formulated curricula at this point.liowever , it is important that they do give adequateattention to the mathematical topics they address.For instance, CSl involves elementary mathematicaltopics such as arrays, matrices and propositionallogic (used in conditionals). The terms involvedshould be carefully defined and properties (suchas DeMorgan's Laws) should be carefully stated andperhaps proven. Stressing at least the necessityof proof helps demonstrate to students that themathematics is intrinsic to computer science,CSl also involves more advanced mathem aticaltopics such as an introduction to recursion andalgorithm verification. The connection betweenthese topics and mathematical induction should atleast be mentioned in CSl, although it may not bepossible to go further as students may not havecompleted discrete mathematics yet. CS2 involvesmathematical topics such as the formal definitionof data structures, assertions and invariants,efficiency of algorithm s, hashing and formalspecifications. In each of these topics, defi-nitions need to be carefully stated. Althoughproofs may often be referred to the discretemathematics course, theorems need to be statedcarefully and attention needs to be paid to thepremises so that theorems are not applied in-appropriately. Upper division computer sciencecourses with explicit mathematical content suchas the courses C02, Algorithms, and C03, Princi-ples of Computation in the model curriculum citedearlier, need to be taught from a mathema ticallyrigorous perspective which would include proofsof the major theorems. Even in courses whichare not as explicitly mathematical, such as CO4,Principles of Programming Languages, relationshipswith mathematics such as the similarity between aformal axiom system and a formal description of alanguage should be emphasized.

    (4) Textbooks for compu ter science courses,especially CSl and CS2, need to become more ex-plicitly mathematical. It is difficult for an in-structor to give proper attention to the mathema-tical dimensions of compu ter science if he or shemust be constantly supplementing the text to do so.

    Thus the texts themselves need to be more carefulto integrate mathematics in their presentation.Also, there has been a tendency in recent yearsfor elementary texts to simplify their presenta-tion by being as unmathematical as possible. Th.isdoes a disservice to students by giving them awrong impression as to the nature of the disci-pline of computer science and by passing up an im-portant opportunity to begin to lay a rigorousfoundation for their understanding.(5) Computer science majors should take at

    least two semesters of Calculus. The Calculuscourse they take should be the same one taken byMathematics majors. There have been many reasonsadvanced why computer science majors should takecalculus. Some of these are; without calculus,computer science majors are cut off from many sub-sequent courses in mathematics they might want totake; calculus is very effective in developingmodeling skills and the ability to handle and man-ipulate symbolic representations: calculus isessential for an understanding of continuousphenomena and not all phenomena com puter scien-tists encounter are discrete; calculus conceptssuch as limits and infinite series are essentialfor understanding discrete topics such as, respec-tively, asymptot ic behavior of functions and gen-erating functions ; calculus is essential if one isever to be involved in scientific computing; with-out calculus, compu ter scientists are severelylimited in their communication with other scien-tists and engineers; and employers of computerscience graduates often regard a compu ter scienceprogram without calculus as weak. It has beensuggested that calculus and discrete mathematicsbe integrated into a single three semes ter se-quence allowing students to benefit from both dis-crete and continuous approaches to the sametopics. This suggestion deserves serious consid-eration by everyone concerned with undergraduatemathematics education.3. Conclusion

    Because mathematics is so central to the dis-cipline of computer science, (1) programs in com-puter science should set the attainment of "math-ematical maturity" as a goal for their computerscience majors and (2) the flavor of mathem aticsshould permeate all computer science courses.4. Acknowledgements

    This paper benefited greatly from discussionswith D r. Russel W. Howell of Westmont College andwith several members of the Liberal Arts ComputerScience Consortium.References1. Bentley, Jon, Programming Pearls-3 Commun. ACM30, 9 (Sept. 1987), 754-757.2. Bertziss, Alfs, A Mathematically FocusedCurriculum for Gputer Science Com mun..- ---yACM 30, 5 (May 1987), 356-365.3. Curriculum '78, Recommendations for the under----___ ~ - --graduate program in computer science, Commun .--- ----- -ACM 22, 3 (March 1979) 147-166.

    102

  • 8/3/2019 El Rol de La as Discretas

    4/4

    4. Gibbs, Norman and Tucker, Allen B., A model-- -curriculum for a liberal arts degree in com------c_ - - ____ --- -~puter science, Commu n. ACM 29,3 (March 1986)..-- ~202-210.5. Newell, Allen and Simon, Herbert A., ComputerScience As Empirical Inquiry: Symbols and----- - --_-_ ---Search Commun. ACM 19,3 (March 1976),-----I

    113-126.6. Ralston, Anthony, The first course in com--- .- -puter science needs a mathematics corequi-site Commu n. ACM--- -9 27, 10 (October 1984),1002-1005.7. Sigman, Scott, Mathematics m rt for com--v--puting degrees:-- a small college perspective,-_I_Siguse Bulletin 19,l (February 1987), 70-75.

    103