## 54 Replies - 2175 Views - Last Post: 05 January 2020 - 12:48 AM

### #16

## Re: Is mathematics used more or logic used more in programming?

Posted 03 January 2020 - 01:08 AM

### #17

## Re: Is mathematics used more or logic used more in programming?

Posted 03 January 2020 - 04:56 AM

macosxnerd101, on 03 January 2020 - 01:08 AM, said:

No, you are disconnected with reality. You ask any person(non-mathematician) on the street and they'll tell you that they think about numerical calculations and computations when they hear the words math or mathematics. That is the same in every part of the world.

### #18

## Re: Is mathematics used more or logic used more in programming?

Posted 03 January 2020 - 06:36 AM

### #19

## Re: Is mathematics used more or logic used more in programming?

Posted 03 January 2020 - 08:04 AM

Quote

The naive sense of "logic" that you're using there is actually fine - it's the stuff that lawyers and historians do. Technically, it's "rhetoric", not "logic", but we can let it pass. It's certainly not "symbolic logic", which is the term you used and which refers to the sort of formal logic which is absolutely and unquestionably mathematical in nature, but again, let it pass.

The distinction between "mathematics" and "computation" is much more important for your ability to make progress, since any serious work that you want to do do in computer programming will be sharply limited by your grasp of mathematics, by which I mean mathematics and not computation. Basically, once you get past the most trivial turtle-logic, "computer programs are like recipes" stuff, you're going to need to understand mathematical concepts, such as induction, graphs, sets, logic, and so forth. You can treat those naively, as many programmers do, and pretend that it's just "stuff you picked up", which will make your life more difficult for no benefit to you, or you can grasp the nettle and learn the math.

Once again, this is "mathematics" which is quite different from the computation of some numerical result or solution to a stated problem. If this sort of problem stumps you - for example, "write a solver for quadratic equations" - then you should be a little bit alarmed by this because it indicates that there's an area of programming at which you are currently inept. Not greatly alarmed, of course - all of us have great swaths of ineptitude, and given finite lives most of those swaths will remain unaddressed - but a little bit alarmed because we're talking about your ability to convert a set of requirements into a working program, which is the skill set you're trying to develop and ultimately sell. So from that perspective, if the problem is "the exercises are not well specified and I can't be arsed to look up the details of the problem they're trying to ask me to solve", then fine, you're lazy in this domain and nobody really cares all that much and you can go solve other problems. On the other hand, if the problem is, "the problems are well specified and I can't manage to execute a solution" then that's probably less fine, and betokens trouble in your chosen field of study. From your original post, I can't tell which situation we're in.

### #20

## Re: Is mathematics used more or logic used more in programming?

Posted 03 January 2020 - 08:43 AM

What arithmetic is?

What calculations and computations are?

And how arithmetic, calculations and computations are not the same as mathematics?

This post has been edited by **noviceFedora**: 03 January 2020 - 08:51 AM

### #21

## Re: Is mathematics used more or logic used more in programming?

Posted 03 January 2020 - 10:25 AM

Quote

Mathematics is about abstraction and precision. We search for patterns and try to design structures that elegantly capture the desired properties. The goal is to then prove theorems about these structures.

Most branches of mathematics don't deal with mindless calculations as you have described. Examples include Category Theory, Model Theory, Computability Theory, Computational Complexity, Linear Algebra, Abstract Algebra, Algebraic Geometry, Commutative Algebra, Representation Theory, Combinatorics, Graph Theory, Number Theory, Cryptography, Information Theory, Algebraic Coding Theory, Real Analysis, Topology, Complex Analysis, and Game Theory.

Arithmetic deals with basic manipulations of (certain subsets of) the complex numbers, such as by addition, subtraction, multiplication, and division. While Arithmetic is certainly Mathematics, not all Mathematics is Arithmetic.

Quote

