On Function-Correcting Lee Metric Codes with Data Protection
Gyanendra K. Verma, Abhay Kumar Singh
Abstract
Function-correcting codes are designed to protect the function values of a prescribed function against errors. Every error-correcting code that provides data protection inherently offers some degree of protection for functions defined on the data. In this work, we introduce a class of codes over Zm, termed function-correcting Lee metric codes with data protection (FCLMCs with data protection), which simultaneously provide error protection for both the data and the corresponding function values under the Lee metric. We consider codes that provide protection against a prescribed level of error for the function values that exceeds the level of protection guaranteed for the underlying data. We present a general construction of these codes and derive lower and upper bounds on the optimal redundancy, including a Plotkin-type lower bound. Furthermore, we derive explicit upper bounds on the redundancy of FCLMCs with data protection for several important classes of functions, including locally binary Lee functions, the Lee weight function, and the modular sum function. Finally, since the Lee metric coincides with the Hamming metric over Z2, all of our results remain valid over Z2 with respect to the Hamming metric.
Keywords: Data protection, function-correcting codes, coding theory, Lee metric, error-correcting codes, optimal redundancy.
Mathematics subject classification: 94B60, 94B65.
1 Introduction
A new coding framework, known as Function-Correcting Codes (FCCs), was introduced in [3] to provide reliable protection for a specific function or attribute of interest rather than for the entire information vector. In conventional error-correcting coding schemes, the primary objective is to recover the complete transmitted information
*Department of Electrical Communication Engineering, Indian Institute of Science, Bengaluru, Karnataka 560012, India. The author is financially supported by the ANRF-NPDF grant PDF/2025/002309. email: gkvermaiitdmaths@gmail.com
†Department of Mathematics and Computing, Indian Institute of Technology (ISM) Dhanbad, Dhanbad. email: abhay@iitism.ac.in Corresponding author: Abhay Kumar Singh vector accurately in the presence of errors. However, in many emerging communication and computing applications, the receiver may require only a particular function or attribute derived from the transmitted data, making complete recovery of the original information vector unnecessary.
A series of papers [1, 4, 5, 6, 7, 9, 10, 11, 13, 12, 15] by various authors have investigated Function-Correcting Codes (FCCs) from different perspectives, considering a wide range of distance metrics and target functions. These studies have explored the design and analysis of FCCs for different classes of functions and have established several relevant theoretical bounds on their performance. In particular, bounds related to code parameters, error-correction capability, redundancy, and coding efficiency have been derived for various function-correcting coding schemes. A summary of the relevant research contributions, including the authors, considered functions, distance metrics, and established bounds, is presented in Table X. The table provides a comparative overview of the existing work on FCCs and highlights the different approaches adopted by researchers in analyzing function-oriented error correction.
Recently, C. Rajput et al. [8] introduced a more general coding framework that extends the concept of Function-Correcting Codes by providing simultaneous protection for both the underlying data and their corresponding function values under the Hamming metric. Unlike conventional FCCs, which primarily focus on the reliable recovery of a specified function of the information vector, this generalized framework considers the joint preservation of the original data and the associated function. This approach provides greater flexibility in applications where both the transmitted data and the computed function are of interest at the decoder.
In this paper, we introduce a more general approach and framework for function-correcting codes with the Lee metric that incorporates data protection as well as protection of function values. A detailed description of Function-Correcting Codes (FCCs), along with a comprehensive review of the existing literature, is presented in Section 1. This section provides an overview of the fundamental concepts of FCCs, their underlying principles, and the various coding frameworks proposed in the literature. Section 2 presents the necessary preliminaries and fundamental concepts required for the development of the paper. It introduces the relevant definitions, notation, and basic results that will be used throughout the subsequent sections. Section 3 introduces the concept of Function-Correcting Codes (FCCs) with data protection under the Lee metric. Furthermore, this section establishes bounds on the redundancy of function-correcting codes with data protection under the Lee metric. These bounds characterize the amount of additional redundancy required to ensure reliable recovery of both the data and the desired function values. Section 4 deals with Function-Correcting Lee Metric Codes (FCLMCs) with data protection for several specific classes of functions, including locally bounded, Lee weight, and modular functions. The section develops the coding framework for these function classes and investigates the corresponding redundancy requirements under the Lee metric. Furthermore, explicit upper bounds on the redundancy are derived for several important classes of these functions. Section 5 concluded the paper.
2 Preliminaries
In this section, we present fundamental definitions, results, and notation used throughout the paper. We denote the residue ring modulo m by Zm, where m is a positive integer greater than or equal to 2. We write the elements of Zm as 0,1,…,m−1 unless otherwise specified. We denote the set of all k-tuples over Zm for a positive integer k by Zmk. The Lee metric is a generalization of the Hamming weight, assigning different weights to distinct non-zero elements in Zm.
Definition 2.1. [2, Lee Metric] Let u=(u1,u2,…,uk) and v=(v1,v2,…,vk) be two vectors in Zmk. The Lee distance between, u and v is defined as
dL(u,v)=i=1∑kwL(ui−vi),
where wL(ui−vi)=min{ui−vi,vi−ui}(modm).
Note that the elements of Zm can also be written as
In this representation, the Lee weight of an element a∈Zm is equivalently defined as (see [16])
wL(a)=∣a∣=max{a,−a}.(2.1)
A k-tuple message is denoted by vectors in Zmk, called the message space. An encoding function E:Zmk→Zmk+r is defined as E(u)=(u,p(u)), where p(u)∈Zmr is called a redundancy vector. The set
C={E(u)∈Zmk+r∣u∈Zmk}
is called a code of length k+r over Zm with redundancy r, and E(u) is called a codeword in C. The minimum Lee distance of C is defined as
dL(C)=min{dL(E(u),E(v))∣u,v∈Zmk,u=v}.
The following lemmas are fundamental results in the Lee metric.
Lemma 2.3. [14] Let C={C1,C2,…,CM}⊆Zmr be a code of length r and size M. Then
i,j∑dL(Ci,Cj)=mSM2r,whereSisasinLemma2.2.
A ball centered at a point u∈Zmk of radius ρ in the Lee metric is defined as
BL(u,ρ)={v∈Zmk∣dL(u,v)≤ρ}.
Definition 2.4 (Function-Correcting Lee Metric Code (FCLMC)). Let t>0 be an integer and f:Zmk→Im(f) be a function defined over message space Zmk. An encoding function E:Zmk→Zmk+r defines an (f,t)-function-correcting Lee metric code (in short, (f,t)L-FCLMC) with redundancy r if dL(E(u),E(v))≥2t+1 holds for all u,v∈Zmk with f(u)=f(v).
By the above definition, any (f,t)L-FCLMC can be seen as a code that can correct up to t function value errors.
Definition 2.5 (Optimal Redundancy). Let t>0 be an integer and f:Zmk→Im(f) be a function. The smallest value r for which there exists an encoding map E:Zmk→Zmk+r that defines an (f,t)L-FCLMC is called the optimal redundancy. It is denoted by rfL(k,t).
For a given function f:Zmk→Im(f), we associate a matrix called the Lee distance requirement matrix and defined as follows.
Definition 2.6 (Lee Distance Requirement Matrix (LDRM)). Let u1,u2,…,uM∈Zmk. Define the Lee distance requirement matrix DfL(t,u1,u2,…,uM) of order M×M in the Lee metric for a given function f:Zmk→Im(f) whose ij-th entry is given by:
Irregular-distance code in the Lee metric is defined as follows.
Definition 2.7 (D-Code in Lee Metirc). Let D be an M×M square matrix over non-negative integers with diagonal entries zero. A code C={C1,C2,…,CM}⊆Zmr is called a D-code in the Lee metric if dL(Ci,Cj)≥[D]ij for all 1≤i,j≤M.
Let NL(D) be the smallest integer r such that there exists a D-code of length r. Next, we define Lee distance on the image set of a function f:Zmk→Im(f) as follows.
Definition 2.8. Let f:Zmk→Im(f) be a function with Im(f)={e1,e2,…,eη}. Define Lee distance on Im(f) as follows
Analogous to LDRM, we define the function-distance matrix for a given function f as follows.
Definition 2.9 (Function Lee Distance Matrix (FLDM)). Let f:Zmk→Im(f) be a function with Im(f)={e1,e2,…,eη}. Define the function Lee distance matrix with (ij)-th entry
The subsequent results establish connections between the optimal redundancy of (f,t)L-FCLMCs and the minimum length of a D-code, where D is LDMR or FLDM.
Theorem 2.10. [13, Theorem 3.6] Let f:Zmk→Im(f) be a function and Zmk={u1,u2,…,umk}. Then
rfL(k,t)=NL(DfL(t,u1,u2,…,umk)).
Corollary 2.11. [13, Corollary 3.7] Let {u1,u2,…uM}⊆Zmk with M≤mk. Then the optimal redundancy of (f,t)-FCLMCs satisfies
rfL(k,t)≥NL(DfL(t,u1,u2,…,uM))
for any function f:Zmk→Im(f).
Corollary 2.12. [13, Corollary 3.11] Let f:Zmk→Im(f) with Im(f)={e1,e2,…,eη} and a set u1,u2,…,uη such that f(ui)=ei. If DfL(t,u1,u2,…,uη)=DfL(t,e1,e2,…,eη), then
rfL(k,t)=NL(DfL(t,e1,e2,…,eη)).
Corollary 2.13. [13, Corollary 6.6] Let f(u)=wL(u) and η=k⌊2m⌋. For any k≥⌈⌊2m⌋t+1⌉,
rfL(k,t)≥⌈3(t+2)2⌊2m⌋10t3+30t2+20t⌉.
For positive integers λ and t, we denote the minimum length of an error-correcting code with λ codewords and the minimum Lee distance 2t by NL(λ,2t). To determine the exact value of NL(λ,2t) for arbitrary λ and t is a fundamental yet challenging problem in coding theory. The following theorem provides an upper bound on NL(λ,2t).
Theorem 2.14. [13] For positive integers λ and t, let NL(λ,2t) denote the minimum length of an error-correcting code with λ codewords and minimum Lee distance 2t. Then, we have
NL(λ,2t)≤λ⌈⌊2m⌋t⌉.
Moreover,
NL(2,2t)=⌈⌊2m⌋2t⌉.
Next, we state a bound on the redundancy of a code in the Lee metric that follows from the Plotkin low-rate average distance bound.
Theorem 2.15. [14] Let E:Zmk→Zmk+rd be an data encoding that defines a code C over Zm with the minimum Lee distance d and redundancy rd. Then, we have
3 Function-correcting code with data protection in Lee metric codes
The function-correcting codes provide error correction whenever there is some error in the function values during transmission. In this section, we introduce a class of codes that provide protection against the message and function value simultaneously. We call such codes a “function-correcting Lee metric code with data protection”.
Definition 3.1. Let dd and df be non-negative integers with dd≤df. An encoding function E:Zmk→Zmk+r with E(u)=(u,p(u)) defines an (f,dd,df)L-function-correcting Lee metric code with data protection if
dL(E(u),E(v))≥dd holds for all distinct u,v∈Zmk
dL(E(u),E(v))≥df holds for all u,v∈Zmk whenever f(u)=f(v).
Equivalently, we denote (f,dd,df)L-FCLMC by (f,td,tf)L-FCLMC, where td=⌊2dd−1⌋ is the error-correction capability for data, and tf=⌊2df−1⌋ is the error-correction capability for function values. By definition, we can see that any (f,td,tf)L-FCLMC provides protection against td data (message bit) errors and tf function values errors. The following example illustrates the definition.
Example 3.2. Let f:Z42→Z4, defined by f(x,y)=x2+y(mod4). Define an encoding map as follows:
E:Z42→Z42+2,E(u)=(u,up)(mod4)∀u∈Z42,
where up is given as follows
u∈Z42
f(u)
(u,up)
(0,0)
0
(0,0,0,0)
(0,1)
1
(0,1,1,2)
(0,2)
2
(0,2,2,0)
(0,3)
3
(0,3,3,2)
(1,0)
1
(1,0,1,2)
(1,1)
2
(1,1,2,0)
(1,2)
3
(1,2,3,2)
(1,3)
0
(1,3,0,0)
(2,0)
0
(2,0,0,0)
(2,1)
1
(2,1,1,2)
(2,2)
2
(2,2,2,0)
(2,3)
3
(2,3,3,2)
(3,0)
1
(3,0,1,2)
(3,1)
2
(3,1,2,0)
(3,2)
3
(3,2,3,2)
(3,3)
0
(3,3,0,0).
Consider C={(u,up):u∈Z42}. Then, C is an (f,dd=2,df=4)L-FCLMC, that is, C is a code with 2-error detection for data and 4-error detection for function values.
It is easy to see that whenever dd=df, an (f,dd,df)L-FCLMC is an error-correcting code with the minimum Lee distance dd=df. It is worth noting that data protection implies function value protection; however, the converse does not hold in general. Next, we present a general construction of function-correcting codes with data protection. Throughout this paper, we assume that dd and df are positive integers satisfying dd<df.
General construction: Let td=⌊2dd−1⌋ and tf=⌊2df−1⌋ be positive integers with tf>td. For a given function f:Zmk→Im(f), an (f,td,tf)L-FCLMC is can be constructed as follows.
Step-1 (Data encoding) Define an encoding Ed:Zmk→Zmk+rd such that dL(Ed(u),Ed(u))≥2td+1 for all u,v∈Zmk.
Step-2 (Function encoding) Define another encoding Ef:Zmk+rd→Zmk+rd+rf such that
dL(Ef(Ed(u)),Ef(Ed(v)))≥2tf+1
for all u,v with f(u)=f(v). Then an encoding E:Zmk→Zmk+rd+rf defined as E(u)=Ef(Ed(u)), defines an (f,td,tf)L-FCLMC with redundancy r=rd+rf.
Linear codes are well known for their efficient encoding and decoding algorithms. To exploit these advantages, one may employ a linear encoding Ed in Step-1, so that the set {Ed(u):u∈Zmk} forms a linear code of length k+rd over Zm. Nevertheless, the results presented in this paper are developed for general codes and do not rely on the assumption of linear encoding.
Definition 3.3. The optimal redundancy rfL(k,dd,df) (equivalently, rfL(k,td,tf)) for a given function f:Zmk→Im(f) is defined as
3.1 Bound on redundancy of FCLMCs with data protection
In this subsection, we derive lower and upper bounds on the optimal redundancy of function-correcting codes with data protection with respect to the Lee metric. We begin by introducing the Lee distance requirement matrix for data protection associated with a given function.
Definition 3.4 (Coded Lee distance requirement matrix (CLDRM)). Let u1,u2,…,uM∈Zmk, and Ed:Zmk→Zmk+rd be a data encoding. The coded Lee distance requirement matrix (CLDRM) DEd,f(tf,u1,u2,…,uM) for an (f,td,tf)L-FCLMC is an M×M matrix with entries
Definition 3.6 (Coded Function Lee Distance Matrix (CFLDM)). Let f:Zmk→Im(f)={e1,e2,…,eη} with ∣Im(f)∣=η and Ed:Zmk→Zmk+rd be a data encoding map. Then an η×η matrix DEd,f(tf,e1,e2,…,eη) with entries
Definition 3.7. Let u1,u2,…,uM∈Zmk and f:Zmk→Im(f) be a function. The Lee distance requirement matrix for data protection with respect to f is defined by an M×M matrix DfL(td,tf,u1,u2,…,uM) with entries
For D=DfL(td,tf,u1,u2,…,umk), if we have a D-code C={C1,C2,…,Cmk} in the Lee metric, then it can be used to construct an (f,td,tf)L-FCLMC by defining the encoding map as follows:
E(ui)=(ui,Ci)∀1≤i≤mk.
Theorem 3.8. Let f:Zmk→Im(f) be a function and Zmk={u1,u2,…,umk}. Then
Proof. Denote rfL(k,td,tf) by r and DfL(td,tf,u1,u2,…,umk) by D for simplicity. Let C be a D-code over Zm of length NL(D) in Lee metric. Then the codewords of C can be used as redundancy for an (f,td,tf)L-FCLMC, that is, r≤NL(D). Next, assume that r<NL(D), then there exists an (f,td,tf)L-FCLMC with redundancy r and encoding map E:Zmk→Zmk+r such that one of the following must be true.
There exist two redundancy vectors up,vp of length r for some u,v∈Zmk with u=v such that dL(up,vp)<2td+1−dL(u,v).
There exist two redundancy vectors up′,vp′ of length r for some u′,v′∈Zmk with f(u′)=f(v′) such that dL(up′,vp′)<2tf+1−dL(u′,v′).
This implies that dL(E(u),E(v))<2td+1 or dL(E(u′),E(v′))<2tf+1 for f(u′)=f(v′), which is a contradiction to the fact E defines an (f,td,tf)L-FCLMC. Hence, r=NL(D).
Corollary 3.9. For any function f:Zmk→Im(f) and {u1,u2,…,um}⊆Zmk, we have
rfL(k,td,tf)≥NL(DfL(td,tf,u1,u2,…,um)).
Particularly, if ∣Im(f)∣≥2, then rfL(k,td,tf)≥NL(2,2tf)=⌈⌊2m⌋2tf⌉.
Utilizing the above bound, we present an explicit lower bound on the optimal redundancy for FCLMCs with data protection.
Theorem 3.10 (Lower Bound). Let f:Zmk→Im(f) with 2≤∣Im(f)∣≤(m−1)k. Then
rfL(k,td,tf)≥⌈m4tf+2td−2m+3⌉.
Proof. As ∣Im(f)∣≥2, we have u1,v∈Zmk with f(u1)=f(v) and dL(u1,v)=1. For i∈[k] and α∈Zm∗=Zm∖{0}, denote ei,α=(0,…,ith−placeα,0,…,0)∈Zmk. Let
Xu1={u1+ei,α:i∈[k],α∈Zm∗}. Then {f(x):x∈Xu1}∪{f(u1)}⊆Im(f). Consequently, ∣{f(x):x∈Xu1}∪{f(u1)}∣≤(m−1)k. As there are (m−1)k choices for ei,α, either there exist i,j∈[k] and α,β∈Zm∗ with f(u1+ei,α)=f(u1+ej,β), where ei,α and ej,β are distinct, or there exists i∈[k] and α∈Zm∗ with f(u1+ei,α)=f(u1).
Case 1: Let f(u1+ei,α)=f(u1+ej,β) for distinct ei,α and ej,β. Let u2=u1+ei,α and u3=u1+ej,β. Then
Case 2: Let f(u1+ei,α)=f(u1) for some i∈[k] and α∈Zm∗. Take u3=u1+ei,α. From initial assumption ∣Im(f)∣≥2, there exists u2 with f(u1)=f(u2) and dL(u1,u2)=1. We can assume u2=u1+ej,1 for some j∈[k]. Then, we have f(u1)=f(u3)=f(u2), and thus,
Corollary 3.11. [8, Theorem 4] Let m = 2. Then the Lee metric coincide with the Hamming metric over Z2 and the optimal redundancy rfH(k,td,tf) of an (f,td,tf)-FCC with data protection satisfies
rfH(k,td,tf)≥2tf+td.
Proof. We get the desired result by putting m = 2 in Theorem 3.10.
Theorem 3.12 (Upper bound). Let Ed:Zmk→Zmk+rd be a data encoding map with redundancy rd and td-error-correction (that is, the corresponding code has the minimum Lee distance 2td+1). Let Zmk={u1,u2,…,umk}, for any function f:Zmk→Im(f), we have
By definition of FCLMC with data protection, the map E defines an (f,td,tf)L-FCLMC with data protection. Hence, rfL(k,td,tf)≤NL(D2)+rd. This completes the proof.
Theorem 3.13. Let u1,u2,…,uM∈Zmk and Ed:Zmk→Zmk+rd be a data encoding map with redundancy rd and td-error-correction (that is, the corresponding code has the minimum Lee distance 2td+1). Then
Combining Theorem 3.12, Theorem 3.13, and Theorem 2.14, we have the following upper bound on the optimal redundancy.
Corollary 3.14. Let Ed:Zmk→Zmk+rd be a data encoding map with redundancy rd and td-error correction (that is, the corresponding code has the minimum Lee distance 2td+1). Then
rfL(k,td,tf)≤mk⌈⌊2m⌋2(tf−td)⌉+rd.
For m = 2, the Lee metric coincides with the Hamming metric over Z2.
Corollary 3.15. Let m=2, and Ed:Z2k→Z2k+rd be an encoding map that defines a linear code with parameters [n=k+rd,k,2td+1]. Then
rfL(k,td,tf)≤2k+1(tf−td)+n−k.
3.2 A Plotkin-like bound for FCLMC with data protection
A general Plotkin-type bound for function-correcting codes under the Lee metric was established in [13, Lemma 4.1]. In the previous subsection, we provided several estimates of the optimal redundancy in terms of the distance requirement matrices. However, applying this bound requires knowledge of all pairwise Lee distances between the codewords of an irregular Lee distance code. To circumvent this requirement, we derive an alternate form of Plotkin-type lower bound on the optimal redundancy of FCLMCs with data protection that depends only on the prescribed distance parameters dd and df, together with the underlying function. It should be noted that the lower bound presented in Theorem 3.10 applies only to functions whose image cardinality does not exceed (m−1)k.
Theorem 3.16 (Lower Bound). Let f:Zmk→Im(f) be a function. Then, for any (f,dd,df)-FCLMC over Zm, we have
rfL(k,dd,df)≥Smk−1(ℓ−1)dd+(mk−ℓ)df−k,
where ℓ=maxe∈Im(f)∣f−1(e)∣, df>dd, and
S={4m24m2−1ifmisevenifmisodd.
Proof. Let E:Zmk→Zmk+r be an encoding map that defines (f,dd,df)L-FCLMC with redundancy r. Then C={E(u):u∈Zmk} is an (f,dd,df)L-FCLMC of length k+r with mk codewords. For a codeword c∈C, denote uc=f−1(c)∈Zmk and f(uc)=ec∈Im(f). Observe that dL(c,c′)≥dd for all c′∈C with ec=ec′ and dL(c,c′′)≥df for all c′′∈C with ec=ec′′. Therefore,
Corollary 3.17. Let f:Z2k→Im(f) be a function. Then, for any (f,dd,df)-FCLMC over Z2, we have
rfL(k,td,tf)≥2k−1(ℓ−1)dd+(2k−ℓ)df−k,
where ℓ=maxe∈Im(f)∣f−1(e)∣ and df>dd.
4 FCLMCs with data protection for specific functions
In this section, we investigate the construction of function-correcting Lee metric codes (FCLMCs) with data protection for several important classes of functions. We derive general lower and upper bounds on the optimal redundancy and provide constructions of such codes.
4.1 Locally bounded functions
Definition 4.1. Let u∈Zmk. A function ball centered at u of radius ρ is defined as
BLf(u,ρ)={f(v)∣v∈BL(u,ρ)}.
Definition 4.2. A function f:Zmk→Im(f) is said to be a locally (λ,ρ)L-function if ∣BLf(u,ρ)∣≤λ for all u∈Zmk.
When λ=2, we say the function is a locally binary Lee function. Now, we derive an upper bound on the optimal redundancy for locally binary Lee functions.
Theorem 4.3 (Upper Bound). Let f:Zmk→Im(f) be a locally (2,2tf)L-function and Ed:Zmk→Zmk+rd be a data encoding map with redundancy rd and td-error-correction (that is, corresponding code has minimum Lee distance 2td+1). Then for any (f,td,tf)-FCLMC, we have
rfL(k,td,tf)≤rd+⌊2m⌋2(tf−td).
Proof. Denote N=⌊2m⌋2(tf−td). Define an encoding map E:Zmk→Zmk+rd+N as follows:
Corollary 4.4. Let Ed:Z2k→Z2k+rd be a data encoding that gives a systematic linear code with parameters [n=k+rd,k,2t+d+1]. Then for any locally (2,2tf)-function, we have
rfH(k,td,tf)≤n−k+2(tf−td).
Proof. We get the desired result by putting m = 2 in Theorem 4.3.
4.2 The Lee weight function
The Lee weight function f:Zmk→{0,1,2,…,k⌊2m⌋} is defined as f(u)=wL(u) for all u∈Zmk. We derive bounds on the optimal redundancy. Observe that ∣Im(f)∣=k⌊2m⌋+1≤(m−1)k for m,k≥3. We have a lower bound on the optimal redundancy from Theorem 3.10.
Corollary 4.5. Let f(u)=wL(u) for all u∈Zmk be the Lee weight function. For m≥3 and k≥3, we have
rfL(k,td,tf)≥⌈m4tf+2td−2m+3⌉.
Next, we present an upper bound on the optimal redundancy.
Theorem 4.6 (Upper Bound). Let f:Zmk→{0,1,…,k⌊2m⌋} be the Lee weight function defined by f(u)=wL(u) for all u∈Zmk, and Ed:Zmk→Zmk+rd be a systematic data encoding map (first k coordinates correspond to message) with td-error-correction. Then
rfL(k,td,tf)≤rd+NL(2tf+1,2(tf−td)),
where NL(λ,d) is the minimum length of an error-correcting code with λ codewords and minimum Lee distance d.
Proof. Denote n1=k+rd and n2=NL(2tf+1,2(tf−td)). Let C be a code with 2tf+1 codewords, length n2 and minimum Lee distance 2(tf−td). Denote the codewords of C by C0,C1,…,C2tf. Define an encoding E:Zmk→Zmn1+n2 as follows
E(u)=(Ed(u),Cf(u)(mod2tf+1)).
We show that E defines an (f,td,tf)-FCLMC. For u,v∈Zmk with u=v, we have
Case 2 If ∣f(u)−f(v)∣≥2tf+1, then without loss of generality, we assume f(u)>f(v), we get f(u)−f(v)≥2tf+1. Also, dL(u,v)≥wL(u)−wL(v)≥2tf+1. Hence,
Corollary 4.7. Let f:Z2k→{0,1,…,k} be the Hamming weight function defined by f(u)=wH(u) for all u∈Z2k, and Ed:Zmk→Zmk+rd be a systematic data encoding map with td-error-correction that gives a linear code with parameters [n=k+rd,k,2td+1]. Then
rfL(k,td,tf)≤n−k+NL(2tf+1,2(tf−td)).
Proof. For m=2, the Lee weight and the Hamming weight coincide over Zmk. The rest follows from Proposition 4.6.
4.3 Modular sum function
A modular sum function fms:Zmk→Zm is defined as fms(u)=∑i=1kui(modm) for all u=(u1,u2,…,uk)∈Zmk. For the modular sum function fms, we have ∣Im(fms)∣=m. Therefore, from Theorem 3.10, we have a lower bound on the optimal redundancy.
Corollary 4.8. Let fms:Zmk→Zm be the modular sum function. Then
rfmsL(k,td,tf)≥⌈m4tf+2td−2m+3⌉.
We now present an upper bound on the optimal redundancy.
Theorem 4.9 (Upper Bound). Let fms:Zmk→Zm be the modular sum function, and let Ed:Zmk→Zmk+rd be a data encoding map with td-error-correction. Then
rfmsL(k,td,tf)≤rd+NL(m,2(tf−td)).
Proof. Let n=NL(m,2(tf−td)) and C=(C1,C2,…,Cm) be a code of length n with the minimum Lee distance 2(tf−td). Define an encoding E:Zmk→Zmk+rd+n as follows:
for all u,v∈Zmk with i=fms(u)=fms(v)=j. Thus, E defines an (f,td,tf)L-FCLMC. This completes the proof.
5 Lee distance graphs and strict (f,dd,df)L-FCLMCs
Note that an (f,dd,df)L-FCLMC with dd=df reduces to an error-correcting code in the Lee metric. We say an (f,dd,df)L-FCLMC, a strict (f,dd,df)L-FCLMC whenever df>dd. In this section, we investigate the existence and non-existence of strict (f,dd,df)L-FCLMCs. First, we define the minimum Lee distance graph corresponding to a given code over Zm under the Lee metric.
Definition 5.1 (α-Lee distance graph). Let C be a code over Zm with the minimum Lee distance dL(C)=d. For an positive integer α, the α-Lee distance graph of C, denoted by GCα, is a graph with vertex set C and two distinct vertices c1,c2∈C are adjacent if and only if dL(c1,c2)≤α.
Theorem 5.2. Let C be an (n,mk,dL(C)=d) code over Zm in the Lee metric and f:Zmk→Im(f) be a function with ∣Im(f)∣≥2. If C is a strict (f,dd=d,df)L-FCLMC for some df>d, then the α-Lee distance graph GCα of C can not be connected for any d≤α<df.
Proof. For all x∈Im(f), define xC={cu∈C:f(u)=x}⊆C, where cu is the encoded codeword corresponding to the message vector u∈Zmk. Let C is a strict (f,dd=d,df)L-FCLMC for some df>d. For each cu∈xC and each cv∈yC with x=y, by definition of (f,dd=d,df)L-FCLMC, we have
dL(cu,cv)≥df>d.
Recall that in GCα, two vertices are adjacent if and only if the Lee distance between them is at most α. Therefore, there is no edge in GCα for α<df between xC and yC for distinct x and y. Thus, GCα is not connected for α<df.
The above theorem can be generalized to the codes whose α-Lee distance graph has more than one connected component.
Theorem 5.3. Let C be an (n,mk,d) code over Zmk in the Lee metric. If the α-Lee distance graph GCα of C has η connected components, then C cannot be a strict (f,d,df)L-FCLMC for any function f:Zmk→Im(f) with ∣Im(f)∣≥η+1 and α<df.
In the following theorem, we discuss the converse direction that gives an existence criterion for arbitrary codes to be strict FCLMCs.
Theorem 5.4. Let C be an (n,mk,d) code. Let f:Zmk→Im(f) be a function with Im(f)={e1,e2,…,eη}. For any integer α≥d, if connected components of GCα can be grouped into disjoint unions of C1,C2,…,Cη with ∣Ci∣=∣f−1(ei)∣, then C is a strict (f,dd=d,df=α+1)L-FCLMC.
Proof. Since ∣Ci∣=∣f−1(ei)∣ for all 1≤i≤η, let ψi:f−1(ei)→Ci be a bijective map. For u∈Zmk, define an encoding E(u)=ψi(u) whenever f(u)=ei. Then, for distinct u,v∈Zmk,
since ψi(u),ψj(v)∈C and dL(C)=dd. Furthermore, let u,v∈Zmk with f(u)=f(v), that is, f(u)=ei and f(v)=ej for some i=j. Then, E(u)=ψi(u)∈Ci and E(v)=ψj(v)∈Cj are in distinct connected components of GCα. Thus,
dL(E(u),E(v))≥α+1=df.
Hence, by Definition 3.1, C is a strict (f,dd=d,df=α+1)L-FCLMC.
6 Conclusion
In this work, we proposed a systematic framework to study function-correcting codes in the Lee metric that simultaneously protects both function values and the corresponding message data. We established several bounds, including a Plotkin-like bound on the optimal redundancy of these codes, as well as explicit constructions. Using these general results, we derived explicit bounds for specific classes of functions, the Lee weight function, locally bounded functions in the Lee metric, and modular sum functions. Furthermore, we explored strict function-correcting Lee metric codes using the corresponding Lee distance graph.
This work lays a foundation for the study of function-correcting codes with data protection in the Lee metric as part of an ongoing research project. The research is currently in progress, with further efforts focused on establishing additional structural properties, deriving stronger bounds, and developing related constructions. A comprehensive treatment of these results will be incorporated in a subsequent version of this work.
References
[1] G. Ge, Z. Xu, X. Zhang, and Y. Zhang. Optimal redundancy of function-correcting codes. IEEE Transactions on Information Theory, 71(12):9458 – 9467, 2025.
[2] C. Y. Lee. Some properties of nonbinary error-correcting codes. IRE Transactions on Information Theory, 4:77–82, 1958.
[3] A. Lenz, R. Bitar, A. Wachter-Zeh, and E. Yaakobi. Function-correcting codes. IEEE Transactions on Information Theory, 69:5604–5618, 2023.
[4] H. Liu and H. Liu. Function-correcting codes with homogeneous distance. Finite Fields and Their Applications, 112, 2026.
[5] H. Liu, H. Liu, and S. Mesnager. Function-correcting RT codes: A coding framework for parallel channels. arXiv:2607.18908, 2026.
[6] H. Ly and E. Soljanin. On the redundancy of function-correcting codes over finite fields. 13th International Symposium on Topics in Coding (ISTC), 2025.
[7] R. Premlal and B. S. Rajan. On function-correcting codes. IEEE Transactions on Information Theory, 71:5884–5897, 2025.
[8] C. Rajput, B. S. Rajan, R. Freij, and C. Hollanti. Function-correcting codes with data protection. IEEE Transactions on Information Theory, 72 (7):4860–4880, 2026.
[9] C. Rajput, B. S. Rajan, R. Freij-Hollanti, and C. Hollanti. Function-correcting codes for locally bounded functions. 2025 IEEE Information Theory Workshop (ITW), 2025.
[10] A. Singh, A. K. Singh, and E. Yaakobi. Function-correcting codes for b-symbol read channels. ArXiv, abs/2503.12894, 2025.
[11] G. K. Verma, A. Singh, and A. K. Singh. Function-correcting b-symbol codes for locally (λ,ρ,b)-functions. IEEE Transactions on Information Theory, 72(1):331–341, 2026.
[12] G. K. Verma and A. K. Singh. Function-correcting codes for linear and locally bounded functions over a finite chain ring. arXiv:2603.14471, 2026.
[13] G. K. Verma and A. K. Singh. On function-correcting codes in the Lee metric. Journal of Algebra, 712:776–803, 2027.
[14] A. D. Wyner and R. L. Graham. An upper bound on minimum distance for a k-ary code. Inf. Control., 13:46–52, 1968.
[15] Q. Xia, H. Liu, and B. Chen. Function-correcting codes for symbol-pair read channels. IEEE Transactions on Information Theory, 70:7807–7819, 2023.
[16] J. C. yaw Chiang and J. K. Wolf. On channels and codes for the Lee metric. Information and Control, 19:159–173, 1971.