Win a copy of Java Challengers this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Which most essential part in mathematics should every programmers know?

 
Ranch Hand
Posts: 46
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone
i've an idea that always appears in my mind , which the most essential part in mathematics should every programmers know ? i made some research i have been found topic that rotates at Statistics , Probability , Calculus
and what about you ?
 
Marshal
Posts: 72662
317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Depends what you are going to do. Moving objects in graphics requires understanding 3D vectors and matrix manipulations.
 
Saloon Keeper
Posts: 23542
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Algebra. Symbolic Logic.

Calculus is mostly of benefit in getting people to think about functions (although "New Math" introduced that concept at the elementary school level). Statistics - you can make a whole career out of not knowing Probability or Statistics.

Unless, of course, you're in a field like insurance or epidemiology. And even then actuaries may be doing the heavy lifting.

The idea that you have to be a mathematical genius to code in Visual Basic is one of the most annoying assertions I've even had foisted upon me.
 
Houssam El
Ranch Hand
Posts: 46
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
really i like mathematics , i have been studied data structure and algorithms from books that specify a part belong to  mathematics such as inductions and recursive ...
 
Houssam El
Ranch Hand
Posts: 46
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think matrix are essential in our field
 
Houssam El
Ranch Hand
Posts: 46
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Algebra. Symbolic Logic.

Calculus is mostly of benefit in getting people to think about functions (although "New Math" introduced that concept at the elementary school level). Statistics - you can make a whole career out of not knowing Probability or Statistics.

Unless, of course, you're in a field like insurance or epidemiology. And even then actuaries may be doing the heavy lifting.

The idea that you have to be a mathematical genius to code in Visual Basic is one of the most annoying assertions I've even had foisted upon me.



i forget another important point , so if you take  a look at Knuth's volume , you found him give  a brief prelude about mathematics that facilitates analyzing of an algorithms such as binomial coefficient and other things
 
Saloon Keeper
Posts: 8096
71
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Houssam El wrote:

Campbell Ritchie wrote:Depends what you are going to do. Moving objects in graphics requires understanding 3D vectors and matrix manipulations.



i think matrix are essential in our field


Matrix is only useful in a subset of application genres, such as 3D graphics. I don't consider it "most essential" at all. On the other hand, if you don't know algebra then writing software to solve just about any type of problem will either be very painful or impossible.
 
Rancher
Posts: 3850
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dunno -- even algebra is not that significant to many programs I see.  You can say that the idea of using symbols to refer to numbers is algebra, OK... but pretty soon you run into x = x + 1, which has no solution in algebra, but is pretty fundamental in programming.  And so, much of what we do in programming is outside the scope of algebra, I think.  For that matter, integer division is rather different from what you would learn in algebra, as well.  Math in programming is, well, different.  At least, different from what you see in the first year or two of algebra.

More generally, the essential parts of mathematics needed for programming are pretty simple, I think.  You need enough algebra to understand the idea of a variable and evaluate basic arithmetic expressions.  And you need enough symbolic logic to understand something like "if (a && b || c)" correctly.  For better or worse, many people can get by with little more than this, I think.  Thanks to libraries and abstractions available nowadays.

Personally, I'd strongly encourage enough algebra to understand big-O notation, and why O(N^2) is worse than O(N).  Or why exponential is so much worse than any polynomial.
 
Tim Holloway
Saloon Keeper
Posts: 23542
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When we say "algebra", we don't mean solving for values, we mean the manipulation of symbolic formulas. You don't have to know the quadratic theory for most programming, but you should know the properties of transitivity and commutation.

We also mean boolean algebra, which is symbolic logic. And the Calculus of Propositions.
 
Mike Simmons
Rancher
Posts: 3850
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, but that depends who "we" are.  When you say algebra to many people, they think of that class they took in high school years ago that they barely remember.  Much of which is not needed for programming - but some is, indeed, key.  And some things, they're going to have to relearn, in a programming context, because the details will have changed.  I like the callouts to the specific areas of interest, like symbolic logic, transitivity and commutation, more than a general claim about needing to understand "algebra".  Of course there's much much more that is very good to learn about... but what's essential?  Not that much, I think...
 
