• OK, it's on.
  • Please note that many, many Email Addresses used for spam, are not accepted at registration. Select a respectable Free email.
  • Done now. Domine miserere nobis.

math in programming

Ex-User (8886)

Well-Known Member
Local time
Today 7:15 AM
Joined
Sep 11, 2013
Messages
620
-->
I'm just starting college and in future want to be programmer. What sections of math is important in programming? I also think about some competitions, and what is the most important there from math side?
 

Ex-User (9086)

Prolific Member
Local time
Today 7:15 AM
Joined
Nov 21, 2013
Messages
4,758
-->
Math is not important in programming unless you need to apply it in your program.
That doesn't mean it is not necessary to study it as it teaches you basics of formal thinking that later helps with using logics in algorithms.

Popular areas of math that are used in programming are:
Statistics (business, modelling, robotics, probability theory)
Algebra (formal mathematical operations)
Number theory (mainly for cryptography)
 

Cognisant

Prolific Member
Local time
Yesterday 8:15 PM
Joined
Dec 12, 2009
Messages
10,564
-->
Basic algebra.
An algorithm is just an algebraic equation used over and over.

Some understanding of probability is good if you're making games or AI and you're after an output that isn't a straightforward answer to a problem.

Really the hardest thing about programming isn't the programming itself, or even debugging (that's just time consuming) the real challange is learning the syntax, hence why many coders try to make their one chosen language and compiler fit all problems (when possible) rather than go through the headache of learning the syntax of several languages.

In my experiance the best way to learn programming is to read the code of an already working opn source program then use whatever language/compiler that was used to make it, because there's nothing more frustrating than a tutorial with an example program that dosen't run which is more than likely because it's outdated.
 

Grayman

Soul Shade
Local time
Today 12:15 AM
Joined
Jan 8, 2013
Messages
4,416
-->
Location
You basement
Algebra is needed.

Game physics might require more.
 

gypster

Noshirt
Local time
Today 3:15 AM
Joined
Jan 9, 2014
Messages
10
-->
i would say it really depends on your end goal as a programmer. as previous posters have stated, some basic skills in math are definitely required. mostly algebra and logic. this will at least get your toes wet.

are you interested in more hardware or software? software/systems engineering? app development? game development? graphics? AI? data science? networking? distributed computing? cryptography? linguistics?

this is by no means an exhaustive list of options, but hopefully can help you thinking about you want. depending on how you want to go, you'll find that certain maths will come in handy.

if you're unsure, i would echo the sentiment of looking into some open source projects of things you find interesting, but more from the standpoint of learning about the underlying concepts behind the implementation, as opposed to just trying to get something to compile. this is something i wish i had figured out earlier in my life, actually.

if you want to start off even smaller than that (which is completely fine, as you have plenty of years to get up to speed), there are a couple of sites that can help poke and prod the hidden programmer within you. sites like hackerrank.com and topcoder.com offer various types of programming problems, which will expose you to the different kinds of math needed for certain areas. codekata.com has a decent list of puzzles to get you thinking about problems. and of course, sites like ocw.mit.edu will offer self-learning opportunities.
 

JansenDowel

Active Member
Local time
Today 7:15 PM
Joined
Sep 7, 2014
Messages
240
-->
Location
New Zealand
Depends on what you want to do. Usually the following math papers will do the trick:

Linear Algebra (Not JUST algebra).
Probability Theory (Not JUST statistics).
Discrete Mathematics

These are a MUST. The following are helpful if you want to get into Machine Learning, Computational Biology and so on.

Multivariable Calculus (Scientific applications)
Differential Equations (Scientific applications).
Number Theory (Not really, but may be useful).
 

Ex-User (9086)

Prolific Member
Local time
Today 7:15 AM
Joined
Nov 21, 2013
Messages
4,758
-->
Linear Algebra (Not JUST algebra).
Probability Theory (Not JUST statistics).
Discrete Mathematics

These are a MUST. The following are helpful if you want to get into Machine Learning, Computational Biology and so on.
These are not a must and I would have to question whether you have any idea about how programming is done in practice.

Every bit of mathematics you will need is solution specific. You will need it if it helps you implement the features such as geometry or physics that would be present in your program.
 

ProxyAmenRa

Here to bring back the love!
Local time
Today 5:15 PM
Joined
Sep 30, 2009
Messages
4,668
-->
Location
Australia
Depends on what you want to do. Usually the following math papers will do the trick:

