1. Introduction
In mathematics, the image refers to the set of values obtained by applying a mapping to all elements within the domain. Within this image, certain structural properties of the domain are retained. A mapping that maintains such a structure, which is of particular interest for our study, is commonly referred to as a homomorphism. In the context of graphs, a homomorphism is defined as follows.
Consider graphs
G and
H. A mapping, denoted as
is a homomorphism from
G to
H if
for all
, meaning that
f preserves the edges. The set of homomorphisms from
G to
H is denoted as
. An endomorphism on
G is a homomorphism from
G to itself, and the set of endomorphisms on
G is denoted by
. Let
represent a path of order
n with vertex set
and edge set
. Similarly,
stands for a cycle of order
n (
) with vertices
and edges
, where the addition is performed modulo
n. For a deeper understanding of graphs and algebraic graphs, we direct readers to references [
1,
2].
Graph homomorphisms, and specifically endomorphisms, have been the subject of much research. Böttcher and Knauer (1992) [
3] detailed various ways to define graph homomorphisms, which resulted in six categories of endomorphisms for any given graph: endomorphisms, half-strong endomorphisms, locally strong endomorphisms, quasi-strong endomorphisms, strong endomorphisms, and automorphisms. It is evident that the set of endomorphisms on
G constitutes a monoid, wherein the composition of mappings serves as the defining operation. The formulas used to count graph homomorphisms and endomorphisms are essential for analyzing the structure of
and
, respectively. The expression for determining the number of endomorphisms on
was introduced by Arworn in 2009 [
4]. Arworn transformed the problem by equating it to enumerating the shortest paths originating from point
and reaching any point
within an
r-ladder square lattice, ultimately deriving a succinct formula. Arworn and Wojtylak [
5] also presented a formula in the same year to calculate the number of homomorphisms from path
to path
. This formula uses the order of the set
, where
for all
. In 2014, Eggleton and Morayne [
6] provided identities and formulas for counting homomorphisms of a finite path into a finite path. The paper also presents closed-form formulas for the number of endomorphisms of a finite path. In the same year, Csikvari and Lin [
7] studied the number of homomorphisms from a tree with
m vertices (
) to any graph
G. They established a lower bound for the number of these homomorphisms in terms of the largest eigenvalue of the adjacency matrix of
G. In 2015, Csikvari and Lin [
8] further investigated the number of homomorphisms of trees into a path, proving the inequality:
where
is any tree on
m vertices and
denotes the star on
m vertices.
The concept of counting standard homomorphisms between graphs has been well studied. However, many problems require a more general mapping, one that allows for the collapsing of edges. This need motivates the introduction of weak homomorphisms, which extend the traditional definition by allowing the edges to be contracted.
When considering a mapping , the concept of f contracting an edge denotes that both vertices x and y are mapped to the same vertex in , i.e., . The central concept is that homomorphisms must preserve the edges. If we also have the option to contract edges, then this achievement can be realized using regular homomorphisms when our graphs contain a loop at every vertex.
A mapping
is a weak homomorphism from a graph
G to a graph
H (also referred to as an egamorphism) if
f contracts or preserves the edges, that is,
or
whenever
. A weak homomorphism from
G to itself is referred to as a weak endomorphism on
G. We denote the set of weak homomorphisms from
G to
H as WHom(
) and the set of weak endomorphisms on
G as WEnd(
G). It is evident that WEnd(
G) constitutes a monoid under the composition of mappings. The composition of (weak) homomorphisms also forms a (weak) homomorphism. Consequently, this results in a preorder on graphs and defines a category [
1].
Weak homomorphisms extend traditional graph mappings by allowing for edge contraction, offering a versatile tool for analyzing complex networks across disciplines. In computer science, they efficiently simplify large social networks by merging related users, revealing community structures. This ability to abstract while preserving key relationships makes weak homomorphisms valuable for diverse applications.
In 2010, Sirisathianwatthana and Pipattanajinda [
9] established the count of weak homomorphisms of cycles as WHom(
), expressed in terms of the collection of
(
), where
(
) represents a set of weak homomorphisms from
to
, with the conditions that
and
.
Recently, in 2022, Promsri et al. [
10] introduced the number of weak homomorphisms of paths WHom(
), by associating it with the order of the following three sets:
WHom
,
WHom
, and
WHom
, where
i ranges from 0 to
. This motivated us to investigate the number of weak homomorphisms from paths to the product of paths.
For any two graphs and , the Cartesian product of and is the graph with vertices , in which forms an edge if either and , or and .
A rectangular grid graph represents the Cartesian product of and . These graphs, especially when (forming square grids, ), possess a high degree of symmetry, including reflectional, rotational, and near-translational symmetry, a direct consequence of their regular structure. A key connection between paths and these grid graphs arises when considering the mappings between them. Specifically, a mapping f from the vertices of a path to the vertices of the Cartesian product graph (which encompasses rectangular grids) is a homomorphism, if and only if, the sequence of vertices forms a walk within . This crucial observation establishes a one-to-one correspondence between the set of homomorphisms and the set of walks consisting of m vertices within . Similarly, we can establish a one-to-one correspondence between the set WHom() and the collection of partial walks with m vertices in . Here, the partial walk is a sequence obtained by concatenating q walks, namely , for some , and the ending vertex of is the same as the starting vertex of for all .
Yingtaweesittikul et al. (2023) [
11] successfully developed formulas for the number of weak homomorphisms from path graphs to ladder graphs (
) and stacked prism graphs (
). Here, we aim to determine formulas for the number of weak homomorphisms from the path graphs to rectangular grid graphs, denoted as |
|, which provides a solution to the problem concerning the number of partial walks of
m vertices within the rectangular grid graphs
.
2. Basic Results and Examples
In 2018, Knauer and Pipattanajinda [
12] introduced the count of weak endomorphisms on paths by relating it to the quantities of the shortest paths from the origin point
to any arbitrary point
within the three-dimensional square lattice, as well as within the
r-ladder three-dimensional square lattice. Moreover, they provided formulas for the count of shortest paths from the point
to any point
, as shown in Proposition 1.
Figure 1 and
Figure 2 depict the cubic lattice and the 2-ladder cubic lattice when
,
, and
, respectively.
Proposition 1 ([
12])
. The numbers and of the shortest paths from the point to any point in the cubic lattice and in the r-ladder cubic lattice areandrespectively. In 2023, Yingtaweesittikul et al. [
13] introduced a formula to determine the count of homomorphisms from
to
, relating it to the order of the set of weak homomorphisms
f from
to
with
, denoted as
(
). This formula provides the solution to the problem concerning the number of walks of order
m in the rectangular grid graphs
. Moreover, they provided formulas for |
(
)|, as shown in Theorem 1.
Theorem 1 ([
13])
. Let be positive integers and j be a non-negative integer. Let and . Then, If we let , let , and reduce all of the zero terms, we can obtain the following corollary.
Corollary 1. Let be positive integers and j be a non-negative integer such that and . Then, Proof. As
,
. Thus,
and Equation (
1) can be reduced to
As
,
,
,
,
,
, and
are all zeros, we have
□
To better understand the main theorem, we start by examining a straightforward example. Our goal at this stage is to create a visual representation of weak homomorphisms. Check
Figure 3 for potential weak homomorphisms from
to
specifically mapping 0 to 0. The numbers at the top represent elements of the domain set
, and those on the left correspond to elements of the image set
.
The mappings
with
and
are represented by the dotted line on the top and black line, respectively (see
Figure 4).
Figure 5 illustrates weak homomorphisms using the cubic lattice. Multiple cases need consideration. Initially, when
, it corresponds to moving from
to
. Similarly, when
, it corresponds to moving from
to
. For the remaining cases, where
, the correspondence involves moving from
to
. Consequently, the mappings
and
are depicted by the shortest paths from
to
and
in the 0-ladder cubic lattice, respectively (see
Figure 6).
The cardinality
is the summation of
and
where
(large black points). From
Figure 5, if
, we use
; otherwise,
.
Similar to the above example,
Figure 7 visualizes the possible weak homomorphisms of the path
to
which map 0 to 1.
The cardinality
is the summation of
and
where
(large black points). From
Figure 8, if
, we use
; otherwise
.
4. The Number of Weak Homomorphisms from Paths to Grid Graphs
In this section, we present the formulas for determining the count of weak homomorphisms from paths to rectangular grid graphs . We represent the set of weak homomorphisms from to , mapping 0 to , as . From the symmetry of , we deduce the following lemma:
Lemma 1. Let i and n be integers, such that , and let be a positive integer.
- 1.
,
for all and .
- 2.
.
- 3.
.
- 4.
.
- 5.
.
Example 1. .
Figure 13 shows all possible weak homomorphisms from
to
which map 0 to
. The numbers on top are the elements of domain set
and the tuples on the left are elements of image set
. The tuples with the same second elements are represented by the circle with the same color.
We noted that normal black lines represent the increment of the first coordinate, dashed black lines represent the decrement of the first coordinate, normal magenta lines represent the increment of the second coordinate, magenta lines represent the decrement of the second coordinate, and cyan lines represent no change in both coordinates.
We now divide all the mappings in
into groups according to the number of changes in the first coordinate
h, and rewrite each path as two shorter paths (see
Table 3). The first path is formed by gray lines. On the other hand, the second path consists of cyan and magenta lines. In both paths, the lines are arranged in sequential order.
Theorem 3. Let and k be positive integers and be non-negative integers, such that and . It follows that Proof. Let . For each in the domain, either or , where . Assume changes in the first coordinate appear h times. Then, changes in the second coordinate appear times. The sequence of changes in the first coordinate form a homomorphism . Similarly, the sequence of remaining changes (and no changes) in the second coordinate form a weak homomorphism . Thus, the corresponding path graph of f can be obtained from the permutations of all edges in path graphs of and with a fixed sequential order. There are permutations in total. Hence, □
From Lemma 1 and Theorem 3, we obtain the theorem below.
Theorem 4. The cardinalities of the weak homomorphisms from undirected paths to grid graphs arewhere .
For convenience, we compute
for
The results are presented in
Table 4.