Group Theory Application: Boolean Function Counting
Abstract algebra is often challenging to understand initially because of its abstract nature. This article introduces an application of group theory: counting boolean functions.
Burnside’s Lemma
When analyzing the action of a group on a set, Burnside’s lemma is a very important theorem:
Burnside’s Lemma
Let a finite group
act on a finite set , then the number of orbits of under the action of is where
is the number of fixed points of on .
There are many references for the proof of this lemma 12, which will not be repeated here.
Boolean Function Counting Problem
Problem Background
Boolean functions are an important class of functions that satisfy the mapping form
- Logical AND:
x y f(x, y) 0 0 0 0 1 0 1 0 0 1 1 1 - Logical OR:
x y f(x, y) 0 0 0 0 1 1 1 0 1 1 1 1 - Logical XOR:
x y f(x, y) 0 0 0 0 1 1 1 0 1 1 1 0
Boolean functions can also be represented by switch circuits, as shown in the following figure:
It can be seen that two switches in these three switch circuits can be exchanged. Some Boolean functions are equivalent under the permutation of the independent variables. Therefore, the counting problem of Boolean functions is raised: For an
Observing 2-variable Boolean Functions
Let’s first take a look at the truth tables of all 2-variable Boolean functions:
(0,0) | (0,1) | (1,0) | (1,1) | |
---|---|---|---|---|
0 | 0 | 0 | 0 | |
0 | 0 | 0 | 1 | |
0 | 0 | 1 | 0 | |
0 | 0 | 1 | 1 | |
0 | 1 | 0 | 0 | |
0 | 1 | 0 | 1 | |
0 | 1 | 1 | 0 | |
0 | 1 | 1 | 1 | |
1 | 0 | 0 | 0 | |
1 | 0 | 0 | 1 | |
1 | 0 | 1 | 0 | |
1 | 0 | 1 | 1 | |
1 | 1 | 0 | 0 | |
1 | 1 | 0 | 1 | |
1 | 1 | 1 | 0 | |
1 | 1 | 1 | 1 |
Consider the permutation of two elements, that is, the permutation group
and and and and
Therefore, the number of essentially different 2-variable Boolean functions is
So how to analyze it using Burnside’s lemma? Count the elements in
Permutation Type | Count | |
---|---|---|
1 | ||
1 |
For the
Therefore, by Burnside’s lemma, the number of essentially different 2-variable Boolean functions is:
3-variable Boolean Functions
For 3-variable Boolean functions, we directly count the elements of S3 by permutation type:
Permutation Type | Count | |
---|---|---|
1 | ||
3 | ||
2 |
Compared with 2-variable Boolean functions, the permutation type
Therefore, by Burnside’s lemma, the number of essentially different 3-variable Boolean functions is:
More General Cases
For n-variable Boolean functions, our task is to classify the elements of
Note: Perhaps finding these combinations corresponds to a similar application problem, but I haven’t thought of one yet.
Footnotes
-
胡冠章 应用近世代数[M]. 第 3 版. 版. 北京: 清华大学出版社, 2006. ↩