# Thread: [SOLVED] Catlans Numbers Problem

1. ## [SOLVED] Catlans Numbers Problem

What is the number of balanced strings of 5 left and 5 right brackets which
end with RR?

The answer is 42-14 = 28 ...

I know 42 is the number of ways we can arrange 5 balacned strings of brackets... but why did we pick the number 14 which is the number of ways to arrange 4 balanced strings of brackets...

can some one clear this one for me thanks

2. Originally Posted by Khonics89
What is the number of balanced strings of 5 left and 5 right brackets which end with RR?
Do you realize that you have asked a totally idiosyncratic question?
What are balanced strings? And why would we know that?
Why would such a string end in RR?

Do you just assume that the whole mathematics community is on your page?

3. Thanks for not answering my question, this question was in our exam just for your information.

If you didn't understand the question, here is what i started with...

The aim of that question is to find all POSSIBLE balacned strings that end with RR or ))

here is an example ...

()()()(()) .. there are 13 more...

my question was.. why do C(5)-C(4) ???

4. Originally Posted by Khonics89
What is the number of balanced strings of 5 left and 5 right brackets which
end with RR?

The answer is 42-14 = 28 ...

I know 42 is the number of ways we can arrange 5 balacned strings of brackets... but why did we pick the number 14 which is the number of ways to arrange 4 balanced strings of brackets...

can some one clear this one for me thanks
I will use ( and ) as the brackets and write C(n) for the nth Catalan number.
I assume that by "balanced string" you mean the same as a string of correctly matched parentheses.

A balanced string of length 10 must end in ). There are C(5) = 42 such strings.

The preceding character can be either ( or ). If the preceding character is ) then we have a string ending in )), which is what we are trying to count. If the preceding string is a (, so the last two characters are (), then the first 8 characters must form a balanced string of length 8; there are C(4) = 14 of these. So...

5. ok i see... does this method apply for findings balanced strings begining with LL...

6. Originally Posted by Khonics89
ok i see... does this method apply for findings balanced strings begining with LL...
Yes, the same method can be applied to count the number of balanced strings starting with ((.