Hi, could someone please explain how to do this one?

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

Thanks in advance!

Printable View

- Aug 20th 2011, 12:12 AMrorosingsongBalanced Strings
Hi, could someone please explain how to do this one?

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

Thanks in advance! - Aug 20th 2011, 02:31 AMrorosingsongRe: Balanced Strings
... I know it's 42-14 = 28, but I don't know why...?

I'm guessing that 42 is the number of balanced strings for n=5, and 14 is the 4th catalan number, but I'm not sure WHY you have to subtract the 4th catalan number in order to get how many strings end in RR.

I'm a beginner to discrete mathematics and would really appreciate some help... cheers. =) - Aug 20th 2011, 06:26 AMTravellerRe: Balanced Strings
If a string does not end in RR it ends with LR. Map that to the balanced string with four brackets without the LR at the end.

- Aug 20th 2011, 07:31 PMrorosingsongRe: Balanced Strings
Thanks Traveller! I can't believe I didn't realise it before, appreciate the tip.

Cheers! (Nod)