TITLE: how many semantically different boolean functions are there for n boolean variables?
QUESTION [34 upvotes]: In short, this is an assignment question for a course I am taking - the exact wording is this:
"Given n Boolean variables, how many 'semantically' different Boolean functions can you construct?"
Now, I had a crack at this myself - and got pretty stuck. The question doesnt state how many boolean operators there are (and, or, xor, nand, nor, iff, implies, not) nor does it state whether brackets should be used, i.e. a ^ (b v c) is different from (a ^ b) v c.
So, my question for you is - is this question possible given the limited information available? 
Is it going to be something like ${n^x}$ where x is the number of boolean operators.
Any direction here would be greatly appreciated.

REPLY [2 votes]: Consider this: There are  n  variables which means there are  2n  entries in the truth table. 
The number of variables determine the number of rows in the truth table 
A  minterm  exists for  every row  in the truth table. This means that there are  2n minterms . The column of minterms on the far right. 
Each  function  can be written as a  sum of minterms . The minterm is either in the sum or not in the sum. 
This means that such a function can be specified with a string of 1's and 0's with the following meaning: 

if at position i there is a 1 then the i-th minterm is part of the function sum.
if there is a 0 instead then that minterm is not part of the sum. 

Each function can be expressed as a sum of one or more minterms
It is clear that having 2n minterms makes this function defining string 2n positions long. At each position there can be a 1 or  a 0. Hence the total number of different strings is 22n which is the total number of different functions and also the total number of different sums that the minters can be combined into.