Papers
Topics
Authors
Recent
2000 character limit reached

Function-Correcting Codes: Theory & Applications

Updated 30 November 2025
  • Function-Correcting Codes (FCCs) are error-correcting codes that ensure accurate recovery of specific function values by relaxing traditional distance constraints.
  • They employ a combinatorial framework and metrics like the Lee metric to reduce redundancy, often achieving optimal performance with minimal extra bits.
  • FCCs leverage irregular-distance coding and graph-theoretic techniques to enhance data aggregation and distributed computations in practical settings.

Function-Correcting Codes (FCCs) are a novel class of error-correcting codes designed to guarantee the reliable recovery of prescribed function values computed on a message, while minimizing the redundancy compared to classical codes. In contrast to traditional error-correcting codes (ECCs), which require all distinct message codewords to be separated by a fixed metric distance, FCCs only impose distance constraints between codewords with nonequivalent function values. This fundamental relaxation can dramatically reduce redundancy when the function of interest is many-to-one. FCCs admit a general, function- and metric-dependent combinatorial framework, and have been explicitly studied for various algebraic and combinatorial metrics, including Hamming, Lee, pair, and homogeneous distances.

1. Formal Definition and Framework

Consider messages uZqku \in \mathbb{Z}_q^k and a target function f:ZqkIm(f)f: \mathbb{Z}_q^k \rightarrow \operatorname{Im}(f). A systematic function-correcting code (FCC) for ff and tt-error correction in a metric dd is an encoding map Enc(u)=(u,p(u))Zqk+r\operatorname{Enc}(u) = (u, p(u)) \in \mathbb{Z}_q^{k+r} such that if f(u1)f(u2)f(u_1) \neq f(u_2), then d(Enc(u1),Enc(u2))2t+1d(\operatorname{Enc}(u_1), \operatorname{Enc}(u_2)) \geq 2t+1 (K. et al., 3 Aug 2025). The smallest rr for which such an encoder exists is the optimal redundancy rf(q,k,t)r^f(q,k,t).

FCCs in the Lee Metric

The Lee metric for a,bZqa,b \in \mathbb{Z}_q is dL(a,b)=min(ab,qab)d_L(a,b) = \min(|a-b|, q-|a-b|). For vectors, dL(x,y)=i=1ndL(xi,yi)d_L(x,y) = \sum_{i=1}^n d_L(x_i, y_i). The systematic FCC for ff in the Lee metric (a Function-Correcting Lee Code, FCLC) satisfies dL(Enc(u1),Enc(u2))2t+1d_L(\operatorname{Enc}(u_1), \operatorname{Enc}(u_2)) \geq 2t+1 when f(u1)f(u2)f(u_1) \neq f(u_2) (K. et al., 3 Aug 2025).

A central tool is the distance requirement matrix DfD_f of size M=ZqkM = |\mathbb{Z}_q^k| with entries [Df]ij=[2t+1dL(ui,uj)]+[D_f]_{ij} = [2t+1 - d_L(u_i, u_j)]^+ for f(ui)f(uj)f(u_i) \neq f(u_j), else $0$. The minimal rr such that a set of redundancy vectors {p1,...,pM}Zqr\{p_1, ..., p_M\} \subset \mathbb{Z}_q^r exists with dL(pi,pj)[Df]ijd_L(p_i, p_j) \geq [D_f]_{ij} for all iji \neq j is denoted NL(Df)N_L(D_f). The optimal redundancy is rLf(q,k,t)=NL(Df)r_L^f(q,k,t) = N_L(D_f) (K. et al., 3 Aug 2025).

2. Core Principles and Theoretical Bounds

FCC design reduces to constructing irregular-distance codes: vector sets subject to a matrix of minimum distance constraints reflecting function preimages. Two main types of bounds result:

  • Plotkin-like Lower Bound: For even qq, NL(D)(8/(M2q))i<j[D]ijN_L(D) \geq (8/(M^2 q)) \sum_{i<j} [D]_{ij}. For odd qq, NL(D)(4/(M2q/2))(q/(q+1))i<j[D]ijN_L(D) \geq (4/(M^2 \lfloor q/2 \rfloor)) (q/(q+1)) \sum_{i<j} [D]_{ij}. The denominator adjusts for parity in MM and qq (K. et al., 3 Aug 2025).
  • Gilbert–Varshamov Upper Bound: NL(D)min{r:qr>maxji<jVL(r,Dij1)}N_L(D) \leq \min \{r : q^r > \max_j \sum_{i < j} V_L(r, D_{ij} - 1)\}, with VL(r,ρ)V_L(r, \rho) the size of a Lee ball of radius ρ\rho (Verma et al., 23 Jul 2025).

These generalize bounds for classical codes. For any function, the redundancy obeys

NL(2,2t)rLf(q,k,t)NL(Im(f),2t).N_L(2, 2t) \leq r_L^f(q,k,t) \leq N_L(|\operatorname{Im}(f)|, 2t).

3. Explicit FCC Constructions and Function Classes

