0

$f\in\boldsymbol{B}_n$ is called linear if $f(x_1,\ldots,x_n)=a_0+a_1x_1+\cdots+a_nx_n$ for suitable coefficients $a_0, \ldots , a_n\in \{ 0, 1\}.$ Here + denotes exclusive disjunction (addition modulo 2) and the not written multiplication is conjunction (i.e., $a_ix_i=x_i$ for $a_i=1$ and $a_ix_i=0$ for $a_i=0).$

(a) Show that the above representation of a linear function $f$ is unique.

(b) Determine the number of $n$-ary linear Boolean functions.

(c) Prove that each formula $\alpha$ in $\neg,+$ (i.e., $\alpha$ is a formula of the logical signature $\{\neg,+\})$ represents a linear Boolean function.

from Wolfgang Rautenberg's A Concise Introduction to Mathematical Logic.

I tried figuring out a formula of signature $\neg,+$ that equates conjunction denoted by not-written multiplication. But unfortunately it didn't work.

Tankut Beygu
  • 4,412

1 Answers1

2

(a) Uniqueness of representation.

A function $f\in\mathbf{B}_n$ is linear if it can be represented as

$$f(x_{1},\ldots, x_{n}) = a_{0} + a_{1}x_{1} +\cdots +a_{n}x_{n}$$

with $a_{0},\ldots, a_{n}\in\{0,1\}$. We need to show that this representation is unique. Note that

  1. $f:\{0,1\}^n\to\{0,1\}$.

  2. Each term $a_i x_i$ is either $0$ (if $a_i = 0$) or $x_i$ (if $a_i = 1$).

  3. For any valuation of $x_1, \dots, x_n$, $f$ is determined completely by

$$a_0 + a_1 x_1 + \dots + a_n x_n$$

Now, suppose the contrary; there are two different representations:

$$f(x_1, \ldots, x_n) = a_0 + a_1 x_1 + \dots + a_n x_n$$

and

$$f(x_1, \ldots, x_n) = b_0 + b_1 x_1 + \dots + b_n x_n$$

Since both express the same function, they agree on all valuations of $(x_{1},\ldots, x_{n})\in\{0,1\}^{n}$. Taking their difference by XOR:

$$(a_0 + b_0) + (a_1 + b_1)x_1 + \dots + (a_n + b_n)x_n = 0$$

for all valustions of $x_1, \dots, x_n$.

Since the only Boolean function that is identically zero is the trivial function with all coefficients $0$, we conclude $a_i = b_i$ for all $i$.

More explicitly, step by step, we can see that as follows:

  1. Evaluate the expressions at $(x_{1},\ldots, x_{n})=(0,…,0)$ and get $a_{0}=b_{0}$.
  2. For some $k$, $1\leq k\leq n$, evaluate the expressions at $(x_{1},\ldots, x_{n})=(0,\ldots, 1,\ldots, 0)$ so that $x_{k}= 1$ and for all $j\neq k, x_{j}=0$ and get $a_{0}+a_{k}=a_{0}+b_{k}$, hence $a_{k}=b_{k}$.

(b) The total number of $n$-ary linear Boolean functions.

As we have seen, each function is uniquely determined by choosing values for $a_0,\ldots, a_n$, where each $a_i$ can be either $0$ or $1$.

  • There are $n+1$ coefficients.
  • Each coefficient has 2 choices.

Thus, the total number of $n$-ary linear Boolean functions is: $\quad2^{n+1}$

Compare this to how many semantically different Boolean functions are there for n Boolean variables?


(c) Every formula $\alpha$ in $\{\neg, +\}$ represents a linear function.

We need to show that any Boolean function representable using only negation and XOR is necessarily of the linear form:

$$a_{0} + a_1 x_1 + \dots + a_n x_n$$

We do this by structural induction.

Basis clause:

  • The constant functions $f=0$ and $f=1$ are trivially linear.

  • Each variable $x_{i}$ is trivially linear.

Inductive hypothesis:

  • Suppose $\beta$ and and $\gamma$ are formulas that are represented by linear functions $f(x_1, \dots, x_n)$ and $g(x_1, \dots, x_n)$, respectively:

$$f = a_0 + a_1 x_1 + \dots + a_n x_n$$

$$g = b_0 + b_1 x_1 + \dots + b_n x_n$$

(i) The case of XOR

Suppose the formula $\alpha$ is of the form $\beta +\gamma$.

Since $f + g$ is computed modulo 2, we have:

$$f + g = (a_0 + b_0) + (a_1 + b_1) x_1 + \dots + (a_n + b_n) x_n$$

which is again a linear function.

(ii) The case of negation

Suppose $\alpha$ is of the form $\neg\beta$.

Since $\neg x = 1 + x$, negating any linear function just flips $a_0$, preserving the linear form.

Hence, each formula built from $\neg$ and $+$ represents a linear Boolean function.

Tankut Beygu
  • 4,412