Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The aim is to find a formula for the question.

For n=2 i get (2^(2^n)=16 possible functions.

This is the solution for a boolean function with 2 attributes:

01) a     ->  separable
02) b     ->  separable
03) not a    ->  separable
04) not b    ->  separable
05) a and b   ->  separable
06) a or b    ->  separable
07) a xor b   -> not separable
08) a nand b   ->  separable
09) a nor b   ->  separable
10) a xnor b   -> not separable
11) (not a) and b  ->  separable
12) a and (not b)  ->  separable
13) (not a) or b  ->  separable
14) a or (not b) ->  separable
15) (not a) xor b  -> not separable
16) a xor (not b) -> not separable

But what is the formular for n?

share|cite|improve this question
This looks similar to this question:… – PEV Jan 19 '11 at 1:58
@Brainlag: Something is wrong with your list of functions; because you lack the two trivial functions in your list: $f(a,b)=0$ and $f(a,b)=1$ But you are still correct that there are $2^{2^n}$ boolean functions; your (10), (15), and (16) all represent the same function. – Chas Brown Jan 19 '11 at 5:33
@PEV : Yes but i know how many functions are possible. The Question is how many functions are separable for n (not only n=2) – user6006 Jan 19 '11 at 12:24
@Chas Brown I don't get it. I don't see they are the same. – user6006 Jan 19 '11 at 12:24
all three have the truth table: – Chas Brown Jan 19 '11 at 17:17

It may be easier to think in terms of linearly separable subsets of $\{0,1\}^n$ (that is, those that are cut off from the cube by a hyperplane). For $n=2$ we are looking at subsets of the vertex set of a square: the only two that are not linearly separable are the diagonals. This makes $2^{2^2}-2=14$ separable functions: all except XOR and NOT XOR.

There is no formula for general $n$, in fact only a handful of counts are known. This is the OEIS sequence A000609, labeled "hard". By the way, the Wikipedia page on linear separability references OEIS.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.