Is mathematics used more or logic used more in programming?

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • 4

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

Poll: What is used more in programming? (2 member(s) have cast votes)

Does progamming use mathematics more or logic more?

  1. Mathematics (0 votes [0.00%])

    Percentage of vote: 0.00%

  2. Logic (1 votes [50.00%] - View)

    Percentage of vote: 50.00%

  3. No (1 votes [50.00%] - View)

    Percentage of vote: 50.00%

Vote

#16 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12680
  • View blog
  • Posts: 45,864
  • Joined: 27-December 08

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

Posted 03 January 2020 - 01:08 AM

Your definition of mathematics is incorrect then.
Was This Post Helpful? 0
  • +
  • -

#17 noviceFedora   User is offline

  • New D.I.C Head

Reputation: -4
  • View blog
  • Posts: 44
  • Joined: 08-December 19

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

Posted 03 January 2020 - 04:56 AM

View Postmacosxnerd101, on 03 January 2020 - 01:08 AM, said:

Your definition of mathematics is incorrect then.


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.
Was This Post Helpful? 0
  • +
  • -

#18 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 7230
  • View blog
  • Posts: 24,513
  • Joined: 05-May 12

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

Posted 03 January 2020 - 06:36 AM

That is because of the unfortunate naming of subjects in the lower grade levels of arithmetic (the manipulation of numbers) as math or mathematics. Even worse, when this is being corrected by actually teaching mathmatic concepts first then arithmetic second (e.g. Common Core Math), most people are balking at the change and just want the drill-and-kill just teach them how to manipulate the digits instead of seeing the relationships.
Was This Post Helpful? 2
  • +
  • -

#19 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11768
  • View blog
  • Posts: 19,977
  • Joined: 19-March 11

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

Posted 03 January 2020 - 08:04 AM

I think I addressed that question earlier.

Quote

So yeah, start by thinking about logic, but if you don't bump into some math pretty soon you're probably not setting your sights high enough.


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.
Was This Post Helpful? 2
  • +
  • -

#20 noviceFedora   User is offline

  • New D.I.C Head

Reputation: -4
  • View blog
  • Posts: 44
  • Joined: 08-December 19

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

Posted 03 January 2020 - 08:43 AM

Can anyone here give me an example of what they think mathematics is?

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

Was This Post Helpful? 0
  • +
  • -

#21 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12680
  • View blog
  • Posts: 45,864
  • Joined: 27-December 08

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

Posted 03 January 2020 - 10:25 AM

Quote

Can anyone here give me an example of what they think mathematics is?


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

No, you are disconnected with reality.


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

Was This Post Helpful? 3
  • +
  • -

#22 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11768
  • View blog
  • Posts: 19,977
  • Joined: 19-March 11

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

Posted 03 January 2020 - 11:49 AM

View PostnoviceFedora, on 03 January 2020 - 10:43 AM, said:

Can anyone here give me an example of what they think mathematics is?

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"
Was This Post Helpful? 3
  • +
  • -

#23 noviceFedora   User is offline

  • New D.I.C Head

Reputation: -4
  • View blog
  • Posts: 44
  • Joined: 08-December 19

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

Posted 04 January 2020 - 11:46 AM

View Postmacosxnerd101, on 03 January 2020 - 10:25 AM, said:

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.

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.
Was This Post Helpful? 0
  • +
  • -

#24 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 7230
  • View blog
  • Posts: 24,513
  • Joined: 05-May 12

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

Posted 04 January 2020 - 12:55 PM

Just like a person crossing the street looks at the oncoming cars is not doing differential equations to make sure that they don't hit by a bus or a car.

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. :)/>
Was This Post Helpful? 2
  • +
  • -

#25 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12680
  • View blog
  • Posts: 45,864
  • Joined: 27-December 08

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

Posted 04 January 2020 - 02:53 PM

I'm so glad we don't have people like Number Theorists and Cryptographers thinking about how to securely send information. It's not like folks buy things online.

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

Was This Post Helpful? 2
  • +
  • -

#26 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15488
  • View blog
  • Posts: 62,032
  • Joined: 12-June 08

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

Posted 04 January 2020 - 03:00 PM

Pfffssst... That's just fake info distributed by cronies of BigNumbers.. the insidious cousin of BigPharma and BigOil.
Was This Post Helpful? 2
  • +
  • -

#27 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12680
  • View blog
  • Posts: 45,864
  • Joined: 27-December 08

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

Posted 04 January 2020 - 03:02 PM

We need to thank BigNumbers for our Industrial-Grade Primes!
Was This Post Helpful? 1
  • +
  • -

#28 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15488
  • View blog
  • Posts: 62,032
  • Joined: 12-June 08

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

Posted 04 January 2020 - 03:15 PM

To heck with that! BigNumbers is just one epsilon-transition away from euler cycles spilling into our water ways and non-euclidean pollution in our national parks! They are a menace, but noooooooooo... lamestream media won't touch the topics because of big moolah.
Was This Post Helpful? 0
  • +
  • -

#29 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11768
  • View blog
  • Posts: 19,977
  • Joined: 19-March 11

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

Posted 04 January 2020 - 03:18 PM

Big Moolah, of course, is in the pocket of Big Cows.
Was This Post Helpful? 0
  • +
  • -

#30 noviceFedora   User is offline

  • New D.I.C Head

Reputation: -4
  • View blog
  • Posts: 44
  • Joined: 08-December 19

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

Posted 04 January 2020 - 07:51 PM

View Postjon.kiparsky, on 04 January 2020 - 03:18 PM, said:

Big Moolah, of course, is in the pocket of Big Cows.


What is the reason for using "Big Cows"? Is it offend me as I'm from India? And people here are believed to consider cows sacred?
Was This Post Helpful? 0
  • +
  • -

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • 4