Less so than you think. I teach Math at the University level, including courses such as Calculus and Discrete Math for non-majors, as well as upper-division courses like Algorithms and Theory of Computation. There are ideas and techniques in both- not just mindless computations. In Calculus, we grapple with the definition of a limit early in the semester. Historically, Calculus ideas (e.g., instantaneous change, the derivative, the integral) have been around for centuries. It wasn't until Karl Weierstrass developed the limit (in order to make precise the notion of approximation) that Calculus was on firm footing.

By the way, Calculus is pretty useful, such as for optimization. And optimization is pretty fundamental in Machine Learning. Applications of Machine Learning are pretty easy to find in the real world- Google's PageRank algorithm, Amazon's recommender system which suggests products you might like, Facebook's facial recognition software, etc. There is a considerable amount of theory and math that goes into developing the algorithms for these things. It's not just mindless computation.

This post has been edited by **macosxnerd101**: 03 January 2020 - 10:28 AM

### #22

## Re: Is mathematics used more or logic used more in programming?

Posted 03 January 2020 - 11:49 AM

noviceFedora, on 03 January 2020 - 10:43 AM, said:

What arithmetic is?

What calculations and computations are?

And how arithmetic, calculations and computations are not the same as mathematics?

A loose but useful definition that I like to use is: mathematics is the habit of concrete reasoning about rigidly-defined abstract entities.

To expand on this: by "concrete", I mean reproducible and convincing and systematic. By "rigidly-defined abstract" entities, I mean entities which are created by definitions which fully characterize their behavior, in other words, entities about which no experiment can reveal new truths.

So, an example: a "set" is a collection of entities, such that any entity in the "universe"* is either in the set or it is not.

This may seem like a fairly trivial sort of entity, but we can use it to build up an entity of useful tools, such that it can serve as the foundation of just about all interesting mathematics. In fact, a useful way to determine whether a book is an intro to interesting mathematics is to look for an early overview of set theory: if set theory is not needed, it's probably not interesting math, and if a working knowledge of set theory is assumed, it's probably not an intro.

Once we have set theory in hand, we might look at networks and connections. This is graph theory, and it has the delightful property of requiring, at least at the initial stages, almost no arithmetic and no numbers. Of course, eventually we will want to count things, but at least at the outset you can clearly see how mathematics can be done simply on "nodes" and "edges", without bothering about additions and subtractions and so forth. Trudeau (not the Canadian prime minister) has a good intro to graph theory.

Logic, of course, is a good example of a math. As it turns out, set theory is also sufficient underpinning for the fundamentals of mathematical logic, see Rosenbloom or Stoll. (also available from Dover).

Personally, I greatly enjoy number theory, which deals with problems about the integers and their properties. George E. Andrews' introduction to number theory will make you work a little, but it's accessible to the interested non-mathematician. (again, available from Dover)

If you want to justify the arithmetic you learned in grade school, Birkhoff and MacLaine's Survey of Modern Algebra does an excellent job of establishing that facts of life about numbers: they exist, and they can do the things you believe they ought to be able to do, and what Mrs. Grundy told you about long division is in fact valid even though she, forgivably enough, failed to provide proofs of her algorithms. Sadly, this one seems to be hard to find in a new edition (I see that Powells has a new copy for >$100, but you can do better than that if you look for a used copy)

I hope this helps give you some ideas of what I mean when I talk about mathematics.

Arithmetic, as I use the term, is the deployment of algorithms justified by mathematics to solve concrete problems. An analogy: if we consider quicksort as a theorem, proving it to be effective and optimal is mathematics. Using it to sort the words of War and Peace is arithmetic. If we're interested in linear algebra, understanding the fundamentals of matrices and how they behave is a mathematical study, but multiplying [1 2 3, 4 5 6, 7 8 9] by [3 2 1, 6 5 4, 9 8 7] is arithmetic. And so forth. The "lawyers' logic" that I referred to above could be considered the logical equivalent of arithmetic - saying "if you believe that all swans are white, and you believe that this bird is black, then you must believe that this is not a swan" is correct, but justifying that argument is math.

