Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Counting the Number of Domatic Partition of a Graph

Saeid Alikhani1,111Corresponding author    Davood Bakhshesh2    Nima Ghanbari1
(June 27, 2024)
Abstract

A subset of vertices S𝑆Sitalic_S of a graph G𝐺Gitalic_G is a dominating set if every vertex in Vβˆ–S𝑉𝑆V\setminus Sitalic_V βˆ– italic_S has at least one neighbor in S𝑆Sitalic_S. A domatic partition is a partition of the vertices of a graph G𝐺Gitalic_G into disjoint dominating sets. The domatic number d⁒(G)𝑑𝐺d(G)italic_d ( italic_G ) is the maximum size of a domatic partition. Suppose that d⁒p⁒(G,i)𝑑𝑝𝐺𝑖dp(G,i)italic_d italic_p ( italic_G , italic_i ) is the number of distinct domatic partition of G𝐺Gitalic_G with cardinality i𝑖iitalic_i. In this paper, we consider the generating function of d⁒p⁒(G,i)𝑑𝑝𝐺𝑖dp(G,i)italic_d italic_p ( italic_G , italic_i ), i.e., D⁒P⁒(G,x)=βˆ‘i=1d⁒(G)d⁒p⁒(G,i)⁒xi𝐷𝑃𝐺π‘₯superscriptsubscript𝑖1𝑑𝐺𝑑𝑝𝐺𝑖superscriptπ‘₯𝑖DP(G,x)=\sum_{i=1}^{d(G)}dp(G,i)x^{i}italic_D italic_P ( italic_G , italic_x ) = βˆ‘ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_d ( italic_G ) end_POSTSUPERSCRIPT italic_d italic_p ( italic_G , italic_i ) italic_x start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT which we call it the domatic partition polynomial. We explore the domatic polynomial for trees, providing a quadratic time algorithm for its computation based on weak 2-coloring numbers. Our results include specific findings for paths and certain graph products, demonstrating practical applications of our theoretical framework.

1Department of Mathematical Sciences, Yazd University, 89195-741, Yazd, Iran

2Department of Computer Science, University of Bojnord, Bojnord, Iran

alikhani@yazd.ac.ir, d.bakhshesh@ub.ac.ir, n.ghanbari.math@gmail.com

Keywords: Domatic partition, dominating set, counting.

AMS Subj.Β Class.: 05C69.

1 Introduction

Let G=(V,E)𝐺𝑉𝐸G=(V,E)italic_G = ( italic_V , italic_E ) be a simple graph of order n𝑛nitalic_n. The open neighborhood (closed neighborhood) of a vertex v∈V𝑣𝑉v\in Vitalic_v ∈ italic_V is the set N⁒(v)𝑁𝑣N(v)italic_N ( italic_v ) = {u|u⁒v∈E}conditional-set𝑒𝑒𝑣𝐸\{u|uv\in E\}{ italic_u | italic_u italic_v ∈ italic_E }, (the set N⁒[v]𝑁delimited-[]𝑣N[v]italic_N [ italic_v ] = N⁒(v)βˆͺ{v}𝑁𝑣𝑣N(v)\cup\{v\}italic_N ( italic_v ) βˆͺ { italic_v }). The number of vertices in |N⁒(v)|𝑁𝑣|N(v)|| italic_N ( italic_v ) | is the degree of v𝑣vitalic_v, denoted by d⁒e⁒g⁒(v)𝑑𝑒𝑔𝑣deg(v)italic_d italic_e italic_g ( italic_v ). A set SβŠ†V𝑆𝑉S\subseteq Vitalic_S βŠ† italic_V is a dominating set of a graph G𝐺Gitalic_G, if every vertex in Vβˆ–S𝑉𝑆V\setminus Sitalic_V βˆ– italic_S has at least one neighbor in S𝑆Sitalic_S, in other words N⁒[S]=V𝑁delimited-[]𝑆𝑉N[S]=Vitalic_N [ italic_S ] = italic_V. The cardinality of a minimum dominating set in G𝐺Gitalic_G is called the domination number of G𝐺Gitalic_G and is denoted by γ⁒(G)𝛾𝐺\gamma(G)italic_Ξ³ ( italic_G ). The various different domination concepts are well-studied now, however new concepts are introduced frequently and the interest is growing rapidly. We recommend two fundamental books [5, 6] and some surveys [4, 7] about domination in general.

A domatic partition is a partition of the vertex set into dominating sets, in other words, a partition Ο€πœ‹\piitalic_Ο€ = {V1,V2,…,Vk}subscript𝑉1subscript𝑉2…subscriptπ‘‰π‘˜\{V_{1},V_{2},...,V_{k}\}{ italic_V start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_V start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , … , italic_V start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT } of V⁒(G)𝑉𝐺V(G)italic_V ( italic_G ) such that every set Visubscript𝑉𝑖V_{i}italic_V start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is a dominating set in G𝐺Gitalic_G. Cockayne and Hedetniemi [2] introduced the domatic number of a graph d⁒(G)𝑑𝐺d(G)italic_d ( italic_G ) as the maximum order kπ‘˜kitalic_k of a vertex partition. For more details on the domatic number refer to e.g., [8, 9, 10].

Motivated by enumerating of the number of dominating sets of a graph and domination polynomial (see e.g. [1]), the enumeration of the domatic partition for certain graphs is a natural subject. In other words, we explore domatic partition from the point of view of the counting polynomial defined in the following standard way.

Definition 1.1

Let π’Ÿβ’π’«β’(G,i)π’Ÿπ’«πΊπ‘–{\cal DP}(G,i)caligraphic_D caligraphic_P ( italic_G , italic_i ) be the family of domatic partition of a graph G𝐺Gitalic_G with cardinality i𝑖iitalic_i, and let d⁒p⁒(G,i)=|π’Ÿβ’π’«β’(G,i)|π‘‘π‘πΊπ‘–π’Ÿπ’«πΊπ‘–dp(G,i)=|{\cal DP}(G,i)|italic_d italic_p ( italic_G , italic_i ) = | caligraphic_D caligraphic_P ( italic_G , italic_i ) |. The domatic polynomial D⁒P⁒(G,x)𝐷𝑃𝐺π‘₯DP(G,x)italic_D italic_P ( italic_G , italic_x ) of G𝐺Gitalic_G is defined as