Linear Algebra (Not JUST algebra).
Probability Theory (Not JUST statistics).
Discrete Mathematics

These are a MUST. The following are helpful if you want to get into Machine Learning, Computational Biology and so on.

Multivariable Calculus (Scientific applications)
Differential Equations (Scientific applications).
Number Theory (Not really, but may be useful).

These are the basics one needs to know for scientific computing.

Additionally, knowing what math symbols mean is would be damn handy. I look at equations and I have no bloody clue what they mean.
 

Ex-User (8886)

Well-Known Member
Local time
Today 7:15 AM
Joined
Sep 11, 2013
Messages
620
-->
i would say it really depends on your end goal as a programmer. as previous posters have stated, some basic skills in math are definitely required. mostly algebra and logic. this will at least get your toes wet.

are you interested in more hardware or software? software/systems engineering? app development? game development? graphics? AI? data science? networking? distributed computing? cryptography? linguistics?

this is by no means an exhaustive list of options, but hopefully can help you thinking about you want. depending on how you want to go, you'll find that certain maths will come in handy.

if you're unsure, i would echo the sentiment of looking into some open source projects of things you find interesting, but more from the standpoint of learning about the underlying concepts behind the implementation, as opposed to just trying to get something to compile. this is something i wish i had figured out earlier in my life, actually.

if you want to start off even smaller than that (which is completely fine, as you have plenty of years to get up to speed), there are a couple of sites that can help poke and prod the hidden programmer within you. sites like hackerrank.com and topcoder.com offer various types of programming problems, which will expose you to the different kinds of math needed for certain areas. codekata.com has a decent list of puzzles to get you thinking about problems. and of course, sites like ocw.mit.edu will offer self-learning opportunities.

I'm totally new in the subject, but my dream is to connect computer with our nervous system. Computational neuroscience is incredible.
Also AI, software engineering and app or game development seems interesting.

Thanks everyone for replies.
 

Ex-User (9086)

Prolific Member
Local time
Today 7:15 AM
Joined
Nov 21, 2013
Messages
4,758
-->
I'm totally new in the subject, but my dream is to connect computer with our nervous system. Computational neuroscience is incredible.
Also AI, software engineering and app or game development seems interesting.

Thanks everyone for replies.
You can download visual studio for free, start developing in C# and see how you like it.
You could write several of your first programs in a matter of minutes.
If you were really focused you could get to learning classes by the evening.

Then maybe try other languages, new versions of LISP recommended.

Road to programming is laid out and all the resources are availible online, few clicks away.
 

gypster

Noshirt
Local time
Today 3:15 AM
Joined
Jan 9, 2014
Messages
10
-->
I'm totally new in the subject, but my dream is to connect computer with our nervous system. Computational neuroscience is incredible.
Also AI, software engineering and app or game development seems interesting.

Thanks everyone for replies.

if you have a dream, then by all means go for it! the general field is interesting, indeed, and you may find yourself dabbling in the other things you mentioned as you work your way towards your dream.

You can download visual studio for free, start developing in C# and see how you like it.
You could write several of your first programs in a matter of minutes.
If you were really focused you could get to learning classes by the evening.

Then maybe try other languages, new versions of LISP recommended.

Road to programming is laid out and all the resources are availible online, few clicks away.

i second this, and am also glad to see LISP mentioned as a language to try. most programmers i work with seem to be fascinated by and satisfied with just slapping together some APIs in the name of making something "cool". meanwhile, there's no rhyme or reason to how things are structured. it's these people that tend to smile and nod at me as if i were some clueless child when i mention LISP as something all programmers should have a grasp of. ;)
 

Ex-User (9086)

Prolific Member
Local time
Today 7:15 AM
Joined
Nov 21, 2013
Messages
4,758
-->
i second this, and am also glad to see LISP mentioned as a language to try. most programmers i work with seem to be fascinated by and satisfied with just slapping together some APIs in the name of making something "cool". meanwhile, there's no rhyme or reason to how things are structured. it's these people that tend to smile and nod at me as if i were some clueless child when i mention LISP as something all programmers should have a grasp of. ;)
I think starting from C# and LISP, he would start from more accessible languages in the beginning and later naturally drift towards Perl, Ruby and finally C++ which is currently used as the best language for optimisation/implementation of pretty much anything, including AI, which seems to be his goal.

