Preservers of graph and digraph cordiality

LeRoy B. Beasley1
1Clocktower Plaza#317, 550 North Main, Box C3 Logan, Utah 84321, USA

Abstract

An undirected graph is said to be cordial if there is a friendly (0,1)-labeling of the vertices that induces a friendly (0,1)-labeling of the edges. An undirected graph G is said to be (2,3)-orientable if there exists a friendly (0,1)-labeling of the vertices of G such that about one-third of the edges are incident to vertices labeled the same. That is, there is some digraph that is an orientation of G that is (2,3)-cordial. Examples of the smallest noncordial/non-(2,3)-orientable graphs are given, and upper bounds on the possible number of edges in a cordial/(2,3)-orientable graph are presented. It is also shown that if T is a linear operator on the set of all undirected graphs on n vertices that strongly preserves the set of cordial graphs or the set of (2,3)-orientable graphs, then T is a vertex permutation.

Keywords: Friendly labeling, Cordial graph, (2,3)-cordial digraph, (2,3)-orientable graph, Linear operator, Linear preserver, Vertex permutation

1. Introduction

Let Gn denote the set of all simple loopless undirected graphs on the vertex set V={v1,v2,,vn}. Let G=(V,E) be an undirected graph in Gn with vertex set V and edge set E. A (0,1)-labeling of the vertex set is a mapping f:V{0,1} and is said to be friendly if approximately one half of the vertices are labeled 0 and the others labeled 1. An induced labeling of the edge set is a mapping g:E{0,1} where for an edge uv,g(uv)=g^(f(u),f(v) for some g^:{0,1}×{0,1}{0,1} and is said to be cordial if f is friendly and about one half the edges of G are labeled 0 and the others labeled 1, that is, both f and g are friendly. A graph, G, is called cordial if there exists a cordial induced labeling of the edge set of G.

Let |X| denote the cardinality of the set X, so that |g1(0)| denotes the number of edges labeled 0 if g:E{0,1} is the labeling of the edges.

In this article we consider not only cordial undirected graphs but also use a cordial labeling of directed graphs that is not merely a cordial labeling of the underlying undirected graph. It was defined and studied in [1].

We shall consider three classes of graphs: Those that are cordial with an induced edge labeling consisting of the sum modulo 2 of the labels of the end vertices (see [3]); those that are cordial with an induced edge labeling consisting of the product of the labeling of the end vertices (see [5]) and those that are (2,3)-orientable (see[1]), that is, graphs that may be oriented such that if each arc of the directed graph is labeled as the label of the terminal vertex minus the label of the initial vertex, and we have that about one third of the arcs are labeled 0, about one third labeled 1 and the remaining one third labeled -1.

2. Preliminaries

We begin with formal definitions of the terms from the introduction.

Definition 2.1. (See [4]) Let Z be a set and label the set with entries from the set A. Let f the function f:ZA that preforms this labeling. This labeling of a set is called A-friendly if 1|f1(i)||f1(j)|1 for any i,jA. A labeling f is said to be k-friendly if it is Zk-friendly where Zk is the set of integers modulo k. Further the labeling f is said to be friendly if it is 2-friendly.

Definition 2.2. Let A be a semiring and G be an undirected graph with vertex set V and edge set E. Let f:VA be an A-friendly labeling of the non-isolated vertices of V and let g:EA be an induced labeling of E, that is given an edge uv, g(uv)=g^(f(u),f(v)) where g^:A×AA. Note that g^ must be symmetric to be well defined. The graph G with the A-friendly labeling f of the non-isolated vertices of G and induced edge labeling g is said to be A-cordial if g is also an A-friendly mapping. Also, G is k-cordial if A is Zk, and we say G is cordial if A is Z2.

Remark 2.3. It should be noted that (Z2,+)-cordial and (Z2,)-cordial are the same and in fact is the usual definition of cordial where f is a (0,1) labeling and g(u,v)=|f(u)f(v)|. Further, the restriction that f is a friendly labeling of the non-isolated vertices, not necessarily all vertices, is required because, for example, if the restriction to non-isolated vertices were not required, the graph 2K2 would be (Z2,+)-cordial as a graph on five vertices and not on four vertices.

For digraphs we have a similar definition, however, as digraphs are not usually symmetric, we do not require the induced mapping g to be symmetric:

Definition 2.4. Let A and B be sets and let G=(V,A) be an directed graph with vertex set V and arc set A. Let f:VA be an A-friendly labeling of the non-isolated vertices of V and let g:AB be an induced labeling of A, that is given an arc uv, g(uv)=g^(f(u),f(v)) where g^:A×AB. The graph G with the A-friendly labeling f of the non-isolated vertices and induced edge labeling g is said to be (A,B)-cordial if g is a B-friendly mapping. When A=Zk and B=Z we say that G is (k,)-cordial. In particular we say that G is (2,3)-cordial if A=Z2, B=Z3 and g(uv)=f(v)f(u). Note that in this case g is anti-symmetric.

Note that in the above definitions, if g^ is the binary mapping corresponding to one of the binary operations on A or B we indicate that by placing that operator in the notation. For example a digraph is (A,B,)-cordial indicates that the induced labeling g is g(uv)=f(v)f(u). So a digraph is (2,3,)-cordial means that the arc labelings are f(v)f(u) for the arc uv. In this specific case we usually drop the minus sign and write (2,3)-cordial. A graph with an A-friendly vertex labeling is product cordial if it is (A,×)-cordial (see [5]). Unless specified otherwise, product cordial graphs have the vertex set labeled with {0,1}.

Definition 2.5. An undirected graph G is said to be (2,3)-orientable if some orientation of the edges yeilds a (2,3)-cordial digraph.

3. Extremes of cordial graphs

In this section we shall exhibit examples of graphs that are the smallest or largest (edgewise) of cordial/noncordial graphs.

3.1. (Z2,+)-cordial/Non-cordial graphs

3.1.1. Smallest (Z2,+)-cordial/Non-cordial graphs

It is easily shown that the graph with one edge and all graphs with three edges are (Z2,+)-cordial. However, the connected graph with two edges (a 2-path or a 2-star) is (Z2,+)-cordial while the graph 2K2 is not and the complete graph on n4 vertices is not (Z2,+)-cordial..

3.1.2. Largest (Z2,+)-cordial/Non-cordial graphs

If n4, Kn is not (Z2,+)-cordial. So how large can a graph be and be (Z2,+)-cordial? That is: How many edges can a (Z2,+)-cordial graph on n vertices contain?

Let f be a friendly labeling of Kn. Since the labeling of the vertices of a complete graph is independent of the visual location of the vertex, we may assume that the vertices labeled 0 are located on the right half and the vertices labeled 1 are on the left. The vertices labeled 0 induce a graph of order n2(n21)2 and the vertices labeled 1 induce a subgraph of order n2(n21)2, or visa versa. In either case there are precisely n2(n21)2+n2(n21)2 edges labeled 0 and the others labeled 1.

So if n is even, say n=2k, there are k2k edges labeled 0 and k2 edges labeled 1. Thus to have a (Z2,+)-cordial graph one must delete at least k1 edges joining vertices that are labeled differently. Thus, when n=2k is even, there can be at most 2k22k+1 edges in a (Z2,+)-cordial graph.

If n is odd, say n=2k+1, there are k2+k edges labeled 1 and k2 edges labeled 0. Thus to get a graph that is (Z2,+)-cordial one must delete at least k1 edges connecting vertices labeled differently. Thus, when n=2k+1 is odd, there can be at most 2k2+1 edges in a (Z2,+)-cordial graph.

The added “+1” in the formulas accounts for the fact that for a cordial graph the cardinality of the two sets g1(0) and g1(1) may differ by 1.

3.2. Product cordial/non-cordial graphs

3.2.1. Smallest (Z2,×)-cordial/non-cordial graphs

It is easily shown that all graphs with one, two, or three edges are (Z2,×)-cordial. There are two graphs with four edges that are not (Z2,×)-cordial, the four cycle and a three cycle with an attached edge.

3.2.2. Largest (Z2,×)-cordial/non-cordial graphs

For a labeling of the vertices of a graph on n vertices to be friendly, at most n2 vertices can be labeled 1. Thus, at most n2(n21)2 edges can be labeled 1 for any product cordial graph on n vertices. Thus, a (Z2,×)-cordial graph on n vertices can have at most at most n2(n21) edges since n2(n21)2<12n(n1)21 if n4.

3.3. (2,3)-orientable/non-orientable graphs

3.3.1. Smallest (2,3)-orientable/non-orientable graphs

Note that the graph consisting of three mutually non incident arcs is (2,3)-cordial in the set of digraphs on seven or more vertices but not in the set of digraphs on six vertices. Thus the need for using nonisolated vertices in the above definition to avoid ambiguity. All other graphs consisting of the union of three edge graphs are (2,3)-orientable. There are a total of five non isomorphic graphs of three edges. See Figure 1 for the (2,3)-orientable ones and Figure 2 for the non orientable one.

Figure 1 (2,3)-orientable labelings of four 3-edge graphs
Figure 2 The non (2,3)-orientable 3-edge graph
3.3.2. Largest (2,3)-orientable/non-orientable graphs

It was shown in [1] that the only complete graphs that are (2,3)-orientable are for n5. For n6, Santana in [6] showed that for given n6 the maximum number of edges in a (2,3)-orientable graph is (1)(n2){(n22)+(n22)}+12((n2){(n22)+(n22)}). The proofs are similar to those in Section 3.1.2 above.

4. Linear operators on graphs

Let T:GnGn be a mapping such that the image of a union of graphs is the union of the images of the graphs and that the image of the edgeless (empty) graph, Kn¯, is the edgeless graph. Such a mapping is said to be a linear operator. Note that Gn is a semimodule over the set {0,1} where addition is union and scalar multiplication is Boolean, that is for XGn, 0X=Kn¯ and 1X=X. For convenience we use juxtaposition for multiplication and we denote Kn¯ by O. So T is a linear operator if for any U,VGn, T(UV)=T(U)T(V) and T(O)=O.

Let X be a subset of Gn. Then T is said to preserve the set X if whenever UX, T(U)X. We say T strongly preserves X if T preserves X and T preserves GnX.

Lemma 4.1. Let T:GnGn be a linear operator. Then the following are equivalent:

  1. T is injective;

  2. T is surjective;

  3. T is bijective.

Proof. This follows from the fact that Gn is finite.

Since a vertex permutation merely changes the order of the vertices (an independent labeling), we have:

Lemma 4.2. Every vertex permutation strongly preserves:

  1. the set of (Z2,+)-cordial graphs;

  2. the set of (Z2,×)-cordial graphs; and

  3. the set of (2,3)-orientable graphs.

Note that a linear mapping on Gn is nonsingular if and only if the only graph mapped to the edgeless graph is the edgeless graph. Because this semi module uses union for addition, nonsingularity does not imply invertibility as in vector spaces over fields.

Example 4.3. Let T:G10G10 and suppose that T(X)=Pet for all XG10 where Pet is the Petersen graph. Then T maps each 3-regular graph to a 3-regular graph (T preserves 3-regular graphs). But, T also maps every non 3-regular graph to a 3-regular graph.

Thus, in view of the above example, we place more restrictions on T in order to reasonably characterize preservers. This additional restriction is usually that T preserves some other set or function, that T is bijective, or, as below, that T strongly preserves the set.

Lemma 4.4. Let T:GnGn be a linear operator that strongly preserves

  1. the set of (Z2,+)-cordial graphs,

  2. the set of (Z2,×)-cordial graphs, or

  3. the set of (2,3)-orientable graphs.

Then T is nonsingular.

Proof. Suppose that T(X)=O for some XGn. Then for any edge graph EX we have that T(E)=O. Let H be the graph of: a) two parallel edges; b) a four cycle; or c) three parallel edges; one edge of which is E. Then, since T(E)=O, T(H)=T(HE), a contradiction since H is not: a) (Z2,+)-cordial; b) (Z2,×)-cordial; or c) (2,3)-orientable while HE is: a) (Z2,+)-cordial; b) (Z2,×)-cordial: or c) (2,3)-orientable; respectively. Thus, in each case, T is nonsingular.