D⁒P⁒(G,x)=βˆ‘i=1d⁒(G)d⁒p⁒(G,i)⁒xi,𝐷𝑃𝐺π‘₯superscriptsubscript𝑖1𝑑𝐺𝑑𝑝𝐺𝑖superscriptπ‘₯𝑖DP(G,x)=\sum_{i=1}^{d(G)}dp(G,i)x^{i},italic_D italic_P ( italic_G , italic_x ) = βˆ‘ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_d ( italic_G ) end_POSTSUPERSCRIPT italic_d italic_p ( italic_G , italic_i ) italic_x start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ,

where d⁒(G)𝑑𝐺d(G)italic_d ( italic_G ) is the domatic number of G𝐺Gitalic_G.

In Section 2, we explore various properties of the domatic polynomial. Moving on to Section 3, we delve into the investigation of the domatic polynomial for trees. Following that, in Section 4, we introduce a quadratic time algorithm designed to compute the domatic polynomial of trees, accompanied by an analysis of its time complexity. Lastly, we wrap up our paper with a conclusion in the final section.

2 Introduction to domatic polynomial

In this section, we obtain some properties of domatic polynomial of a graph. We need the following result:

Theorem 2.1

[2] For any graph G𝐺Gitalic_G, d⁒(G)≀δ+1𝑑𝐺𝛿1d(G)\leq\delta+1italic_d ( italic_G ) ≀ italic_Ξ΄ + 1, where δ𝛿\deltaitalic_Ξ΄ is the minimum degree of G𝐺Gitalic_G.

Also, we need the following easy lemma. It is well known that if there is no isolated vertex in the graph, i.e. Ξ΄β‰₯1𝛿1\delta\geq 1italic_Ξ΄ β‰₯ 1, then the domatic number is at least 2. For convenience, we present a proof.

Lemma 2.2

If G𝐺Gitalic_G is a connected graph, then d⁒(G)β‰₯2𝑑𝐺2d(G)\geq 2italic_d ( italic_G ) β‰₯ 2.

Proof.Β  Suppose that G𝐺Gitalic_G is a graph of order n𝑛nitalic_n, and D𝐷Ditalic_D is a dominating set of that with minimum size. Since G𝐺Gitalic_G is connected, so by Ore’s Theorem γ⁒(G)≀n2𝛾𝐺𝑛2\gamma(G)\leq\frac{n}{2}italic_Ξ³ ( italic_G ) ≀ divide start_ARG italic_n end_ARG start_ARG 2 end_ARG. Let D𝐷Ditalic_D be a dominating set of G𝐺Gitalic_G with minimum size. By the definition of dominating sets, then D¯¯𝐷\overline{D}overΒ― start_ARG italic_D end_ARG is a dominating set of G𝐺Gitalic_G too. So

P={D,DΒ―}𝑃𝐷¯𝐷P=\{D,\overline{D}\}italic_P = { italic_D , overΒ― start_ARG italic_D end_ARG }

is a domatic partition of G𝐺Gitalic_G, and therefore we have the result. β–‘β–‘\squareβ–‘

As an immediate result of definition of domatic number, d⁒p⁒(G,i)=0𝑑𝑝𝐺𝑖0dp(G,i)=0italic_d italic_p ( italic_G , italic_i ) = 0 for i>d⁒(G)𝑖𝑑𝐺i>d(G)italic_i > italic_d ( italic_G ). So the following definition is equivalent to the definition of domatic polynomial of a graph by using Theorem 2.1:

Definition 2.3

Let π’Ÿβ’π’«β’(G,i)π’Ÿπ’«πΊπ‘–{\cal DP}(G,i)caligraphic_D caligraphic_P ( italic_G , italic_i ) be the family of domatic partition of a graph G𝐺Gitalic_G with cardinality i𝑖iitalic_i, and let d⁒p⁒(G,i)=|π’Ÿβ’π’«β’(G,i)|π‘‘π‘πΊπ‘–π’Ÿπ’«πΊπ‘–dp(G,i)=|{\cal DP}(G,i)|italic_d italic_p ( italic_G , italic_i ) = | caligraphic_D caligraphic_P ( italic_G , italic_i ) |. The domatic polynomial D⁒P⁒(G,x)𝐷𝑃𝐺π‘₯DP(G,x)italic_D italic_P ( italic_G , italic_x ) of G𝐺Gitalic_G is defined as

D⁒P⁒(G,x)=βˆ‘i=1Ξ΄+1d⁒p⁒(G,i)⁒xi,𝐷𝑃𝐺π‘₯superscriptsubscript𝑖1𝛿1𝑑𝑝𝐺𝑖superscriptπ‘₯𝑖DP(G,x)=\sum_{i=1}^{\delta+1}dp(G,i)x^{i},italic_D italic_P ( italic_G , italic_x ) = βˆ‘ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_Ξ΄ + 1 end_POSTSUPERSCRIPT italic_d italic_p ( italic_G , italic_i ) italic_x start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ,

where δ𝛿\deltaitalic_Ξ΄ is the minimum degree of G𝐺Gitalic_G.

As an immediate result of Definition 2.3, we have the following result.

Proposition 2.4

If G𝐺Gitalic_G has isolate vertices, then

D⁒P⁒(G,x)=x.𝐷𝑃𝐺π‘₯π‘₯DP(G,x)=x.italic_D italic_P ( italic_G , italic_x ) = italic_x .

In [3], it was shown that finding domatic number of a graph is NP-complete. Consequently, we have the following result.

Theorem 2.5

Computation of the domatic polynomial of a graph is NP-complete.