I wouldn't give C++ to someone new to the programming, the learning curve is terrible.
 

gypster

Noshirt
Local time
Today 3:15 AM
Joined
Jan 9, 2014
Messages
10
-->
I wouldn't give C++ to someone new to the programming, the learning curve is terrible.

tell that to my high school. :D my foray into programming was with an AP course taught in C++, followed by systems level programming in C! glad i stuck it out, though.
 

JansenDowel

Active Member
Local time
Today 7:15 PM
Joined
Sep 7, 2014
Messages
240
-->
Location
New Zealand
These are not a must and I would have to question whether you have any idea about how programming is done in practice.

Every bit of mathematics you will need is solution specific. You will need it if it helps you implement the features such as geometry or physics that would be present in your program.

I am currently doing machine learning and algorithm analysis papers. Algorithm analysis requires discrete math and linear algebra. While machine learning requires ALL of the papers I described.

Yes it depends on what you want you want to do. If your idea of fun is just software engineering, then knowing algebra is all it takes.
 

Ex-User (8886)

Well-Known Member
Local time
Today 7:15 AM
Joined
Sep 11, 2013
Messages
620
-->
I think starting from C# and LISP, he would start from more accessible languages in the beginning and later naturally drift towards Perl, Ruby and finally C++ which is currently used as the best language for optimisation/implementation of pretty much anything, including AI, which seems to be his goal.

I wouldn't give C++ to someone new to the programming, the learning curve is terrible.

Mhmm, I already started learning C++ and know some basics. Should I change language to C#?
 

Grayman

Soul Shade
Local time
Today 12:15 AM
Joined
Jan 8, 2013
Messages
4,416
-->
Location
You basement
Mhmm, I already started learning C++ and know some basics. Should I change language to C#?

I would since it is considerably easier. Also, if you ever plan on doing web it can be useful.
 

Ex-User (9086)

Prolific Member
Local time
Today 7:15 AM
Joined
Nov 21, 2013
Messages
4,758
-->
Mhmm, I already started learning C++ and know some basics. Should I change language to C#?
I have seen 90% of the people I started my course with give up on programming after being introduced to C++, I and a few others weren't because we already were dabbling in it for a while and we were aware of more communicative solutions.

I doubt the average students dedication and vision to become a programmer, but I doubt it even more when they are presented with industrial oriented courses on C and C++, which are quite standard at least around here.

So I would say it depends on how much work and breakthroughs you are going to make in your free time, but I wouldn't bet my money on anyone successfuly going through it that I haven't previously seen had a talent and some sort of "predestination" to adapt and overcome such things.

It takes a few hours to see how both languages work, what you are doing with your free time is your thing, notably, you could have it all figured out instead of perusing this forum to ask these questions which will never be case specific and definite.
mainline:
If any advice on these sorts of things then, don't expect to learn math or programming during your course at the university. You are bound to practise and learn at home if you are into the deep knowledge of most subjects.
 

JansenDowel

Active Member
Local time
Today 7:15 PM
Joined
Sep 7, 2014
Messages
240
-->
Location
New Zealand
I have seen 90% of the people I started my course with give up on programming after being introduced to C++

Why? Its not like c++ is difficult to learn. I learned how to use it on my own in just under a couple of weeks.
 

pjoa09

dopaminergic
Local time
Today 2:15 PM
Joined
Feb 9, 2010
Messages
1,857
-->
Location
th
Mhmm, I already started learning C++ and know some basics. Should I change language to C#?

I'd suggest Python.

C++ was such a pain in the ass.

If I used it for anything I do right now. I'd be having mild psychosis. I just write 20 lines of code max too so it's not like I am doing anything fancy either.

Still.

fuc da ccc
 

pjoa09

dopaminergic
Local time
Today 2:15 PM
Joined
Feb 9, 2010
Messages
1,857
-->
Location
th
Depends on what you want to do. Usually the following math papers will do the trick:

Linear Algebra (Not JUST algebra).
Probability Theory (Not JUST statistics).
Discrete Mathematics

These are a MUST. The following are helpful if you want to get into Machine Learning, Computational Biology and so on.

Multivariable Calculus (Scientific applications)
Differential Equations (Scientific applications).
Number Theory (Not really, but may be useful).

I'd agree with this list.

