1.

Consider the expression T & F ∧ T.What is the number of ways in which the expression can be parenthesized so that the output is T (true)?(a) 0(b) 1(c) 2(d) 3This question was posed to me by my college professor while I was bunking the class.I need to ask this question from Counting Boolean Parenthesizations in division Dynamic Programming of Data Structures & Algorithms II

Answer»

Right ANSWER is (c) 2

The EXPLANATION is: The EXPRESSION can be parenthesized as (T & F) ∧ TorT & (F ∧ T), so that the OUTPUT is T.



Discussion

No Comment Found

Related InterviewSolutions