I found articulating how and why mathematics is important in computer science challenging. It’s always been my intuition--even more so, that they are interdependent -- but can I support this claim?

The importance of math is most clear in computer graphics because of the heavy use of linear algebra in rendering and even more so in ray tracing, yet this example is unsatisfying as it seems domain-specific and not an essential to the computer science.

I have wondered whether theoretical computer science is actually the natural progression of mathematics. Mathematics has been revolutionized through automated theorem provers, computer algebra systems and other packages that have mechanized previously human activities. Computers have even been successful in proving unsolved problems. It’s certainly clear that the practice of mathematics has improved considerable, but improvements in the process of performing mathematics is not satisfying argument for the important relationship of math and computer science, as computers have revolutionized numerous unrelated fields. I also considered whether theoretical computer science notions of algorithms, computable and recursive functions, and algorithmic behavior could unify computer science with mathematics.

Yet it all seems forced. A classmate, who took 1st place nationally in the Putman Mathematics competition, remarked that CS 51 to be the hardest course he took at Harvard; this surprised me as I didn’t find the programming assignments very challenging. His mathematical prowess provided little conceptual lift in the second of two introductory computer courses at Harvard. Grasping recursion and pointers is probably predicated on knowledge about stack frames and memory addressing, which I already had, having programmed significantly in assembly language.

If math and computer science are so related, then why does much of mathematics seem irrelevant to programming, for instance, calculus and differential equations? In the 1980s, computer science was still doubted as a serious theoretical discipline.

There is actually a subfield of mathematics, discrete mathematics, specifically focused on a grab bag of mathematical topics with relevant application to computer science. If much of mathematics seems not very relevant to computer programming, it is because the study of mathematics evolved to serve the fields of physics and engineering, which deals with continuous quantities, but current computer architectures can only deal with finite quantities and computer science is still a young field with consequently less influence over the development of modern mathematics. Perhaps future architectures may support continuous bits.

Fortunately, though, much of continuous mathematics have discrete analogues. Finite calculus serves the role for discrete functions as traditional calculus serves for continuous functions. Similar techniques from integration can be applied to symbolic summation, and similar techniques from differential equation can be applied to difference/recurrences equations. The natural base for discrete function is 2 instead of e, and the discrete logarithm function is the Harmonic function.

I can point to a few reasons why mathematics and computer science haven’t mixed so well. Programming languages and compilers are designed close to the hardware, and highly constrained to physical realities of the world.

My mathematical proclivities have lead me to embrace explicitly mathematical styles of programming such as functional (Lisp, Haskell), logical (Prolog III, λ Prolog, Mercury), and equational programming(Q/Pure, Mathematica), but I have always justified such approaches in their greater expressivity and potential performance advantages through high-level optimizations. Even imperative styles of programming can be handled through conversions into functions. Speaking of imperative languages, Fortress is a new language designed for mathematicians and scientists, that shows promise in making computer programs more like mathematics.

Languages can also be evaluated symbolically, which can potentially extract out answers without performing all the computations (much as a human being can walk through code and pick out the value of variable without evaluating every expression). In this mode of evaluation, programs can utilize operators that are possible in the larger computational sense but have no natural or efficient hardware implementation: continuous data types, modal operators, nondeterminism operators, nonterminating functions. It always seemed to me that theoretical computer science was the study of computational operators.

It’s in this case of symbolically evaluating programs that the differences between mathematics and computer science begin to disappear in which programs and expressions are the same and their evaluation yields another reduced expression.