1

i am relatively new here, so if this was asked before, feel free to redirect me. I am searching for an answer in form of a (iterative or recursive) Formula or even better, an algorithm to list them all. But if you know the name of what i am searching for or have some strategy how i could approach this or tips for literature where i can read about it, that would also help.

My question is the following:

How many different boolean functions exist up to permutation of its $n$ variables. That is two functions $f$ and $g$ are considered the same if $$ g(x_1,x_2,\dots,x_n) = f(x_{\sigma^{-1}(1)},x_{\sigma^{-1}(2)},\dots,x_{\sigma^{-1}(n)}) \quad \text{for some} \quad \sigma \in S_n $$ For example, i want to treat $A \wedge \neg B$ as if it was equal to $\neg A \wedge B$, and therefore count it only once.

Edit: I also want to treat $A \wedge \neg B$ as if it was equal to $\neg B \wedge A$. That means, i want to treat functions as equal if they are

  1. semantically equal
  2. semantically different but there exists a permutation of variables that makes them semantically equal

1 Answers1

2

You are looking for A003180.

The related sequence A003181 counts functions depending on all variables.

Often one allows further operations: negation of inputs, and negation of the output. The corresponding sequence is then A000370.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514