views:

128

answers:

2

I'm starting Calculus this semester and I've been using programming (or scripting) languages before—mostly PHP and C# (not much low-level work). The only relationships I've made between the syntaxes are Anonymous functions with Y-Combinators and Arrays with Set-notation (I'm not even sure if these are correct).

I always see similarities between Calculus and programming—it's almost like numerology—so how do calculus and programming languages relate?

Subconsciously, I know there are relationships, but I don't think I know the proper terminology to describe it. Some people have referred me to "computational theory" and "turing machines", but I haven't really looked into it yet. Can I still consider myself a programmer if I don't fully understand computational theory?

+6  A: 

"Calculus" is a word meaning, in the context of mathematics:

Any formal system in which symbolic expressions are manipulated according to fixed rules.

So it does not stand to reason that two concepts are in some way related just because their names both contain the word "calculus".

Lambda calculus is a formalism for modeling computation, provably equivalent to the Turing machine. The purpose of both Turing Machines and the lambda calculus (which were developed independently around the same time), is to provide a formal system in which statements about computation can be rigorously proved. This is the fundamental underpinning of theoretical computer science. It relates to programming languages because of the Church-Turing Thesis, which essentially states that any programming language capable of emulating a Turing Machine is capable of computing anything that can possibly be computed. A language satisfying this property is called Turing-complete. Nearly all modern general-purpose programming languages have this property.

Differential/Integral calculus, the kind you learned in high school, has nothing in common with lambda calculus other than the word "calculus". It has nothing to do with programming... unless you're writing a program to compute integrals or derivatives.

First-order logic (a type of predicate calculus) has some relevance in the domain of artificial intelligence and automated theorem-proving, but again this is just using computers to solve math problems, and has no relationship to the underlying theory of computation, or to the design of programming languages.

Tyler McHenry
So the calculus I'm going to learn in high school won't be related to programming at all?—unless I plan to do solve equations?
Gio Borje
Yes. The calculus you learn in high school will be relevant to writing programs which attempt to solve problems that require the computation of derivatives or integrals (used especially in scientific computing, e.g. physics simulations). However, high-school calculus has no relationship whatsoever to the *theory* of computer programming and computability.
Tyler McHenry
+1  A: 

Numerology is something entirely different, but that's not the point here!

Its been awhile since I took calculus, but nevertheless, it is mathematics. It has a lot of applications with physics and mechanical engineering.

Calculus and programming are somewhat related, such as your mention of computational theory, which is also a subset of mathematics, but strictly speaking it is not at all programming.

Lastly, you can use programming languages and software to solve calculus equations, but you don't need to. Calculus has been around for a lot longer than computers!

Docunext