* "universe" will presently be defined to mean just "those things which might come into the present discussion"

### #23

## Re: Is mathematics used more or logic used more in programming?

Posted 04 January 2020 - 11:46 AM

macosxnerd101, on 03 January 2020 - 10:25 AM, said:

Most branches of mathematics don't deal with mindless calculations as you have described. Examples include Category Theory, Model Theory, Computability Theory, Computational Complexity, Linear Algebra, Abstract Algebra, Algebraic Geometry, Commutative Algebra, Representation Theory, Combinatorics, Graph Theory, Number Theory, Cryptography, Information Theory, Algebraic Coding Theory, Real Analysis, Topology, Complex Analysis, and Game Theory.

Arithmetic deals with basic manipulations of (certain subsets of) the complex numbers, such as by addition, subtraction, multiplication, and division. While Arithmetic is certainly Mathematics, not all Mathematics is Arithmetic.

Less so than you think.

**I teach Math at the University level,**including courses such as Calculus and Discrete Math for non-majors, as well as upper-division courses like Algorithms and Theory of Computation. There are ideas and techniques in both- not just mindless computations. In Calculus, we grapple with the definition of a limit early in the semester. Historically, Calculus ideas (e.g., instantaneous change, the derivative, the integral) have been around for centuries. It wasn't until Karl Weierstrass developed the limit (in order to make precise the notion of approximation) that Calculus was on firm footing.

By the way, Calculus is pretty useful, such as for optimization. And optimization is pretty fundamental in Machine Learning. Applications of Machine Learning are pretty easy to find in the real world- Google's PageRank algorithm, Amazon's recommender system which suggests products you might like, Facebook's facial recognition software, etc. There is a considerable amount of theory and math that goes into developing the algorithms for these things. It's not just mindless computation.

Doesn't the bolded part prove my point, you teach math, so you are mathematician, so you think math is not calculations and computations. For normal people, that is what it means.

I'm not familiar many of the the areas of mathematics you mentioned, but taking a cursory look at them, they also look like they only involve calculations and computations. Set Theory is the only area of mathematics which seems to have less emphasis on computations.

### #24

## Re: Is mathematics used more or logic used more in programming?

Posted 04 January 2020 - 12:55 PM

Or a carpenter trying to build a book case is not doing integral calculus to figure out how much wood he needs.

Or a taxi driver trying to figure out the fastest way to get his customer to their destination is not applying graph theory.

Or a criminal who is being offered a deal by the prosecutor to rat out on his cohorts is not using game theory.

Or a lawyer is trying to parse out all the IFs, WHEREAS, ANDs, ORs, EXCEPTs in a legal statute is not using logic and set theory.

Nope... none of those people are using math at all. />

### #25

## Re: Is mathematics used more or logic used more in programming?

Posted 04 January 2020 - 02:53 PM

And it's a great thing nobody thinks about how to recover messages from damaged transmissions. I really love when my calls get dropped, or when I can't understand a word the other person is saying. I'm glad math folks don't work in the area of error correcting codes.

Yep- all those mathematicians just mindlessly push numbers around all day, not impacting the lives of the "real world" folks at all.

This post has been edited by **macosxnerd101**: 04 January 2020 - 02:54 PM

### #26

## Re: Is mathematics used more or logic used more in programming?

Posted 04 January 2020 - 03:00 PM

### #27

## Re: Is mathematics used more or logic used more in programming?

Posted 04 January 2020 - 03:02 PM

### #28

## Re: Is mathematics used more or logic used more in programming?

Posted 04 January 2020 - 03:15 PM

### #29

## Re: Is mathematics used more or logic used more in programming?

Posted 04 January 2020 - 03:18 PM

### #30

## Re: Is mathematics used more or logic used more in programming?

Posted 04 January 2020 - 07:51 PM