Let and be two Boolean functions defined on for some . We say and are equivalent with respect to if .
For a Boolean function of degree , a fast point of order for is defined as a nonzero element such that where is the map on defined as .
Let be the binary Hamming code of length . We define be the set of the Boolean functions of degree up to equivalence with respect to , such that the set of fast points of order with is equal to . Find .
[THOUGHT] Let me break down this problem step by step.
- We're working over where (since the Hamming code has length ).
Wait, let me reconsider. The Hamming code is a code, meaning it has length 7, dimension 4, and minimum distance 3. So we're working in .
-
We need Boolean functions of degree 4 on .
-
A fast point of order 2 for is a nonzero such that .
-
The set of fast points of order 2 together with should equal (the Hamming code).
-
Two functions are equivalent with respect to 2 if their difference has degree at most 2.
Let me think about this more carefully. For a degree 4 Boolean function, the derivative has degree at most 3 in general. We want for to be a fast point of order 2.
The Hamming code has codewords (including ), so we need exactly 15 nonzero fast points of order 2.
Let me write code to explore this problem. [/THOUGHT] [PYTHON] import numpy as np from itertools import combinations, product from functools import reduce
Work in F_2^7
n = 7
Generate all elements of F_2^7
elements = [tuple(int(b) for b in format(i, f'0{n}b')) for i in range(2**n)] elements_array = np.array(elements, dtype=np.uint8)
Generate the Hamming code H_7
H_7 is the [7,4,3] code. Its parity check matrix H has columns that are all nonzero binary vectors of length 3
Generator matrix G can be constructed from this
Parity check matrix for H_7 (columns are 1,2,3,4,5,6,7 in binary)
H = np.array([ [0, 0, 0, 1, 1, 1, 1], [0, 1, 1, 0, 0, 1, 1], [1, 0, 1, 0, 1, 0, 1] ], dtype=np.uint8)
Codewords are vectors c such that H @ c = 0 (mod 2)
hamming_code = [] for i in range(2**n): c = np.array([int(b) for b in format(i, f'0{n}b')], dtype=np.uint8) if np.all(H @ c % 2 == 0): hamming_code.append(tuple(c))
print(f"Hamming code has {len(hamming_code)} codewords") print("Codewords:", hamming_code[:5], "...") [/PYTHON]
[THOUGHT] Let me continue analyzing this problem more carefully. I need to run more code to actually solve the problem - the previous output just confirmed the Hamming code structure. Let me continue with the full computation. [/THOUGHT] [PYTHON] import numpy as np from itertools import combinations, product from functools import reduce
Work in F_2^7
n = 7
Generate all elements of F_2^7
elements = [tuple(int(b) for b in format(i, f'0{n}b')) for i in range(2**n)]
Parity check matrix for H_7
H = np.array([ [0, 0, 0, 1, 1, 1, 1], [0, 1, 1, 0, 0, 1, 1], [1, 0, 1, 0, 1, 0, 1] ], dtype=np.uint8)
Get Hamming code codewords
hamming_code = set() for i in range(2**n): c = np.array([int(b) for b in format(i, f'0{n}b')], dtype=np.uint8) if np.all(H @ c % 2 == 0): hamming_code.add(tuple(c))
For a Boolean function f of degree k, represented by its ANF (algebraic normal form)
The monomials of degree d in n variables correspond to subsets of {0,1,...,n-1} of size d
A degree 4 Boolean function has monomials of degree 0,1,2,3,4
We care about equivalence up to degree 2, so we only need to count degree 3 and 4 parts
For x to be a fast point of order 2, we need deg(D_x f) <= 1
D_x f(u) = f(u+x) + f(u) (in F_2)
For a monomial m = x_{i1} * x_{i2} * ... * x_{id},
D_a m(u) = m(u+a) + m(u)
The key insight: for a degree 4 function f, D_x f has degree <= 1 iff
the degree 4 and degree 3 parts of D_x f are zero.
Let's think about this algebraically. If f has ANF with degree 4 terms,
then D_x f involves derivatives of those terms.
For a monomial prod_{i in S} x_i where |S|=4,
D_a (prod_{i in S} x_i) = prod_{i in S}(x_i + a_i) + prod_{i in S} x_i
This has degree 3 if a has exactly one 1 in positions S, degree 2 if two 1s, etc.
Actually, for D_x f to have degree <= 1, we need:
- All degree 4 monomials: D_x of them should have degree <= 1
- All degree 3 monomials: D_x of them should have degree <= 1
For a degree 4 monomial m_S = prod_{i in S} x_i, D_x m_S has degree 4 - |S ∩ supp(x)|
where supp(x) is the support of x.
So D_x m_S has degree <= 1 iff |S ∩ supp(x)| >= 3
For a degree 3 monomial m_T, D_x m_T has degree <= 1 iff |T ∩ supp(x)| >= 2
So x is a fast point of order 2 iff:
- For every degree 4 monomial S in f: |S ∩ supp(x)| >= 3
- For every degree 3 monomial T in f: |T ∩ supp(x)| >= 2
We want the set of such x (plus 0) to equal the Hamming code.
Let's enumerate degree 4 monomials and degree 3 monomials
deg4_monomials = list(combinations(range(n), 4)) # 35 monomials deg3_monomials = list(combinations(range(n), 3)) # 35 monomials
print(f"Number of degree 4 monomials: {len(deg4_monomials)}") print(f"Number of degree 3 monomials: {len(deg3_monomials)}")
Convert Hamming code to supports (nonzero positions)
hamming_nonzero = [c for c in hamming_code if c != (0,)*n] print(f"Nonzero Hamming codewords: {len(hamming_nonzero)}") [/PYTHON]
[THOUGHT] I need to continue the computation to find the actual answer. Let me run more code to complete the analysis. [/THOUGHT] [PYTHON] import numpy as np from itertools import combinations, product
n = 7
Parity check matrix for H_7
H = np.array([ [0, 0, 0, 1, 1, 1, 1], [0, 1, 1, 0, 0, 1, 1], [1, 0, 1, 0, 1, 0, 1] ], dtype=np.uint8)
Get Hamming code codewords
hamming_code = set() for i in range(2**n): c = tuple(int(b) for b in format(i, f'0{n}b')) c_arr = np.array(c, dtype=np.uint8) if np.all(H @ c_arr % 2 == 0): hamming_code.add(c)
hamming_nonzero = [c for c in hamming_code if c != (0,)*n]
Get supports of nonzero Hamming codewords
def support(c): return frozenset(i for i in range(n) if c[i] == 1)
hamming_supports = [support(c) for c in hamming_nonzero] non_hamming_nonzero = [] for i in range(1, 2**n): c = tuple(int(b) for b in format(i, f'0{n}b')) if c not in hamming_code: non_hamming_nonzero.append(c)
non_hamming_supports = [support(c) for c in non_hamming_nonzero]
deg4_monomials = list(combinations(range(n), 4)) deg3_monomials = list(combinations(range(n), 3))
For x to be a fast point of order 2:
- For every deg 4 monomial S in f: |S ∩ supp(x)| >= 3
- For every deg 3 monomial T in f: |T ∩ supp(x)| >= 2
For x NOT to be a fast point:
- There exists deg 4 monomial S in f with |S ∩ supp(x)| <= 2, OR
- There exists deg 3 monomial T in f with |T ∩ supp(x)| <= 1
We need: fast points = hamming_nonzero (exactly)
For each x in hamming_nonzero: x IS a fast point
For each x not in hamming (and nonzero): x is NOT a fast point
Let's build constraint matrices
For deg4 monomial S and element x: constraint is |S ∩ supp(x)| >= 3 (for x to be fast)
This means: if |S ∩ supp(x)| <= 2, then S must NOT be in f (for x in Hamming)
And: if |S ∩ supp(x)| <= 2 for some S in f, then x is not fast (good for non-Hamming)
For Hamming codewords to be fast points:
For each x in Hamming nonzero, for each deg4 S: if |S ∩ supp(x)| <= 2, then S not in f
For each x in Hamming nonzero, for each deg3 T: if |T ∩ supp(x)| <= 1, then T not in f
Find forbidden deg4 monomials (those that would make some Hamming point not fast)
forbidden_deg4 = set() for x_supp in hamming_supports: for S in deg4_monomials: S_set = frozenset(S) if len(S_set & x_supp) <= 2: forbidden_deg4.add(S)
forbidden_deg3 = set() for x_supp in hamming_supports: for T in deg3_monomials: T_set = frozenset(T) if len(T_set & x_supp) <= 1: forbidden_deg3.add(T)
allowed_deg4 = [S for S in deg4_monomials if S not in forbidden_deg4] allowed_deg3 = [T for T in deg3_monomials if T not in forbidden_deg3]
print(f"Allowed deg4 monomials: {len(allowed_deg4)}") print(f"Allowed deg3 monomials: {len(allowed_deg3)}") print(f"Allowed deg4: {allowed_deg4}") print(f"Allowed deg3: {allowed_deg3}") [/PYTHON]
[THOUGHT] The computation shows that there are no allowed degree 4 or degree 3 monomials that satisfy the constraint that all Hamming codewords are fast points of order 2. This means there are no Boolean functions of degree 4 (up to equivalence with respect to 2) such that the set of fast points of order 2 together with 0 equals the Hamming code.
Wait, but the problem asks for degree 4 functions. If there are no allowed degree 4 monomials, then the only function would be one with no degree 4 or degree 3 terms, which would have degree at most 2, not degree 4.
This means there are no such Boolean functions of degree exactly 4 satisfying the given conditions. Therefore |F| = 0. [/THOUGHT]
\boxed{0}