Application of Catalan number [closed]

Hi guys just a quick questions What are the real life application of catalan numbers? Thanks a lot!

-
They are useful when you go shopping in Catalonia. I voted to close. – Angelo May 15 2012 at 14:24
I voted to close, but am now about to give an answer. I don't know how to retract a close vote... – Igor Rivin May 15 2012 at 15:12
The faq explains how such questions are not appropriate for mathoverflow. There are other fora where you will have better luck. – Gjergji Zaimi May 15 2012 at 15:17
Sorry I admit forgetting to check the FAQ I'll be sure to check it next time then Thanks for the help anw – unknown (google) May 15 2012 at 15:49

2 Answers

In all seriousness, this type of enumerative combinatorics is very useful e.g. in figuring out expected running time for computer programs. An example involving Catalan numbers (which may seem a little contrived, but I think things like this probably do really come up) is: count how many times you go through the inner loop, i.e. how many times you print "hello world", in:

for $i_1=0$ to $1$

for $i_2=i_1$ to $2$

for $i_3=i_2$ to $3$

...

for $i_n = i_{n-1}$ to $n$

print "hello world"

-
Thank you for this answer! – unknown (google) May 15 2012 at 15:48
You're welcome. I wonder about these things too. – Patricia Hersh May 17 2012 at 21:25

This is discussed at great length in:

"Catalan numbers with applications" by Thomas Koshy. The main application seems to be to make money for the publisher (the book is insanely expensive), but google books has extracts.

-