Relaxing the injectivity constraint on arithmetic and harmonious labelings

Several of the most studied graph labelings are injective functions, this constraint pre-cludes some graphs from admitting such labelings; a well-known example is given by the family of trees that cannot be harmoniously labeled. In order to study the existence of these labelings for certain graphs, the injectivity constraint is often dropped. In this work we eliminate this condition for two di ff erent, but related, additive vertex labelings such as the harmonious and arithmetic labelings. The new labelings are called semi harmonious and semi arithmetic. We consider some families of graphs that do not admit the injective versions of these labelings, among the graphs considered here we have cycles and other cycle-related graphs, including the analysis of some operations like the Cartesian product and the vertex or edge amalgamation; in addition, we prove that all trees admit a semi harmonious labeling. Something similar is done with the concept of arithmetic labeling, studying finite unions of semi arithmetic graphs together with some general results.


Introduction
In this work we follow the notation and terminology used in [6] and [8]. The set of integers is denoted by Z while the set of nonnegative integers is denoted by N and the additive group of integers (mod n) by Z n . The arithmetic sequence of length q with first element a and difference d is denoted by [a, a + (q − 1)d] d , except when d = 1, where we do not use the subindex. By a (p, q)-graph we understand a graph with p vertices and q edges, i.e., a graph of order p and size q.
An additive vertex labeling of a (p, q)-graph G is a function f : V(G) → S, where S is a set of nonnegative integers, that induces for each edge uv of G a weight defined as f (u) + f (v). In this work, the word labeling is used in the context of an additive vertex labeling. In [10], Graham and Sloane introduced the concept of harmonious labeling to study modular versions of additive bases problems stemming from error-correcting codes; these labelings are one of the most study additive vertex labelings. Let G be a (p, q)-graph such that q ≥ p and f be a labeling of G, we say that f and G are harmonious if f is an injective function with codomain Z q , and the set of induced weights is Z q , after each weight has been reduced (mod q). Let w 1 , w 2 , . . . , w q be consecutive integers, then {w 1 , w 2 , . . . , w q } ≡ Z q modulo q. Therefore, assuming that f : V(G) → Z q is injective and the induced weights form a set of q consecutive integers, then f is harmonious. Trees constitute an important family of graphs that fail the condition q ≥ p. This type of graph was also considered in [10]; there, Graham and Sloane dropped the injectivity condition allowing one label to be used twice. In this work we allow multiple repetitions of multiple labels. The following result was proved in [10], we included it here because it is used in some of the results in Section 2. Theorem 1.1. If G is a harmonious graph of even size q where the degree of every vertex is divisible by 2 k , for some positive integer k, then q is divisible by 2 k+1 .
The following result, due to Youssef [15], proves the existence of a harmonious labeling for graphs obtained with multiple copies of the same harmonious graph. By nG we understand the disjoint union of n copies of a graph G and by G (n) , the one-point union of n copies of G. Theorem 1.2. If G is a harmonious graph, then both nG and G (n) are harmonious provided that n is a positive odd integer.
Some variations of the concept of harmonious labeling have been studied by several authors. Lee et al. [12] generalized the concept of harmonious graph in the following terms: a graph G with q edges is called felicitous if there exists an injective function f : V(G) → Z q+1 such that the set of induced weights is Z q , when each weight is reduced (mod q). Among other results, they proved that the cycle C n is felicitous if and only if n 2(mod 4). Chang et al. [5] said that a graph G with q edges is strongly k-harmonious if there exists an injective function f : V(G) → Z q such that the set of induced weights is [k, k + q − 1]. A little less restrictive is the concept of (k, d)-arithmetic graph introduced by Acharya and Hegde [1]; a graph G with q edges is called (k, d)-arithmetic if there exists an injective function f : V(G) → N such that the set of induced weights is [k, k + (q − 1)d] d for two positive integers k and d. Lourdsamy and Seenivasan [13] said that a graph G with q edges is vertex equitable if there exists a function f : V(G) → [0, ⌈ q 2 ⌉] such that the set of induced weights is [1, q] and for every pair of elements i and j in the range of f , the number of vertices labeled i and the number of vertices labeled j differ by at most one unit. They characterized the cycles that are vertex equitable.
In this work we generalize the concepts of harmonious and (k, d)-arithmetic graphs by relaxing the injectivity constraint of the corresponding labeling. We refer to the new versions of these labelings as semi harmonious and semi (k, d)-arithmetic. In Section 2 we show the existence of a semi harmonious labeling for several types of cycle-related graphs; we characterize the cycles that admit such a labeling; using semi harmonious cycles we study the finite union, the one-point union, the edge amalgamation, and the Cartesian product with the path P m . We conclude that section proving that the complete bipartite graph is semi harmonious as well. We continue in Section 3 proving that all trees are semi harmonious. In Section 4 we study semi (k, d)-arithmetic labelings, we prove that if G is semi (k, d)-arithmetic, then it is also semi (rk, rd)-arithmetic for every r ≥ 1 and that nG is both semi (k, d)-arithmetic and semi (k + d, d)-arithmetic; we also study the complete bipartite graph proving that any graph which components are complete bipartite graphs is semi (k, d)-arithmetic for any ordered pair (k, d) of positive integers; in the last result of this section we prove that if G i is a semi (k i , d)-arithmetic graph of size q i for each i = 1, 2, then G 1 ∪ G 2 is semi (k 1 , d)-arithmetic.