Lemma 4.5. Let L:GnGn be an idempotent linear operator that strongly preserves

  1. the set of (Z2,+)-cordial graphs for n4,

  2. the set of (Z2,×)-cordial graphs for n4, or

  3. the set of (2,3)-orientable graphs for n6.

Then the image of an edge graph is an edge graph.

Proof. Let E be an edge graph and suppose that L(E)F where F is an edge graph, FE. Say L(E)=QF. Let G be: a) a (Z2,+)-cordial graph; b) a (Z2,×)-cordial graph; or c) a (2,3)-orientable graph; with the maximal number of edges such that GE and GF. This choice is possible since for n4, the complete graph Kn is not (Z2,+)-cordial or (Z2,×)-cordial, and for n6, Kn is not (2,3)-orientable. Then L(G)=L(GE)=L(G)L(E). Then, L(G)=L(G)L(E)=L(G)QF, so that L(G)=L2(G)=L(L(G))=L(L(G)L(Q)L(F))=L2(G)L(F)L(Q)=L(G)L(F)L(Q)=L(GFQ), a contradiction since G is: a) a (Z2,+)-cordial graph; b) a (Z2,×)-cordial graph; or c) a (2,3)-orientable graph, while GFQ cannot be: a) a (Z2,+)-cordial graph; b) a (Z2,×)-cordial graph; or c) a (2,3)-orientable graph; respectively, since it has too many edges. Thus L maps edge graphs to edge graphs.

Lemma 4.6. Let L:GnGn be an idempotent linear operator that strongly preserves

  1. the set of (Z2,+)-cordial graphs for n4,

  2. the set of (Z2,×)-cordial graphs for n4, or

  3. the set of (2,3)-orientable graphs for n6.

Then L is bijective.

Proof. By Lemma 4.5, L maps edge graphs to edge graphs. Thus, L is not bijective if and only if the image of two edge graphs are equal. Suppose that E and F are distinct edge graphs such that L(E)=L(F). Let G be: a) a (Z2,+)-cordial graph; b) a (Z2,×)-cordial graph; or c) a (2,3)-orientable graph; with the maximal number of edges such that GE and GF. Then L(G)=L(GE)=L(G)L(E)=L(G)L(F)=L(GF) a contradiction since G is: a) a (Z2,+)-cordial graph; b) a (Z2,×)-cordial graph; or c) a (2,3)-orientable graph, while GF cannot be: a) a (Z2,+)-cordial graph; b) a (Z2,×)-cordial graph; or c) a (2,3)-orientable graph; respectively, since it has too many edges.. Thus L is bijective on the set of edge graphs and since L is linear L is bijective on Gn.

An interesting fact about idempotent maps on finite sets is that they are bijective if and only if they are the identity:

Lemma 4.7. Let K be a finite set and let Φ:KK. If Φ is bijective and idempotent then Φ is the identity map.

Proof. Assume that Φ is bijective. Let AK and suppose that Φ(A)=B. Then, Φ(B)=Φ(Φ(A))=Φ2(A)=Φ(A) (since Φ is idempotent). So that Φ(A)=Φ(B). Therefore A=B since Φ is bijective and hence, Φ(A)=A for all AK.

Note that because union is the addition in Gn, any bijective map on Gn maps edge graphs to edge graphs and preserves |E(G)|, the number of edges in a graph

The next theorem uses the following lemma from [2]:

Lemma 4.8. [2, Lemma 2.2] If T:GnGn is bijective, preserves |E(G)|, and maps 2-stars to 2-stars then T is a vertex permutation.

Theorem 4.9. Let T:GnGn be a linear operator. Then, T strongly preserves

  1. the set of (Z2,+)-cordial graphs for n4,

  2. the set of (Z2,×)-cordial graphs for n5, or

  3. the set of (2,3)-orientable graphs for n6

if and only if T is a vertex permutation.

Proof. By Lemma 4.2, every vertex permutation strongly preserves the set of (Z2,+)-cordial graphs, the set of (Z2,×)-cordial graphs and the set of (2,3)-orientable graphs. So we now assume that T strongly preserves: a) the set of (Z2,+)-cordial graphs; b)the set of (Z2,×)-cordial graphs, or c) the set of (2,3)-orientable graphs. Let L=Td where d is chosen so that L is idempotent. By Lemma 4.6, L is bijective and hence the identity mapping. Now, suppose that T(X)=T(Y). Then Td1(T(X))=Td1(T(Y)) so that L(X)=Td(X)=Td1(T(X))=Td1(T(Y))=Td(Y)=L(Y). Since L is the identity, we have X=Y. That is T is injective and hence, by Lemma 4.1, T is bijective. Since addition is union, the image of any edge graph is a edge graph. Thus, for any graph, |E(G)|=|E(T(G))|. That is, T preserves |E(G)|.

Case 1. T preserves the set of (Z2,+)-cordial; graphs.

Let E and F be incident edges, so that EF is a 2-star (2-path) and suppose that T(EF) is a pair of non incident (parallel) edges. Then EF is (Z2,+)-cordial while its image is not, a contradiction. That is T maps 2-stars to 2-stars. By Lemma 4.8, T is a vertex permutation.

Case 2. T preserves the set of (Z2,×)-cordial; graphs.

Let E and F be incident edges, so that EF is a 2-star (2-path) and suppose that T(EF) is a pair of non incident (parallel) edges. Let K be the edge joining the vertices of EF that forms a triangle. Let G=EFK. Then there are 3(n3) edges that are adjacent to G. There are only three possible images of G since T is bijective and the image of any edge graph is an edge graph. T(G) is either a 2-star with a non-incident edge, a three path or three mutually parallel edges (a 3K2 ). If T(G) is a 2-star with a non-incident edge, there is only one edge added to T(G) that results in a non (Z2,×)-cordial graph. If T(G) is a 3K2, no edge added to T(G) results in a non (Z2,×)-cordial graph, and if T(G) is a three path, there are exactly three edges which, when any one is added to T(G) would result in a non (Z2,×)-cordial graph. Since G together with any one of the 3(n3) edges adjacent to G is a non (Z2,×)-cordial graph, so must its image be. Since we have shown that this is impossible, it follows that T maps 2-stars to 2-stars. By Lemma 4.8, T is a vertex permutation.

Case 3. T preserves the set of (2,3)-orientable graphs.

Let E and F be incident edges, so that EF is a 2-star (2-path) and suppose that T(EF) is a pair of non incident (parallel) edges. Let H be an edge graph such that the image of H is an edge graph parallel to both T(E) and T(F). Then, EFH is (2,3)-orientable while T(EFH), being three parallel edges, is not (2,3)-orientable, a contradiction. That is T maps 2-stars to 2-stars. By Lemma 4.8, T is a vertex permutation.

References:

  1. L. Beasley. Cordial digraphs. Journal of Combinatorial Mathematics and Combinatorial Computing, 121(1):59–66, 2024. 10.61091/jcmcc121-06.
  2. L. Beasley and N. J. Pullman. Linear operators preserving properties of graphs. Congressus Numerantium, 70:105–112, 1990.
  3. I. Cahit. Cordial graphs—a weaker version of graceful and harmonious graphs. Ars Combinatoria, 23:201–207, 1987.
  4. M. Hovey. A-cordial graphs. Discrete Mathematics, 93(2-3):183–194, 1991. https://doi.org/10.1016/0012-365X(91)90254-Y.
  5. E. Salehi. Pc-labeling of a graph and its pc-set. Bulletin of the Institute of Combinatorics and its Applications, 58:112–121, 2010.
  6. M. Santana, J. Mousley, D. Brown, and L. B. Beasley. (2, 3)-cordial trees and paths:119–127, 2021. https://doi.org/10.1007/978-3-031-52969-6_12.