Though I'd place Discrete Math much higher in recommendation.

It's not a must but I'd recommend Discrete Math for living.

I felt much more important as a human being by taking Discrete Math.

But you wouldn't need any of this unless you are trying to make some sort of optimized code.
 

computerhxr

Village Idiot
Local time
Today 12:15 AM
Joined
Oct 21, 2014
Messages
789
-->
Location
beyond space and time
I'm totally new in the subject, but my dream is to connect computer with our nervous system. Computational neuroscience is incredible.
Also AI, software engineering and app or game development seems interesting.

Thanks everyone for replies.

Everyone has great answers. If you are just starting out, then I would learn the basics of math and programming before approaching AI. Computer AI is not necessarily useful. Functions and object methods are much more useful in computing.

If you want to integrate AI into a computer program, you can use parallel human computing methods to solve problems. Amazon Mechanical Turk is an example solution that uses human computing mechanisms. No need to re-invent the wheel.

For AI, I would recommend learning quantum mechanics and chaos theory. Quantum mechanics uses chaos theory. Learn calculus, and then lean φ(phi) to allow for chaos(decision capability).

Look into fuzzy logic I've used fuzzy logic for simple (intelligent) search solutions. E.g. searching for "bank ov amereka" would probably benefit from "bank of america" search results that are abstractly (fuzzily) related. See a quote below that I made in another thread.

Learn about neural networks. I believe that Google has released an API that allows you to use a neural network to evaluate data. I think that stores like Amazon and Netflix use neural networks to determine personal preference based on past purchases. Some people use these as research tools to predict changes in the stock market.

The problem with most AI is that it's binary instead of spectral. Computers are binary systems. Humans are spectral systems which give the illusion of free will or decision making capability. So a spectral fact checking system would produce abstract solutions that deviate from the mean(or make a decision).

If you fully understand all of these concepts, then I would say you have a decent start to creating computer AI. So it's a frivolous journey that you are on but I wish you luck!

I agree with Architect! My response is basically another way of saying entropy is the primary difference.

Both code and language require interpretation. Grammar is much more important to code than written languages. Some parts of the code are not interpreted, like strings of characters. Making a mistake in code would result in complete failure, and has almost no effect with spoken language.

The biggest difference in my opinion is that spoken and written language is interpreted each time that the information is communicated. Programming languages on the other hand are interpreted or compiled into a different language, and then interpreted by a consistent set of rules. Even with computers the interpretations can change over time, or function differently with different hardware configurations. However, each version of the interpreter is technically a different language which is why software only works on specific version ranges of the interpreter. Whereas people can change their interpretation of the same sentence after each reading.

Also, written and spoken languages are not so well defined. With computers, they are precisely defined by the code/mechanism that processes it.

Another thing to consider is that binary 010101010001 is not exactly binary. It may be represented as 1's and 0's but in reality it's highs and lows (or frequency key shifting, etc...). This is where code can be misinterpreted. An example is when binary data is transferred over a wireless network. It is transferred using a wave, which is not binary. So it will read the high points as 1's and low points as 0's. I'm oversimplifying how it works to illustrate my point and you can look up digital modulation if you want to learn more.

binary-not-so-binary_zpsac696f2b.gif


If written and spoken languages were precise, then they would be less effective. People can derive understanding from parts of words, etymology, context, and so on. People use something called fuzzy-logic, which allows us to read and understand words that a computer would not understand without using fuzzy-logic (or a database of misspellings like a dictionary which may use fuzzy logic to find possible replacement words). There are a few good examples of this:

1. When you see a road sign, but you can not make out the letters, you can still read the sign. You can approximate the width and shape of each of the letters, and the length of each of the words to come up with a small range of possibilities. Then using other information such as memory, you can narrow it down to a single result.

fuzzy-logic-example_zpsbe9368d4.png


2. You can read sentences fluently even when most of the words are jumbled. This is called Typoglycemia and you've probably seen similar examples before.

"I cdn'uolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg: the phaonmneel pweor of the hmuan mnid. Aoccdrnig to a rseearch taem at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoatnt tihng is taht the frist and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it wouthit a porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Scuh a cdonition is arppoiatrely cllaed Typoglycemia .
"Amzanig huh? Yaeh and you awlyas thguoht slpeling was ipmorantt."

Imagine a computer trying to read and understand that!
 
Top Bottom