Tim Holloway
Saloon Keeper
Posts: 23542
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Considering that the discussion is in a forum on programming, I think "we" can safely say that "we" are software designers addressing a particular domain and not the general public speaking more broadly.

Of course. I'm reasonably certain that if you use the word "algebra" to mathematicians, they also would be more likely to think of symbolic operations rather than of the specific form taught in high school. Hence terms such as "boolean algebra". Hmmm. Wikipedia time....

Yup. Just about exactly what I was saying: https://en.wikipedia.org/wiki/Algebra That is, what most non-technical people (being neither computer scientists nor mathematicians) would call "algebra" is technically "elementary algebra".
 
Mike Simmons
Rancher
Posts: 3850
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Agreed on what "algebra" would mean to mathematicians, and what it means to the general public.  In the context of this thread, I'm not sure what's more appropriate - what does "algebra" mean to the original poster?  Are they still in school?  The the beginning of their career?  Well into it?  I don't know.  My answers were more aimed at the beginner level, which may not have been appropriate.

I do think that for either definition, "algebra" still contains many, many things which are not essential for programming.

However, the actual reason I came back here just now was, after posting this, my podcast feed turned to to latest episode of "Talking Kotin", which has Erik Meijer talking about gradient descent in machine learning.  And lo and behold, he started talking about this very topic, coming from a different direction that i thought worth sharing.  I'm not going to try to transcribe or summarize here, but folks in this thread may find it interesting to listen to 15:34-21:10 or so.  

https://talkingkotlin.com/gradient-descent/

Cheers...
 
Rancher
Posts: 961
23
Netbeans IDE Oracle MySQL Database Tomcat Server C++ Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Houssam,

Here is what you need to know of Math for programming and the progression of what you should know:

You need to know the rules of Math how to evaluate an expression according to precidence--and how the language you are using evaluates precidence.

You need to understand underflow and overflow and how that can make a difference to what you are doing, and when they occur or may occur in the calculations you making.

You need to understand number systems base 2 (binary), base 8 (octal), base 10 (decimal), and base 16 Hex and how that applies to the work you are doing at the time--logic, graphic, memory manipulation, and driver development.

You need to understand logic... predicate calculus, demmorgan's theorum and how they apply to what you are doing.

You need to be able to do basic formula manipulations--that is Algebra for those of you that don't know.

You need to be able to programmatically define points in free space to fit object onto the screen--that is also Algebra for those of you that don't know.

You need to understand number representation and how that applies to the data types you may be using--or the ones you should be choosing.

if you need to be able to add numbers in your head so that you aren't sitting there with a calculator or counting on your fingers trying to figure out the addresses or locations of objects, ports, and other interfaces that you may need to use.

now those are what i consider the fundamentals--let's take a look at what you really need:

ANY AND ALL ability to comprehend, visualize, and develop complex patterns needed to bring your project to life.  That is enhanced in physics, calculus, and complex math during problem solving.

Not to mention if you decide you may actually wanna do something other than simple GUI development--heaven forbid you actually wanna do something exciting like make a game or compression algorithm or complex encryption or something marvelous... then there is not bound to the Math you will need.

You will need Geometry and trigonometry to do graphics right.

you will need physics to understand the world around you so you can model it.

So let me put it this way: I was once showing Al Barella, one of the VP of IBM, around our college campus, one of my duties as the chairman of our local ACM chapter, and I asked him what would best benefit me in my studies 2 more classes or English, 2 more classes or hardware interfacing, 2 more classes of computer language, or 2 more classes of Math for my study option for my degree--I already had emphasis in programming.  His answer was simple: "Math never hurt anybody." I took that to heart and I finished up with a few more upper divisional Math classes.  Guess what?  It didn't hurt me.  As a matter of fact, those extra math classes actually have made a lot of my efforts very fun because I understand what's going on and I can develop complex models to simulate the solution sought by the client.  I can run objects around on the screen in a reasonable fashion from complex math formulas that I develop for graphics and dynamic GUI design.

Can I be a programmer without as much Math, sure, no problem, there are a lot of programmers that take their shoes off to count past 11. But when they want something to move and act and do like is supposed to without a huge amount of logic, then it's what kind of formula can you come up with to constrain the movements of these objects to keep them on the screen where they are supposed to be--Math makes that happen.  You may not ever have to write a graphics package to represent a hyperbolic saddle point in space, but you may have to be able to visualize something just as complex and imagine it abstractly.  Modeling is Math.