A weak kπ‘˜kitalic_k-coloring of a graph G=(V,E)𝐺𝑉𝐸G=(V,E)italic_G = ( italic_V , italic_E ) assigns a color c⁒(v)∈{1,2,…,k}𝑐𝑣12β€¦π‘˜c(v)\in\{1,2,\ldots,k\}italic_c ( italic_v ) ∈ { 1 , 2 , … , italic_k } to each vertex v∈V𝑣𝑉v\in Vitalic_v ∈ italic_V, such that each non-isolated vertex is adjacent to at least one vertex with different color. So a weak 2222-coloring of a graph is equivalent to finding a domatic partition of a graph of size 2222. In the following, let 𝒲⁒(G,2)𝒲𝐺2{\cal W}(G,2)caligraphic_W ( italic_G , 2 ) be the family of weak 2222-coloring of a graph G𝐺Gitalic_G, and let w2⁒(G)=|𝒲⁒(G,2)|subscript𝑀2𝐺𝒲𝐺2w_{2}(G)=|{\cal W}(G,2)|italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_G ) = | caligraphic_W ( italic_G , 2 ) |. So d⁒p⁒(G,2)=w2⁒(G)𝑑𝑝𝐺2subscript𝑀2𝐺dp(G,2)=w_{2}(G)italic_d italic_p ( italic_G , 2 ) = italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_G ).

We conclude this section, with the following results which are immediately obtained by the Definition 1.1.

Proposition 2.6

Let G𝐺Gitalic_G be a graph, and d⁒(G)=rπ‘‘πΊπ‘Ÿd(G)=ritalic_d ( italic_G ) = italic_r. The following holds:

  • (i)

    d⁒p⁒(G,1)=1.𝑑𝑝𝐺11dp(G,1)=1.italic_d italic_p ( italic_G , 1 ) = 1 .

  • (ii)

    d⁒p⁒(G,2)𝑑𝑝𝐺2dp(G,2)italic_d italic_p ( italic_G , 2 ) is the number of weak 2-coloring of G𝐺Gitalic_G.

  • (iii)

    D⁒P⁒(G,1)𝐷𝑃𝐺1DP(G,1)italic_D italic_P ( italic_G , 1 ) is the number of all domatic partition of G𝐺Gitalic_G.

  • (iv)

    drd⁒xr⁒D⁒P⁒(G,x)=r!⁒d⁒p⁒(G,r).superscriptdrdsuperscriptπ‘₯r𝐷𝑃𝐺π‘₯π‘Ÿπ‘‘π‘πΊπ‘Ÿ\frac{\mathrm{d^{r}}}{\mathrm{d}x^{\mathrm{r}}}DP(G,x)=r!dp(G,r).divide start_ARG roman_d start_POSTSUPERSCRIPT roman_r end_POSTSUPERSCRIPT end_ARG start_ARG roman_d italic_x start_POSTSUPERSCRIPT roman_r end_POSTSUPERSCRIPT end_ARG italic_D italic_P ( italic_G , italic_x ) = italic_r ! italic_d italic_p ( italic_G , italic_r ) .

  • (v)

    dsd⁒xs⁒D⁒P⁒(G,x)=0,superscriptdsdsuperscriptπ‘₯s𝐷𝑃𝐺π‘₯0\frac{\mathrm{d^{s}}}{\mathrm{d}x^{\mathrm{s}}}DP(G,x)=0,divide start_ARG roman_d start_POSTSUPERSCRIPT roman_s end_POSTSUPERSCRIPT end_ARG start_ARG roman_d italic_x start_POSTSUPERSCRIPT roman_s end_POSTSUPERSCRIPT end_ARG italic_D italic_P ( italic_G , italic_x ) = 0 , for s>rπ‘ π‘Ÿs>ritalic_s > italic_r.

  • (vi)

    Zero is a root of D⁒P⁒(G,x)𝐷𝑃𝐺π‘₯DP(G,x)italic_D italic_P ( italic_G , italic_x ), with multiplicity one.

3 Domatic Polynomial of Trees

In this section, we aim to compute the domatic polynomial for a given tree. By TheoremΒ 2.1 and Lemma 2.2, if T𝑇Titalic_T is a tree, then d⁒(T)=2𝑑𝑇2d(T)=2italic_d ( italic_T ) = 2. So we have the following result:

Proposition 3.1

Let T𝑇Titalic_T be a tree. Then d⁒(T)=2𝑑𝑇2d(T)=2italic_d ( italic_T ) = 2, and D⁒P⁒(T,x)=x+w2⁒(T)⁒x2𝐷𝑃𝑇π‘₯π‘₯subscript𝑀2𝑇superscriptπ‘₯2DP(T,x)=x+w_{2}(T)x^{2}italic_D italic_P ( italic_T , italic_x ) = italic_x + italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T ) italic_x start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT.

Let T𝑇Titalic_T be a tree and u𝑒uitalic_u be a support vertex. Let o⁒n⁒e⁒s⁒(u)π‘œπ‘›π‘’π‘ π‘’ones(u)italic_o italic_n italic_e italic_s ( italic_u ) be the collection of vertices that have a degree of 1 and share an edge with u𝑒uitalic_u. Let Tuβˆ’1superscriptsubscript𝑇𝑒1T_{u}^{-1}italic_T start_POSTSUBSCRIPT italic_u end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT and Tuβˆ’2superscriptsubscript𝑇𝑒2T_{u}^{-2}italic_T start_POSTSUBSCRIPT italic_u end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT be two trees obtained from T𝑇Titalic_T by removing the vertices o⁒n⁒e⁒s⁒(u)π‘œπ‘›π‘’π‘ π‘’ones(u)italic_o italic_n italic_e italic_s ( italic_u ) and o⁒n⁒e⁒s⁒(u)βˆͺ{u}π‘œπ‘›π‘’π‘ π‘’π‘’ones(u)\cup\{u\}italic_o italic_n italic_e italic_s ( italic_u ) βˆͺ { italic_u }, respectively.

In a tree, we call a vertex v𝑣vitalic_v as a quasi-star vertex of tree if it satisfies the following conditions:

  • β€’

    v𝑣vitalic_v is adjacent to exactly one non-leaf vertex (an internal vertex).

  • β€’

    v𝑣vitalic_v is adjacent to at least one leaf (vertex with degree 1).

We call a tree containing a quasi-star vertex by star-neighbor tree. Now, we prove the following result.

Theorem 3.2

For any star-neighbor tree T𝑇Titalic_T of order nβ‰₯4𝑛4n\geq 4italic_n β‰₯ 4, if y𝑦yitalic_y is its quasi-star vertex, then

