Algorithms described with mathematical expressions

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Algorithms described with mathematical expressions

Post by Chris Corbyn »

When I read about a particular algorithm I'm often overwhelmed by mathematical expressions that don't really mean anything to me.

Can anyone point me in the direction of the "field of study" I need to be reading around in order to make at least some of the basics "click"? I appreciate that this is a complex area and not something you can just read a few articles on but right now I don't even know what keywords to search for. Generally you can look past all the maths and fathom it out from the description and code samples but since mathematical expressions are used so commonly I'd like to try and get a grip on them.

I was pretty good at mathematics during school and college but didn't take it up at university, nor did I study comp sci, both of which would probably help me now :P
User avatar
it2051229
Forum Contributor
Posts: 312
Joined: Tue Dec 25, 2007 8:34 pm

Re: Algorithms described with mathematical expressions

Post by it2051229 »

what do you mean exactly by "basic clicks"? does this have something to do with programming? i am assuming yes, as we all know computer speaks in numbers and numbers are often being dealt with math. You might want to study computer organization and architecture.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Algorithms described with mathematical expressions

Post by Eran »

You should probably check out an entry calculus course text book. Those should include all the basic notation and concept you need for alogrithms. And there's also Wikipedia and Wolfram mathworld, both invaluable resources.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Algorithms described with mathematical expressions

Post by Chris Corbyn »

it2051229 wrote:what do you mean exactly by "basic clicks"? does this have something to do with programming? i am assuming yes, as we all know computer speaks in numbers and numbers are often being dealt with math. You might want to study computer organization and architecture.
I wrote 'in order to make at least some of the basics "click"' ;)

It's a common figure of speech in the English language. I think it's used in all English cultures but perhaps it's just a British English figure of speech. When something doesn't make sense to somebody, then they eventually understand it for whatever reason they usually say it "clicked". You might say that some seemingly obscure subject "just clicks" after a certain amount of time of studying it. It implies a huge leap from knowing nothing to knowing enough to get by.

I'm not sure the mathematical formulae I'm talking about are really to do with the CPU dealing with binary (if that's what you're getting at). They're more of a formal way of representing a solution to a problem.

I'm currently doing a lot of reading around regarding parsers for computer pgramming languages and I see people write things like "The algorithm can be generalized with the following mathematical expression *&*&%^&"

Where *&*&%^& is effectively what my eyes see :P
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Algorithms described with mathematical expressions

Post by Chris Corbyn »

pytrin wrote:You should probably check out an entry calculus course text book. Those should include all the basic notation and concept you need for alogrithms. And there's also Wikipedia and Wolfram mathworld, both invaluable resources.
Brilliant thank you, I shall bookmark those pages :) I've studied calculus at a basic level (1 year at college) but obviously it goes way beyond what I would have studied. I can't remember anything about it neither given that it was 9 years ago now. It'll come back to me :)

I suspect that in your first year on a comp sci course they introduce you to the specific forms of mathematics you'll be using... that's what I've missed out on. I need to do a sort of "Mathematics for Computer Scientists" course!

I must have read the yacc and bison manual about 4 times now and although I understand the concepts I can quite pin it down to a decent algorithm that doesn't involve lots of backtracking (parsers can never go backwards... they must choose a path a stick to it, or error).
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Algorithms described with mathematical expressions

Post by Eran »

For CS, the main mathematics courses are Linear Algebra, Calculus and Discrete Mathematics (I didn't take CS by the way, but Physics). I don't think they have specialized books for CS students (or maybe they do? depending on the college I would assume)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Algorithms described with mathematical expressions

Post by Chris Corbyn »

Discrete Mathematics. That rings a bell from other students who did comp sci, though I haven't ever studied it. This is all really helpful actually :) Thanks.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: Algorithms described with mathematical expressions

Post by jayshields »

My university (Manchester) messed up some (my) Comp Sci courses. I was put into the Informatics school and ended up learning about software engineering and UML for a year, then the Informatics school got pushed into the Comp Sci school and we got chucked in at the deep end having studied no maths what-so-ever. Don't really understand the formulae either but have got by...
dml
Forum Contributor
Posts: 133
Joined: Sat Jan 26, 2008 2:20 pm

Re: Algorithms described with mathematical expressions

Post by dml »

Chris Corbyn wrote: I'm currently doing a lot of reading around regarding parsers for computer pgramming languages and I see people write things like "The algorithm can be generalized with the following mathematical expression *&*&%^&"

Where *&*&%^& is effectively what my eyes see :P
Are you familiar with the theory of languages and language processing... the concept of a language being generated from productions, the concept of classes of languages that can be processed by classes of machines (for example that some languages can be processed by state machines and some require machines with stacks), the different ways that parse trees can be built from a stream of tokens, etc? The book known as the Dragon book comes to mind. I was going to say that it's a bit out of date at this point, but there's a 2006 edition.
User avatar
it2051229
Forum Contributor
Posts: 312
Joined: Tue Dec 25, 2007 8:34 pm

Re: Algorithms described with mathematical expressions

Post by it2051229 »

Yeah I have a book "Theory of Programming Languages" and it talks about different types of programming languages' way of handling parsing codes. For the discrete mathematics, as far as a I remember we dealt with solving binary too in a logical manner. I also have the book "Computer Organization and Architecture" which explains in detail the flow,manipulation, and calculation of data(includes binary) on different computer hardware such as the cpu, memory, auxiliary devices and the such. But interestingly I encountered the expression "&*&%^&" (and the like) when I was taking my compiler design subject. And I also see that this is related on how preg_match() and expr() works. For the calculus, I took differential and integral calculus and as to now, I admit I never tried using it on programming yet(unless i'm creating a MIT like calculator).
wei
Forum Contributor
Posts: 140
Joined: Wed Jul 12, 2006 12:18 am

Re: Algorithms described with mathematical expressions

Post by wei »

These seem pretty decent...

http://ocw.mit.edu/OcwWeb/Electrical-En ... /index.htm

This should introduce what the symbols mean.


part of the course in http://ocw.mit.edu/OcwWeb/Electrical-En ... /index.htm
some have video lectures.

For linear algebra, Strang is very good (with videos)
http://ocw.mit.edu/OcwWeb/Mathematics/1 ... /index.htm
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: Algorithms described with mathematical expressions

Post by Kieran Huggins »

I find it easier to visualize the problem / solution first, then try to read the formula after. Sometimes you don't even really need to read the formula once the problem makes sense.

The latest example that comes to mind is graph theory.. I just read a bunch on wikipedia and then the formulas sort of became moot.
User avatar
arjan.top
Forum Contributor
Posts: 305
Joined: Sun Oct 14, 2007 4:36 am
Location: Hoče, Slovenia

Re: Algorithms described with mathematical expressions

Post by arjan.top »

mintedjo
Forum Contributor
Posts: 153
Joined: Wed Nov 19, 2008 6:23 am

Re: Algorithms described with mathematical expressions

Post by mintedjo »

jayshields wrote:My university (Manchester)...
THATS WHERE I GO!
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Algorithms described with mathematical expressions

Post by pickle »

Discrete Math was the single most useful math course - deals with boolean logic quite a bit.

Calculus, on the other hand, was the single lease useful math course (for comp sci). 9 years later in the business & I have yet to use it.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply