Many times I wish to implement an algorithm but simply can't seem to grasp what is being said by mathematicians.
Usually something to the effect of "large E" with subscripts some parens, then some collections of variables with subscripts some ellipses maybe some assignment type arrows etc.
Does anyone know of a good book that teaches math notation so that a programmer can convert it mentally into a series of collections, for loops and functions?
I can't be the only one lost on this kind of thing (not having much of a math background in school)
Learning to read and comprehend math notation
-
- Posts: 43
- Joined: Mon Aug 26, 2013 9:24 pm
Re: Learning to read and comprehend math notation
Preface: I'm not a really "big" mathematician either but I've learned lots of that stuff by myself and maybe we can collect some publicly available internet resources for learning math and how to transform a written math formula into a computer algorithm.
The book(s) that you probably are looking for:
The Lisp code is a bit silly because the array by default is filled with zeros, so the resulting sum will also be zero. A real world array wold probably be filled with more interesting numbers.
Other internet resources where I have learned a lot about math:
One of the biggest problems with math is that it is an even much more general tool than a computer programming language, so there often is no "general way" to implement a specific math formula without knowing the full context. Maybe you can post a link to a math formula you're trying to implement and we can try to solve it together?
- edgar
The book(s) that you probably are looking for:
- Wikipedia: The Art of Computer Programming by Donald Knuth
- Wikipedia: Summation > Capital-sigma notation
Code: Select all
n
___ (let ((a (make-array 100)) ; 100 is arbitrary here
\ | (m 0)
> a (n 99))
/__| i (loop for i from m to n
sum (aref a i)))
i=m
Other internet resources where I have learned a lot about math:
- Maxima CAS - implemented in Common Lisp
- Axiom CAS - implemented in Common Lisp
- Wolfram MathWorld - everything we (n)ever wanted to know about math
One of the biggest problems with math is that it is an even much more general tool than a computer programming language, so there often is no "general way" to implement a specific math formula without knowing the full context. Maybe you can post a link to a math formula you're trying to implement and we can try to solve it together?
- edgar
-
- Posts: 43
- Joined: Mon Aug 26, 2013 9:24 pm
Re: Learning to read and comprehend math notation
Thanks for the help edgar-rft!
I'm going to look into these now. Much appreciated.
I'm going to look into these now. Much appreciated.
-
- Posts: 4
- Joined: Thu Oct 31, 2013 4:04 am
Re: Learning to read and comprehend math notation
This book helped me massively:
http://www.amazon.co.uk/Maths-Chemistry ... 0199541299
The Sigma (big E) was explained very simply as is capital Pi.
I like the comparision of the For loop to explain Sigma, as this is how I see it. The Pi is not summing, you multiply instead.
This book is excellent too, I have it electronically and paperback:
http://www1.maths.leeds.ac.uk/~khouston/httlam.html
It explains some quite ubiquitous symbols like R, Z, N, Q very early on (Real, Integer, Natural, Rational numbers) then goes into Set notation - just as a topic used to illustrate the thinking about part. I've a lot of these books as I really, really need to get higher maths to do the more interesting jobs out there.
I've a lot of other books on thinking mathamatically, including a delightful volume known as The mathematical mechanic that teaches proving in a visual way.
The cognitive aspect of maths, for me, is about how I represent it to myself. Until I learned enough code to get into trouble, I couldn't "get" simultaneous equations - now that I get the simple notion of variables I can do simple versions of such in my head. The same goes for differentiation - which to be fair is just a rule anyway, something programmers are good at. It's just how its represented. The dense symbols used, really do fox me a lot but gradually some of it is beginning to clear. The set theory symbols are worth knowing cold - if you look up List comprehensions on wikipedia, there's an explanation shorthanded into symbol form that actually makes plenty of elegant sense the moment you get it.
Anyway, I'm on a ramble and on a similar journey to yourself!
http://www.amazon.co.uk/Maths-Chemistry ... 0199541299
The Sigma (big E) was explained very simply as is capital Pi.
I like the comparision of the For loop to explain Sigma, as this is how I see it. The Pi is not summing, you multiply instead.
This book is excellent too, I have it electronically and paperback:
http://www1.maths.leeds.ac.uk/~khouston/httlam.html
It explains some quite ubiquitous symbols like R, Z, N, Q very early on (Real, Integer, Natural, Rational numbers) then goes into Set notation - just as a topic used to illustrate the thinking about part. I've a lot of these books as I really, really need to get higher maths to do the more interesting jobs out there.
I've a lot of other books on thinking mathamatically, including a delightful volume known as The mathematical mechanic that teaches proving in a visual way.
The cognitive aspect of maths, for me, is about how I represent it to myself. Until I learned enough code to get into trouble, I couldn't "get" simultaneous equations - now that I get the simple notion of variables I can do simple versions of such in my head. The same goes for differentiation - which to be fair is just a rule anyway, something programmers are good at. It's just how its represented. The dense symbols used, really do fox me a lot but gradually some of it is beginning to clear. The set theory symbols are worth knowing cold - if you look up List comprehensions on wikipedia, there's an explanation shorthanded into symbol form that actually makes plenty of elegant sense the moment you get it.
Anyway, I'm on a ramble and on a similar journey to yourself!