Semi Harmonious Labelings
A (p, q)-graph G is said to be semi harmonious if there exists a labeling f : Every labeling f that satisfies this definition is called semi harmonious.
Suppose that f is a semi harmonious labeling of a (p, q)-graph G. Let c be a positive constant, we said that the labeling g of G is a shifting of f in c units if g(u) = f (u) + c, for every u ∈ V(G). It is important to note that if uv is the edge of G of weight m, then g(u) + g(v) = m + 2c; in other terms, the set of edge labels induced by g consists of q consecutive integers.
Note that the necessary condition for the existence of a harmonious labeling for a graph of even size, given in Theorem 1.1, is still valid for semi harmonious labelings. In addition we have that for every n ≥ 3, the complete graph K n is semi harmonious if and only if K n is harmonious. While the cycle C n is harmonious if and only if n is odd, we can prove that the cycle C n is semi harmonious except when n ≡ 2(mod 4). The structure of the proof is similar to the proofs in [7] and [13] for the corresponding labelings. Proof. The necessity follows from Theorem 1.1. To prove the sufficiency, we analyze two cases, in either case we assume that V(G) = {u 1 , u 2 , . . . , u n } and E(G) = {u 1 u 2 , u 2 u 3 , . . . , u n u 1 }. Case 1. When n ≡ 0 or 3(mod 4). Consider the labeling f : V(G) → Z n defined for every vertex u i of C n as follows: www.ejgta.org Semi arithmetic and harmonious labelings | C. Barrientos Observe that the range of f is 0, n 2 when n is even and 0, n+1 2 when n is odd. Now we want to determine the weight of the edge u i u i+1 , that is, Thus, we have n 2 edges which weights are n 2 + 1, n 2 + 2, . . . , n. Since the edge v n v 1 has weight f (u n ) + f (u 1 ) = n 2 + 0 = n 2 , the set of weights induced by f is {1, 2, . . . , n}. Consequently, f is semi harmonious.
Case 2. When n ≡ 1(mod 4). In this case the labeling f is defined as: Thus, we get n+1 2 edges which weights are 0, 1, . . . , n−1 2 . Assuming that n+3 = i when i is odd. Thus, we get n−3 2 edges which weights are n+3 2 , n+5 2 , . . . , n − 1. The edge u n u 1 has weight n+1 2 + 0 = n+1 2 . Hence, the set of edge labels is Z n . Therefore, f is a semi harmonious labeling of C n . □ We show in Figure 1 three examples of the semi harmonious labeling of C n described within the proof of Theorem 2.1 corresponding to the congruences of n (mod 4).