So what do you you need to know about Math to be a programmer--NOTHING and EVERYTHING, it all depends on how clever you really wanna be!!!

Houssam El wrote:Hello everyone
i've an idea that always appears in my mind , which the most essential part in mathematics should every programmers know ? i made some research i have been found topic that rotates at Statistics , Probability , Calculus
and what about you ?

 
Houssam El
Ranch Hand
Posts: 46
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


i have enjoyed during reading your reply bro , you are so amazing , same for other
thanks for everybody
 
Houssam El
Ranch Hand
Posts: 46
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mike Simmons wrote:Agreed on what "algebra" would mean to mathematicians, and what it means to the general public.  In the context of this thread, I'm not sure what's more appropriate - what does "algebra" mean to the original poster?  Are they still in school?  The the beginning of their career?  Well into it?  I don't know.  My answers were more aimed at the beginner level, which may not have been appropriate.

I do think that for either definition, "algebra" still contains many, many things which are not essential for programming.

However, the actual reason I came back here just now was, after posting this, my podcast feed turned to to latest episode of "Talking Kotin", which has Erik Meijer talking about gradient descent in machine learning.  And lo and behold, he started talking about this very topic, coming from a different direction that i thought worth sharing.  I'm not going to try to transcribe or summarize here, but folks in this thread may find it interesting to listen to 15:34-21:10 or so.  

https://talkingkotlin.com/gradient-descent/

Cheers...



Thanks a lot
 
Houssam El
Ranch Hand
Posts: 46
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Considering that the discussion is in a forum on programming, I think "we" can safely say that "we" are software designers addressing a particular domain and not the general public speaking more broadly.

Of course. I'm reasonably certain that if you use the word "algebra" to mathematicians, they also would be more likely to think of symbolic operations rather than of the specific form taught in high school. Hence terms such as "boolean algebra". Hmmm. Wikipedia time....

Yup. Just about exactly what I was saying: https://en.wikipedia.org/wiki/Algebra That is, what most non-technical people (being neither computer scientists nor mathematicians) would call "algebra" is technically "elementary algebra".



Thanks a lot
 
Campbell Ritchie
Marshal
Posts: 72662
317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mike Simmons wrote:. . . x = x + 1 . . .

Please explain more. What would the = symbol represent. I can envisage a situation where x = x + 1 is valid algebra, but it is a rather trivial equation.
 
Campbell Ritchie
Marshal
Posts: 72662
317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Les Morgan wrote:. . . comprehend, visualize, and develop complex patterns . . .

A lot of people believe that visualising patterns counts as part of Maths. Even simple patterns, so planning anything more complicated than “Hello World” counts as mathematical reasoning. You said it yourself later:-

Modeling is Math.

take their shoes off to count past 11. . . .

Please confirm that is 11 in decimal.
 
Houssam El
Ranch Hand
Posts: 46
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Mike Simmons wrote:. . . x = x + 1 . . .

Please explain more. What would the = symbol represent. I can envisage a situation where x = x + 1 is valid algebra, but it is a rather trivial equation.



maybe he means x  square 2 + 1 = 0, the previous equations considered as a certain cause led to cover complex number
 
Campbell Ritchie
Marshal
Posts: 72662
317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please explain more about that complex number. I was thinking about + as a Boolean operator, so you are evaluating x ∨ true, which is equal to x.
 
Saloon Keeper
Posts: 4381
163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that having a good knowledge of high school maths is good enough. And the ability to look things up at Google.

Tim Holloway wrote:And even then actuaries may be doing the heavy lifting.


My English is insufficient to understand this sentence. Is that a compliment to actuaries or an insult? Better be the first one....    
 
Campbell Ritchie
Marshal
Posts: 72662
317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It means Tim thinks the actuaries will do all the statistics etc.
 
Tim Holloway
Saloon Keeper
Posts: 23542
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:It means Tim thinks the actuaries will do all the statistics etc.



Correct. I can speak with authority because I started my career doing actuarial computing. We got our requirements from an outside actuarial company. They did the math, we put it into computers.

