The total number of possible boolean function involving 'n' boolean variable is?
-
infinity
-
n^n
-
n^2
-
2^n
-
2^(2^n)
For n boolean variables, each can be 0 or 1, so there are 2^n possible input combinations. A boolean function maps each input combination to an output (0 or 1), so for each of the 2^n inputs we have 2 choices, giving 2^(2^n) total functions. For example, with 2 variables we have 2^4=16 possible boolean functions.
A boolean function of n variables is a mapping from each of the 2^n rows of the truth table to a value in {0,1}. Since each of those 2^n rows can independently be assigned 0 or 1, the total number of distinct boolean functions is 2^(2^n). The value 2^n only counts the number of truth-table rows (input combinations), not the number of functions. The correct option 2^(2^n) was absent, so it has been added and marked correct; the previously marked 2^n is now incorrect.