56
$\begingroup$

A question (by a fellow CS student taking a first course in calculus, presumably after the lecture in which continuity was introduced: was as follows.

In the real, physical world, we deal with numbers that are sort of “finite” or “discrete” by their nature; there's no such thing as a perfect circle in the physical world. In CS, we model computers with discrete mathematics and it’s enough. So why real analysis? Why concepts like continuity and “completeness” of real numbers are useful? Why do we need them?

I found Math.se has lots of questions for similar “concrete” justifications for complex numbers and great answers for them, but I didn’t really manage to find similar for this. The question Are all numbers real numbers? is related, but I’m not sure it’s exactly what I’m looking for.

My attempt at an answer was along the line:

Are we content with the length of the side of a square that has area of 2 units remaining a undefined number, even if we never manage find such a square?

and

Calculus and real analysis provide results that are useful even if in numerical calculations we use finite approximations. To really understand what's going on, we want it to be rigorous.

but I’m not sure if I was persuasive enough. Any better ideas?

$\endgroup$
  • 42
    $\begingroup$ Because as much as computer science is important, it's not the center of the world, certainly not the center of the mathematical world? $\endgroup$ – Asaf Karagila Sep 27 '14 at 14:10
  • 6
    $\begingroup$ Also if you send the student to talk with Doron Zeilberger or Norman Wildberger, they'll inform him that real numbers are meaningless and a silly waste of time indeed. $\endgroup$ – Asaf Karagila Sep 27 '14 at 14:19
  • 9
    $\begingroup$ Differential and integral analysis are powerful tools that make use of the real numbers. Maxwell's equations are expressed using calculus. Is not electromagnetism important to CS? I would say yes, unless you use an abacus. $\endgroup$ – mfl Sep 27 '14 at 14:22
  • 39
    $\begingroup$ Jazz music does not exist in nature. Let's not play it. $\endgroup$ – marco trevi Sep 27 '14 at 14:41
  • 8
    $\begingroup$ By definition, discrete things can be used to approximate continuous things, e.g., the integral is a limit of discrete sums. It's not much of a leap to realize that, conversely, computations utilizing the continuum may approximate discrete things, and indeed, one can observe this come up innumerable times in the relevant branches of mathematics. So there's still a place for the continuum, even if the discrete is all that "exists". $\endgroup$ – Dustan Levenstein Sep 27 '14 at 15:35

16 Answers 16

46
$\begingroup$

It's far, far easier to understand some notion of "approximately a circle" if you are first able to understand some notion of "circle".

And even if you try to stick to, say, just the rational numbers, the real numbers keep managing to show up anyways. e.g. as soon as you ever find yourself in the situation where you think to identify a number by a function that tells you whether or not other rational numbers are larger or smaller than it, you've suddenly reinvented the real numbers.

It's telling that number theory -- one of the subjects that, a priori, should be one of the most discrete subjects of mathematics -- makes heavy use of the real numbers. And even that isn't enough 'continuous' mathematics for the sake of number theorists: they've invented $p$-adic numbers too!

$\endgroup$
  • 7
    $\begingroup$ Update: We decided that the $p$-adics were still not continuous enough and had to invent things like Berkovich spaces(the Wikipedia article is terribly inadequate, but it's the most readable thing I could find). $\endgroup$ – Slade Sep 28 '14 at 1:34
20
$\begingroup$

Perhaps you could point your friend to the book Concrete Mathematics: A Foundation for Computer Science by Graham, Knuth & Patashnik, which shows a lot of useful connections between continuous mathematics (with real numbers) and discrete mathematics. ("Concrete = continuous + discrete".)

For example, the Euler–Maclaurin summation formula from advanced calculus can be used to derive approximations for discrete things like $\sum_{k=1}^n \frac1k$.

$\endgroup$
18
$\begingroup$

The real numbers were "ideally conceived" by many of the most prolific mathematicians of their time (Euler, Gauss, Dedekind, Weiertrass, &c) before they were constructed formally and rigorously. Even Archimedes and Euclid already had a settled idea of what a "line" was, about what a continuum was, but they weren't able to conceive it mathematically. The real numbers is the fundamental structure of modern analysis, perhaps: they are a totally ordered Dedekind complete field, and, not much by our surprise nowadays, this characterizes them uniquely!

People knew they wanted numbers to form a field (they wanted addition, multiplication and inverses of nonzero numbers, commutativity, &c). They wanted them to be totally ordered, and that this order was compatible with the field operations. And they wanted this line to be with no gaps, to be a continuum. As I said, great mathematicians already assumed the existence of this object before it was constructed (or proven to exist?) and proven to be unique, and it was the foundation of many of the modern mathematics we see today, like Calculus, Analysis, Geometry, &c.

I guess the point here is that most people had a very strong intuitive idea of what a line is, and it is the reals that made this idea a concrete mathematical object, which allowed people to work and advance in their rather abstract thoughts to obtain well founded theories.

$\endgroup$
  • 1
    $\begingroup$ Nice answer, but when you say "And the wanted this line to be with no gaps, to be a continuum," what do you mean by "no gaps"? The rational numbers have no gaps either, in a certain sense. In another sense, the real numbers have gaps too, for example if you look at them as a subset of the surreal numbers. I think instead of the unclear "no gaps", what they really wanted was "completeness" (not necessarily limited to the order) and the Archimedean property: $\forall x\in {\mathbb R} \quad \exists n\in {\mathbb N} \quad x < n$. $\endgroup$ – Thomas Klimpel Sep 28 '14 at 20:45
  • 2
    $\begingroup$ @ThomasKlimpel Sure, the language is ambiguous there, but I cannot possibly know for certain what they thought about when they thought about completeness at the time. $\endgroup$ – Pedro Tamaroff Sep 28 '14 at 22:37
11
$\begingroup$

I think your whole viewpoint is skewed, even in the other answers. Continuity is the most natural and physical notion. If we look at the physical world we seem to be able to subdivide matter, time and space indefinitly. From such a naive point of view real numbers are forced upon us, by geometry. Just an the Pythagoreans were compelled to accept irrationals.

$\endgroup$
  • 6
    $\begingroup$ @Alice Hence my usage of the word 'naive'. Also QM only came into being long after the real numbers had an established theory. $\endgroup$ – Rene Schipperus Sep 28 '14 at 1:33
  • 7
    $\begingroup$ @Alice Its so nice to meet a fanatic. $\endgroup$ – Rene Schipperus Sep 28 '14 at 2:12
  • 15
    $\begingroup$ @Alice: Do you have any actual assurance that quarks are the fundamental limit of matter? Or that quantum mechanics is correct, for that matter? Observation is not assurance, by the way, because if it is then only set theory is an interesting field in mathematics, no ravens are black, and pretty much everyone speaks Hebrew. $\endgroup$ – Asaf Karagila Sep 28 '14 at 3:54
  • 8
    $\begingroup$ @Alice: So you have no way of assuring that. Great, I'm glad that we agree. $\endgroup$ – Asaf Karagila Sep 28 '14 at 15:53
  • 7
    $\begingroup$ @Alice: This will be my last comment in this waltz of nonsense. Just because the math doesn't work out when you change a few things doesn't mean it's right. Doesn't mean anything from a physical point of view. Except that for the time being this is perhaps our best approximation of the universe. Much like Newtonian mechanics was the best approximation at its heyday. Only time will tell, and we all probably die before time will tell us anything. Time is a jerk that way. $\endgroup$ – Asaf Karagila Sep 29 '14 at 0:29
10
$\begingroup$

As a one who learns Computer Science and Mathematics (just because I love to make my own video games) I want tell you that:

Even though computer science is all discrete, Continuous mathematics stays true in discrete cases like computer science.

For example suppose that you want to move a bird on screen from point $A$ to point $B$ on the graph of the function $f(x)=\frac{\sin x }{ x }$. What can you do when $x=0$? How can you know that $f$ can be defined at $x=0$ in a way that removes the discontinuity without using the squeeze theorem? (By the way better movement can be done using the arc length formula which invites even more calculus) What if you want to change the bird' s rotation so that the bird will be 'tangent' to the curve? The derivative comes. There are even more extreme cases where you'll need to use Real Analysis to analyze graph of functions (and to actually use $\epsilon-\delta$ definition of limits).

That's was a very simple example. There are more complex examples, How can your make water simulation that interacts with your bird so that if your bird touches the water or dives into the water, ripples will start (not ripples that are some simple animation, but ripples that are calculated using the impact force on the water)? You'll need to use Vector Fields and Fluid Mechanics and a lot of it which is of course continuous mathematics.

This means that continuous mathematics stays true in discrete cases (like pixels on screen).

I think one of the best ways to see where continuous mathematics is important in computer science is to do stuff that invites its use like Computer Graphics, Audio Processing, Image Processing, Computer Vision, Artificial Intelligence, Physics Programming, Machine Learning, Computational Geometry, Game Development (which is actually a mix of Computer Graphics, Computational Geometry, Artificial Intelligence and Physics Programming and you can even add Computer Vision and Audio Processing for different types of game interactions).

Try to build a small computer game and tell me how can you move your objects on screen without continuous mathematics?

Now what about complex analysis?

$\endgroup$
  • 1
    $\begingroup$ Untrue, as anyone who has ever had to use a form of antialiasing would clearly see; continuous mathematics does not stay true in discrete cases, below a certain value. $\endgroup$ – Alice Sep 28 '14 at 1:25
  • 3
    $\begingroup$ True, in some cases continuous mathematics will not work but generally it is quite good. $\endgroup$ – MathNerd Sep 28 '14 at 7:19
  • $\begingroup$ @MathNerd What does it mean? $\endgroup$ – Pixar Sep 1 '16 at 1:23
8
$\begingroup$

Because things we can understand and derive using the real numbers become useful even when they're not directly available to us. E.g. isn't it nice to know that $f(x)=x^2-2$ has a real root we can rationally approximate to within arbitrary precision?

$\endgroup$
5
$\begingroup$

Most of the answers so far have addressed why the rational numbers (or other well-known smaller number systems) are insufficient for important mathematical uses, but have hardly addressed why the real numbers, and not some smaller field, are useful.

The key property of the real numbers is completeness, which basically means that any sequence of real numbers where the difference between successive terms approaches zero (a Cauchy sequence) has a limit that's also a real number. This property is needed for calculus and analysis. Otherwise, smaller fields such as the constructible numbers or computable numbers would be sufficient for many (most?) non-analysis uses.

Another valuable property is uncountability. While naively it may seem desirable to work with countable sets (note that all of the number systems I mentioned above are countable), there are various theorems you can prove that essentially say "All countable sets are boring" for concepts of "boring" depending on your field. For example, in measure theory, the only translation-invariant measure on a countable set is the trivial measure (assigning measure zero to all subsets).

$\endgroup$
  • 1
    $\begingroup$ +1 for mentioning the constructible/computable numbers. It's surprising how many answers are defining numbers algorithmically (eg. deriving pi from a circle, or the square root of 2 from a unit triangle), then claiming them to be unrepresentable by a computer! Just because C doesn't allow "real x;" doesn't mean that the program itself can't represent a number ;) $\endgroup$ – Warbo Sep 29 '14 at 8:24
4
$\begingroup$

(I just mention something as many other things have been said in good answers)

Your friend will have to do statistics without recourse to the Gaussian distribution.

$\endgroup$
  • 4
    $\begingroup$ Use the binomial distribution. $\endgroup$ – Mitch Sep 29 '14 at 13:00
3
$\begingroup$

I think this question can be answered from many aspects.

  • There are many mathematicans who do really care about the real world , see math problem as a puzzle and try to find exact answers to problems.(it is useful for them to solve the puzzle.)
  • Second thing is that when you know the exact answer, it is up to you how much approach the exact values. (We know the exact value of $\pi$ as an infinite sum. You can take $\pi=3,14$ but if your calculation is delicate, you should take it $\pi=3,14159265359$). So it is better to know the exact value.
  • Mathematics is a general tool which has application in almost every problem. It is not limited only to CS.
  • There are many high level math subjects like Topology, Algebraic Topology, Differential Geometry... and they are inspired by structures of $\mathbb{R}, \mathbb{R}^n...$
$\endgroup$
2
$\begingroup$

They fill the gaps that arise in the field of rational numbers. It took 19 centuries for mathematicians to accept and define them rigorously. It is very important that a model that satisfies the field axioms can be made and to know that we don't talk about things that don't exist. They have huge applications, not just in CS, but many other subjects. What a miserable world it would be if we don't have the real numbers.

$\endgroup$
1
$\begingroup$

See (integer programing) and how relaxing the problem to use real numbers actually makes it easier to find a solution.

Ask him to prove his assumption that all matter is actually made of discrete units, and then bring up Zeno's paradox to show that he has much to learn.

Your emphasis on sqrt(2) is probably a good place to start. Mention that pi is also not discrete, and yet actually does exist. Also Phi, and how this appears in nature on plants.

Bring up trig equations Cos and Sin which are used in computer simulations of light bouncing off objects.

And finally, who says that CS is only about measuring things that actually exist anyway? It's about making calculations that are useful, and sometimes calculating things about infinite series are useful, even if such a thing may or may not exist!

PS: Tell the student he is wrong, and that college is a place to correct your internal biases. Not believing that real numbers exist is a perfect example of something this student should spend time learning about instead of blindly holding his incorrect belief.

$\endgroup$
  • $\begingroup$ For some basic information about writing math at this site see e.g. here, here, here and here. $\endgroup$ – Jessica B Sep 27 '14 at 21:27
1
$\begingroup$

First, topology is also used in discrete mathematics.

The real numbers emanates from geometry and land surveying. They are the simplest way to approach a lot of mathematical problems, but in modern science discrete solution seems to be more and more adequate. Now, when computers do most of the calculations, the emphasis will turn to more adequate discrete calculations.

And I guess that future science almost only will rely on discrete math, aside from that the reals will remain important as an algebraic system, for example in functional analysis.

$\endgroup$
  • $\begingroup$ Well, topology. So what? One can define (non-Hausdorff) topology on a poset or a graph without any knowledge of number systems at all. $\endgroup$ – Incnis Mrsi Apr 20 '15 at 11:38
1
$\begingroup$

I think that the question is quite interesting. I will try to introduce an analogy that may help picturing the importance of the real numbers.

Lets start by supposing that the only sense that folks got is mathematics and that our universe is an infinite plan. With finite mathematics, all what people can interact with is a square of some dimensions. Using "Real numbers", a man can not only go beyond those dimensions but he can define things and then also predict them and try to partially interact with them.

We approximate what is defined, if there is no good definitions, approximation would be the hardest thing ever. That's why, according to one legend, Pythagoreans used to throw those who tried to introduce the notion of infinity. They couldn't define it and they took it as a shame.

In the same way, if we didn't use real numbers, in physics, biology, astronomy.. We wouldn't had achieved much!

$\endgroup$
  • $\begingroup$ Although you have presented a beautiful notion, please consider elaborating and clarifying on what you are trying to convey. $\endgroup$ – Nick Sep 28 '14 at 18:03
1
$\begingroup$

The answer boils down to two simple reasons.

  1. Whether or not you believe the real numbers (or even the rational numbers!) are actually "real" or have any physical basis, they greatly simplify the calculation of arbitrarily accurate approximations of the physical world. E.g. if you have a can (i.e. cylinder) of height 20cm and diameter 20cm, it will hold $2\pi$ litres of sand, or approximately 6.283 litres. This is despite the fact that sand is clearly discrete, not continuous. Assuming sand is uniform, you can't have exactly a litre of it, let alone $2\pi$ litres (unless your sand has a very fortunate density!) Yet nobody will deny the approximation is useful - and the notation is simple and powerful, being usable for much more complicated problems.

  2. Real numbers make it much easier for us to obtain results and prove properties about the integers and rationals. Even if the real numbers do not "exist", they can be seen as a notational tool that helps create elegant proofs or simple working for purely rational or integral problems.

    Here's a simple example: how many terms of the sequence $(1, 2, 4, 8, 16, \ldots)$ are less than $10^{10}$? Well, let's try solving $2^k = 10^{10}$. By taking log of both sides, we get $k = 10 \frac{\log 10}{\log 2} \approx 33.22$. So there are 34 terms. That's not an approximation, there are precisely 34 terms. Sure, we could find the same answer without using real numbers (or even rationals) but it would take a lot more effort.

As you can see, the question of whether the real numbers "exist" is irrelevant to the question of whether they are useful.

In both examples, note that we have treated real numbers just like we do rational numbers: we multiplied and divided them. The usefulness of real numbers doesn't just come from giving a name to $\pi$ or $\sqrt2$ and having algorithms to approximate them, but also from allowing us to do (nearly) all the things we expect of rational numbers. In other words, we treat them as numbers, not just mathematical objects.

$\endgroup$
  • $\begingroup$ LoL. In fact, it’s easier to make an estimate for a logarithm than to substantiate your “≈” stuff strictly. A very poor example of usefulness. $\endgroup$ – Incnis Mrsi Apr 20 '15 at 11:36
0
$\begingroup$

Real analysis will provide tools to solve many problems, mundane or not. One need only analyse a few problems, and soon you'll need real analysis. The same would happen with computer science: what problem does it solve which cannot be solved by the calculating mind?

I don't get if the doubt is why need infinite objects? or abstract? Or only, real analysis?

In particular, one may use the real analysis theory to replace the function f(x)=sin(x) by the approximation g(x)=x. In fact, it is impossible to do numerical analysis without the tools provided by real analysis; for example, how do you know that g is a good approximation for x?

Aren't the transistors inside your computer objects that have "real" properties which model the boolean set?

The real line is just one tool. Of course, the fight between the finite and the infinite is old -and interesting. I'd recommend the stories about Kronecker ("God made natural numbers; all else is the work of man"), and his fights with Godel and Hilbert. But don't get fooled by the discourse, infinite objects are necessary, yet one deals with them through finite processes (algorithms) or representations.

$\endgroup$
0
$\begingroup$

I don't know how to explain it clearly and properly so I will give an answer that's a simplifying approximation of a more detailed clear answer. In physics, you need to treat it like every single real number physically exists in our universe in order to make predictions about what you will observe according to a theory that is a simplifying approximation of the accepted theory, if we count time as a dimension. In that theory, we neglect the nonzero size of atoms. If you're missing one real number, then it's impossible to deduce just from the stress equations alone that a hanging string will not just spontaneously break apart.

I myself have an open mind that $\mathbb{R}$ is a proper class and that the fundamental laws of the universe are something like a 1-dimensional Conway's game of life but not quite because it includes a cell for each ordered pair of natural numbers with simple rules for determining what colour to assign to each ordered pair, and that it only simulates what we observe. However, I believe one variation of those laws that are like that of a Conway's game of life can be shown to simulate a universe that follows the laws of the accepted theory, which includes the predictions that use Zermelo-Fraenkel set theory, even if you reject Zermelo-Fraenkel set theory entirely and use only Peano-arithmitic with the assumption that ZF is consistent, to form the theory that treats the universe like something like a Conway's game of life.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.