Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Number of Boolean functions

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

In the below article, we are going to find the number of Boolean Functions possible from the given sets of binary number.

Statement-1:
Suppose two sets are set ‘A’ = {1, 2, 3, 4, …….., n} where each number will be either ‘0’ or ‘1’ and hence the total number of boolean variable possible will be 2^n and set ‘B’ = {0, 1}. Now the number of possible boolean function when counting is done from set ‘A’ to ‘B’ will be 2^{(2^n)}.

Explanation:
As we know that boolean variable is either ‘0’ or ‘1’ and in the set ‘A’ there are ‘n’ numbers and each number will be either ‘0’ or ‘1’ and hence the total number of possible boolean variable are 2^n. Now set ‘A’ contain 2^n boolean variable and set ‘B’ contain 2 boolean variable.

This can be understood with help of below diagram:

Each element of set ‘A’ makes a function with each element of set ‘B’ hence one element of set ‘A’ makes two function with set ‘B’ and hence total number of possible boolean functions are 2^{(2^n)} where 2^n is the number of element in set ‘A’.

Statement-2:
Suppose two sets of ternary variable are set ‘A’ = {1, 2, 3, 4, …….., n} where each number will be either ‘0’ or ‘1’ or ‘2’ and hence the total number of ternary variable possible will be 3^n and set ‘B’ = {0, 1}. Now the number of possible boolean function when counting is done from set ‘A’ to ‘B’ will be 2^{(3^n)}.

Explanation:
As we know that ternary variables are ‘0’ or ‘1’ or ‘2’ and in the set ‘A’ there are ‘n’ numbers and each number will be either ‘0’ or ‘1’ or ‘2’ and hence the total number of possible ternary variables are 3^n. Now set ‘A’ contain 3^n ternary numbers and set ‘B’ contain 2 boolean variable.

This can be understood with help of below diagram:

Each element of set ‘A’ makes a function with each element of set ‘B’ hence one element of set ‘A’ makes two functions with set ‘B’ and hence the total number of possible boolean functions are 2^{(3^n)} where 3^n is the number of elements in set ‘A’.

Note:

Similarly for a set ‘A’ of ‘n’ numbers of k-ary variable and set ‘B’ of p-ary variable then the total number of p-ary possible function will be p^{(k^n)}.

My Personal Notes arrow_drop_up
Last Updated : 25 Nov, 2019
Like Article
Save Article
Similar Reads