w2⁒(T)=w2⁒(Tyβˆ’1)+w2⁒(Tyβˆ’2),subscript𝑀2𝑇subscript𝑀2superscriptsubscript𝑇𝑦1subscript𝑀2superscriptsubscript𝑇𝑦2w_{2}(T)=w_{2}(T_{y}^{-1})+w_{2}(T_{y}^{-2}),italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T ) = italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ) + italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT ) ,

where w2⁒(K1,r)=1subscript𝑀2subscript𝐾1π‘Ÿ1w_{2}(K_{1,r})=1italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_K start_POSTSUBSCRIPT 1 , italic_r end_POSTSUBSCRIPT ) = 1, for any rβ‰₯1π‘Ÿ1r\geq 1italic_r β‰₯ 1.

Proof.Β  It is clear that for any rβ‰₯1π‘Ÿ1r\geq 1italic_r β‰₯ 1, w2⁒(K1,r)=1subscript𝑀2subscript𝐾1π‘Ÿ1w_{2}(K_{1,r})=1italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_K start_POSTSUBSCRIPT 1 , italic_r end_POSTSUBSCRIPT ) = 1. Suppose that π’žπ’ž\cal{C}caligraphic_C is a weak 2-coloring for tree T𝑇Titalic_T. We will show that with this coloring, if we cannot construct a weak 2-coloring for tree Tyβˆ’1superscriptsubscript𝑇𝑦1T_{y}^{-1}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT, we can certainly construct a weak 2-coloring for tree Tyβˆ’2superscriptsubscript𝑇𝑦2T_{y}^{-2}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT using it. Also, suppose that the non-leaf vertex adjacent to vertex y𝑦yitalic_y is vertex w𝑀witalic_w. It is easy to see that if the colors of vertices y𝑦yitalic_y and w𝑀witalic_w are different, then coloring π’žπ’ž\cal{C}caligraphic_C is indeed a coloring for tree Tyβˆ’1superscriptsubscript𝑇𝑦1T_{y}^{-1}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT. Now, assume that in coloring π’žπ’ž\cal{C}caligraphic_C, the colors of the two vertices y𝑦yitalic_y and w𝑀witalic_w are the same. Therefore, it is clear that since vertex y𝑦yitalic_y is a leaf in tree Tyβˆ’1superscriptsubscript𝑇𝑦1T_{y}^{-1}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT, coloring π’žπ’ž\cal{C}caligraphic_C is not a coloring for Tyβˆ’1superscriptsubscript𝑇𝑦1T_{y}^{-1}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT, but since vertex w𝑀witalic_w must, by the definition of weak 2-coloring, be adjacent to a vertex with a different color, one of the vertices adjacent to w𝑀witalic_w must have a different color from w𝑀witalic_w. Therefore, we conclude that coloring π’žπ’ž\cal{C}caligraphic_C is a coloring for tree Tyβˆ’2superscriptsubscript𝑇𝑦2T_{y}^{-2}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT.

Based on the above discussion, we can derive the relationship w2⁒(T)≀w2⁒(Tyβˆ’1)+w2⁒(Tyβˆ’2)subscript𝑀2𝑇subscript𝑀2superscriptsubscript𝑇𝑦1subscript𝑀2superscriptsubscript𝑇𝑦2w_{2}(T)\leq w_{2}(T_{y}^{-1})+w_{2}(T_{y}^{-2})italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T ) ≀ italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ) + italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT ).

Now, since any coloring for tree Tyβˆ’1superscriptsubscript𝑇𝑦1T_{y}^{-1}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT or Tyβˆ’2superscriptsubscript𝑇𝑦2T_{y}^{-2}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT can easily be transformed into a coloring for tree T𝑇Titalic_T, the above relationship is an exact equality. Therefore, the theorem is proved. β–‘β–‘\squareβ–‘

Now, consider a path Pnsubscript𝑃𝑛P_{n}italic_P start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT. It is clear that Pnsubscript𝑃𝑛P_{n}italic_P start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT is a star-neighbor tree. Let T:=Pnassign𝑇subscript𝑃𝑛T:=P_{n}italic_T := italic_P start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT. It is clear that Tyβˆ’1superscriptsubscript𝑇𝑦1T_{y}^{-1}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT or Tyβˆ’2superscriptsubscript𝑇𝑦2T_{y}^{-2}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT are Pnβˆ’1subscript𝑃𝑛1P_{n-1}italic_P start_POSTSUBSCRIPT italic_n - 1 end_POSTSUBSCRIPT and Pnβˆ’2subscript𝑃𝑛2P_{n-2}italic_P start_POSTSUBSCRIPT italic_n - 2 end_POSTSUBSCRIPT, respectively. Now, using Theorem 3.2, we have the following result.

Corollary 3.3

For any path Pnsubscript𝑃𝑛P_{n}italic_P start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT of order nβ‰₯4𝑛4n\geq 4italic_n β‰₯ 4,

w2⁒(Pn)=w2⁒(Pnβˆ’1)+w2⁒(Pnβˆ’2),subscript𝑀2subscript𝑃𝑛subscript𝑀2subscript𝑃𝑛1subscript𝑀2subscript𝑃𝑛2w_{2}(P_{n})=w_{2}(P_{n-1})+w_{2}(P_{n-2}),italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_P start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) = italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_P start_POSTSUBSCRIPT italic_n - 1 end_POSTSUBSCRIPT ) + italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_P start_POSTSUBSCRIPT italic_n - 2 end_POSTSUBSCRIPT ) ,

where w2⁒(P3)=w2⁒(P2)=1subscript𝑀2subscript𝑃3subscript𝑀2subscript𝑃21w_{2}(P_{3})=w_{2}(P_{2})=1italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_P start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT ) = italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_P start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) = 1.

As an immediate result of Corollary 3.3, we have:

Corollary 3.4

limnβ†’βˆžw2⁒(Pn+1)w2⁒(Pn)=Ο•,subscript→𝑛subscript𝑀2subscript𝑃𝑛1subscript𝑀2subscript𝑃𝑛italic-Ο•\lim_{n\to\infty}\frac{w_{2}(P_{n+1})}{w_{2}(P_{n})}=\phi,roman_lim start_POSTSUBSCRIPT italic_n β†’ ∞ end_POSTSUBSCRIPT divide start_ARG italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_P start_POSTSUBSCRIPT italic_n + 1 end_POSTSUBSCRIPT ) end_ARG start_ARG italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_P start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) end_ARG = italic_Ο• , where Ο•italic-Ο•\phiitalic_Ο• is the golden ratio.

Proof.Β  Since w2⁒(Pn)subscript𝑀2subscript𝑃𝑛w_{2}(P_{n})italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_P start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) follows the Fibonacci sequence, we have the result. β–‘β–‘\squareβ–‘

Let w1,w2,…,wksubscript𝑀1subscript𝑀2…subscriptπ‘€π‘˜w_{1},w_{2},\ldots,w_{k}italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , … , italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT be some vertices of a graph G𝐺Gitalic_G. Let B⁒(G;w1,…,wk)𝐡𝐺subscript𝑀1…subscriptπ‘€π‘˜B(G;w_{1},...,w_{k})italic_B ( italic_G ; italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT ) be the bouquet of graph G𝐺Gitalic_G with respect to the vertices {wi}i=1ksuperscriptsubscriptsubscript𝑀𝑖𝑖1π‘˜\{w_{i}\}_{i=1}^{k}{ italic_w start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT } start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_k end_POSTSUPERSCRIPT and obtained by identifying the vertex wisubscript𝑀𝑖w_{i}italic_w start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT of the graph with vertex w𝑀witalic_w.


Consider a tree denoted by T𝑇Titalic_T, and select a support vertex within T𝑇Titalic_T, labeled y𝑦yitalic_y. Let N⁒(y)βˆ–o⁒n⁒e⁒s⁒(y)={w1,w2,…,wk}π‘π‘¦π‘œπ‘›π‘’π‘ π‘¦subscript𝑀1subscript𝑀2…subscriptπ‘€π‘˜N(y)\setminus ones(y)=\{w_{1},w_{2},\ldots,w_{k}\}italic_N ( italic_y ) βˆ– italic_o italic_n italic_e italic_s ( italic_y ) = { italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , … , italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT }. The tree obtained by bouqueting the vertices {w1,w2,…,wk}subscript𝑀1subscript𝑀2…subscriptπ‘€π‘˜\{w_{1},w_{2},\ldots,w_{k}\}{ italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , … , italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT } is denoted as Tβ€²superscript𝑇′T^{\prime}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT (see FigureΒ 1).

Refer to caption
Figure 1: A tree T𝑇Titalic_T and the tree Tβ€²superscript𝑇′T^{\prime}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT.

Now, we prove the following result.

Theorem 3.5

For any tree T𝑇Titalic_T of order n>1𝑛1n>1italic_n > 1, if y𝑦yitalic_y is one of its support vertices, then

w2⁒(T)=w2⁒(Tyβˆ’1)+w2⁒(Tβ€²yβˆ’2).subscript𝑀2𝑇subscript𝑀2superscriptsubscript𝑇𝑦1subscript𝑀2superscriptsubscriptsuperscript𝑇′𝑦2w_{2}(T)=w_{2}(T_{y}^{-1})+w_{2}({T^{\prime}}_{y}^{-2}).italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T ) = italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ) + italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT ) .

Proof.Β  Suppose that π’žπ’ž\cal{C}caligraphic_C is a weak 2-coloring for tree T𝑇Titalic_T. We will show that with this coloring, if we cannot construct a weak 2-coloring for tree Tyβˆ’1superscriptsubscript𝑇𝑦1T_{y}^{-1}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT, we can certainly construct a weak 2-coloring for tree Tβ€²yβˆ’2superscriptsubscriptsuperscript𝑇′𝑦2{T^{\prime}}_{y}^{-2}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT using it. Also, let N⁒(y)βˆ–o⁒n⁒e⁒s⁒(y)={w1,w2,…,wk}π‘π‘¦π‘œπ‘›π‘’π‘ π‘¦subscript𝑀1subscript𝑀2…subscriptπ‘€π‘˜N(y)\setminus ones(y)=\{w_{1},w_{2},\ldots,w_{k}\}italic_N ( italic_y ) βˆ– italic_o italic_n italic_e italic_s ( italic_y ) = { italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , … , italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT }. It is easy to see that if the colors of vertices y𝑦yitalic_y and one of the vertices {w1,w2,…,wk}subscript𝑀1subscript𝑀2…subscriptπ‘€π‘˜\{w_{1},w_{2},\ldots,w_{k}\}{ italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , … , italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT } are different, then coloring π’žπ’ž\cal{C}caligraphic_C is indeed a coloring for tree Tyβˆ’1superscriptsubscript𝑇𝑦1T_{y}^{-1}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT. Now, assume that in coloring π’žπ’ž\cal{C}caligraphic_C, the colors of the vertices y𝑦yitalic_y and all vertices {w1,w2,…,wk}subscript𝑀1subscript𝑀2…subscriptπ‘€π‘˜\{w_{1},w_{2},\ldots,w_{k}\}{ italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , … , italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT } are the same. Now, by bouqueting the vertices {w1,w2,…,wk}subscript𝑀1subscript𝑀2…subscriptπ‘€π‘˜\{w_{1},w_{2},\ldots,w_{k}\}{ italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , … , italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT } into a vertex w𝑀witalic_w, we obtain the tree Tβ€²superscript𝑇′T^{\prime}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT. We color the vertex w𝑀witalic_w by the color assigned to the vertices {w1,w2,…,wk}subscript𝑀1subscript𝑀2…subscriptπ‘€π‘˜\{w_{1},w_{2},\ldots,w_{k}\}{ italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , … , italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT }. Since w𝑀witalic_w have the same color with y𝑦yitalic_y, coloring π’žπ’ž\cal{C}caligraphic_C is not a coloring for Tβ€²yβˆ’1superscriptsubscriptsuperscript𝑇′𝑦1{T^{\prime}}_{y}^{-1}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT, but since the vertex w𝑀witalic_w in Tβ€²superscript𝑇′T^{\prime}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT must, by the definition of weak 2-coloring, be adjacent to a vertex with a different color, one of the vertices adjacent to w𝑀witalic_w must have a different color from w𝑀witalic_w. Therefore, we conclude that coloring π’žπ’ž\cal{C}caligraphic_C is a coloring for tree Tβ€²yβˆ’2superscriptsubscriptsuperscript𝑇′𝑦2{T^{\prime}}_{y}^{-2}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT.

Based on the above discussion, we can derive the relationship w2⁒(T)=w2⁒(Tyβˆ’1)+w2⁒(Tβ€²yβˆ’2)subscript𝑀2𝑇subscript𝑀2superscriptsubscript𝑇𝑦1subscript𝑀2superscriptsubscriptsuperscript𝑇′𝑦2w_{2}(T)=w_{2}(T_{y}^{-1})+w_{2}({T^{\prime}}_{y}^{-2})italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T ) = italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ) + italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT ).

Now, since any coloring for tree Tyβˆ’1superscriptsubscript𝑇𝑦1T_{y}^{-1}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT or Tβ€²yβˆ’2superscriptsubscriptsuperscript𝑇′𝑦2{T^{\prime}}_{y}^{-2}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT can easily be transformed into a coloring for tree T𝑇Titalic_T, the above relationship is an exact equality. Therefore, the theorem is proved. β–‘β–‘\squareβ–‘

As an another conclusion of Theorem 3.5, we have the following result.

Proposition 3.6

If Pnsubscript𝑃𝑛P_{n}italic_P start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT is a path of order n𝑛nitalic_n, then

D⁒P⁒(Pn∘K1,x)=x+2nβˆ’1⁒x2.𝐷𝑃subscript𝑃𝑛subscript𝐾1π‘₯π‘₯superscript2𝑛1superscriptπ‘₯2DP(P_{n}\circ K_{1},x)=x+2^{n-1}x^{2}.italic_D italic_P ( italic_P start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ∘ italic_K start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_x ) = italic_x + 2 start_POSTSUPERSCRIPT italic_n - 1 end_POSTSUPERSCRIPT italic_x start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT .

Proof.Β  It is not hard to see that by Theorem 3.5, w2⁒(Pn∘K1)=2⁒w2⁒(Pnβˆ’1∘K1)subscript𝑀2subscript𝑃𝑛subscript𝐾12subscript𝑀2subscript𝑃𝑛1subscript𝐾1w_{2}(P_{n}\circ K_{1})=2w_{2}(P_{n-1}\circ K_{1})italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_P start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ∘ italic_K start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) = 2 italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_P start_POSTSUBSCRIPT italic_n - 1 end_POSTSUBSCRIPT ∘ italic_K start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ). Since w2⁒(P2∘K1)=2subscript𝑀2subscript𝑃2subscript𝐾12w_{2}(P_{2}\circ K_{1})=2italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_P start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ∘ italic_K start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) = 2, we easily conclude that w2⁒(Pn∘K1)=2nβˆ’1subscript𝑀2subscript𝑃𝑛subscript𝐾1superscript2𝑛1w_{2}(P_{n}\circ K_{1})=2^{n-1}italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_P start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ∘ italic_K start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) = 2 start_POSTSUPERSCRIPT italic_n - 1 end_POSTSUPERSCRIPT. Hence, D⁒P⁒(Pn∘K1,x)=x+2nβˆ’1⁒x2.𝐷𝑃subscript𝑃𝑛subscript𝐾1π‘₯π‘₯superscript2𝑛1superscriptπ‘₯2DP(P_{n}\circ K_{1},x)=x+2^{n-1}x^{2}.italic_D italic_P ( italic_P start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ∘ italic_K start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_x ) = italic_x + 2 start_POSTSUPERSCRIPT italic_n - 1 end_POSTSUPERSCRIPT italic_x start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT .

Finally, we extend the previous result as follows.

Theorem 3.7

Let G𝐺Gitalic_G be a graph of order n𝑛nitalic_n, and let r>0π‘Ÿ0r>0italic_r > 0 be an integer. Then

D⁒P⁒(G∘KΒ―r,x)=x+2nβˆ’1⁒x2.𝐷𝑃𝐺subscriptΒ―πΎπ‘Ÿπ‘₯π‘₯superscript2𝑛1superscriptπ‘₯2DP(G\circ\overline{K}_{r},x)=x+2^{n-1}x^{2}.italic_D italic_P ( italic_G ∘ overΒ― start_ARG italic_K end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT , italic_x ) = italic_x + 2 start_POSTSUPERSCRIPT italic_n - 1 end_POSTSUPERSCRIPT italic_x start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT .

Proof.Β  Assume we have two colors c1subscript𝑐1c_{1}italic_c start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT and c2subscript𝑐2c_{2}italic_c start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT for coloring of G𝐺Gitalic_G. As we know, each vertex of the graph G𝐺Gitalic_G is adjacent to at least rπ‘Ÿritalic_r vertices of degree one. Therefore, for a weak 2-coloring of G𝐺Gitalic_G, any color assigned to vertex xπ‘₯xitalic_x must be different from the colors assigned to all its adjacent vertices of degree one. Hence, the method of coloring is completely determined. Now, since each vertex in G𝐺Gitalic_G has two coloring options, the total number of ways to color (weak 2-coloring) the graph is 2nsuperscript2𝑛2^{n}2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT. However, by swapping color c1subscript𝑐1c_{1}italic_c start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT with color c2subscript𝑐2c_{2}italic_c start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT, we obtain another coloring, but in terms of domatic partitioning, it is no different from the coloring before the swap. Therefore, the total number of distinct weak 2-colorings of the graph is 2nβˆ’1superscript2𝑛12^{n-1}2 start_POSTSUPERSCRIPT italic_n - 1 end_POSTSUPERSCRIPT. Hence, w2(G∘KΒ―)=2nβˆ’1w_{2}(G\circ\overline{K}_{)}=2^{n-1}italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_G ∘ overΒ― start_ARG italic_K end_ARG start_POSTSUBSCRIPT ) end_POSTSUBSCRIPT = 2 start_POSTSUPERSCRIPT italic_n - 1 end_POSTSUPERSCRIPT that completes the proof. β–‘β–‘\squareβ–‘

4 Algorithm and analysis

Based on Theorem 3.5, we provide the following algorithm that computes the w2⁒(T)subscript𝑀2𝑇w_{2}(T)italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T ) for a tree T𝑇Titalic_T.

Input: Tree T𝑇Titalic_T
Output: w2⁒(T)subscript𝑀2𝑇w_{2}(T)italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T )
1
2
3FunctionΒ ComputeW2(T𝑇Titalic_T):
4Β Β Β Β Β Β  ifΒ T𝑇Titalic_T has only one vertexΒ then
5Β Β Β Β Β Β Β Β Β Β Β Β  return 0;
6Β Β Β Β Β Β Β Β Β Β Β Β 
7Β Β Β Β Β Β  end if
8Β Β Β Β Β Β Identify a support vertex y𝑦yitalic_y in T𝑇Titalic_T;
9Β Β Β Β Β Β  Compute o⁒n⁒e⁒s⁒(y)π‘œπ‘›π‘’π‘ π‘¦ones(y)italic_o italic_n italic_e italic_s ( italic_y ) (vertices of degree 1 adjacent to y𝑦yitalic_y);
10Β Β Β Β Β Β  Compute Tyβˆ’1superscriptsubscript𝑇𝑦1T_{y}^{-1}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT by removing vertices in ones⁒(y)ones𝑦\text{ones}(y)ones ( italic_y );
11Β Β Β Β Β Β  Compute Tβ€²superscript𝑇′{T^{\prime}}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT by bouqueting the vertices {w1,w2,…,wk}subscript𝑀1subscript𝑀2…subscriptπ‘€π‘˜\{w_{1},w_{2},\ldots,w_{k}\}{ italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , … , italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT } in T𝑇Titalic_T;
12Β Β Β Β Β Β  Compute Tβ€²yβˆ’2superscriptsubscriptsuperscript𝑇′𝑦2{T^{\prime}}_{y}^{-2}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT by further removing vertex y𝑦yitalic_y from Tβ€²yβˆ’1superscriptsubscriptsuperscript𝑇′𝑦1{T^{\prime}}_{y}^{-1}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT;
13Β Β Β Β Β Β 
14
15
16return ComputeW2(Tyβˆ’1superscriptsubscript𝑇𝑦1T_{y}^{-1}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT) + ComputeW2(Tβ€²yβˆ’2superscriptsubscriptsuperscript𝑇′𝑦2{T^{\prime}}_{y}^{-2}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT);
AlgorithmΒ 1 Algorithm to compute w2⁒(T)subscript𝑀2𝑇w_{2}(T)italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T ) in a tree T𝑇Titalic_T

Now, we analyze the time complexity of the algorithm.

To analyze the time complexity of the algorithm for computing w2⁒(T)subscript𝑀2𝑇w_{2}(T)italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T ) for a tree T𝑇Titalic_T of order n𝑛nitalic_n, we consider the following steps:

  • β€’

    Step 1: Identifying a support vertex y𝑦yitalic_y:

    • –

      Traversing the tree and checking the degrees of vertices takes O⁒(n)𝑂𝑛O(n)italic_O ( italic_n ) time.

  • β€’

    Step 2: Computing o⁒n⁒e⁒s⁒(y)π‘œπ‘›π‘’π‘ π‘¦{ones}(y)italic_o italic_n italic_e italic_s ( italic_y ):

    • –

      Identifying the vertices of degree 1 adjacent to y𝑦yitalic_y can be done in O⁒(dy)𝑂subscript𝑑𝑦O(d_{y})italic_O ( italic_d start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT ) time, where dysubscript𝑑𝑦d_{y}italic_d start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT is the degree of y𝑦yitalic_y.

    • –

      Since dysubscript𝑑𝑦d_{y}italic_d start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT can be at most nβˆ’1𝑛1n-1italic_n - 1, this step is bounded by O⁒(n)𝑂𝑛O(n)italic_O ( italic_n ).

  • β€’

    Step 3: Computing Tyβˆ’1superscriptsubscript𝑇𝑦1T_{y}^{-1}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT:

    • –

      Removing the vertices in o⁒n⁒e⁒s⁒(y)π‘œπ‘›π‘’π‘ π‘¦{ones}(y)italic_o italic_n italic_e italic_s ( italic_y ) involves visiting each of these vertices and removing them, which can be done in O⁒(dy)𝑂subscript𝑑𝑦O(d_{y})italic_O ( italic_d start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT ) time.

    • –

      This step is bounded by O⁒(n)𝑂𝑛O(n)italic_O ( italic_n ) since dy≀nβˆ’1subscript𝑑𝑦𝑛1d_{y}\leq n-1italic_d start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT ≀ italic_n - 1.

  • β€’

    Step 4: Computing Tβ€²superscript𝑇′{T^{\prime}}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT:

    • –

      Contracting vertices {w1,w2,…,wk}subscript𝑀1subscript𝑀2…subscriptπ‘€π‘˜\{w_{1},w_{2},\ldots,w_{k}\}{ italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , … , italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT } into a single vertex involves merging these vertices and updating the edges.

    • –

      This can be done in O⁒(n)𝑂𝑛O(n)italic_O ( italic_n ) time.

  • β€’

    Step 5: Computing Tβ€²yβˆ’2superscriptsubscriptsuperscript𝑇′𝑦2{T^{\prime}}_{y}^{-2}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT:

    • –

      Removing vertex y𝑦yitalic_y from Tβ€²superscript𝑇′{T^{\prime}}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT can be done in O⁒(1)𝑂1O(1)italic_O ( 1 ) time.

  • β€’

    Step 6: Recursive computation of w2subscript𝑀2w_{2}italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT:

    • –

      The function w2subscript𝑀2w_{2}italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT is computed recursively on Tyβˆ’1superscriptsubscript𝑇𝑦1T_{y}^{-1}italic_T start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT and Tβ€²yβˆ’2superscriptsubscriptsuperscript𝑇′𝑦2{T^{\prime}}_{y}^{-2}italic_T start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT.

    • –

      Let n1subscript𝑛1n_{1}italic_n start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT and n2subscript𝑛2n_{2}italic_n start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT be the sizes of the smaller subtrees formed after removing vertices from T𝑇Titalic_T. The combined size is n1+n2≀nsubscript𝑛1subscript𝑛2𝑛n_{1}+n_{2}\leq nitalic_n start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT + italic_n start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ≀ italic_n.

The recurrence relation for the time complexity T⁒(n)𝑇𝑛T(n)italic_T ( italic_n ) is:

T⁒(n)=T⁒(n1)+T⁒(n2)+O⁒(n).𝑇𝑛𝑇subscript𝑛1𝑇subscript𝑛2𝑂𝑛T(n)=T(n_{1})+T(n_{2})+O(n).italic_T ( italic_n ) = italic_T ( italic_n start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) + italic_T ( italic_n start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) + italic_O ( italic_n ) .

Using the Master Theorem for divide-and-conquer recurrences, we analyze this recurrence:

  • β€’

    Case 1: Balanced subproblems

    T⁒(n)=2⁒T⁒(n2)+O⁒(n).𝑇𝑛2𝑇𝑛2𝑂𝑛T(n)=2T\left(\frac{n}{2}\right)+O(n).italic_T ( italic_n ) = 2 italic_T ( divide start_ARG italic_n end_ARG start_ARG 2 end_ARG ) + italic_O ( italic_n ) .

    According to the Master Theorem, this recurrence has a solution of T⁒(n)=O⁒(n⁒log⁑n)𝑇𝑛𝑂𝑛𝑛T(n)=O(n\log n)italic_T ( italic_n ) = italic_O ( italic_n roman_log italic_n ).

  • β€’

    Case 2: Highly unbalanced subproblems

    T⁒(n)=T⁒(nβˆ’1)+O⁒(n).𝑇𝑛𝑇𝑛1𝑂𝑛T(n)=T(n-1)+O(n).italic_T ( italic_n ) = italic_T ( italic_n - 1 ) + italic_O ( italic_n ) .

    This recurrence results in a time complexity of T⁒(n)=O⁒(n2)𝑇𝑛𝑂superscript𝑛2T(n)=O(n^{2})italic_T ( italic_n ) = italic_O ( italic_n start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ).

Now, we finalize this section.

Theorem 4.1

The worst-case time complexity of the algorithm for computing w2⁒(T)subscript𝑀2𝑇w_{2}(T)italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T ) for a tree T𝑇Titalic_T of order n𝑛nitalic_n is O⁒(n2)𝑂superscript𝑛2O(n^{2})italic_O ( italic_n start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ).

5 Conclusion

In this paper, we have introduced and analyzed the domatic partition polynomial of a graph, D⁒P⁒(G,x)𝐷𝑃𝐺π‘₯DP(G,x)italic_D italic_P ( italic_G , italic_x ), which enumerates the domatic partitions of G𝐺Gitalic_G by their cardinality. We have established several properties of this polynomial, including its relationship with the minimum degree of the graph and its computational complexity. Specifically, we demonstrated that computing the domatic polynomial is NP-complete.

We also focused on trees and provided a detailed examination of their domatic polynomials. We derived a quadratic time algorithm for computing the domatic polynomial of a tree by leveraging the weak 2-coloring number, w2⁒(T)subscript𝑀2𝑇w_{2}(T)italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_T ). This algorithm capitalizes on the hierarchical structure of trees, recursively breaking down the problem into smaller subtrees.

Furthermore, we provided specific results for paths and certain graph products, showcasing the practical applications of our theoretical findings. For paths Pnsubscript𝑃𝑛P_{n}italic_P start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT, we determined that D⁒P⁒(Pn,x)=x+2⌊n2βŒ‹βˆ’1⁒x2𝐷𝑃subscript𝑃𝑛π‘₯π‘₯superscript2𝑛21superscriptπ‘₯2DP(P_{n},x)=x+2^{\lfloor\frac{n}{2}\rfloor-1}x^{2}italic_D italic_P ( italic_P start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT , italic_x ) = italic_x + 2 start_POSTSUPERSCRIPT ⌊ divide start_ARG italic_n end_ARG start_ARG 2 end_ARG βŒ‹ - 1 end_POSTSUPERSCRIPT italic_x start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT. Additionally, we extended our results to graphs of the form G∘KΒ―r𝐺subscriptΒ―πΎπ‘ŸG\circ\overline{K}_{r}italic_G ∘ overΒ― start_ARG italic_K end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT, demonstrating that D⁒P⁒(G∘KΒ―r,x)=x+2nβˆ’1⁒x2𝐷𝑃𝐺subscriptΒ―πΎπ‘Ÿπ‘₯π‘₯superscript2𝑛1superscriptπ‘₯2DP(G\circ\overline{K}_{r},x)=x+2^{n-1}x^{2}italic_D italic_P ( italic_G ∘ overΒ― start_ARG italic_K end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT , italic_x ) = italic_x + 2 start_POSTSUPERSCRIPT italic_n - 1 end_POSTSUPERSCRIPT italic_x start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT for a graph G𝐺Gitalic_G of order n𝑛nitalic_n.

Overall, our work provides a comprehensive framework for understanding and computing the domatic partition polynomial, opening new avenues for future research in graph theory and combinatorial optimization.

References

  • [1] S. Akbari, S. Alikhani, Y.H. Peng, Characterization of graphs using domination polynomials, Eur. J. Combin. 31 (2010) 1714-1724.
  • [2] E.J. Cockayne, S.T. Hedetniemi, Towards a theory of domination in graphs, Networks, 7 (1977) 247-261.
  • [3] M.R. Garey, D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP- completeness, Freeman, San Francisco, CA, 197).
  • [4] W. Goddard, M.A. Henning, Independent domination in graphs: A survey and recent results, Discrete Math., 313 (7) (2013) 839-854.
  • [5] T.W. Haynes, S.T. Hedetniemi, P.J. Slater, Fundamentals of domination in graphs, Marcel Dekker, NewYork (1998).
  • [6] M.A. Henning, A. Yeo, Total domination in graphs. Springer Monographs in Mathematics, (2013).
  • [7] M.A. Henning, A survey of selected recent results on total domination in graphs. Discrete Math., 309 (1) (2009), 32-63.
  • [8] B. Zelinka, Domination in the generalized Petersen graphs, Czechoslov. Math. J., 52 (127) (2002), 11–16.
  • [9] B. Zelinka, Domatic number and degrees of vertices of a graph, Math. Slovaca 33 (1983): 145–147.
  • [10] B. Zelinka, On domatic numbers of graphs, Math. Slovaca 31 (1981), 91–95.