A Linear Representation for Functions on Finite Sets

Roman Bacik
Vancouver, Canada


Abstract

We demonstrate that any function \(f\) from a finite set \(Y\) to itself can be represented linearly. Specifically, we prove the existence of an injective map \(j\) from \(Y\) into a modular ring \(\mathbb{Z}/m\mathbb{Z}\) and a constant \(a \in \mathbb{Z}/m\mathbb{Z}\) such that the relation \(j(f(y)) = a \cdot j(y)\) in \(\mathbb{Z}/m\mathbb{Z}\) holds for all \(y \in Y\). This result is established by analyzing the algebraic properties of the adjugate of the characteristic matrix associated with the function’s digraph. The proof is constructive, providing a method for finding the embedding \(j\), the modulus \(m\), and the linear multiplier \(a\).

Preprint Notice. This is an extended preprint version of a manuscript submitted to Journal of Combinatorial Theory, Series A. Licensed under CC BY-NC-ND 4.0. © 2025 Roman Bacik.

Keywords: Functional graph, Linear representation, Adjugate matrix, Characteristic polynomial, Discrete dynamical systems, Finite functions.

1 Introduction↩︎

Functions on finite sets are fundamental objects in discrete mathematics, combinatorics, and theoretical computer science. The structure of such a function \(f: Y \to Y\) is completely described by its functional graph (or functional digraph), a directed graph where a unique edge emanates from each vertex \(y\) to its image \(f(y)\). While these functions can exhibit complex and seemingly chaotic behavior, a central goal in mathematics is to find alternative representations that reveal underlying algebraic structure.

This article establishes that any such function becomes linear after a suitable embedding. We show that for any function \(f\) on a finite set, one can find an injective map \(j\) from the set into a ring of integers modulo \(m\) such that the action of \(f\) corresponds to multiplication by a constant \(a\). That is, the following relation holds for all \(y \in Y\): \(j(f(y)) = a \cdot j(y)\) in \(\mathbb{Z}/m\mathbb{Z}\) that the following diagram commutes:

