Formulas for the Number of Weak Homomorphisms from Paths to Ladder Graphs and Stacked Prism Graphs

Let


Introduction
Let G and H be graphs.A mapping f: V(G) ⟶ V(H) is a homomorphism from G to H if f preserves the edges, i.e., if f(x), f(y)   ∈ E(H), whenever x, y   ∈ E(G).We denote the set of homomorphisms from G to H by Hom(G, H).Let P n denote a path of order n such that V(P n ) � 0, 1, . . ., n − 1 { } and }, where + is the addition modulo n.Furthermore, we will refer to [1,2] for more information about graphs and algebraic graphs.
Te formula for the number of homomorphism from P n to P n itself, End(P n ), was stated by Arworn [3] in 2009.Arworn [3] transformed the problem into counting the numbers of shortest paths from the point (0, 0) to any point (i, j) in an r-ladder square lattice and obtained a concise formula.
In general, a homomorphism from G to G itself is called an endomorphism on G. Clearly, the set of endomorphisms on G forms a monoid under a composition of mappings.
For a mapping f: V(G) ⟶ V(H), we say that f contracts an edge x, y   ∈ E(G) if f(x) � f(y).A mapping f: V(G) ⟶ V(H) is called a weak homomorphism from a graph G to a graph H (also called an egamorphism) if f contracts or preserves the edges; i.e., if x, y   ∈ E(G), then f(x) � f(y) or f(x), f(y)   ∈ E(H).A weak homomorphism from G to G itself is called a weak endomorphism on G.We denote the set of weak homomorphisms from G to H by WHom(G, H) and the set of weak endomorphisms on G by WEnd(G).Clearly, WEnd(G) forms a monoid under a composition of mappings.
Te composition of (weak) homomorphisms is also a (weak) homomorphism.When we have a collection of objects and morphisms between them, satisfying certain properties such as composition and identity, we can defne a category.In this context, the category consists of graphs as objects and (weak) homomorphisms as morphisms, where the composition of (weak) homomorphisms and the identity (weak) homomorphism for each graph form the necessary structure [1].It provides a structured way to study and analyze relationships between graphs, allowing for a wide range of applications, including graph database querying, graph theory research, and network analysis.Te choice between strong (graph) homomorphisms and weak graph homomorphisms in the category can lead to diferent ways of capturing and studying relationships between graphs, depending on the specifc requirements of the problem at hand.
Given a graph product ⊛, the cancellation problem for the product is the conditions under which G ⊛ K � H ⊛ K implies G � H. Te problem is simple when ⊛ is the Cartesian product □.Consequently, we assert that cancellation holds for the Cartesian product.It is much more complicated for the direct product × and the strong product ⊠.In the case of the direct product of graphs, if there exist homomorphisms from G to K and from H to K, then G � H [4].By utilizing the fact that |WHom(X, A ⊠ B)| � |WHom(X, A)‖WHom(X, B)| for all fnite simple graphs A and B, and for all fnite graphs X where loops are admitted, cancellation also holds for the strong product of graphs [4].
In 2010, Sirisathianwatthana and Pipattanajinda [5] provided the number of weak homomorphisms of cycles WHom Motivated by Arworn's work [3], in 2018, Knauer and Pipattanajinda [6] used a cubic lattice and an r-ladder cubic lattice to construct the number of weak endomorphisms on paths WEnd(P n ).Moreover, they provided formulas for the number of shortest paths from the point (0, 0, 0) to any point (i, j, k), as in Proposition 1. Figures 1 and 2 represent the cubic lattice and the 2-ladder cubic lattice when i � 6, j � 4, and k � 4, respectively.Proposition 1 (see [6]).The numbers M(i, j, k) and M r (i, j, k) of the shortest paths from the point (0, 0, 0) to any point (i, j, k) in the cubic lattice and in the r-ladder cubic lattice are as follows: respectively.
For any two graphs G 1 and G 2 , the Cartesian product of G 1 and G 2 is the graph ) and u � v. Te ladder graph L n is the Cartesian product of P n and P 2 .Te stacked prism graph Y n,m is the Cartesian product of P n and C m .
We see that a mapping f: We thus get a one-one correspondence between the set of homomorphisms f: P n ⟶ G 1 □G 2 and the set of walks of n vertices in G 1 □G 2 .In the same manner, we can see that there is a one-one correspondence between the set WHom (P n , G 1 □G 2 ) and the set of partial walks of n vertices in G 1 □G 2 , where the partial walk is a sequence obtained by joining q walks W 1 , W 2 , . . ., W q for some q with the ending vertex of W i being the starting vertex of W i+1 for all i � 1, 2, . . ., q − 1.
In this paper, we are interested in fnding the number of weak homomorphisms from paths to ladder graphs, WHom (P n , L n ), and from paths to stacked prism graphs, WHom (P n , Y n,m ).Tese give the numbers of partial walks of n vertices in L n and Y n,m .Here, we generalize the original cubic lattice by adding double edges and triple edges in the backward directions and obtain a double-bridge cubic lattice and a triple-bridge cubic lattice as in Figures 3 and 4, respectively.Similarly, we obtain an r-ladder double-bridge cubic lattice and an r-ladder triple-bridge cubic lattice (see Figures 5 and 6).
Te number of shortest paths from the point (0, 0, 0) to any point (i, j, k) in a double-bridge cubic lattice and in an r-ladder double-bridge cubic lattice is as follows.
Proposition 2. Te numbers M 2 (i, j, k) and M 2 r (i, j, k) of shortest paths from the point (0, 0, 0) to any point (i, j, k) in the double-bridge cubic lattice and in the r-ladder doublebridge cubic lattice are as follows: respectively.

