Product Antimagic Labeling of Caterpillars

Let G be a graph with m edges. A product antimagic labeling of G is a bijection from the edge set E ( G ) to the set 1 , 2 , .. . ,m { } such that the vertex-products are pairwise distinct, where the vertex-product of a vertex v is the product of labels on the incident edges of v . A graph is called product antimagic if it admits a product antimagic labeling. In this paper, we will show that caterpillars with at least three edges are product antimagic by an O ( m log m ) algorithm.


Introduction
Let b > a be two integers. We use [a, b] to denote the set a, a + 1, . . . , b { } and simply write [1, a] as [a]. All graphs considered in this paper are simple and finite. Let G be a graph with m edges. e vertex set and edge set of G are denoted by V(G) and E(G), respectively. For two vertex sets X, Y ⊂ V(G), the set of edges with one end in X and the other end in Y is denoted by E(X, Y). An antimagic labeling of G is a bijection τ from E(G) to [m] such that for any two distinct vertices u and v in G, the sum of labels on the edges incident with u differs from that of v. A graph is said to be antimagic if it admits an antimagic labeling. e concept of antimagic labeling was proposed by Hartsfield and Ringel in 1990 [1]. In the same paper, they conjectured that every connected graph other than K 2 is antimagic. is topic was investigated by many researchers; for instance, see [2][3][4][5][6]. Recently, Lozano et al. [7] proved that caterpillars are antimagic, where a caterpillar is a tree with at least three vertices such that the removal of its leaves produces a path.
In 2000, Figueroa-Centeno et al. [8] introduced multiplicative variation of antimagic labeling. A product antimagic labeling of a graph G with m edges is a bijection φ from E(G) to [m] such that the vertex-products are pairwise distinct, where the vertex-product p(v) of a vertex v is the product of labels on the incident edges of v. A graph G is called product antimagic if there is a product antimagic labeling of G. In [8], the authors proved that paths with at least four vertices and 2-regular graphs are product antimagic. Furthermore, they proposed the following conjecture.

Conjecture 1. A connected graph with at least three edges is product antimagic.
Kaplan et al. [9] proved that the following graphs are product antimagic: the disjoint union of cycles and paths where each path has at least three edges; connected graphs with n vertices and m edges where m ≥ 4nlnn; graphs G where each component has at least two edges and the minimum degree of G is at least 8 ����������� � ln|E|ln(ln|E|); and all complete k-partite graphs except K 2 and K 1,2 . In [10], Pikhurko characterizes all large graphs that are product antimagic. More precisely, it is shown that there is an integer n 0 such that a graph with n ≥ n 0 vertices is product antimagic if and only if it does not belong to any of the following four classes: graphs that have at least one isolated edge; graphs that have at least two isolated vertices; unions of vertexdisjoint of copies of K 1,2 ; graphs consisting of one isolated vertex; and graphs obtained by subdividing some edges of the star K 1,k+ℓ .
In this paper, we prove that Conjecture 1 is affirmative for caterpillars with at least three edges.

Theorem 1. Every caterpillar with at least three edges is product antimagic.
ere are some other variations of antimagic labeling, such as antimagic orientation; see [11][12][13][14] for some results of trees. For more types of labelings, refer to the survey of Joseph [15]. e remainder of this paper is organized as below. In the next section, we prove eorem 1. In Section 3, we write the labeling procedure of eorem 1 as an algorithm.

Proof of Theorem 1
Let T be a caterpillar. A leaf of T is a vertex of degree one in T, a spine of T is a longest path of T, and a leg of T is an edge that does not belong to the spine of T.
Proof. of eorem 1. Let T be a caterpillar with m( ≥ 3) edges. Since it is proved that paths with at least three edges are product antimagic, we may assume that T is not a path.
erefore, M is a matching of size |U| that saturates all vertices in U. We define a product antimagic labeling of T in three steps in the following, and see Figure 1 for example.
Claim 1. For any two distinct vertices, v i , v j ∈ V(P) and Proof. By the definition of vertex-product, By equations (2) and (3), it is easy to verify that Denote the current labeling by φ 2 and the partial vertexproduct of a vertex x ∈ V(T) by p 2 (x).
Step 3. Label edges in M.

Claim 2. φ 3 is a product antimagic labeling of T.
Proof. By the way of assigning labels to edges in M, we have It is easy to see that φ 3 is a bijection from E(T) to [m]. We show that φ 3 is a product antimagic labeling of T in the following. Let V 1 and V 2 be the sets of vertices of degree 1 and 2, respectively.
Step 3. Combining with Claim 1 and the labeling steps, it follows that no vertex in V 1 receives the same vertex-product as other vertices in T. Also, by Claim 1 and equation (5), it suffices to prove that for any vertex u ∈ V 2 and any vertex v ∈ U, p 3 (u) ≠ p 3 (v).

An Algorithm
In this section, we will write the steps of labeling a caterpillar as Algorithm 1. e notation follows from the last section.
Finally, we show that Algorithm 1 runs in time O(m log m). Assignments in Step 1 of the algorithm can be done in constant time. erefore, the cost of Step 1 is the result of the linear loop at lines 5 and 6 and the assignments at line 7, that is, O(m). Note that if each vertex in U is of degree three, Step 2 does not run. Otherwise, Step 2 visits at most m edges and assigns a random label to each of them, but labels can be chosen increasingly from the unused labels in [1] ∪ [⌈ℓ/2⌉ + 2, m − ⌊ℓ/2⌋], thus giving a cost O(m).
Step 3 requires time O(m log m) due to the fact that the partial vertex-products must be sorted (line 10). e total cost of the algorithm is, then, O(m log m). Since T is a tree, the vertex number n � m + 1, so the cost can be also expressed as O(n log n).

Journal of Mathematics 3
Data Availability e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that they have no conflicts of interest.