I'm a little reluctant to revive the algebra argument, but I think some clarifications are in order. First of all, "x = x+1" is not algebra. It's not even an equation in most computer languages, it's an assignment. Many computer languages make that clear by using special operators such as Pascal/Modula/Ada "x := x + 1" Or "x <- x + 1". Or look at computer science textbooks where they simply typeset an actual arrow character. "x ← x + 1".

So why do we use "=" in Java, C/C++, et. al.?. Because it has a long history going back to times when keyboards were simpler (often even lower-case wasn't available), input media was limited (using 2 characters instead of one costs significantly when you can only punch in a 65-column zone of an 80-column Hollerith card, and storage media was expensive and limited (the archetypal IBM 2400 BPI tape reels could only hold 150MB and some of the systems I worked on in school had 2 5MB hard drives - with 14-inch platters - for the entire system. So coding just  "=" and understanding the meaning from context is common.

So what about "learning algebra"? It's true. In school what they teach is a particular type of algebra. It has specific real-world uses. And you're not likely in most cases to need to know all of it to do software development. but it does teach commutativity, formula reduction and similar concepts.

The symbolic manipulation part of high-school algebra is integral to almost all computer languages, excepting maybe systems like FORTH or specialized text-processing (and maybe even then). And since no one is offering courses in just the "useful" (from a computer standpoint) part of algebra, take the [expletive deleted] algebra course. Anyway, I don't think I was given an option.
 
Campbell Ritchie
Marshal
Posts: 72662
317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:. . . So why do we use "=" in Java, C/C++, et. al.?. . . .

Yes, it is the wrong symbol. At last I have an explanation for using = rather than ≔.

And I got the bit about + meaning or wrong earlier, didn't I; it would only make sense if you use + to mean and, which it usually doesn't.
 
Tim Holloway
Saloon Keeper
Posts: 23542
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ironically, one of the oldest uses of "=" as an assignment operator is seen in the Fortran programming language. Which, of course, is simply shorthand for FORmula TRANslator.
 
Campbell Ritchie
Marshal
Posts: 72662
317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have vague memories of Fortran using the SET keyword with =. Am I mistaken about that?
 
lowercase baba
Posts: 12982
66
Chrome Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I have a different take on what is "math".  I used to be a secondary school math teacher.  I always had students ask me "why do we need to learn this stuff...".

I equated it to an athlete doing exercise.  I have seen MANY football players do jumping jacks, or step through tires laid out on the ground. I've seen baseball players lifting weights.  But they only do this during practice, not during an actual game.

Math is the same thing.  You do a lot of exercises that help train your brain how to think through a problem.  In the 'real world', you may never need to prove two lines are parallel, but having practiced that kind of logical thinking and problem analysis, it's easier to do the problems you DO face.
 
Mike Simmons
Rancher
Posts: 3850
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Campbell, I'm not sure what the question was about x = x + 1.  Perhaps the answer was in the surrounding context which you deleted.  Tim got what I was talking about - just the fact that there's a misleading difference between the meaning of = in elementary algebra (i.e. the one taught first in school) and = as assignment operator in almost any programming language.  There, x = x + 1 is just a way to increment a variable - very different from what it means in elementary algebra.

Fred, I definitely like your take on the use of math.
 
Tim Holloway
Saloon Keeper
Posts: 23542
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I really enjoyed doing geometric proofs in high school. Now I've so completely forgotten them I wouldn't know how to even begin. I studied trigonometric identities, but years later, taking Calculus II, I had forgotten that they even existed. I had to re-learn the concepts all over again. Didn't withdraw from the course fast enough, either, so it's the only one I ever flunked.

My wife wants to learn Python and there's a very good video course we're watching (and, of course, I'm critiquing ). The instructor took great pains to point out the difference between a command and an expression.. An assignment statement is a command and it has a very specific syntax. Which, unfortunately in Java happens to include the equals sign in the rôle of the assignment operator. Which, now that I think of it, is a bit of a misnomer, since if we consider "operators" to be parts of expressions, means that we're getting sloppy with terminology.

Basic Algebra, on the other hand, concerns itself with equations. Equations are neither commands nor expressions in the context of programming.They are statements of fact, not executable statements. In fact, I can think of only two cases where you're likely to even see equations in programs. In MatLab and in functional languages such as LISP. But there they are more likely to serve as data to be evaluated or manipulated..
 
Piet Souris
Saloon Keeper
Posts: 4381
163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I certainly liked Freds view too.

But it doesn't end with maths, I'm afraid. Why do we learn writing, when all we do these days is typing on a keyboard.
 
Campbell Ritchie
Marshal
Posts: 72662
317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mike Simmons wrote:. . . a misleading difference between the meaning of = in elementary algebra . . . and = as assignment operator . . .

I thought it must mean something like that.
 
Mike Simmons
Rancher
Posts: 3850
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah Tim, I have almost the exact same experience of geometric proofs - really loved doing them at the time, and yet just a few years later I had no memory of how to do them.  And trig identities, yes, they seemed kind of pointless to me at the time, and then later when learning integration, oh yeah, turns out you really need those things, what were they again? Ah, memories...

The instructor took great pains to point out the difference between a command and an expression.. An assignment statement is a command and it has a very specific syntax. Which, unfortunately in Java happens to include the equals sign in the rôle of the assignment operator. Which, now that I think of it, is a bit of a misnomer, since if we consider "operators" to be parts of expressions, means that we're getting sloppy with terminology.


Well, in many languages including Java, assignments can be parts of other expressions.  We may typically frown on it as bad style, but something like

is a legal statement in Java, an assignment statement, combining two assignment expressions as

where y = 42 not only assigns 42 to y, but also evaluates to 42, to be used in the outer expression x = (...).  

A more widely accepted example, from a stylistic standpoint, might be

Yes, there are better ways now, but this was for a while a pretty common way to loop through lines in a file while minimizing the scope of local variables.  And again, it relies on an assignment being used as an subexpression in a longer expression.
 
Tim Holloway
Saloon Keeper
Posts: 23542
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I actually did consider your first example. It's discouraged in Java and not particularly well-received in C, but more that once I've seen constructs such as:

More common in C, since historically if you didn't explicitly initialize something there it would start with random garbage resulting in hard-to-find bugs. But hey, who wants to code all that stuff as independent lines? Actually, it turns out that despite the tedium, the maintenance cost is lower if you do. Especially if one day k has start at 4.

Assignment within a condition or function call is, of course, another matter. Still, there are definite limits on syntax for that kind of stuff that make assignment unambigous. I suppose that the true "equals" in Java expressions is the "==" digraph, but that's actually a boolean operator, not a statement of fact. And not to be confused with "equals()". There really is no "statement of fact" construct I can think of in Java. Unless you count assert. Fact, or else!

In many languages, especially the Algol-descended ones, it's encouraged to read ":=" as "becomes" rather than "equals". It's more accurate.
 
Marshal
Posts: 26534
81
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mike Simmons wrote:Agreed on what "algebra" would mean to mathematicians, and what it means to the general public.



Well, hold on. I'm a mathematician and I got my PhD in "algebra". Now have a look at the Wikipedia article Algebra. In the table of contents, section 6 is "Elementary algebra". That's what the general public thinks of as "algebra", solving of simple polynomials. But section 7 is "Abstract algebra" and it's an entirely different topic. It's almost like the two versions of "algebra" just happen to have the same name, although they aren't totally unrelated.
 
Mike Simmons
Rancher
Posts: 3850
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, that's right.  Much like the point Tim had just made when I said "agreed".  I think I've been clear that my own points were generally about elementary algebra, and comparing it to programming.  Not sure what needs a "hold on" here; we seem to be going in circles.
 
Tim Holloway
Saloon Keeper
Posts: 23542
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From section 7:

WikiPedia on Algebra wrote:Abstract algebra extends the familiar concepts found in elementary algebra ... to more general concepts

Emphasis mine.

So Sections 6 and 7 aren't mutually exclusive, Abstract Algebra is taking Elementary Algebra to a meta-level. And that's how it worked historically, I think, just as Calculus started with the idea of dividing area under a curve into smaller and smaller slices, and ended up manipulating entire sets of equations in the form of partial differentials and Tensors.

Actually, I had to stop and think about the difference between abstract algebra and abstract calculus, and I think a reasonable distinction is that algebra is the art of manipulating collections of symbols and their relationships, and calculus is the art of transforming symbols and their relationships. That is, X = 3Y + 2 can be refactored to Y = (X - 2)/3 algebraically, but dX/dY = 3, which contains a different set of elements altogether.

Incidentally, long ago I was tangentally involved in a college project where the computer group had the mathematical geeks run a set of proofs on a ring that they had theorized to ensure that it would actually have the properties that they hoped it would. And if that seems vague, it was because not only was it a long time ago, it was pretty abstract even then.

Anyway, going back to our core propositition. I think we have consensus that abstract algebra is indeed useful, if not essential for programming. And by abstract, I mean not only numeric refactoring of expressions but also boolean refactoring which belongs to a whole different branch of mathematics. But since high school algebra (elementary algebra) is a subset of Abstract Algebra, it's the best and most likely way for most people to learn this essential skill.

Quod Erat Demonstratum.
 
Paul Clapham
Marshal
Posts: 26534
81
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:From section 7:

WikiPedia on Algebra wrote:Abstract algebra extends the familiar concepts found in elementary algebra ... to more general concepts

Emphasis mine.

So Sections 6 and 7 aren't mutually exclusive, Abstract Algebra is taking Elementary Algebra to a meta-level.



Well, I actually worked in the field and I have to say that's similar to claiming that building jet aircraft extends the idea of jumping over a creek. Of course it does, since both involve people becoming air-borne, but it stretches the meaning of the word "extends" way too far.

I'm just saying that as a mathematician I disagree with what you and Mike have agreed that a mathematician would believe.
 
Tim Holloway
Saloon Keeper
Posts: 23542
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:

Tim Holloway wrote:From section 7:

WikiPedia on Algebra wrote:Abstract algebra extends the familiar concepts found in elementary algebra ... to more general concepts

Emphasis mine.

So Sections 6 and 7 aren't mutually exclusive, Abstract Algebra is taking Elementary Algebra to a meta-level.



Well, I actually worked in the field and I have to say that's similar to claiming that building jet aircraft extends the idea of jumping over a creek. Of course it does, since both involve people becoming air-borne, but it stretches the meaning of the word "extends" way too far.

I'm just saying that as a mathematician I disagree with what you and Mike have agreed that a mathematician would believe.



On the other hand, Java is very much about extending "Jumper" into "Flyer". You just subclass Jumper to add range, velocity, fuel and equipment. We do that sort of thing every day.

Pure Mathematics generally distills and extends concrete mathematics, after all. Humans love to do that. Consider how the simple process of selling shares in a corporation has abstracted into such things as mutual funds, futures, options and derivatives. A good idea can travel a long way, and you may need archaeology to discover its roots before it's all over.

It's how I get given a set of programs to do, abstract their common denominators, develop an appllication generator, and end up laid off because I don't do any work when I could have been happily re-writing the same program repeatedly at an hourly rate for months/
 
Tim Holloway
Saloon Keeper
Posts: 23542
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Incidentally, I know of at least two other algebras that I dealt with in high school.

In physics, where we did vector algebra. And in general math, where we did Set Theory. These are both officially recognized in the literature as algebraic in nature in that they possess operators and rules for manipulation of expressions, even though those rules aren't the same as in Elementary Algebra. Set theory, of course, we encounter almost daily in SQL database operations and in Java Collections, although we don't use the specialized operators that Mathematics would use (unless you're coding on an APL keyboard, anyway!)

Boolean algebra, as I said, is a legitimate component of Mathematical Logic and George Boole was a recognized mathematician and algebrist by profession.

And then there's Graph Algebra,  which is essential to compiling and optimizing Java programs and SQL statements. Since one of the first things a compiler does after lexical processing is to build an Abstract Syntax Tree (AST) and run algebraic operations to condense and optimize it.

You could argue that Wikipedia got it backwards. So-called "Elementary Algebra" is a superclass of Abstract Algebra, just as are Boolean Algebra, Vector/Matric Algebra, Set and Graph Algebra. All have the common properties that they deal with entities, operators, and the manipulation of operational expressions.

But since most people are more familiar with algebra in its practical form, it's forgivable that they started with a specific flavor and then moved towards the general. Since the specific is based on the general (abstract) concept, you have to learn the abstract concepts to do the specifics. And thus, by stealth, learn skills that can be re-mapped to a wide variety of uses in software design and development.
 
Do Re Mi Fa So La Tiny Ad
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic