{'fraction_non_alphanumeric': 0.05397070161912105, 'fraction_numerical': 0.010683996034805595, 'mean_word_length': 3.935716227235662, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 19, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Locally Repairable Codes with Unequal Locality Requirements

When a node in a distributed storage system fails, it needs to be promptly repaired to maintain system integrity. While typical erasure codes can provide a significant storage advantage over replication, they suffer from poor repair efficiency. Locally repairable codes (LRCs) tackle this issue by reducing the number of nodes participating in the repair process (locality), with the cost of reduced minimum distance. In this paper, we study the tradeoff between locality and minimum distance of LRCs with local codes that have an arbitrary distance requirement. Unlike existing methods where a common locality requirement is imposed on every node, we allow the locality requirements vary arbitrarily from node to node. Such a property can be an advantage for distributed storage systems with non-homogeneous characteristics. We present Singleton-type distance upper bounds and also provide an optimal code construction with respect to these bounds. In addition, the feasible rate region is characterized by a dimension upper bound that does not depend on the distance. In line with the literature, we first derive bounds based on the notion of locality profile, which refers to the symbol localities specified in a minimum sense. Since the notion of locality profile is less desirable than the locality requirement, which all conventional problem formulations are also based on, we provide locality requirement-based bounds by exhaustively comparing over the relevant locality profiles. Furthermore, and most importantly, we derive bounds with direct expressions in terms of the locality requirement.


A. Background
The fundamental advantage of storing data in a distributed manner is that the risk of failure can be localized, and a catastrophic loss at once of all the stored data can be avoided. Furthermore, reliability of the system can be improved by using erasure codes on the user data across different storage nodes in a distributed storage system (DSS). Although maximum distance separable (MDS) codes provide an optimal storage efficiency for a given amount of reliability, they suffer from poor efficiency during repair [1], which is the recovery procedure for failed nodes. Even if the number of failed storage nodes is below the erasure tolerance limit of the codes employed, some (or all) of the failed nodes may have to be promptly repaired to maintain system integrity. For a single node repair, while repetition codes only need access to another single node which is just a replica of the failed node, MDS codes are an opposite extreme in that the number of required helper nodes is as large as the dimension (number of information symbols) of the code. Locally repairable codes (LRCs) try to minimize locality, which is the number of nodes that are accessed during repair, for given code parameters such as length, dimension, and minimum distance. The tradeoff between locality and other parameters has been studied extensively since the discovery of the Singleton-type bound in [2].
A natural extension to the conventional locality is the (r, δ)-locality [3], [4], where more flexible repair options are provided by generalizing the constraint on the minimum distance of local codes to at least δ instead of 2 (single parity checks). Such flexibility is beneficial to modern large-scale DSSs where multiple node failures become more common. For example, in conventional optimal LRCs [2], [5], [6] with locality r, if another node included in the local repair group of a failed node simultaneously fails, repair from r nodes is no longer valid, and a large number of nodes have to be accessed to perform ordinary erasure correction. On the other hand, (r, δ)-LRCs can still perform repair from r nodes even if δ − 1 nodes in a local repair group simultaneously fail.
Recently, there has been interest in the case where locality is specified differently for different nodes [7]- [10].
Such situations may occur, for example, when the underlying storage network is not homogeneous. It would also be beneficial in the scenarios where hot data symbols require faster repair or reduced download latency [7]. In [7], [9], relevant Singleton-type bounds have been found and some optimal code constructions are also given, which shows the tightness of the bounds.

B. Contributions and Organization
In this paper, we study the tradeoff between locality and minimum distance for (r, δ)-LRCs, where the locality parameter r is not necessarily the same for each node. Our main contribution is different from previous work on unequal locality [7], [9] in two ways. First, we extend the results on conventional r-locality to (r, δ)-locality.
Specifically, our new Singleton-type bound based on the notion of locality profile (Theorem 2) includes the bound in [7] as a special case. Second, and more importantly, we present a bound (Theorem 5) whose expression is directly based on the locality requirement, making it more desirable than the straightforward bound (Theorem 3) obtained by maximizing over all locality profiles that comply with the specified locality requirement. Moreover, this bound is shown to be tight in the sense that non-trivial codes (Construction 1) that achieve the equality in the bound exist (Theorem 6). We also characterize the feasible rate region by an upper bound on the code dimension, which does not depend on the minimum distance (Theorem 1, 3, and 4).
The rest of this paper is organized as follows. In Section II, we review some important preliminaries. Section III describes the motivation of our work and provides formal definitions for both the locality profile and the locality requirement. Our Singleton-type bounds based on the locality profile and the locality requirement are respectively provided in Section IV and V, together with the corresponding dimension upper bounds. Section VI shows a code construction scheme that is optimal for the bounds in Section V. In Section VII, we provide some further results, including the optimality of the code construction in Section VI in terms of the bound in Section IV, and a further tightened bound based on the locality requirements with two unequal parameters under a special condition. Finally, the concluding remarks are drawn in Section VIII.

A. Notation
We use the following notation.

1) For an integer
4) For sets A and B, A ⊔ B denotes the disjoint union, i.e., A ∪ B with further implication that A ∩ B = ∅.

5) For a symbol index set T ⊂ [n]
of a code C of length n, C | T denotes the punctured code with support T , and G| T is the corresponding generator matrix. Furthermore, we define rank G (T ) = rank(G| T ).

6) For a symbol index set T ⊂ [n]
of a linear [n, k] code C constructed via polynomial evaluation on an extension field F q t , rank E (T ) denotes the rank of the evaluation points corresponding to C | T over the base field F q .

B. Minimum Distance
The minimum distance of linear codes is well known to be characterized by the following lemma [4, Lem. A.1], which is the basis of our minimum distance bounds.

Lemma 1. For a symbol index set
with equality if T is of largest cardinality.
As an immediate corollary to Lemma 1, we also get the following lemma, which is used when showing the optimal distance property of our code construction. C. (r, δ)-Locality 1 A linear [n, k, d] code C is said to have locality r (or r-locality) if every symbol of C can be recovered with a linear combination of at most r other symbols [2]. An equivalent description is that for each symbol index i ∈ [n], there exists a punctured code of C with support containing i, length of at most r + 1 and distance of at least 2. We call such codes r-LRCs. It has been shown in [2] that the minimum Hamming distance d of an [n, k, d] r-LRC is upper bounded by which reduces to the well-known Singleton bound if r ≥ k. Various optimal code constructions achieving the equality in the minimum distance bound have been reported in the literature [2], [5], [6], [12]- [17].
The notion of r-locality can be naturally extended to (r, δ)-locality [3] to address the situation with multiple (local) node failures.
If r is minimum, the ith symbol is said to be of (r, δ)-locality and we denote it by loc δ (i) = r. Furthermore, we and also denote C to be of (loc δ (C ), δ)-locality. 1 To prevent ambiguity, we make our notation and definitions slightly different from that in [3]. However, the expression of having locality (r, δ) in [3] can be verified to be equivalent to the condition loc δ (·) ≤ r in our notation, for both symbols and codes. In our paper, we use the expression of satisfying an (r, δ)-locality requirement to denote that condition.
For 2 ≤ δ ≤ d, loc δ (i) in Definition 1 can be shown to be well-defined. In particular, considering the process of repeatedly puncturing C at a symbol not indexed by i, each time the minimum distance decreases by at most 1 and ends up with 1. Therefore, we can always find a set S i such that d(C | Si ) = δ. Further choosing S i to be of minimum cardinality, we have loc δ (i) = |S i | − δ + 1.

Remark 2.
By applying the Singleton bound to C | Si in Definition 1, we get rank G (S i ) ≤ r.

D. r-LRC with Unequal Locality Profile
Conventionally, the locality of a code is characterized by a single parameter r, i.e., r-LRC. Although an [n, k] r-LRC 2 can have different loc 2 (i) for different i ∈ [n], as long as loc 2 (i) ≤ r, optimal codes generally require loc 2 (i) = r for every symbol due to the general tradeoff between locality and distance.
Inspired by the notion of unequal error protection, [7] considers linear codes where different subsets of symbols have different localities. This feature can be captured by the notion of locality profile. In particular, the locality profile of a linear [n, k, d] code C is defined as the vector r = (r 1 , . . . , r n ), where r i = loc 2 (i), i ∈ [n]. The locality profile can also be specified as another vector n = (n 1 , . . . , n r * ), where r * = max{r 1 , . . . , r n } and n j is the number of symbols such that loc(·) equals j, for j ∈ [r * ]. The minimum Hamming distance of C is shown to be upper bounded by where Furthermore, this bound is demonstrated to be tight by some optimal code constructions achieving the equality in the bound for some parameter regime.
The work in [9] has investigated the same problem, resulting in a bound with an expression similar to (2), where the difference comes mostly from notational difference. However, after aligning the notation, one can verify that (2) is tighter in general.

E. Gabidulin Codes
Our optimal code construction is an extension of the LRC construction based on Gabidulin codes [7], [13]. We thus give a brief introduction on Gabidulin codes, including some relevant properties.
Due to the vector space structure of extension fields, an element in F q t can be equivalently expressed as a vector of length t over the base field F q , i.e., F t q . Consequently, a vector v ∈ F n q t can be represented as a matrix V ∈ F t×n q where each column vector of the matrix V corresponds to the vector representation of an element in vector v. The rank of the vector v is defined as rank(v) = rank(V ). Furthermore, a metric called rank distance can be defined It is easy to see that the rank distance is upper bounded by the Hamming distance, i.e., Therefore the minimum rank distance of a linear [n, k] q t code is also upper bounded by the Singleton bound, and the codes achieving this bound are called maximum rank distance (MRD) codes. Clearly, MRD codes also have the MDS property.
Gabidulin codes [21] are an important class of codes with the MRD property. Similar to Reed-Solomon and other algebraic codes, Gabidulin codes are constructed via polynomial evaluation. However, both the data polynomials and the evaluation points are different. In particular, an [n, k, d] q t Gabidulin code (t ≥ n) is constructed by encoding a message vector a = (a 1 , . . . , a k ) ∈ F k q t according to the following two steps.
The data polynomial f (x) belongs to a special class of polynomials called linearized polynomials [22]. The evaluation of a linearized polynomial over F q t is an F q -linear transformation. In other words, for any a, b ∈ F q and x, y ∈ F q t , the following holds.
The rank distance of any Gabidulin codeword c can be shown to meet the Singleton bound by noting that where (a) is due to the rank-nullity theorem and the fact that the nullity of f (·) is at most the q-degree of f (·), i.e., k − 1.
Although it is sufficient to claim Gabidulin codes to be MDS by their MRD property, a more insightful derivation can be obtained by showing the MDS property directly with the analysis of its erasure correction capability.
Specifically, the polynomial f (·), and therefore the underlying message vector a, can be recovered from evaluations on any k points {f (y 1 ), . . . , f (y k )} that are linearly independent (over F q ), i.e., rank({y 1 , . . . , y k }) = k. This argument is true since the use of the F q -linearity in (3) makes it possible to obtain evaluations at q k different points, from which the polynomial f (·) of degree q k−1 can be interpolated. Therefore, erasure correction is possible from arbitrary k symbols of the codeword.
More importantly, note that the evaluation points may differ from the original ones used in the codeword construction. This turns out to be the case for our optimal code construction, where we apply MDS encoding on chunks of a Gabidulin codeword to equip the code with the desired locality property. To analyze the possibility of erasure correction (or decodability) of an erasure pattern of the code, all we need to do is to figure out whether the remaining rank, which referes to the rank of the evaluation points corresponding to the remaining symbols of the erasure pattern, is at least k. Moreover, the term rank erasure will refer to the vanishing rank by symbol erasures. The following lemma, which is a special case of [23, Lem. 9], will be used several times in analyzing the distance of our optimal code construction.
III. (r, δ)-LRC WITH UNEQUAL LOCALITY Consider DSSs that have different (r, δ)-locality requirements (with fixed δ) for different nodes. In other words, the upper limit for loc δ (·) varies from symbol to symbol for the code employed in the DSS. Among the different locality requirements, let us denote the minimum locality requirement by r min . We can employ codes satisfying the (r min , δ)-locality requirement, i.e., (r min , δ)-LRCs. However, this clearly tends to be an over-design, and one may expect improved minimum distance by taking advantage of the looser locality requirements.
To be more specific, suppose for a linear [n, k, d] code and symbol index sets Clearly a code C 1 such that loc δ (C 1 ) ≤ r 1 satisfies this requirement and by optimal code constructions with respect to (1), we may achieve On the other hand, any code fulfilling the different locality requirements also clearly satisfies the (r 2 , δ)-locality requirement, and we therefore have, again by (1), Note that d 1 ≤ d 2 where equality does not hold in general. Now the question is as follows: can we construct codes achieving a distance larger than d 1 , and at the same time, do we have a distance bound tighter than d 2 ?
To provide an answer to the question, we first introduce the notion of locality profile and locality requirement for linear [n, k] codes. Note that some redundant parameters are further defined, which makes various expressions more compact.

Definition 2 (Locality profile). Given a linear
where r * = max{r 1 , . . . , r n }, the locality profile of C is defined as an ordered pair (n, δ) where n = (n 1 , . . . , n r * ) such that n j = |N j |. Furthermore, define Definition 3 (Locality requirement). The locality requirement is defined as an ordered pair (n, δ) where n = . Furthermore, as for the locality profile (Definition 2), parameters p j , q j and m j are implicitly defined for a locality requirement (n, δ).
In our study, a direct analysis of the distance characteristics of LRCs based on a given locality requirement appears to be infeasible due to its inherent ambiguity. In particular, a symbol satisfying the (r 1 , δ)-locality requirement also satisfies, by definition, the (r 2 , δ)-locality requirement. Note that to tighten the straightforward minimum distance upper bound given by d 2 , it becomes essential to treat symbols with different locality requirements separately. In general, a symbol identified as satisfying the (r 2 , δ)-locality requirement can participate in the local repair of other symbols satisfying the (r 1 , δ)-locality requirement, which means it also satisfies the (r 1 , δ)-locality requirement.
This fact makes it very difficult to separate symbols identified by the (r 2 , δ)-locality requirement from symbols with the (r 1 , δ)-locality requirement. To handle this issue, we first assume the knowledge of loc δ (·) for every symbol, i.e., the locality profile, and later proceed to the original problem formulation based on the locality requirement.
The key characteristic of the locality profile that makes the problem more tractable is given in the following remark.

Remark 3.
Suppose that the ith symbol is of (r, δ)-locality, i.e., loc δ (i) = r. Clearly, this symbol cannot participate in the repair process of the jth symbol of (r, δ)-locality such thatr < r, since we otherwise have a contradiction such that loc δ (i) ≤r < r. Therefore, the symbols indexed by S j (see Definition 1) are guaranteed not to be of (r, δ)-locality.
Another view of our approach is to first focus on codes that meet the locality requirement with equality. Therefore, an analysis of the minimum distance based on the locality profile not only makes the problem more tractable, but is also reasonable because larger locality tends to provide larger minimum distance. However, note that a more useful problem setting is based on the locality requirement, which also corresponds to the conventional problem formulations with equal locality requirements [2], [3]. While a given code has a unique locality profile, it satisfies (infinitely) many locality requirements, and more importantly, codes of different locality profiles can satisfy a given locality requirement. Furthermore, it is clear that there always exists a code satisfying a locality requirement, but this may not be the case for a given locality profile.

IV. UPPER BOUNDS BASED ON LOCALITY PROFILE
In this section, we provide a minimum distance upper bound for (r, δ)-LRCs based on their locality profile. The derivation starts by defining some rank-related auxiliary parameters and proceeds in two steps. First, a bound based on the auxiliary parameters is established, and the auxiliary parameters are subsequently eliminated in the bound expression by utilizing an upper bound on themselves. As a by-product, we also give a dimension upper bound which does not depend on the minimum distance.
Given Definition 2, the auxiliary parameters are defined as follows. Note that, these auxiliary parameters are always assumed to be implicitly defined whenever we specify a locality profile (n, δ).

Definition 4 (Auxiliary parameters)
. Given a locality profile (n, δ), define the following rank-related parameters, The following lemma gives a distance upper bound with the auxiliary parameters appearing in the expression.
The proof is built on the algorithmic technique originally proposed in [2], which has been widely used in the literature [4], [7], [9] with some modification.
Proof: By using Algorithm 1, we build a set T ⊂ [n] such that rank G (T ) ≤ k−1, and apply Lemma 2 to obtain the distance upper bound. In the algorithm, S i denotes the support of the punctured code by which loc δ (i) = j.

The condition in
Step 2 ensures that it is always possible to pick a suitable i in Step 3. The algorithm iterates until Algorithm 1 Used in the Proof of Lemma 5 and Lemma 6 since for the incremental rank in each iteration, we have We claim that To see why (5) holds, first note that in the context of the punctured code corresponding to S i , the symbols indexed by an arbitrary subset of S i with the size of δ − 1 are redundant since d(C | Si ) = δ. We have |Q l | − |Q l−1 | = |Q l \ Q l−1 | ≥ δ, since otherwise we must have rank G (Q l ) = rank G (Q l−1 ), due to the fact that Q l \ Q l−1 ⊂ S i . This is contradictory to the condition in Step 3. Now, out of the |Q l | − |Q l−1 | ≥ δ incremental symbols in the set Q l , at least δ − 1 symbols are redundant since they are already redundant in the context of S i ⊂ Q l . Therefore, Next, set j = ρ in the algorithm. By (4) and the definition of ρ, we have We conclude the proof by noting that the number of redundant symbols indexed by T is The next lemma gives a tight bound for the auxiliary parameter ξ with the original locality profile parameters (n, δ) appearing in the expression, again using Algorithm 1.
Again by (6), we have and therefore As a simple corollary to Lemma 6, we derive the following upper bound on the dimension of (r, δ)-LRCs based on their locality profile parameters.
Proof: First note that r is well defined due to Theorem 1, and we have r ≤ ρ since ρ j=1 k i ≥ ρ j=1 ξ i = k. If r = ρ, it is easy to verify that the theorem holds by applying Lemma 6 on Lemma 5.
where (a) is just Lemma 5, (b) is obtained by removing some non-negative subtrahends, and (c) is due to Lemma 6.

V. UPPER BOUNDS BASED ON LOCALITY REQUIREMENT
The bounds derived in the previous section require knowing the locality profile. In a practical scenario, a fixed known locality profile setting is quite unlikely since there is no reason to exclude the locality profiles with better locality properties, i.e., smaller loc δ (·) for some symbols, as long as the locality profile complies with the given locality requirement. Therefore, returning to the original problem formulation, we give two types of upper bounds based on the locality requirement.
First we establish upper bounds on the dimension and minimum distance of LRCs by making an exhaustive search through all locality profiles satisfying the given locality requirement. The lemma below characterizes the locality profile of a linear code that satisfy a given locality requirement. The resulting dimension and distance upper bounds are then given in a theorem following the lemma.
Note that, hereafter, we use a hat notation for locality profile-related parameters, such asn,n j ,p j ,q j ,m j ,k j , andr, to distinguish them from their locality requirement counterparts.

Lemma 7. A code satisfies the locality requirement (n, δ) if and only if its locality profile (n, δ) is such that
for all j ∈ [r * ].
Proof: See Appendix B.

Theorem 3 (Upper bounds for codes with unequal locality requirement based on the locality profile
Proof: By Lemma 7, Definition 2, and Theorem 1 and 2, the theorem is self-evident.
Instead of the upper bounds in Theorem 3, it is desirable to have upper bounds in closed form, which will be given in Theorem 4 and 5. Although these bounds are, by construction, looser than Theorem 3 in general, it turns out that they coincide for some important parameter regimes.
Below, we first give a simple lemma followed by the two theorems stating the upper bounds. Moreover, the technique shown in its proof will also be utilized several times in the proof of the theorem stating the minimum distance upper bound.

Lemma 8.
For the locality profile (n, δ) of a code satisfying the locality requirement (n, δ), we have for all j ∈ [r * ].
Proof: By repeatedly using Lemma 7, we have Proof: Let the locality profile of the code be (n, δ). We have where (a) is Theorem 1, (b) is from Definition 2, and (c) is due to Lemma 8.
Note that Theorem 4 characterizes the feasible rate region for LRCs with an arbitrary locality requirement and degenerates to the rate bound in [24] (see also [14]) if all symbol locality requirements are equal.
Proof: Let the locality profile of the code be (n, δ). By Theorem 2, we have For j ∈ [r * ], letφ Note thatk and alson The proof will proceed with the corresponding cases.
For term B, we claim that where (a) is obtained by removing some non-negative summands from (17). To see why (b) is true, first note that where (a), (b), and (c) follows from observations identical to those in (21), respectively.

Remark 4.
Note that for r ≤ r ′ ≤ r * , Therefore, we also have which is somewhat looser than Theorem 5, but does not require the computation of r. A similar observation has been made implicitly in [9].

Corollary 1. For the upper bounds on codes satisfying a given locality requirement (n, δ) (Theorem 3, 4, and 5),
we have Proof: From the proofs of Theorem 4 and 5, we have for an arbitrary locality profile (n, δ) that satisfies the locality requirement (n, δ). In other words, (n, δ) ∈ P, where P is defined in Theorem 3. Therefore, the corollary simply follows from Theorem 3.

Corollary 2. For the locality requirement
Proof: Note that wih the condition of j + δ − 1 | n j , which results in m j = ⌈m j ⌉ = ⌊m j ⌋ and k j = n j − m j (δ − 1) = m j j. The equality between d prf UB (n, δ) and d req UB (n, δ) can be shown as where (a) is due to Theorem 4.

VI. OPTIMAL CONSTRUCTION
We give an optimal code construction achieving the equality for the bound in Theorem 5, and also the bound in Theorem 3. In other words, the code is built in the parameter regime where the two distance bounds coincide, as shown in Corollary 2. The construction closely follows the Gabidulin-based LRC construction which originates from [13], and is also used in [7].
Construction 1 (Gabidulin-based LRC with unequal locality). For integers m j , j ∈ [r * ], let n j = m j (j + δ − 1) and n = r * j=1 n j . Let us also constrain the parameters to satisfy the condition r * ≤ k ≤ n Gab r * j=1 m j j ≤ t. Linear [n, k] q t codes satisfying the locality requirement (n, δ) are constructed according to the following steps.
1) Precode k information symbols using a Gabidulin code of length n Gab . 3) Encode each local group of size j using an [j + δ − 1, j, δ] q MDS code.

2) Partition the Gabidulin codeword symbols into
Note that according to Lemma 4, every symbol of the code by Construction 1 also corresponds to an evaluation of the polynomial used in the Gabidulin precoding.

Remark 5. Clearly, the subspace generated by the evaluation points of the code of Construction 1 is a direct sum
of each subspace generated by the evaluation points corresponding to a single local group. Therefore, rank E (T ) of some set T ⊂ [n] is the sum of each rank E (·) computed separately on the points being in the same local group.
To analyze the minimum distance of the code by Construction 1, we require a lemma that can be understood quite intuitively. The optimality of the code construction is claimed in the theorem following the lemma. Proof: It is obvious by construction that a Gabidulin-based LRC C satisfies the locality requirement (n, δ). In particular, by choosing S i as the index set of symbols that belongs to the same MDS local code, we have i ∈ S i and S i = j + δ − 1. Furthermore, d(C | Si ) ≥ δ since C | Si is a subcode of a [j + δ − 1, j, δ] q MDS code.
To analyze the minimum distance, we give a lower bound on the minimum distance of the code, which equals the upper bound of Theorem 5. In particular, we derive a lower bound by using Lemma 3 as well as Remark 1.
Note that erasure correction is possible from an arbitrary set with the cardinality of where r is given by Theorem 5.
Let integers P and Q such that and 0 ≤ Q ≤ r − 1. Consider an arbitrary symbol index set T ⊂ [n] of cardinality According to Lemma 9, the number of rank erasures is maximal when T corresponds to all symbols in every local group of size (before MDS encoding) at most r − 1 and P local groups of size r, and some Q + 1 symbols in an additional local group of size r. Such a distribution for T is valid since where (a) comes from the definition of r if r < r * , or from the parameter condition in the construction if r = r * .
By Lemma 4 and Remark 5, we have rank E (T ) ≥ r−1 j=1 m j j + P r + Q + 1 = k, and erasure correction is therefore possible from arbitrary T .
The proof is complete by noting that substituting (24) into (25) yields which is equal to τ .

A. Optimality in terms of the Profile-based Bound
In this subsection, we show that Construction 1 is also optimal in terms of the distance upper bound based on the locality profile (Theorem 2). Clearly, as mentioned in the proof of Corollary 2, the minimum distance of codes by Construction 1 that satisfy the locality requirement (n, δ) achieve the equality for the bound in Theorem 2, i.e., d = d req UB (n, δ) = d prf UB (n, δ). To claim optimality, we have to show that the locality profile of the constructed code is the same as the locality requirement (n, δ), which is given as a proposition after the following lemma. Proof: For j ∈ [r * ], let N j denote the symbol index set of the Gabidulin-based LRC C corresponding to the local groups of size (before MDS encoding) j. We have to show that loc δ (i) = j for every i ∈ N j . Since it is obvious by construction that a Gabidulin-based LRC C satisfies the locality requirement loc δ (i) ≤ j (see the proof of Theorem 6), we further show that assuming loc δ (i) < j for i ∈ N j results in a contradiction, thereby completing the proof.
Suppose that there exists some i ∈ N j with loc δ (i) = j ′ such that j ′ < j. This implies the existence of a set S ′ i such that i ∈ S ′ i and with d(C | S ′ i ) = δ. We claim that for an arbitrary set T ⊂ S ′ i such that |T | ≥ |S ′ i | − (δ − 1), it must be true that First, note that T is an erasure correctable set for C | S ′ i , hence rank G (T ) = dim(C | S ′ i ) = rank G (S ′ i ) (see Remark 1). From the Singleton bound, we have Therefore we can apply Lemma 10 and the claim (26) follows. The remaining part of the proof proceeds with two cases.
For the first case, assume that 1 ≤ |S ′ i ∩ S i | ≤ δ − 1 and let T = S ′ i \ S i . Since we have i ∈ S ′ i and i / ∈ T while which is a contradiction to to (26). Note that (a) is due to Remark 5.
For the second case where δ ≤ |S ′ i ∩ S i | < j + δ − 1, let Q and Q ′ be arbitrary sets such that Q ⊂ S ′ i ∩ S i with |Q| = δ − 1, and Q ′ Q. By letting T = S ′ i \ Q, we get where (a) is due to Remark 5,and (b) follows from Lemma 4 with the observation that ( Therefore, we have which is again a contradiction to (26).

B. Two Unequal Locality Requirement Case
We show that the closed form minimum distance upper bound based on the locality requirement (Theorem 5) can be tightened in the case where there are only two different locality requirements and a special condition holds.
In particular, consider a locality requirement (n, δ) such that n j1 = 0 for some j 1 ∈ [r * − 1] and n j = 0 for all j ∈ [r * −1]\j 1 . Note that by definition, we have n r * = 0. Letting j 2 = r * , we use the notation ((n j1 , j 1 ), (n j2 , j 2 ), δ) for such a locality requirement. The tightened bound is given as a proposition after the following corollary restating Theorem 5 in a relevant form.

Proposition 2.
The minimum Hamming distance of linear [n, k, d] codes satisfying the locality requirement ((n j1 , j 1 ), (n j2 , j 2 ), δ), 2) if ⌈m j1 ⌉j 1 < k, Proof: To derive a bound tighter than Corollary 3, we first make some auxiliary definitions. Specifically, for andň ji = |Ň ji |, i = 1, 2. Furthermore,p j1 ,q j1 andm j1 are defined such as in Definition 2 and 3. By definition, we haveň j1 ≥ n j1 and alsom Note that the setsŇ j1 andŇ j2 share an important property with those sets corresponding to the locality profile, such that their actual symbol localities are disjoint, i.e., loc δ (i 1 ) ≤ j 1 and j 1 ≤ loc δ (i 2 ) ≤ j 2 for i 1 ∈Ň j1 and i 2 ∈Ň j2 . Therefore, by repeating the steps in the proof of Lemma 5 and 6, and Theorem 2 onŇ j1 andŇ j2 , one can verify that where Since the bound (27), being identical with (31a), is tighter than (28) (see Remark 4), the claim is valid ifǩ j1 ≥ k, and we only have to check for the case whereǩ j1 < k.
where (a) is due to (29) and the conditions imposed onq j1 and q j1 .
If 0 ≤q j1 ≤ δ − 2, we havě Substituting into (31b) together with (32), we get where (a) holds since for integers a, b such that a ≥ b, we have and it is true that ⌊m j1 ⌋ ≥ ⌈m j1 ⌉ for the same reason as in (33). Now, (28) is immediate by (30).
Again, substituting into (31b) together with (32), we get which concludes the proof after being substituted into (30).
It is easy to verify that Proposition 2 implies Corollary 3, hence a tighter bound. Note that in the parameter regime of our optimal code construction (Construction 1), Proposition 2 coincides with both Corollary 3 and the minimum distance of the optimal code construction.
For the special case of δ = 2, the condition of Proposition 2, such that q j1 = 0 or δ − 1 ≤ q j1 ≤ j 1 + δ − 2, is always true and therefore can be omitted. In this case, Proposition 2 becomes identical to [9,Thm. 6]. 3 However, note that the proof of [9, Thm. 6] makes an implicit assumption that the given parameters n j1 and n j2 are not locality requirements, but in fact the profile-like parametersň j1 andň j2 used in the proof of Proposition 2. On the contrary, Proposition 2 is simply based on the locality requirement.

VIII. CONCLUSION
In this work, we have investigated the minimum distance characteristics of (r, δ)-LRCs with unequal locality.
The problem has been analyzed in both the locality profile and the locality requirement scenario. Singleton-type minimum distance bounds have been presented and their tightness has been shown by an optimal construction achieving the equality in the bounds. Feasible rate regions have also been characterized by the dimension upper bounds that do not depend on the minimum distance.
APPENDIX A

Algorithm 3 Used in the
∆R j ⊂ R ∩ G j , and |∆R i | = |∆R j | = min(|G i \ R|, |R ∩ G j |) 3: Conversely, starting from j = 1, construct the sets N j , j ∈ [r * ], by choosing n j symbols with loc δ (·) being at most j, i.e., n j symbols from the setsN j ′ such that j ′ ≤ j. This is possible since the number of such symbols still left is APPENDIX C PROOF OF LEMMA 9 Proof: An erasure pattern can be represented by an index set R corresponding to the remaining symbols.
Any erasure pattern can be transformed into the claimed worst case pattern by invoking Algorithm 3. In Step 3 of the algorithm, as many symbols as possible in the local group G j are replaced with symbols in the local group G i , where |G i | ≤ |G j |. We claim that that this replacement always yields an erasure pattern with a non-increasing remaining rank, i.e., a non-decreasing number of rank erasures, making the claimed pattern be the worst indeed.
First, observe that We have where (a) is due to Remark 5. Similarly, for Case 3: |R i | > rank E (G i ) and |R j | ≤ rank E (G j ).

Lemma 4 gives
rank E (R i ) + rank E (R j ) = rank E (G i ) + |R j |, and it is immediate from (38) that hence (37).
Case 4: |R i | > rank E (G i ) and |R j | > rank E (G j ).
It is easy to see that by Lemma 4, and also that from (38), resulting in (37).

APPENDIX D PROOF OF LEMMA 10
Proof: Let us denote the evaluation points corresponding to T as {y 1 , . . . , y |T | }, where y i ∈ F t q (or equivalently y i ∈ F q t ), i ∈ [|T |]. Without loss of generality, we assume that the set {y 1 , . . . , y rankE(T ) } is a basis for the vector space span({y 1 , . . . , y |T | }). Then, for i = rank E (T ) + 1, . . . , |T |, we have where λ ij ∈ F q . The generator submatrix corresponding to the symbols indexed by T can be written as Furthermore, for i = rank E (T ) + 1, . . . , |T |, we can write and therefore rank G (T ) = rank G (T ′ ) = rank(G| T ′ ), where T ′ is the symbol index set corresponds to the evaluation points {y 1 , . . . , y rankE(T ) }, i.e., G| T ′ = (g T 1 . . . g T rankE(T ) ). Note that G| T ′ is a Moore matrix [22], [25] of size k × rank E (T ) with all the elements in the first row being linearly independent over F q . Therefore, an arbitrary square submatrix of G| T ′ is nonsingular, and we get rank G (T ) = min(rank E (T ), k), from which, one can easily verify that the claim follows.