The Number of Weak Homomorphisms from Paths to Ladder Graphs
In this section, we provide the formula for fnding the number of weak homomorphisms from paths P n to ladder graphs L n .We denote the set of weak homomorphisms from P n to L n , which maps 0 to (j, i) by WHom ji (P n , L n ).By the symmetry of L n , we obtain the following lemma.
Lemma 4. Let j and n be integers such that 0 ≤ j < n. (1) To gain insight into the main theorem, we begin by observing a simple example.In this step, we aim to visualize weak homomorphisms.Figure 7 shows the possible weak homomorphisms from P 4 to L 4 , which map 0 to (0, 0).Te numbers on the top are elements of the domain set V(P 4 ), and the tuples on the left are elements of the image set V(L 4 ).
Te mapping is represented by the dotted arcs on the top and black line (see Figure 8).We noted that normal lines represent the change in the frst coordinate, dotted arcs represent the change in the second coordinate, and dashed lines indicate no change in coordinates.
Theorem .Let n be a positive integer and j be a nonnegative integer such that j < n/2 − 1.It follows that where n − 1 � i + j.
Proof.Let i � n − j − 1.To fnd |WHom j0 (P n , L n )|, we count the number of shortest paths from the point (0, 0, 0) to any point (i 0 , j 0 , k 0 ), where i 0 + j 0 + k 0 � n − 1 in the j-ladder double-bridge cubic lattice.We consider the following three cases corresponding to the value of j 0 .

□
If j 0 > j, then for each j 0 � j + t, there are  i− t i 0 �t M 2 j (i 0 , j 0 , k 0 ) shortest paths.Figure 13 displays possible end points (i 0 , j 0 � j + t, k 0 ) when t � 1 by big circles, while small circles stand for all possible origins of dashed lines with an end point (i 0 , j 0 , k 0 ).
Since t ≤ i/2, we obtain the following equation: We replace t and i 0 with s and i − i 0 − s, respectively, and the total number of shortest paths is as follows: If j 0 ≤ j and i 0 ≤ i, then for each i 0 , j 0 , there are M 2 (i 0 , j 0 , k 0 ) shortest paths.

Tis
contributes 14 displays a possible end point (i 0 , j 0 , k 0 ) by the big circle, while small circles stand for all possible origins of dashed lines with an end point (i 0 , j 0 , k 0 ).We replace i 0 and j 0 with i − i 0 and j − j 0 , respectively, and the total number of shortest paths is as follows: 6 Journal of Mathematics (3, 1) Figure 8: Graphical presentation of the domain and image of f 1 and f 2 .

