5 votes 5 votes In how many ways can the string $A \cap B - A \cap B -A$ be fully paranthesized to yield an infix expression? 15 14 13 12 Combinatory ugcnetcse-june2016-paper2 parenthesization combinatory + – go_editor asked Aug 16, 2016 recategorized Jun 22, 2022 by Arjun go_editor 6.6k views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply KISHALAY DAS commented Oct 21, 2016 reply Follow Share Is it (2)14?? 0 votes 0 votes Imarati Gupta commented Oct 22, 2016 reply Follow Share yes but how 0 votes 0 votes Please log in or register to add a comment.
2 votes 2 votes Actually there is a formula No of ways we can parenthesise n operands(like in matrix multiplication,arithmetic exp )= Catalan No(n-1)=$1/(n)*\binom{2(n-1)}{(n-1))}$ Here n=5 So no of way would be Catalan No(4)=$1/(5)*\binom{8}{4}$=14 KISHALAY DAS answered Oct 22, 2016 KISHALAY DAS comment Share Follow See all 4 Comments See all 4 4 Comments reply Imarati Gupta commented Oct 23, 2016 reply Follow Share n means total occurences of A and B right ? 0 votes 0 votes KISHALAY DAS commented Oct 23, 2016 reply Follow Share Yes N means total ocurance of any operand in the expression 1 votes 1 votes Hemavasu commented Oct 29, 2017 reply Follow Share 1/5 * (84) how to solve 0 votes 0 votes Prasanjeet Ghosh commented Jul 1, 2018 reply Follow Share formula is 1/N * 2(N-1)C(N-1) where N is number of operands =1/5 * 8C4 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes formula is 1/N * 2(N-1)C(N-1) where N is number of operands =1/5 * 8C4 =14 Prasanjeet Ghosh answered Jul 1, 2018 Prasanjeet Ghosh comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes answer is 14 that is 2 option. chhavi gupta answered Jul 12, 2016 chhavi gupta comment Share Follow See all 3 Comments See all 3 3 Comments reply Tauhin Gangwar commented Jul 12, 2016 reply Follow Share chhavi can u explain it how 14 is answer....actually i need clear view not expert view 0 votes 0 votes chhavi gupta commented Jul 12, 2016 reply Follow Share Either of the four operators can be the outermost one, so there are four cases to consider. If the first operator is the outermost one, then we need to compute the number of ways to fully parenthesize B - An B - A. Here there are 5 possibilities: 1 in which the "n" symbol is the outermost operator and 2 with each of the " - " symbols as the outermost operator. If the second operator in our original expression is the outermost one, then the only choice is in the parenthesization of the second of its operands, and there are 2 possibilities. Thus there are a total 7 ways to parenthesize this expression if either of the first two operators are the outermost one. By symmetry there are another 7 if the outermost operator is one of the last two. Therefore the answer to the problem is 14. 2 votes 2 votes Pyadav commented Jul 17, 2016 reply Follow Share Chhavi gupta. I like you how u explained. 0 votes 0 votes Please log in or register to add a comment.