# The strange story of ternary bent functions in 2 variables

Consider a function $f:GF(3)^2\to GF(3)$.

Such functions are often studied in terms of their Walsh(-Hadamard) transforms – a complex-valued function on $V=GF(3)^2$ that can be defined as

$W_f(u) = \sum_{x \in V} \zeta^{f(x)- \langle u,x\rangle},$
where $\zeta = e^{2\pi i/3}$. We call $f$ bent if
$|W_f(u)|=3^{n/2},$
for all $u\in V$ (here $n=2$). Such ternary (or $3$-ary) bent functions have been studied by a number of authors. Here we shall only consider those ternary bent functions of two variables which are even (in the sense $f(-x)=f(x)$) and $f(\vec{0})=0$.

Thanks to a Sage computation, there are precisely $18$ such functions.

$\begin{array}{cccccccccc} {\rm bents}\backslash GF(3)^2 & (0, 0) & (1, 0) & (2, 0) & (0, 1) & (1, 1) & (2, 1) & (0, 2) & (1, 2) & (2, 2) \\ \hline b1 & 0 & 1 & 1 & 1 & 2 & 2 & 1 & 2 & 2 \\ b2 & 0 & 2 & 2 & 1 & 0 & 0 & 1 & 0 & 0 \\ b3 & 0 & 1 & 1 & 2 & 0 & 0 & 2 & 0 & 0 \\ b4 & 0 & 2 & 2 & 0 & 1 & 0 & 0 & 0 & 1 \\ b5 & 0 & 0 & 0 & 2 & 1 & 0 & 2 & 0 & 1 \\ b6 & 0 & 1 & 1 & 0 & 2 & 0 & 0 & 0 & 2 \\ b7 & 0 & 0 & 0 & 1 & 2 & 0 & 1 & 0 & 2 \\ b8 & 0 & 2 & 2 & 0 & 0 & 1 & 0 & 1 & 0 \\ b9 & 0 & 0 & 0 & 2 & 0 & 1 & 2 & 1 & 0 \\ b10 & 0 & 2 & 2 & 2 & 1 & 1 & 2 & 1 & 1 \\ b11 & 0 & 0 & 0 & 0 & 2 & 1 & 0 & 1 & 2 \\ b12 & 0 & 2 & 2 & 1 & 2 & 1 & 1 & 1 & 2 \\ b13 & 0 & 1 & 1 & 2 & 2 & 1 & 2 & 1 & 2 \\ b14 & 0 & 1 & 1 & 0 & 0 & 2 & 0 & 2 & 0 \\ b15 & 0 & 0 & 0 & 1 & 0 & 2 & 1 & 2 & 0 \\ b16 & 0 & 0 & 0 & 0 & 1 & 2 & 0 & 2 & 1 \\ b17 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ b18 & 0 & 1 & 1 & 2 & 1 & 2 & 2 & 2 & 1 \\ \end{array}$

The (edge-weighted) Cayley graph of the second function $b_2$ is shown here (thanks to Sage):

cayley graph GF3 bent

When I showed this (actually, not just this graph but the print-outs of most of these Cayley graphs) to my colleague T.S. Michael, he observed that there is only one (up to iso) strongly regular (unweighted) graph of degree $4$ with $9$ vertices, and this is it!

Here are some relationships they satisfy:

$b_1=-b_{10}, \ \ b_2=-b_3, \ \ b_4 = -b_6, \ \ b_5 = -b_7, \ \ b_8=-b_{14},$

$b_9=-b_{15}, \ \ b_{11}=-b_{16}, \ \ b_{12}=-b_{18}, \ \ b_{13}=-b_{17},$

$b_1 = b_7+b_{14} = b_6+b_{15}, \ \ b_{10} = b_{4}+b_{9} = b_{5}+b_{8}, \ \ b_{12} = b_{2}+b_{11} = b_{7}+b_{8},$

$b_{13} = b_{3}+b_{11} = b_{6}+b_{9}, \ \ b_{17} = b_{2}+b_{16} = b_{4}+b_{15,}\ \ b_{18} = b_{3}+b_{16} = b_{5}+b_{14}.$

Their supports are given as follows:

$\{1,2,3,6\} = supp(b_2)=supp(b_3), \ \ \{1,2,4,8\} = supp(b_4)=supp(b_6),$

$\{1,2,5,7\} = supp(b_8)=supp(b_{14}), \ \ \{3,5,6,7\} = supp(b_9)=supp(b_{15}),$

$\{3,4,6,8\} = supp(b_{5})=supp(b_{7}),\ \ \{4,5,7,8\} = supp(b_{11})=supp(b_{16}),$

$\{1,2,3,4,5,6,7,8\} = supp(b_{1})=supp(b_{10}) = supp(b_{12})=supp(b_{13}) = supp(b_{17})=supp(b_{18}).$

Note that all these functions are weight $4$ or weight $8$.

In fact, my colleague David Phillips and I found that if you consider their set of supports (together with the emptyset $\emptyset$),

$S = \{ \emptyset \} \cup \{ {\rm supp}(f)\ |\ f:GF(3)^2\to GF(3), \ f(0)=0,\ f\ {\rm bent} \},$
then $S$ forms a group under the symmetric difference operator $\Delta$! In fact, $S\cong GF(2)^3$.

I told you this was strange!

The Sage code for this is rather involved but it can be found here: hadamard_transform.sage.

[1] Sage, mathematics software, sagemath.com.