Journal of Mathematics
If j 0 ≤ j and i 0 ≥ i + 1, then for each i 0 � i + t ′ , there are  j− t ′ j 0 �t ′ M 2 i (j 0 , i 0 , k 0 ) shortest paths.Tis can be obtained by fipping the cubic lattice diagonally.Figure 15 displays possible end points (i 0 � i + t ′ , j 0 , k 0 ) when t ′ � 1 by big circles, while small circles stand for all possible origins of dashed lines with an end point (i 0 , j 0 , k 0 ).Since t ′ ≤ j/2, we obtain the following equation: We replace t ′ and j 0 with s and j − j 0 − s, respectively, and total number of shortest paths is as follows: Adding up over all cases, |WHom j0 (P n , L n )| is as desired.

The Number of Weak Homomorphisms from Paths to Stacked Prism Graphs
In this section, we provide the formula for fnding the number of weak homomorphisms from paths P n to stacked prism graphs Y n,m .We denote the set of weak homomorphisms from P n to Y n,m , which maps 0 to (j, i) by WHom ji (P n , Y n,m ).
By the symmetry of Y n,m , we obtain the following lemma.Lemma 6.Let i and n be integers such that 0 ≤ j < n, and let m > 2 be a positive integer. (1) Similar to the previous section, we provide some insight via examples.Figure 16 shows all the possible weak homomorphisms from P 4 to Y 4,3 , which map 0 to (0, 0).Te numbers on the top are elements of the domain set V(P 4 ), and the tuples on the left are elements of the image set V(Y 4,3 ). Figure 17 visualizes weak homomorphisms using the triple-bridge cubic lattice, where the move from (i, j, k) to the next point is depicted as follows: (1) (4) To (i, j, k + 1) through the dotted upper arc, if f(x + 1) � f(x) + (0, 1).
(5) To (i, j, k + 1) through the dotted lower arc, if Note that + is the addition modulo m for the second coordinate of images.Again, normal lines in Figure 16 represent the change in the frst coordinate, dotted arcs represent the change in the second coordinate, and dashed lines indicate no change in coordinates.

Journal of Mathematics
In general, to fnd |Whom r0 (P n , Y n,m )|, we use M 3 r (i, j, k) to compute the number of shortest paths from (0, 0, 0) to (i, j, k) when j > r, and we use M 3 n− r− 1 (j, i, k) when i > n − r − 1; otherwise, we use M 3 (i, j, k).
Theorem 7. Let m, n be positive integers and j be a nonnegative integer such that m ≥ 3 and j < n/2 − 1.It follows that where n − 1 � i + j.

Main Results
From Lemma 4 and Teorem 5, we obtain the theorem as follows.
Theorem 8. ) From Lemma 6 and Teorem 7, we obtain the theorem as follows.
Te algorithmic complexity of the evaluation of the formulas is O(n 4 ) for memoryless computation.Tis complexity can be toned down to O(n 3 ) using linear space memory.Te computed |WHom(P n , L n )| and |WHom(P n , Y n,m )| for 2 ≤ n ≤ 19 and 3 ≤ m ≤ 4 on a logarithmic scale are presented in Figure 22.Although the number of weak homomorphisms from paths to ladder graphs and stacked prism graphs is not bounded, one can conjecture that the asymptotic behaviour of the formulas, depending on n, is in exponential form.12 Journal of Mathematics

Figure 13 :
Figure13: Possible end points in the j-ladder double-bridge cubic lattice when j 0 > j.

f 4 f 3 Figure 18 :
Figure 18: Graphical presentation of the domain and image of f 3 and f 4 .

Figure 19 :
Figure 19: Triple-bridge cubic lattice presentation of f 3 and f 4 .
Te cardinalities |WHom(P n , L n )| of weak homomorphisms from undirected paths P n to ladder graphs L n are as follows: Te cardinalities |WHom(P n , Y n,m )| of weak homomorphisms from undirected paths P n to stacked prism graphs Y n,m are as follows: