How many ways are there to arrange 10 left parentheses and 10 right parentheses so that the resulting expression is correctly matched?
For example, ( ( ) ( ( ) ) ) is correctly matched, but ( ( ) ) ) ( ( ) is not.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Why are there (20, 10) ways for 10:10 score?
Let f ( n ) be the number of ways we can arrange n pairs of parentheses.
f ( 0 ) = 1 because 0 pairs of parentheses aren't rearrengeable.
Suppose we have n pairs of parentheses, take the first pair p : then there can be k pairs of parentheses into p and n − 1 − k pairs out of p for all possible k .
So, f ( n ) = k = 0 ∑ n − 1 f ( k ) f ( n − 1 − k )
f ( 1 0 ) = 1 6 7 9 6
From the question, we know that we are basically finding the 10th Catalan number, which is 16796.
Problem Loading...
Note Loading...
Set Loading...
There are ( 1 0 2 0 ) ways in which a score of 1 0 : 1 0 can be achieved in a football game between teams A , B . By the Reflection Principle, there are ( 9 2 0 ) ways in which a score of 1 0 : 1 0 can be achieved for which A is behind in the score at some time. Thus there are ( 1 0 2 0 ) − ( 9 2 0 ) = 1 6 7 9 6 ways in which a score of 1 0 : 1 0 , with team A never falling behind in the score.
Regarding a left brace as a goal for team A , and a right brace as a goal for team B , the answer to the question is again 1 6 7 9 6 .