设 $x_{i} \in\{0,1\}(i=1,2, \cdots, n)$,若函数 $f=f\left(x_{1}, x_{2}, \cdots, x_{n}\right)$ 的值只取 $0$ 或 $1$,则称 $f$ 是一个 $n$ 元布尔函数,并记 $D_{n}(f)=\left\{\left(x_{1}, x_{2}, \dots\right.\right.x_{n} ) | f\left(x_{1}, x_{2}, \cdots, x_{n}\right)=0 \}$.
(1)求 $n$ 元布尔函数的个数;
(2)设 $g$ 是十元布尔函数,满足 $\begin{aligned} g\left(x_{1}, x_{2}, \cdots, x_{10}\right) \equiv 1+x_{1}+x_{1} x_{2}+x_{1} x_{2} x_{3}+\cdots+x_{1} x_{2} \cdots x_{10}(\bmod 2) \end{aligned}$
求集合 $D_{10}(g)$ 的元素个数,并求 $\displaystyle \sum\limits_{\left(x_{1}, \cdots, x_{10}\right) \in D_{10}(g)}\left(x_{1}+x_{2}+\cdots+x_{10}\right)$.
(1)求 $n$ 元布尔函数的个数;
(2)设 $g$ 是十元布尔函数,满足 $\begin{aligned} g\left(x_{1}, x_{2}, \cdots, x_{10}\right) \equiv 1+x_{1}+x_{1} x_{2}+x_{1} x_{2} x_{3}+\cdots+x_{1} x_{2} \cdots x_{10}(\bmod 2) \end{aligned}$
求集合 $D_{10}(g)$ 的元素个数,并求 $\displaystyle \sum\limits_{\left(x_{1}, \cdots, x_{10}\right) \in D_{10}(g)}\left(x_{1}+x_{2}+\cdots+x_{10}\right)$.
【难度】
【出处】
2017中国东南数学奥林匹克试题(高一)
【标注】
【答案】
略
【解析】
(1)$x_{1}, x_{2}, \cdots, x_{n}$ 的所有可能的取值共有 $2^n$ 个,每个对应的函数值都有 $0$ 或 $1$ 两个,故所有不同的 $n$ 元布尔函数的个数为 $2^{2^n}$ 个.
(2)记 $\left|D_{10}(g)\right|$ 表示集合 $D_{10}(g)$ 中元素的个数,下面用 $*$ 表示可以取 $ 0$ 或 $1$,因此
当 $\left(x_{1}, x_{2}, \cdots, x_{10}\right)=(1,0, *, *, *, *, *, *, *, *)$ 时,$g\left(x_{1}, x_{2}, \cdots, x_{10}\right)=0$,共有 $2^{8}=256$ 个;
当 $\left(x_{1}, x_{2}, \cdots, x_{10}\right)=(1,1,1,0, *, *, *, *, *, *)$ 时,$g\left(x_{1}, x_{2}, \cdots, x_{10}\right)=0$,共有 $2^{6}=64$ 个;
当 $\left(x_{1}, x_{2}, \cdots, x_{10}\right)=(1,1,1,1,1,0, *, *, *, *)$ 时,$g\left(x_{1}, x_{2}, \cdots, x_{10}\right)=0$,共有 $2^{4}=16$ 个;
当 $\left(x_{1}, x_{2}, \cdots, x_{10}\right)=(1,1,1,1,1,1,1,0, *, *)$ 时,$g\left(x_{1}, x_{2}, \cdots, x_{10}\right)=0$,共有 $2^{2}=4$ 个;
当 $\left(x, x_{2}, \cdots, x_{10}\right)=(1,1,1,1,1,1,1,1,1,0)$ 时,$g\left(x_{1}, x_{2}, \cdots, x_{10}\right)=0$,共有 1 个.
所以集合 $D_{10}(g)$ 的元素个数为 $ 256 + 64 + 16 + 4 + 1 = 341$.
从而
$\displaystyle \sum\limits_{\left(x_{1}, \cdots, x_{10}\right) \in D_{10}(g)}\left(x_{1}+x_{2}+\cdots+x_{10}\right)=1 \times 256+128 \times 8+3 \times 64+32 \times 6+5 \times 4+7 \times 4+2 \times 2+9=1817$.
(2)记 $\left|D_{10}(g)\right|$ 表示集合 $D_{10}(g)$ 中元素的个数,下面用 $*$ 表示可以取 $ 0$ 或 $1$,因此
当 $\left(x_{1}, x_{2}, \cdots, x_{10}\right)=(1,0, *, *, *, *, *, *, *, *)$ 时,$g\left(x_{1}, x_{2}, \cdots, x_{10}\right)=0$,共有 $2^{8}=256$ 个;
当 $\left(x_{1}, x_{2}, \cdots, x_{10}\right)=(1,1,1,0, *, *, *, *, *, *)$ 时,$g\left(x_{1}, x_{2}, \cdots, x_{10}\right)=0$,共有 $2^{6}=64$ 个;
当 $\left(x_{1}, x_{2}, \cdots, x_{10}\right)=(1,1,1,1,1,0, *, *, *, *)$ 时,$g\left(x_{1}, x_{2}, \cdots, x_{10}\right)=0$,共有 $2^{4}=16$ 个;
当 $\left(x_{1}, x_{2}, \cdots, x_{10}\right)=(1,1,1,1,1,1,1,0, *, *)$ 时,$g\left(x_{1}, x_{2}, \cdots, x_{10}\right)=0$,共有 $2^{2}=4$ 个;
当 $\left(x, x_{2}, \cdots, x_{10}\right)=(1,1,1,1,1,1,1,1,1,0)$ 时,$g\left(x_{1}, x_{2}, \cdots, x_{10}\right)=0$,共有 1 个.
所以集合 $D_{10}(g)$ 的元素个数为 $ 256 + 64 + 16 + 4 + 1 = 341$.
从而
$\displaystyle \sum\limits_{\left(x_{1}, \cdots, x_{10}\right) \in D_{10}(g)}\left(x_{1}+x_{2}+\cdots+x_{10}\right)=1 \times 256+128 \times 8+3 \times 64+32 \times 6+5 \times 4+7 \times 4+2 \times 2+9=1817$.
答案
解析
备注