Explicit and often optimal FCLCs have been constructed for several function classes (K. et al., 3 Aug 2025, Verma et al., 23 Jul 2025):

3.1 Lee Weight (f(u)=wtL(u)f(u) = \mathrm{wt}_L(u))

Let E=kq/2+1E = k \lfloor q/2 \rfloor + 1; consider representative vectors of weights $0, 1, ..., E$. The code distance matrix is [Dwt]ij=[2t+1ij]+[D_{wt}]_{ij} = [2t+1 - |i-j|]^+.

Construction: For q5q \geq 5, t(q3)/2t \leq (q-3)/2:

  • Odd qq: ps=2smodqp_s = 2s \bmod q.
  • Even qq: ps=2smodqp_s = 2s \bmod q for s<q/2s < q/2, ps=2s+1modqp_s = 2s+1 \bmod q for sq/2s \geq q/2.
  • Redundancy is tt (r=tr = t).

This is optimal for many small q,kq, k. Applying the Plotkin bound to DwtD_{wt} gives explicit lower bounds (K. et al., 3 Aug 2025).

3.2 Lee-Weight Distribution (f(u)=wtL(u)/Tf(u) = \lfloor \mathrm{wt}_L(u)/T \rfloor)

Divide weight into TT-bins. If TT divides EE, then image size is E=E/TE' = E / T.

  • Upper bound: rLΔ(q,k,t)NL(DΔ)r_L^\Delta(q,k,t) \leq N_L(D_\Delta), with DΔD_\Delta reflecting minimum bin differences.
  • For tTt \leq T, redundancy rtr \leq t.

3.3 Modular Sum (f(u)=iuimodqf(u) = \sum_{i} u_i \bmod q)

Image size E=qE=q. Assign each modular sum ss a parity psp_s as above. Redundancy requirements mirror those for Lee weight.

3.4 Locally (2t,λ)L(2t,\lambda)_L-Bounded Functions

If ff is locally (2t,λ)L(2t,\lambda)_L, i.e., the value set of ff within any Lee-ball of radius $2t$ is λ\leq \lambda, assign a coloring Colf\operatorname{Col}_f with λ\lambda colors, then use a code with parameters adapted to λ\lambda. For λq/2\lambda \leq q/2, r=t/q/(2λ)r = \lceil t / \lfloor q/(2\lambda) \rfloor \rceil. This is sometimes optimal by matching lower bounds.

4. Redundancy Analysis and Comparative Performance

Lower and upper bounds can often be explicitly calculated for concrete function classes using matrix methods and combinatorial arguments (K. et al., 3 Aug 2025). In the most studied cases, explicit constructions achieve minimal redundancy.

A comparative summary:

Method Redundancy Lower Bound Typical Redundancy Achieved
Classical Lee ECC logqVt(n)\geq \log_q V_t^{(n)} Sphere-packing dominated
ECC on function values logq(Im(f)Vt(n))\geq \log_q (|\operatorname{Im}(f)| \cdot V_t^{(n)}) Function-image size dominates
FCLC t,2t1t, 2t-1 (varies by class) Often r=tr = t (see Lee weight)

In the Lee-weight example with q=5,k=2,t=1q=5,k=2,t=1, ECC on data needs r2r \geq 2, ECC on function values r3r \geq 3, but FCLC achieves r=1r=1. For large kk and functions with small image size, rr can be substantially smaller with FCLCs.

5. Graph-Theoretic and Algorithmic Perspectives

FCC construction is equivalent to finding large independent sets in a function-dependent graph where vertices encode messages and their redundancy and edges correspond to forbidden pairs under the metric and ff constraints (K. et al., 3 Aug 2025). The problem reduces to constructing a code with a prescribed irregular-distance matrix, leveraging coloring and code-assignment techniques. Greedy and coloring-based algorithms derive from Brooks' theorem and sphere-packing ideas.

6. Specializations, Metric Extensions, and Open Problems

The FCC paradigm generalizes readily to other metrics (b-symbol, symbol-pair, homogeneous, Hamming). Reed–Muller, Gray-code, and parity-repetition constructions have broad applicability (K. et al., 3 Aug 2025, Verma et al., 23 Jul 2025). Tight Plotkin-type bounds have been extended to the Lee metric, improving upon prior results in the homogeneous metric (Verma et al., 23 Jul 2025).

Open problems include:

  • Tightening bounds for specific f,t,qf, t, q.
  • Explicit constructions for more general algebraic and combinatorial ff.
  • Extensions to list decoding, probabilistic decoding, and channels with additional error models.

7. Significance and Applications

FCCs, particularly in the Lee metric, provide a rigorous method to optimize and minimize redundancy when only a function of a message matters for downstream reliability—central to data aggregation, hash verification, machine learning inference in storage, and error-resilient distributed computations (K. et al., 3 Aug 2025). Their design paradigm offers a strict generalization of error-correcting codes, interpolating between function-value and data protection, and enables significant improvements in code rate for a wide spectrum of practical coding scenarios.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Whiteboard

Follow Topic

Get notified by email when new papers are published related to Function-Correcting Codes (FCCs).