Abstract

Let and be graphs. A mapping from to is called a weak homomorphism from to if or whenever . In this paper, we provide an algorithm to determine the number of weak homomorphisms of paths.

1. Introduction

Let and be graphs. A mapping is a homomorphism from to if preserves the edges, i.e., if whenever . A homomorphism from to itself is called an endomorphism on . Denote the set of homomorphisms from to by Hom() and the set of endomorphisms on by End(). Clearly, End() forms a monoid under composition of mappings. Let denote a path of order such that and . Let denote a cycle of order such that and , where is the addition modulo . Furthermore, we will refer to [1, 2] for more information about graphs and algebraic graphs.

There are many interesting results concerning graphs and their homomorphisms (or endomorphism monoids). In 1992, Böttcher and Knauer [3] gave an account of the different ways to define homomorphisms of graphs, which leads to six classes of endomorphisms for each graph, i.e., endomorphisms, half-strong endomorphisms, locally-strong endomorphisms, quasi-strong endomorphisms, strong endomorphisms, and automorpisms. The formulas for the number of graph homomorphisms and the number of graph endomorphisms are the important tools for studying the structures of Hom() and End(), respectively. The formula for the number of endomorphisms on paths End() was introduced by Arworn [4] in 2009. She gave the formula in terms of the numbers of shortest paths from the point to any point in an -ladder square lattice. Furthermore, in the same year, Arworn and Wojtylak [5] gave the formula for the number of homomorphisms of paths Hom() in terms of the order of Hom() where for all .

For a mapping , we say that contracts an edge if . The point is that homomorphisms have to preserve edges. If we have the possibility of contracting edges as well, then this could also be achieved with usual homomorphisms when our graphs contain a loop at every vertex.

A mapping is called a weak homomorphism from a graph to a graph (also called an egamorphism) if contracts or preserves the edges, i.e., if or whenever . A weak homomorphism from to itself is called a weak endomorphism on . Denote the set of weak homomorphisms from to by WHom(), and the set of weak endomorphisms on by WEnd(). Clearly, WEnd() forms a monoid under composition of mappings.

In 2010, Sirisathianwatthana and Pipattanajinda [6] gave the number of weak homomorphisms of cycles WHom in terms of the order of where for all . Recently, in 2018, Knauer and Pipattanajinda [7] introduced the number of weak endomorphisms on paths WEnd() in terms of the numbers of shortest paths from the point (0,0,0) to any point in the three-dimensional square lattice and in the -ladder three-dimensional square lattice. In this paper, we are interested in finding the number of weak homomorphisms of paths WHom() in terms of , , and where , , for all .

2. The Number of Weak Homomorphisms of Paths

In this section, we give the number of weak homomorphisms from to ,i.e.,. We see at once that and . The task is now to find for all . For , let , , , and . It is clear that is a partition of WHom(, ), and is a partition of . By the definition of a weak homomorphism, if then for all and . It follows that if , then . This gives for all . Similary, if , then . We thus get for all . For simplicity of notation, we some time write instead of .

Example 1. Consider the weak homomorphisms from to . We see that WHom where , , , , , and . Moreover, we get for all where Let us look at the order of the sets , , and in Example 1, we see that , , , and for all . In the first two lemmas, we consider about some relations of the order of , , and for all .

Lemma 2. Let . Then for all .
Proof. Let and . Define by for all . We first prove that is a weak homomorphism. Let . To show that or . Since and is a weak homomorphism, we get or .

Case 1. If , then

Case 2. If , then or .

Case 2.1. If , then It follows that .

Case 2.2. If , then

This gives .

From Case 1 and Case 2, we conclude that WHom. Since , we get . Define by for all . We will show that is bijective. Let such that . Therefore, for all ,

The result is . So is injective. Let . Define by . In the same manner as proved above, we get WHom. Since , we have for all . As , we get is surjective. Hence is bijective and so for all .

Lemma 3. Let . (1) for all .(2)If , then for all .Proof. 1. Consider the function in the proof of Lemma 2. It is easy to check that . This gives for all .
2. Let . Then . Define : by for all . By similar arguments as in Lemma 2, we also conclude that is bijective.

The following lemma gives the order of in terms of , and .

Lemma 4. Let . Then for all .
Proof. Let and such that .
Since and where then in this case we obtain weak homomorphisms in .
Since and , where then in this case we get weak homomorphisms in .
Since and , where then in this case we have weak homomorphisms in .
Thus, we conclude that . Since , it follows that .

Example 5. Consider the weak homomorphisms from to . We have WHom where Consider the sets in Example 1, we see that .
The next theorem gives the order of WHom in terms of , and for all .

Theorem 6. Let . (1)If is even, then .(2)If is odd, then .Proof. Since , by Lemma 2, we have By Lemma 4, we get the statements 1 and 2.

Theorem 7. Let . If , then .
Proof. Suppose that . Then . Since , by Lemma 2 and Lemma 3 (2), we have . Consider . We see that if then . It follows that if then . Thus for all . So, by Lemma 4, for all . It follows that .

Example 8. From Example 1, we have . Consider WHom in Example 5 we see that In the following lemmas, we give the order of and .

Lemma 9. Let . If , then for all .
Proof. Let . Then , and so . So, for each , if then there are 3 possible choises for which are , and . By the multiplication principle, . Since and , we have by Lemma 4.

Lemma 10. Let . If , then for all .
Proof. Let . Then , and . So, for each , if then there are 3 possible choices for which are and . By the multiplication principle, . It easy to see that and . Thus . Since , we get by Lemma 4.

In light of Theorem 7, Lemma 9, and Lemma 10, we have the following.

Corollary 11. Let . If , then .

Data Availability

All data are available in the article.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

We would like to thank the referees for their comments and suggestions on the manuscript. This research was supported by the Faculty of Science, Chiang Mai University and the Chiang Mai University, Thailand.