Theorem 2.2.
Suppose that for each i ∈ {1, 2, . . . , s}, the cycle C n i is semi harmonious. For each k ∈ {0, 1, 3}, we define the super set S k = {C n i : n i ≡ k(mod 4)}, where If |S 3 | − |S 1 | is either 0 or 1, then the 2-regular graph G = ∪ s i=1 C n i is semi harmonious. Proof. If G is connected, then G is semi harmonious as was proven in Theorem 2.1. Assume that G is disconnected; we arrange the components of G in such a way that for each 1 ≤ j ≤ r, n j ≡ 0(mod 4), and for each r + 1 ≤ j < s, whenever n j ≡ 3(mod 4) then n j+1 ≡ 1(mod 4). Thus, if |S 3 | = |S 1 |, then the size of G is divisible by 4 and when |S 3 | = |S 1 | + 1, the size of G is congruent to 3(mod 4) and n s ≡ 3(mod 4). Each component of G is initially labeled using the corresponding semi harmonious labeling in Theorem 2.1. Most of these initial labelings will be shifted; thus, the shifted labeling will be the final labeling of that component. Suppose that 1 ≤ j ≤ r; when j = 1, the final labeling of C n 1 is its initial labeling; for j > 1, the final labeling of C n j is obtained by shifting its initial labeling 1 2 j−1 i=1 n i units. Since n j ≡ 0(mod 4) for each 1 ≤ j ≤ r, the initial labeling of C n j induces the weights 1, 2, . . . , n j ; therefore, its final labeling induces the weights 1 + Suppose now that j > r; the final labeling of C n j is obtained in essentially the same way, but the shifting applied to the initial labeling of C n j depends of the parity of j−1 i=1 n i . We start with j = r + 1, since r i=1 n i is an even number and the initial labeling of C n r+1 induces the weights 1, 2, . . . , n r+1 , where n r+1 is odd, shifting it 1 2 r i=1 n i units, induces the weights 1, 2, . . . , r+1 i=1 n i on the edges of ∪ r+1 i=1 C n i , but now r+1 i=1 n i is odd, however the initial labeling of C n r+2 induces the weights 0, 1, . . . , n r+2 − 1; consequently, if it is shifted 1 2 1 + r+1 i=1 n i units, the induced weights on the edges of ∪ r+2 i=1 C n i are 1, 2, . . . , r+2 i=1 n i , where r+2 i=1 n i is an even number. We continue with this process until each component has its final labeling. The process guarantees that the induced weights on the edges of G are 1, 2, . . . , s i=1 n i . In other terms, the final labeling of G is semi harmonious. □ In Figure 2 we show an example of this labeling where G = 3C 4 ∪ C 8 ∪ C 7 ∪ C 5 .
If F and G are connected graphs, a one-point union of them is any of the graphs obtained by amalgamating a vertex of F with a vertex of G; when F and G are vertex transitive, the outcome of the one-point union is unique. An immediate consequence of Theorem 2.1 is that the one-point union of C m with C n is semi harmonious when both cycles are semi harmonious and m + n 2(mod 4). We prove this claim in the following corollary. Corollary 2.1. Let C m and C n be semi harmonious. If m + n 2(mod 4), then the one-point union of C m with C n is a semi harmonious graph.
Proof. Suppose that the cycles C m and C n are semi harmonious and that m + n 2(mod 4). We assume that both cycles are labeled using the function f described in Theorem 2.1. We The labeling of C n given in Theorem 2.1 can be also used to produce a semi harmonious labeling of a subfamily of outerplanar graphs. This subfamily is obtained via edge amalgamation of two cycles, say C m and C n , where both m and n are odd or m is odd and n ≡ 0(mod 4). The edge amalgamation of C m and C n is designated with the symbol C m C n . In order to present a broader spectrum of semi harmonious graphs that can be built with the labelings in Theorem 2.1, we need to introduce another semi harmonious labeling for the case where m ≡ 1(mod 4). We present this labeling in the following lemma; since the proof is basically the same that the proof of Theorem 2.1 we omit some details but include the most significant steps. Proof. Consider the following labeling of the vertices of C m : The range of The edge amalgamation C m C n is a semi harmonious graph when any of the following conditions holds: (1) m ≡ 3(mod 4) and n ≡ 0(mod 4) or n ≡ 3(mod 4), (2) m ≡ 1(mod 4) and n ≡ 0(mod 4) or n ≡ 1(mod 4).
Proof. Suppose that m ≡ 3(mod 4) and n ≡ 0(mod 4) or n ≡ 3(mod 4). We use on both cycles the labeling described in Theorem 2.1, but shifting m−1 2 units the labeling of C n ; in this way both cycles have an edge with end-vertices labeled m−1 2 and m+1 2 . The labels on C m are in the range 0, . The vertices u 1 and u 2 of C m are labeled n 2 , this is also the label on the vertices n n−1 and u n of C n . Thus, both cycles have an edge of weight n which end-vertices are labeled n 2 . The amalgamation of these edges produces C m C n with a semi harmonious labeling. □ In the next result we work with the Cartesian product of any of the semi harmonious cycles and a path, proving that C n × P 2 is semi harmonious except when n ≡ 2(mod 4).

Lemma 2.2.
If C n is semi harmonious, then the Cartesian product of C n and P 2 is a semi harmonious graph.
Proof. When n ≡ 0, 3(mod 4), we use on C n the labeling described in Theorem 2.1; when n ≡ 1(mod 4), we use on C n the labeling described in Lemma 2.1. Since C n × P 2 contains two copies of C n , we label both copies with its corresponding semi harmonious labeling and shift the labels on the second copy n units. When n ≡ 0, 3(mod 4), the labels on the first copy of C n are in 0, has weight i−1 2 + i+1 2 + n = n + i; if i is even, this edge has weight i 2 + i+1−1 2 + n = n + i. Thus, we have n−2 2 edges whose weights are n + 1, n + 2, . . . , n + n−2 2 = 3n−2 2 . The edge u 1 n u 2 1 has weight n + n 2 = 3n 2 . Suppose now that n 2 ≤ i ≤ n − 1; if i is odd, then the edge u 1 i u 2 i+1 has weight i+1 2 + i+1 2 + n = n + i + 1; if i is even, this edge has weight i 2 + i+1+1 2 + n = n + i + 1. Thus, we have n 2 edges which weights are 3n 2 + 1, 3n 2 + 2, . . . , 2n. Therefore, the weights of the edges of C n × P 2 are the integers in [1, 3n]; i.e., this graph is semi harmonious when n ≡ 0(mod 4).
Case 3. When n ≡ 1(mod 4). Suppose that 1 ≤ i ≤ n+1 2 ; if i is odd, then the edge u 1 i u 2 i+1 has weight i − 1 + i + 1 − 2 + n = n + 2i − 2; if i is even, this edge has weight i 2 + i + 1 − 1 + n = n + 2i − 2. Thus, we have n+1 2 edges which weights are n, n + 2, . . . , 2n − 1. Suppose now that n+3 2 ≤ i ≤ n the edge u 1 i u 2 i+1 has weight 3n − 2i + 1. Thus, we have n−1 2 edges whose weights are n + 1, n + 3, . . . , 2n − 2. Therefore, the weights of the edges of C n × P 2 are the integers in [0, 3n − 1]; which implies that this graph is semi harmonious when n ≡ 1(mod 4). □ With this result we are ready to prove that C n × P m is semi harmonious for each m ≥ 1 and every n 2(mod 4). In order to simplify the proof of this result we must observe first that Lemma 2.2 is still valid if the vertex u 1 i is connected with u 2 i−1 , where the difference i − 1 is taken (mod n). Theorem 2.4. If C n is semi harmonious, then the Cartesian product of C n and P m is a semi harmonious graph for every m ≥ 1.
Proof. The cases where m = 1, 2 where considered in Theorem 2.1 or Lemma 2.1, and Lemma 2.2, respectively; so, we are assuming that m ≥ 3. Let R 1 , R 2 , . . . , R m be the copies of C n in C n × P m . Each of these copies is initially labeled following the criteria described in Lemma 2.2. For i ≥ 2, the labeling on R i is shifted n(i − 1) units. Thus, the labels on R j and R j+1 are n units apart as in Lemma 2.2. We proceed to connect R j and R j+1 in the following form: if j is odd the vertex u j i of R j is connected with the vertex u j+1 i+1 of R j+1 , if j is even the vertex u j i of R j is connected with the vertex u j+1 i−1 of R j+1 , where the addition i + 1 and the difference i − 1 are taken (mod n). By Lemma 2.2 we know that the edges connecting R j and R j+1 have weights with the suitable values to complement the weights on the copies of C n , therefore, C n × P m is a semi harmonious graph. □ In Figure 3 we show an example of this semi harmonious labeling for the case C 9 × P 3 . Now we turn our attention to the complete bipartite graph K m,n . Let A and B be the stable sets of K m,n , Graham and Sloane [10] proved that this graph is harmonious if and only if at least one of the stable sets is a singleton. In the next result we show that K m,n is semi harmonious for all values of m and n. But first, we note that if f is semi harmonious labeling of K m,n , then f restricted to A or B must be injective, otherwise, we obtain at least two edges with the same weight. This observation can be extended to any complete multipartite graph. Furthermore, for the same reason, i.e., duplication of weights, there are no two labels used on both stable sets or in any two stable sets of a multipartite graph. , and that f restricted to either A or B is an injective function. For a fixed value of j, the weights of the edges u i v j form the interval W j = [m( j − 1) + 1, mj]. Since maxW j−1 = m( j − 1) < minW j = m(j − 1) + 1 and ∪ n j=1 W j = [1, mn], we have that f is indeed a semi harmonious labeling of K m,n . □

All Trees are Semi Harmonious
In this section we prove that all trees are semi harmonious. This result is a consequence of other known results in the area of difference vertex labelings, these labelings are out of the scope of this work and are not discussed here. In order to keep the result self-contained, we describe the labeling of a tree without using these existing results. Proof. Suppose that T is a tree of size q with stable sets A and B such that |A| = a and |B| = b. When T is represented as a rooted tree, with root v 0 1 ∈ A, its vertices are distributed in h + 1 levels; we denote these levels by L 0 , L 1 , . . . , L h , being the root the only vertex on ( We claim that f is a semi harmonious labeling of T. In order to prove this claim, we just need to show that the set of induced weights is {a, a + 1, . . . , a + q − 1}, i.e., a set of q consecutive integers.

Condition (3) tells us that for every 0
Note that condition (4)  and v i j+1 have the same label. As a conclusion of (3), (4), and (5) we get that the sequence formed by the weights of the edges connecting the vertices of L i−1 with the vertices of L i is an arithmetic sequence of difference 1. Condition (6) says that the largest weight on an edge between vertices of L i−2 and L i−1 is exactly one unit less than the smallest weight of an edge between vertices of L i−1 and L i . Consequently, the weights induced on the edges of T form a set of exactly q consecutive integers. Since f (v 0 1 ) = 0 and f (v 1 1 ) = a, the smallest of these weights is a. □ This labeling is a modification of the labeling used in [3] to prove that every tree of size q is a spanning tree of an α-graph of size q + ϵ(T), where ϵ(T) is the excess of T (this parameter was originally introduced in [2], but its analysis is out of the scope of this work). In [11] Jungreis and Reid presented a method to transform an α-labeling into a sequential labeling, which can be transformed into a harmonious labeling. The semi harmonious labeling of T is obtained combining the results in [3] and [11].
In Figure 4 we show the semi harmonious labeling obtained with the procedure described in Theorem 3.1 for a tree of size q = 31 with stable sets of cardinality a = b = 16.

Semi Arithmetic Graphs
Let k, d be a pair of positive integers, a (p, q)-graph G is said to be semi (k, d)-arithmetic if there exists a labeling f : V(G) → N such that the induced weights are k, k+d, k+2d, . . . , k+ (q − 1)d, i.e., an arithmetic sequence with first element k and difference d. As before, the labeling f is called semi (k, d)-arithmetic.
Note that all the semi harmonious labelings discussed in the previous section can be seen as semi (k, d)-arithmetic labelings where k = 0 and d = 1.
Let G be a bipartite graph of order p and size q, such that G is k-indexable where k ≥ 2. Then, for each w ∈ W = {k, k+1, . . . , k+q−1} there exists uv ∈ E(G) such that f (u)+ f (v) = w. If A and B are the stable sets of G, we may assume that u ∈ A and v ∈ B, and that the vertex labeled 0 belongs to A. Consider the labeling g of G defined for each v ∈ V(G) as This implies that the set of weights induced by g is {i, i + 1, . . . , i + q − 1}. Consequently, g is a semi (i, 1)-arithmetic labeling of G. In this way we have proven the next theorem. Theorem 4.1. If G is a bipartite k-indexable graph with k ≥ 2, then G admits a semi (i, 1)-arithmetic labeling for each i ≥ 1.
Germina [9] proved that for each odd value of n, the ladder L n = P n × P 2 is k-indexable when k = n+1 2 . Therefore, we can apply the result of Theorem 4.1 to these graphs. In Figure  5 we use the labeling of L 7 given in [9] to show the semi (i, 1)-arithmetic labeling described before, for each i ∈ {1, 2, 3, 4, 5}, being the case i = 4 the one given in [9].
Next we present another general property of the semi (k, d)-arithmetic labelings.
Proposition 4.1. If G is a semi (k, d)-arithmetic graph, then G is a semi (rk, rd)-arithmetic graph for each r ≥ 2.
Proof. Let G be a graph of size q and f be a semi (k, d)-arithmetic labeling of G. Thus, the set of weights induced by f is W = {k, k + d, . . . , k + d(q − 1)}. Then, for every w ∈ W there exists uv ∈ E(G) such that f (u) + f (v) = w. Let g be the labeling of G defined, for every v ∈ V(G), by g(v) = r f (v) for some r ≥ 2. The weight induced by g on the edge uv is: Since w = k + di, for some i ∈ {0, 1, . . . , q − 1}, we have that the new weight of uv is rk + rdi.
In other terms, the set of weights induced by g is W ′ = {rk, rk + rd, . . . , rk + rd(q − 1)}, i.e., these weights form an arithmetic sequence of difference rd and first element rk. Therefore, g is a semi (rk, rd)-arithmetic labeling of G. □ www.ejgta.org Recall that the union of n copies of a graph G is denoted by nG. In the following results we work with semi (k, d)-arithmetic labelings of graphs of the form nG. 2 . Since G is a semi (k, d)-arithmetic graph, the set of weights induced on the edges of G i is Hence, g is a semi (k, d)-arithmetic labeling of nG as we claimed. □ We show first that nG is a a semi (k, d)-arithmetic graph. Consider the following labeling of the vertices of nG: Note that all the labels assigned by h are nonnegative integers. Let W i be the set formed by the weights induced by h on the edges of G i . Independently of the parity of i, we get that we conclude that the weights induced by h on the edges of nG form an arithmetic sequence of difference d which first and last elements are k and k + d(qn − 1), respectively. Based on the fact that this sequence has qn terms, we have that there are no repeated weights. Consequently, h is a semi (k, d)-arithmetic labeling of nG. Now we prove that nG is semi (k + d, d)-arithmetic. Let h ′ be the labeling of nG defined on the vertices of G i as: , if i is even.
As in the previous case, regardless the parity if i, the set formed by the weights on the edges of G i is which implies that the weights on the edges of nG form an arithmetics sequence of difference d which first and last elements are k + d and k + dqn, respectively. Thus, h ′ is a semi (k + d, d)-arithmetic labeling of nG. □ Now, we turn our attention to the complete bipartite graphs. In [10], Graham and Sloane proved that K m,n is harmonious if and only if it is acyclic. Bu and Shi [4] proved that K m,n is (k, d)-arithmetic if k id for each positive i ≤ n − 1. Lu et al. [14] proved that K 1,m ∪ K p,qn is (k, d)-arithmetic if d 1 and k > d(q − 1) + 1. In the following lemma we show that K m,n is semi (k, d)-arithmetic for any pair k, d of positive integers. Proof. Let A = {u 1 , u 2 , . . . , u m } and B = {v 1 , v 2 , . . . , v n } be the stable sets of K m,n . Consider the following labeling of the vertices of K m,n : Since all the parameters and variables involved in the definition of f are positive integers, we conclude that the range of f is a subset of N. Note that Thus, for a fixed value of i, the set of weights induced on the edges u i v j is W i = {k + dn(i − 1), k + dn(i − 1) + d, . . . , k + dn(i − 1) + d(n − 1)}.
Since i ∈ {1, 2, . . . , m}, the union of these sets is ∪ m i=1 W i = {k, k + d, . . . , k + d(mn − 1)}. Therefore, the labeling f is semi (k, d)-arithmetic. □ In the following result we prove that this labeling of K m,n can be extended to an arbitrary union of complete bipartite graphs. Theorem 4.4. If G is a graph which components are complete bipartite graphs, then G is semi (k, d)-arithmetic.
Proof. Let G = ∪ r t=1 K m t ,n t and A t = {u t 1 , u t 2 , . . . , u t m } and B t = {v t 1 , v t 2 , . . . , v t n } be the stable sets of K m t ,n t . Basically, the labeling of each component of G follows the pattern of the labeling f described in the previous lemma. In particular, the labeling of K m 1 ,n 1 is f itself. For t ≥ 2, the labeling of K m t ,n t depends on the labeling of K m t−1 ,n t−1 ; if xd is the label on u t−1 m t−1 , then the label on u t 1 is (x − 1)d, if k + yd is the label on v t−1 n t−1 , then the label on v t 1 is k + (y + 2)d. Therefore, the largest weight on an edge of K m t−1 ,n t−1 is k + d(x + y) and the smallest weight on an edge of K m t ,n t is (x − 1)d + k + (y + 2)d = k + d(x + y + 1).
Consequently, the weights on the edges of K m t ,n t form an arithmetic sequence of difference d which first element is k + d(x + y + 1). As a result of this, we have that the weights on the edges of G form an arithmetic sequence of difference d which first element is k. Hence, G is a semi (k, d)-arithmetic graph. □ In Figure 6 we show an example of this labeling for a graph G which components are K 3,3 , K 3,4 , and K 4,3 .  Theorem 4.5. For i = 1, 2, let G i be a semi (k i , d)-arithmetic graph of size q i , where dq 1 ≥ k 2 − k 1 > 0. The graph G 1 ∪ G 2 is semi (k 1 , d)-arithmetic if one of the following conditions holds: (1) k 1 and k 2 have the same parity and dq 1 is even, or (2) k 1 and k 2 have different parity and dq 1 is odd.
Proof. Suppose that f i is a semi (k i , d)-arithmetic labeling of G i . Consider the labeling h : V(G 1 ∪ G 2 ) → N defined as We claim that h is a semi (k 1 , d)-arithmetic labeling of G 1 ∪ G 2 . In order to prove our claim, we note first that the fraction is a nonnegative integer because of conditions (1) or (2). Observe now that the weights induced by h of the edges of G 1 are k 1 , k 1 + d, . . . , k 1 + d(q 1 − 1). Since f 2 is a semi (k 2 , d)-arithmetic labeling of G 2 , it induces the weights k 2 , k 2 + d, . . . , k 2 + d(q 2 − 1). This implies that the weights induced by h on the edges of G 2 are the same numbers but shifted k 1 +dq 1 −k 2 units, that is, k 1 +dq 1 , k 1 +d(q 1 +1), . . . , k 1 +d(q 1 +q 2 −1). Therefore, the weights induced by h on the edges of G 1 ∪ G 2 form an arithmetic sequence of difference d and first element k 1 . Consequently, h is a semi (k 1 , d)-arithmetic labeling as we claimed. □