Learning to read and comprehend math notation

Whatever is on your mind, whether Lisp related or not.

Learning to read and comprehend math notation

Postby Pixel_Outlaw » Tue Oct 08, 2013 8:10 pm

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)
Pixel_Outlaw
 
Posts: 41
Joined: Mon Aug 26, 2013 9:24 pm

Re: Learning to read and comprehend math notation

Postby edgar-rft » Wed Oct 09, 2013 2:30 am

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:

I think what you describe as the "large E" ist the Sigma notation for summation as explained here:

The Wikipedia example implemented in Common Lisp code:

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

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:

This list is of course terribly incomplete. Look at the "documentation" links on the Maxima and Axiom pages for lots of other information sources.

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
edgar-rft
 
Posts: 157
Joined: Fri Aug 06, 2010 6:34 am
Location: Germany

Re: Learning to read and comprehend math notation

Postby Pixel_Outlaw » Thu Oct 17, 2013 4:11 pm

Thanks for the help edgar-rft!
I'm going to look into these now. Much appreciated.
Pixel_Outlaw
 
Posts: 41
Joined: Mon Aug 26, 2013 9:24 pm

Re: Learning to read and comprehend math notation

Postby SoulFireMage » Thu Oct 31, 2013 4:37 am

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!
SoulFireMage
 
Posts: 4
Joined: Thu Oct 31, 2013 4:04 am


Return to The Lounge

Who is online

Users browsing this forum: Google [Bot] and 2 guests