\[\begin{tikzcd} Y \arrow[r,"f"] \arrow[d,"j"'] & Y \arrow[d,"j"] \\ \mathbb{Z}/m\mathbb{Z} \arrow[r,"a."] & \mathbb{Z}/m\mathbb{Z} \end{tikzcd}\]

This result bridges the gap between arbitrary discrete maps and structured linear dynamical systems.

The formal proof of this result is under development in [1] using the Lean4. Without loss of generality, we can identify elements of the finite set \(Y\) of size \(n\) with the set \(\{0, 1, \ldots, n-1\}\), which are elements of \(\mathbb{Z}/n\mathbb{Z}\).

2 Main Results↩︎

Definition 1 (Adjacency Matrix of a Function).

Let \(f: \mathbb{Z}/n\mathbb{Z} \to \mathbb{Z}/n\mathbb{Z}\) be any function. The function \(f\) is represented by an \(n \times n\) adjacency matrix \(A=A_f\), where the entry \(A_{ij} = \delta_{f(i),j}\) where \(\delta_{i,j}\) is the Kronecker delta. With this convention, each row of \(A\) contains exactly one non-zero entry.

Lemma 1.

Let \(f: \mathbb{Z}/n\mathbb{Z} \to \mathbb{Z}/n\mathbb{Z}\) be any function and \(A=A_f\) be the adjacency matrix of the function \(f\). Then \((A\cdot y)_i = y_{f(i)}\) for all \(i\in \mathbb{Z}/n\mathbb{Z}\) and \(y\in \mathbb{Z}^n\).

Proof. The proof follows from the Definition 1. \[(A\cdot y)_i = \sum_{j=0}^{n-1} A_{ij} y_j = \sum_{j=0}^{n-1} \delta_{f(i),j} y_j = y_{f(i)}\] ◻

Lemma 2.

Let \(f: \mathbb{Z}/n\mathbb{Z} \to \mathbb{Z}/n\mathbb{Z}\) be any function and \(A=A_f\) be the adjacency matrix of the function \(f\). Let \(v\in \mathbb{Z}^n\) and \(y = \operatorname{adj}(x\cdot I - A)\cdot v\). Then \(y_{f(i)} = x\cdot y_i - m\cdot v_i\) where \(m = \det(x\cdot I - A)\).

Proof. For adjugate matrix we have identity \((x\cdot I - A)\cdot \operatorname{adj} (x\cdot I - A) = \det(x\cdot I - A)\cdot I\). Therefore, \[m\cdot v = (x\cdot I - A)\cdot \operatorname{adj} (x\cdot I - A)\cdot v = (x\cdot I - A)\cdot y = x\cdot y - A\cdot y\]. The final equality follows from the Lemma 1. ◻

Lemma 3 (Determinant Degree Bound).

Let \(M\) be an \(n \times n\) matrix with polynomial entries \(M_{ij} \in \mathbb{Z}[x]\). Then \(\deg(\det(M)) \leq \sum_{i=0}^{n-1} \sum_{j=0}^{n-1} \deg(M_{ij})\).

Proof. The determinant is a sum over permutations \(\sigma\) of products \(\prod_{i=0}^{n-1} M_{\sigma(i),i}\). Each product has degree at most \(\sum_{i=0}^{n-1} \deg(M_{\sigma(i),i})\). Since a single element of a sum is at most the whole sum (when all terms are non-negative), this is bounded by \(\sum_{i=0}^{n-1} \sum_{j=0}^{n-1} \deg(M_{ij})\). The degree of a sum is at most the maximum degree of its summands. ◻

Lemma 4 (Polynomial Degree Properties of Adjugate Entries).

Let \(M = M(x) = \operatorname{adj}(x\cdot I - A)\) be the adjugate of the characteristic matrix \(x\cdot I - A\). Then \(M_{ij} = p_{ij}(x)\) is a polynomial in \(x\) for all \(i,j\in \mathbb{Z}/n\mathbb{Z}\) such that \(p_{ii}(x)\) is monic of degree \(n-1\) for all \(i\in \mathbb{Z}/n\mathbb{Z}\) and \(p_{ij}(x)\) has degree at most \(n-2\) for all \(i\neq j\in \mathbb{Z}/n\mathbb{Z}\).

Proof. The diagonal entries of \(\operatorname{adj}(x\cdot I - A)\) are characteristic polynomials of \((n-1) \times (n-1)\) submatrices, hence monic of degree \(n-1\). The off-diagonal entries correspond to minors with two diagonal positions removed, giving degree at most \(n-2\) by Lemma 3. ◻

Lemma 5 (Polynomial with Positive Leading Coefficient - Integer Version).

If \(p \in \mathbb{Z}[x]\) has positive leading coefficient, then \(p(n) > 0\) for all sufficiently large integers \(n\).

Proof. Write \(p(n) = an^d + r(n)\) with \(a = \text{leadingCoeff}(p) > 0\), \(d = \deg(p)\), and \(\deg(r) < d\). For \(n \geq 1\), we have \(|r(n)| \leq B \cdot n^{d-1}\) where \(B = \sum_{k < d} |p_k|\) (using integer arithmetic). Choose \(n_0 = \max(1, B) + 1\). For \(n > n_0\): \[p(n) = an^d + r(n) \geq an^d - Bn^{d-1} = n^{d-1}(an - B) > 0\] since \(a \geq 1\) (as \(a\) is a positive integer) and \(n > B\), so \(an \geq n > B\). ◻

Lemma 6 (Strict Ordering of Adjugate-Vector Product).

Let \(M = M(x) = \operatorname{adj}(x\cdot I - A)\) be the adjugate of the characteristic matrix \(x\cdot I - A\). Let \(v = (0,1,2,\ldots,n-1)^T\). Then there is \(x_0\) such that for all \(x > x_0\):

  • \(m(x) = \det(x\cdot I - A) > 0\)

  • The entries \(y_i = (M(x)v)_i\) satisfy \(y_i \geq 0\) for all \(i\)

  • The entries are strictly increasing: \(y_i < y_j\) for all \(i < j\)

  • The entries are bounded by the determinant: \(y_i < m(x)\) for all \(i\)

Proof. The proof follows from Lemma 4 and Lemma 5. Let \(y = M(x)v\). Then \(y_i = \sum_{k=0}^{n-1} M_{ik}(x) \cdot k\).

For each entry \(y_i\), we express it as evaluation of a polynomial \(p_i(x) = \sum_{k=0}^{n-1} M_{ik}(x) \cdot k \in \mathbb{Z}[x]\). By Lemma 4, the diagonal entry \(M_{ii}\) is monic of degree \(n-1\), while off-diagonal entries \(M_{ik}\) (for \(k \neq i\)) have degree at most \(n-2\). Therefore, the leading coefficient of \(p_i\) is non-negative (dominated by the \(M_{ii} \cdot i\) term with \(i \geq 0\)).

For the difference \(p_j - p_i\) with \(j > i\), the leading term comes from \((M_{jj} \cdot j - M_{ii} \cdot i)\). Since both \(M_{jj}\) and \(M_{ii}\) are monic of degree \(n-1\), the leading coefficient of \(p_j - p_i\) is \(j - i > 0\).

Similarly, for \(p_m(x) = \det(x\cdot I - A) - p_i(x)\), since \(\det(x\cdot I - A)\) is monic of degree \(n\) (characteristic polynomial) and \(p_i\) has degree at most \(n-1\), the leading coefficient is 1.

Applying Lemma 5 to these polynomials with positive leading coefficients gives the existence of \(x_0\) such that all required inequalities hold for \(x > x_0\). ◻

Definition 2 (Conversion from \(\mathbb{Z}/n\mathbb{Z}\) to Index Set).

For computational purposes, we identify \(\mathbb{Z}/n\mathbb{Z}\) with the index set \(\{0,1,\ldots,n-1\}\) via the canonical map taking each residue class to its unique representative in \(\{0,1,\ldots,n-1\}\).

Definition 3 (Linear Representation).

Let \(f: \mathbb{Z}/n\mathbb{Z} \to \mathbb{Z}/n\mathbb{Z}\) be any function. A linear representation of \(f\) is an injective function \(j: \mathbb{Z}/n\mathbb{Z} \to \mathbb{Z}/m\mathbb{Z}\) such that for all \(i\in \mathbb{Z}/n\mathbb{Z}\), \[j(f(i)) = a \cdot j(i)\] in \(\mathbb{Z}/m\mathbb{Z}\), where \(m\) is a positive integer and \(a\) is a constant from \(\mathbb{Z}/m\mathbb{Z}\) depending on \(f\).

Theorem 1 (Main Theorem: Every Function Has Linear Representation).

Any function \(f: \mathbb{Z}/n\mathbb{Z} \to \mathbb{Z}/n\mathbb{Z}\) has a linear representation.

Proof. Let us define \(m = \det(x\cdot I - A)\), \(a = x\) and \(j(i) = y_i\), where \(y = M(x)v\) with \(v = (0,1,2,\ldots,n-1)^T\). By Lemma 6, we can choose \(x\) large enough such that:

  • \(m > 0\)

  • The entries \(y_i \geq 0\) are non-negative

  • The entries are strictly increasing: \(y_i < y_j\) for \(i < j\)

  • The entries are bounded: \(y_i < m\) for all \(i\)

The non-negativity and boundedness ensure that each \(y_i \in [0, m)\) as an integer. The strict ordering property ensures that the map \(j: \mathbb{Z}/n\mathbb{Z} \to \mathbb{Z}/m\mathbb{Z}\) defined by \(j(i) = y_i \bmod m\) is injective.

Lemma 2 shows that \(y_{f(i)} = x\cdot y_i - m\cdot v_i\). Since \(v_i = i\) (using Definition 2), we have: \[j(f(i)) = y_{f(i)} \bmod m = (x\cdot y_i - m\cdot i) \bmod m = x\cdot y_i \bmod m = x\cdot j(i) \bmod m\]

Therefore, \(j\) is a linear representation of \(f\) with modulus \(m\) and constant \(a = x\). ◻

Examples↩︎

Example 1 (Quadratic Function in \(\mathbb{Z}/3\mathbb{Z}\)). Consider the function \(f: \mathbb{Z}/3\mathbb{Z} \to \mathbb{Z}/3\mathbb{Z}\) defined by \(f(x) = x^2\). This function maps: \[\begin{align} 0 &\mapsto 0 \\ 1 &\mapsto 1 \\ 2 &\mapsto 4 \equiv 1 \pmod{3} \end{align}\] Despite being a non-linear function, Theorem 1 guarantees that \(f\) has a linear representation.

Remark 2 (Explicit Computation). The adjacency matrix for the quadratic function in Example 1 is: \[A_f = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 1 & 0 \end{pmatrix}\]

The characteristic matrix is: \[x \cdot I - A_f = \begin{pmatrix} x-1 & 0 & 0 \\ 0 & x-1 & 0 \\ 0 & -1 & x \end{pmatrix}\]

The characteristic polynomial is: \[m = \det(x \cdot I - A_f) = (x-1)^2 \cdot x = x^3 - 2x^2 + x\]

The adjugate matrix is: \[\operatorname{adj}(x \cdot I - A_f) = \begin{pmatrix} x(x-1) & 0 & 0 \\ 0 & x(x-1) & 0 \\ 0 & (x-1) & (x-1)^2 \end{pmatrix}\]

Using vector \(v = (0, 1, 2)^T\), we get: \[y = \operatorname{adj}(x \cdot I - A_f) \cdot v = \begin{pmatrix} x(x-1) \cdot 0 \\ x(x-1) \cdot 1 \\ (x-1) \cdot 1 + (x-1)^2 \cdot 2 \end{pmatrix} = \begin{pmatrix} 0 \\ x^2 - x \\ (x-1)(2x-1) \end{pmatrix} = \begin{pmatrix} 0 \\ x^2 - x \\ 2x^2 - 3x + 1 \end{pmatrix}\]

For \(x = 4\), we compute: \[\begin{align} y_0 &= 0 \\ y_1 &= 4^2 - 4 = 16 - 4 = 12 \\ y_2 &= 2(4^2) - 3(4) + 1 = 32 - 12 + 1 = 21 \\ m &= 4^3 - 2(4^2) + 4 = 64 - 32 + 4 = 36 \end{align}\]

The injection \(j: \mathbb{Z}/3\mathbb{Z} \to \mathbb{Z}/36\mathbb{Z}\) is defined by \(j(i) = y_i\): \[j(0) = 0, \quad j(1) = 12, \quad j(2) = 21\]

These values are strictly increasing (\(0 < 12 < 21\)) and bounded by \(m = 36\), so \(j\) is injective.

We verify the linear representation property using Lemma 2.

The lemma states that \(y_{f(i)} = x \cdot y_i - m \cdot v_i\), which we can rewrite as: \[j(f(i)) \equiv x \cdot j(i) \pmod{m}\] since the \(m \cdot v_i\) term vanishes modulo \(m\).

Verification: \[\begin{align} j(f(0)) = j(0) = 0 &\equiv 4 \cdot 0 = 0 \pmod{36} \quad✔ \\ j(f(1)) = j(1) = 12 &\equiv 4 \cdot 12 = 48 \equiv 12 \pmod{36} \quad✔ \\ j(f(2)) = j(1) = 12 &\equiv 4 \cdot 21 = 84 \equiv 12 \pmod{36} \quad✔ \end{align}\]

Indeed: \(48 = 36 + 12\), so \(48 \equiv 12 \pmod{36}\), and \(84 = 2 \cdot 36 + 12\), so \(84 \equiv 12 \pmod{36}\).

Thus \(j(f(i)) \equiv 4 \cdot j(i) \pmod{36}\) for all \(i \in \mathbb{Z}/3\mathbb{Z}\), confirming the quadratic function \(f(x) = x^2\) has a linear representation with modulus \(m = 36\) and multiplier \(a = 4\).

3 Discussion and Context↩︎

The representation of arbitrary functions in structured algebraic forms is a recurring theme. Our result provides one such representation, which can be compared to others.

  • Polynomial Interpolation: Any function over a finite field or ring can be represented by a polynomial (e.g., via Lagrange interpolation). Our result is distinct in that it achieves a representation as a simple linear map, \(z \mapsto az\), at the cost of requiring an embedding \(j\) into the ring rather than working on the original set’s labels directly.

  • Linear Feedback Shift Registers (LFSRs): In engineering and cryptography, functions on vector spaces over finite fields are often chosen to be linear for ease of implementation and analysis. Our result generalizes this principle, showing that any function on an arbitrary finite set can be viewed linearly in a suitable module.

  • Graph Theory: In Graph Theory our results shows that any functional digraph is a subgraph of a functional graph of a linear map.

While the modulus \(m\) can be large, making this construction primarily of theoretical interest, it provides the powerful knowledge that every finite function possesses a hidden linear structure.

References↩︎

[1]
R. A. Bacik. FinLin. https://github.com/roman3017/FinLin.