Hacker News new | ask | show | jobs
by craigching 3076 days ago
I have to admit, being a hybrid math/csci student, I never understood the place of discrete math in mathematics or computer science. It always seemed like a mish-mash of different topics I'd studied in algebra->geometry->calc (including mv calc, linear algebra, diff eq, and series and sequences)->real analysis. This article is a bit too brief to properly place it (at least I still don't see it), could someone provide some proper context for discrete mathematics that fits into the mold of the standard maths sequence?
5 comments

It's hard to place a particular "context" for discrete math; it really is a hodgepodge of topics, loosely linked because they deal with discrete structures (integers, graphs, logic statements) rather than continuous ones (real/complex numbers).

It's particularly relevant to computer science because, in CS, we're dealing with discrete structures almost exclusively. The rise of computers and of CS is both what led to the current interest in discrete math subjects as a research field and what led to the development of university curricula in the topic.

So, really, discrete math (as a university course) exists mostly to teach some CS-relevant topics that don't necessarily get much dedicated time in the "standard" algebra->geometry->calc progression, because they're more concerned with continuous phenomena. It's sort of a parallel and independent track from the "standard" math sequence.

It gains a bit more unity when you try to interpret it through certain lenses.

In particular, one problem with discrete mathematics as it's taught, is that it doesn't separate the methods of counting from the set of objects that you need to count.

There are a couple of ways around this. One good way is to look at all combinatoric identities as referring to the number of ways you can connect some set to some other set. Sometimes they're called "choices", "mappings", functions, whatever. You can talk about the function and sets separate from the numbers, and the numbers drop out of properties of the set. Doing this removes a layer of interpretation and guesswork even if it ups the abstraction a bit.

Additionally, discrete math just looked at as the math of algorithms also gets you far. Sedgewick's Analysis of Algorithms book is actually a discrete math book in disguise, since it gives a system of notation that can describe basically any combinatorical object separate from the counting method -- and then maps it to the counting method.

https://www.amazon.com/Introduction-Analysis-Algorithms-2nd-...

So all responses thus far have been great, I think the thing I struggled with in HS and into university is trying to place everything and see what the current math leads to. So, responding here, but upvoting those that responded to me at this time because all provided me with insight. Thanks!
Head down the Prof Wildberger rabbit hole if you'd like to explore why we might be able to cast aside chunks of conventional math including real numbers and infinite sets. https://m.youtube.com/channel/UCXl0Zbk8_rvjyLwAR-Xh9pQ https://njwildberger.com
I would be careful taking that stuff too seriously. It's ok as entertainment though.
Might be? Of course we can. Obviously infinite objects are irrelevant to modeling the real world. They are just a shorthand for adding a bunch of annoying qualifiers to every mathematical statement.
> Obviously infinite objects are irrelevant to modeling the real world.

I disagree. The concept of infinite objects are essentially object sets with an unknown limit. This represents a general case from which we can draw important concepts.

It's a good thing we don't actually need the square root of two!
I disagree that CS deals only with discrete math. Machine learning makes heavy use of linear algebra, with a decent amount of calculus to model statistical phenomena. All of this uses continuous variables, not discrete.
A computer still deals with a finite amount of bits (e.g. 32-bit floating point numbers) so its a discrete system that is large enough to approximate a continuous system.

It may not matter much in practice except for numerical precision issues, but it is useful to understand the foundations and occasionally throw away abstractions for performance/other requirements.

Even then, only small subset of discrete maths often called numerical methods is needed. (Discretizaton, discrete linear and nonlinear algebra, stability.) Going at a problem from fully discrete math point of view is often suicidal (results in unworkable algorithms) as integrals or difference equations are much more useful in practice than say discrete combinatorics. (Mostly used in cryptography.)

Graphs are sometimes useful in a narrow set of CS problems, as are similar structures. However, these are often not taught at discrete maths courses.

That's silly. Floating point math is an approximation of continuous math. It's only discrete in a narrow technical sense.
Computers don't just do floating point. And when they do it, at the lower levels, they don't do it as floating point.
A survey "Discrete Mathematics" course is definitely a mishmash. But every topic in discrete mathematics is rich enough to study in it's own 4 credit 1 quarter undergraduate course: Set Theory, Combinatorics, Graph Theory, Formal Logic, etc.
It doesn't. In my experience, "Discrete Math" is not offered as a math class, but rather as a computer class. In effect, it is the "math for computer science majors" class.
At the university I went to both the math and CS departments offered discrete math courses with slightly different focuses.
That was not my experience despite it being a requirement for the CS major.
Discrete math in my school is mostly about combinatorics, but also graph theory, trees, and things like that. It doesn’t really fit into the standard math sequence IMO. The standard math sequence is essentially single-variable calculus -> multi-variable calculus -> linear algebra and differential equations -> real analysis. Note that all of the above fields essentially operate on continuous things like the real numbers.
That's not quite true, almost any respectable math program is gonna include a significant amount of material on finite set theory and discrete algebra (though maybe not in the non math major escalator, that usually stops at differential equations). That said, I think there is definitely a place for a "discrete math" course, which focuses on teaching things in a more computer science relevant manner.

I also think numerical analysis is a much better choice than real analysis for CS majors, but that's a different topic...

Oh I’m interpreting GP’s mention of standard math sequence as something everyone in math/CS/engineering needs to study, not what math majors specifically need to study.
Of course applied math is much more relevant to CS than pure math. CS is an application of math.
But most applied maths courses/books focus heavily on ODE/PDE which are rarely of help to CS undergrads.
A common use case is prove correctness or running time of algorithms.
Prove running time as in complexity analysis is more analysis than algebra though, right?
Depends. There's not a whole lot of analysis you can do on sufficiently complex recursive algorithms.