EUROPEAN JOURNAL OF PURE AND APPLIED MATHEMATICS Vol. 17, No. 4, 2024, 3356-3369 ISSN 1307-5543 – ejpam.com Published by New York Business Global On b-Coloring Analysis of Graphs: An Application to Spatial-Temporal Graph Neural Networks for Multi-Step Time Series Forecasting of Soil Moisture and pH in Companion Farming Arika Indah Kristiana1,3,∗, Elisa Rachmasari1, Dafik1,3, Robiatul Adawiyah1,3, Ika Hesti Agustin2,3,Indah Lutfiyatul Mursyidah3, Ridho Alfarisi 2,3 1 Department of Mathematics Education, University of Jember, Jember, Indonesia 2 Department of Mathematics, University of Jember, Jember, Indonesia 3 PUI-PT Combinatorics and Graph, CGANT-University of Jember, Jember, Indonesia Abstract. Let G be a pair of two sets (V,E) with vertex set V and edge set E. A proper coloring of a graph G is a vertex coloring of it such that no two adjacent vertices in G have the same color. By b−Coloring, we define a coloring of the vertex of G such that each color class has at least one vertex that adjacent with all other color classes. The b− chromatic number of graph G, denoted by φ(G), is the largest integer k such that graph G has b−Coloring with k colors. In this paper, we will explore some new lemmas or theorems regarding to φ(G). Furthermore, to see the robust application of b−Coloring of graph, at the end of this paper we will illustrate the implementation of b−Coloring on spatial temporal graph neural networks (STGNN) multi-step time series forecasting on soil moisture and pH of companion farming. 2020 Mathematics Subject Classifications: 05C78 Key Words and Phrases: b−Coloring, b-chromatic number, companion farming, multi-step time series forecasting 1. Introduction A classic and well-known graph theory problem is graph coloring. Graph coloring is one of the important branches in graph theory that has been the focus of intensive research in recent years. A graph coloring is considered to be an assignment of colours, labels or weights to the elements of the graphs. For several decades, graph coloring problems have become an extremely useful models for many theoretical and practical problems ∗Corresponding author. DOI: https://doi.org/10.29020/nybg.ejpam.v17i4.5409 Email addresses: arika.fkip@unej.ac.id (A. I. Kristiana), d.dafik@unej.ac.id (Dafik), alfarisi.fkip@unej.ac.id (R. Alfarisi), robiatul@unej.ac.id (R. Adawiyah) https://www.ejpam.com 3356 Copyright: © 2024 The Author(s). (CC BY-NC 4.0) A. I. Kristiana et al. / Eur. J. Pure Appl. Math, 17 (4) (2024), 3356-3369 3357 [11]. Some types of graph coloring are vertex coloring, total coloring, edge coloring, map coloring, interval coloring, clique coloring, and bipartite graph coloring. Vertex coloring refers to the process of assigning colors to vertices in G so that no two adjacent vertices have the same color. The following are a formal definition of k− coloring of graph. 1.1. Basic Definitions Definition 1. [6] The minimum number of colors required to properly color a graph G is its chromatic number G, denoted by χ(G). Based on these concepts, Irving and Manlove [7] introduced a new concept namely b−Coloring. Kouider and Maheo [8] provided some upper and lower bound of the b- chromatic number on b−Coloring of graph. Here is the definition of b−Coloring mentioned in [5, 7, 8]. Definition 2. [7] A b−Coloring of a graph G is a proper vertex coloring in a way that each color class has a at least one vertex that is adjacent to every other color class. Definition 3. [7] The b−chromatic number of graph G is the highest integer k such that G has a b−Coloring, denoted by φ(G). Lemma 1. [8] For any graph G, χ(G) ≤ φ(G) ≤ ∆(G) + 1, where ∆(G) is the highest degree of vertices in G. Definition 4. [5] Let G and H be two connected graphs. Let o be a vertex of H. The comb product between G and H, denoted by G▷oH, is a graph obtained by taking one copy of G and |V (G)| copies of H and grafting the i− th copy of H at the vertex o to the i− th vertex of G. Vivin and Venkatachalam [12] determined b−Coloring of sun let graph dan wheel graph families, Chandel et al., determined b−Coloring of ladder graph [4], Ansari et al., determined b-coloring of helm graph and prism graph families [2] [3], Akalyadevi and Ramaswamy determined b−Coloring of net graph families [1], and Nagarathinam dan Parvathi determined b−Coloring of line, middle and total graph of tadpole graph, and operator graph of tadpole and wheel graph [9] [10]. Determining the b−Coloring is consid- ered to be NP problem, thus finding the exact value of b−chromatic number is still open for any or specific graphs. Thus, in this study aims to analyze the new results obtained b-chromatic number of Pn ▷v1 Pm graph for n,m ≥ 8 and Ln ▷v1 Pm graph for n,m ≥ 5. Furthermore, to see the robust application of b−Coloring of graph, at the end of this paper we will illustrate the implementation of b−Coloring on Spatial Temporal Graph Neural Networks (STGNN) multi-step time series forecasting on soil moisture and pH of companion farming. Companion farming is a system where two or more crops are grown simultaneously on the same farm. Plants are planted alternately in straight rows to create a regular cropping pattern. The use of companion farming aims to minimize crop pests. The b−Coloring analysis on companion farming is used to determine the number of plant species, so that in the same land can be planted various types of plants. There A. I. Kristiana et al. / Eur. J. Pure Appl. Math, 17 (4) (2024), 3356-3369 3358 are factors that affect the growth and yield of companion plants, namely soil moisture and pH. Both of these factors can have an impact on productivity and plant health in companion farming. To predict the soil moisture and pH is very important, since predicting soil moisture and pH is crucial for successful agricultural management and environmental monitoring. Both soil moisture and pH levels play significant roles in determining the health and productivity of plants. The best tool for predicting them is using machine learning, Spatial- Temporal Graph Neural Network (STGNN). A Spatial-Temporal Graph Neural Network (STGNN) is a type of neural network architecture designed to model and analyze data that has both spatial and temporal dependencies, particularly in the context of graphs. It combines concepts from Graph Neural Networks (GNNs) and Temporal models to handle data with both spatial and temporal dimensions. Thus, in this study, we will implement STGNN multi-step time series forecasting for soil moisture and pH. 2. The Methods The research methods used in this research are pattern recognition method, axiomatic deductive method, and application research method. In this study, it explains related to the application scheme of the Spatial-Temporal Graph Neural Network on the problem of forecasting soil moisture and pH in companion plants with a multi-step time series forecasting. The numerical simulation used to run the programming uses Google Collab- orator. Furthermore, STGNN programming will be developed, training the model using 60% input data obtained from the vertex embedding process, testing and finally forecast- ing soil moisture and pH. Soil moisture and pH are two important factors and affect plant growth conditions and the balance of the soil ecosystem. We use the following algorithm for studying companion planting distribution by using STGNN combined by b−Coloring. Single Layer STGNN Algorithm Step 0. Considering a graph G(V,E) of order n with n vertices and m features, a and feature matrix Hn×m from certain companion plantations, and provide a tolerance ϵ. Step 1. Construct the matrix adjacency A of graph G arising from spatial of companion plantations and set a matrix B = A+I, where I is an identity matrix. Step 2. Set weights W to start, bias β, learning rate α. (For ease of understanding, set Wm×1 = [w1 w2 . . . wm], where 0 < wj < 1, bias β = 0 and 0 < α < 1) Step 3. Set a message function mu l = MSGl(hl−1 u ) for the linear layer mu l = W l(hl−1 u ) to multiply the weight matrix with vertex features. Step 4. Combine the signals from the neighbors of vertex v by setting function hlv = AGGl{ml−1 u , u ∈ N(v)}, and by utilizing the sum(·) function hlv = SUM l{ml−1 u , u ∈ N(v)} in connection with matrix B. Step 5. Construct the error, by setting errorl = ||hvi−hvj ||2 |E| , where vi, vj are vertices A. I. Kristiana et al. / Eur. J. Pure Appl. Math, 17 (4) (2024), 3356-3369 3359 that are next to one other. Step 6. Check if error ≤ ϵ or not. If yes end the process, if not proceed to refresh the learning weight matrix W in step 7. Step 7. Set W l+1 = W l j − α × zj × el for updating the learning weight matrix where the total of each column in the H l vi is denoted by zj and then split by the total number of nodes. Step 8. If the data is a time series, save the results of the embedding in a vector and repeat the process for the subsequent time data observation. Step 9. After loading the vector data, perform multi-step time series forecasting, testing, and training using the time series machine learning. Step 10. Is RMSE ≤ ϵ? If YES then STOP. If No then improve W, do Step 2-9. 3. Main Result 3.1. b−Coloring In this paper, we will analyze the new result of the b-chromatic number of Pn ▷v1 Pm graph for n,m ≥ 8 and Ln ▷v1 Pm graph for n,m ≥ 5. Theorem 1. Let Pn ▷v1 Pm be a comb product of graphs for n ≥ 6, m ≥ 2. We have φ(Pn ▷v1 Pm) = 4. Proof. The graph Pn ▷v1 Pm is a connected graph with vertex set V (Pn ▷v1 Pm) = {xi,j ; 1 ≤ i ≤ n, 1 ≤ j ≤ m} and edge set E(Pn ▷v1 Pm) = {xi,1xi+1,1; 1 ≤ i ≤ n− 1} ∪ {xi,jxi,j+1; 1 ≤ i ≤ n, 1 ≤ j ≤ m− 1} . Thus |V (Pn ▷v1 Pm)| = nm and |E(Pn ▷v1 Pm)| = nm−1. The chromatic number γ(Pn ▷v1 Pm) = 2 and maximum degree ∆(Pn ▷v1 Pm) = 3. To obtain the b-chromatic number φ(Pn ▷v1 Pm) for n ≥ 6,m ≥ 2, we will analyze the upper bound of Pn ▷v1 Pm. Based on Definition 2 and Lemma 1, we have χ(Pn ▷v1 Pm) ≤ φ(Pn ▷v1 Pm) ≤ ∆(Pn ▷v1 Pm) + 1 = 4 ←→ φ(Pn ▷v1 Pm) ≤ 4. Furthermore, we need to find the exact value of φ(Pn ▷v1 Pm) by defining the coloring function as follows f : V (Pn ▷v1 Pm)→ {1, 2, 3, . . . , k} as follows f(xi,j)=  1, if i ≡ 2 mod 4, j ≡ 1 mod 2 if i ≡ 0 mod 4, j ≡ 0 mod 2 2, if i ≡ 1 mod 4, j ≡ 1 mod 2 if i ≡ 3 mod 4, j ≡ 0 mod 2 3, if i ≡ 0 mod 4, j ≡ 1 mod 2 if i ≡ 2 mod 4, j ≡ 0 mod 2 4, if i ≡ 3 mod 4, j ≡ 1 mod 2 if i ≡ 1 mod 4, j ≡ 0 mod 2 Based on the function above, we have f : V (Pn ▷v1 Pm) → {1, 2, 3, 4}. Thus, we have k = 4. It implies that φ(Pn ▷v1 Pm) = 4. The last, we need to show that each color class A. I. Kristiana et al. / Eur. J. Pure Appl. Math, 17 (4) (2024), 3356-3369 3360 has at least one vertex that adjacent with all other color classes. According to the coloring function, the b−chromatic number of graph Pn ▷v1 Pm is 4, thus we have four color classes, namely C1 = {xi,j |i ≡ 2mod 4, j ≡ 1mod 2; i ≡ 0mod 4, j ≡ 0mod 2}, C2 = {xi,j |i ≡ 1mod 4, j ≡ 1mod 2; i ≡ 3mod 4, j ≡ 0mod 2}, C3 = {xi,j |i ≡ 0mod 4, j ≡ 1mod 2; i ≡ 2mod 4, j ≡ 0mod 2}, C4 = {xi,j |i ≡ 1mod 4, j ≡ 0mod 2; i ≡ 3mod 4, j ≡ 1mod 2}. Based on the four color classes, we can show that each color class has at least one vertex that is adjacent to all other color classes. We can show it by depicting the methane-like structure, see Figure 1. Thus, it proves that φ(Pn ▷v1 Pm) = 4 for n ≥ 6, m ≥ 2. Figure 1: b-chromatic number of b−Coloring φ(Pn ▷v1 Pm) = 4 To have more detail illustration of b−Coloring of Pn ▷v1 Pm, we depict the picture, see Figure 2. Figure 2: representation of each color class Theorem 2. Let Ln ▷v1 Pm be a comb product of graphs for n ≥ 5, m ≥ 2. We have φ(Pn ▷v1 Pm) = 5. Proof. The graph Ln ▷v1 Pm is a connected graph with vertex set V (Ln ▷v1 Pm) = {xi,j ; 1 ≤ i ≤ n, 1 ≤ j ≤ m} ∪ {yi,j ; 1 ≤ i ≤ n, 1 ≤ j ≤ m} and edge set E(Ln ▷v1 Pm) = {xi,1xi+1,1; 1 ≤ i ≤ n− 1}∪{xi,jxi,j+1; 1 ≤ i ≤ n, 1 ≤ j ≤ m− 1}∪{yi,1yi+1,1; 1 ≤ i ≤ n− 1}∪ {yi,jyi,j+1; 1 ≤ i ≤ n, 1 ≤ j ≤ m− 1} ∪ {xi,1yi,1; 1 ≤ i ≤ n} . Thus |V (Ln ▷v1 Pm)| = 2nm and |E(Ln▷v1Pm)| = 2nm+n−2. The chromatic number γ(Ln▷v1Pm) = 2 and maximum degree ∆(Ln ▷v1 Pm) = 4. To obtain the b-chromatic number φ(Ln ▷v1 Pm) for n ≥ 7,m ≥ 3, we will analyze the upper bound of Ln ▷v1 Pm. Based on Definition 2 and Lemma 1, we have χ(Ln ▷v1 A. I. Kristiana et al. / Eur. J. Pure Appl. Math, 17 (4) (2024), 3356-3369 3361 Pm) ≤ φ(Ln ▷v2 Pm) ≤ ∆(Ln ▷v2 Pm) + 1 = 5 ←→ φ(Ln ▷v1 Pm) ≤ 5. Furthermore, we need to find the exact value of φ(Ln ▷v1 Pm) by defining the coloring function as follows f : V (Ln ▷v2 Pm)→ {1, 2, 3, . . . , k} as follows f(xi,j)=  1, if i ≡ 1 mod 5, j ≡ 1 mod 2 if i ≡ 3 mod 5, j ≡ 0 mod 2 2, if i ≡ 2 mod 5, j ≡ 1 mod 2 if i ≡ 0 mod 5, j ≡ 0 mod 2 3, if i ≡ 3 mod 5, j ≡ 1 mod 2 if i ≡ 4 mod 5, j ≡ 0 mod 2 4, if i ≡ 4 mod 5, j ≡ 1 mod 2 if i ≡ 1 mod 5, j ≡ 0 mod 2 5, if i ≡ 0 mod 5, j ≡ 1 mod 2 if i ≡ 2 mod 5, j ≡ 0 mod 2 f(yi,j)=  1, if i ≡ 4 mod 5, j ≡ 1 mod 2 if i ≡ 2 mod 5, j ≡ 0 mod 2 2, if i ≡ 0 mod 5, j ≡ 1 mod 2 if i ≡ 3 mod 5, j ≡ 0 mod 2 3, if i ≡ 1 mod 5, j ≡ 1 mod 2 if i ≡ 4 mod 5, j ≡ 0 mod 2 4, if i ≡ 2 mod 5, j ≡ 1 mod 2 if i ≡ 0 mod 5, j ≡ 0 mod 2 5, if i ≡ 3 mod 5, j ≡ 1 mod 2 if i ≡ 1 mod 5, j ≡ 0 mod 2 Based on the function above, we have f : V (Ln ▷v1 Pm)→ {1, 2, 3, 4, 5}. Thus, we have k = 5. It implies that φ(Ln▷v1Pm) = 5. The last, we need to show that each color class has at least one vertex that adjacent with all other color classes. According to the labeling, the b−chromatic number of graph Ln ▷v1 Pm is five, thus we have C1 = {xi,j |i ≡ 1mod 5, j ≡ 1mod 2; i ≡ 3mod 5, j ≡ 0mod 2}, C2 = {xi,j |i ≡ 2mod 5, j ≡ 1mod 2; i ≡ 0mod 5, j ≡ 0mod 2}, C3 = {xi,j |i ≡ 3mod 5, j ≡ 1mod 2; i ≡ 4mod 5, j ≡ 0mod 2}, C4 = {xi,j |i ≡ 4mod 5, j ≡ 1mod 2; i ≡ 1mod 5, j ≡ 0mod 2}, C5 = {xi,j |i ≡ 0mod 5, j ≡ 1mod 2; i ≡ 2mod 5, j ≡ 0mod 2} and C1 = {yi,j |i ≡ 4mod 5, j ≡ 1mod 2; i ≡ 2mod 5, j ≡ 0mod 2}, C2 = {yi,j |i ≡ 0mod 5, j ≡ 1mod 2; i ≡ 3mod 5, j ≡ 0mod 2}, C3 = {yi,j |i ≡ 1mod 5, j ≡ 1mod 2; i ≡ 4mod 5, j ≡ 0mod 2}, C4 = {yi,j |i ≡ 2mod 5, j ≡ 1mod 2; i ≡ 0mod 5, j ≡ 0mod 2}, C5 = {yi,j |i ≡ 3mod 5, j ≡ 1mod 2; i ≡ 1mod 5, j ≡ 0mod 2}. Based on the five color classes, we can show that each color class has at least one vertex that is adjacent to all other color classes. We can show it by depicting the methane-like structure, see Figure 3. Thus, it proves that φ(Pn ▷v1 Pm) = 5 for n ≥ 5,m ≥ 2. Figure 3: b-chromatic number of b−Coloring φ(Ln ▷v1 Pm) = 5 To have more detail illustration of b−Coloring of Ln ▷v1 Pm, we depict the picture, see Figure 4. A. I. Kristiana et al. / Eur. J. Pure Appl. Math, 17 (4) (2024), 3356-3369 3362 Figure 4: representation of each color class 3.2. The Application of b−Coloring The next research result is the implementation of b−Coloring on precision agriculture companion farming. In this research, time series forecasting will be performed on precision agriculture datasets, namely soil moisture and pH. The datasets are obtained from simu- lating the placement of soil moisture and pH sensors. The placement of these sensors takes into account the planting topology derived from Theorem 1. The number of plantations is respected to the obtained b-chromatic number φ(G). Based on the Pn ▷v1 Pm graph we can make into a planting layout adapted to the shape of the land. In each vertex, the coloring obtained represents a type of plant. Since φ(Pn▷v1Pm) = 4, there are four types of plants studied. In this study, the color 1 represents cucumbers, the color 2 represents carrots, the color 3 represents tomatoes, and the color 4 represents eggplants. Furthermore, the sensor is placed at the vertex of dominance on the planting layout created. The companion farming layout based on b−Coloring theorem can be seen in Figure 5 and Figure 6. 3.3. Numerical Analysis Hereafter, we discuss the research results and provide an overview to perform time series forecasting in companion farming. First, we show analytically how to embed node features and how b−Coloring works on graphs. We use soil moisture and pH data to derive the STGNN model. Observation 1. Given that there is a n-order graph G. Assume that the set of vertex V (G)={v1, v2, ..., vn−1, vn} and and edge of vertex E(G) = {vivj |vi, vj ∈ V (G)}, respec- A. I. Kristiana et al. / Eur. J. Pure Appl. Math, 17 (4) (2024), 3356-3369 3363 Table 1: The prediction results of STGNN model for dataset-1 T Matric HA ARIMA SVR GCN GRU STGNN RMSE 9.4546 10.6872 9.7862 11.1382 7.5492 6.2187 6 days MAE 8.7113 8.9815 9.4121 10.6702 7.6615 6.4357 Accuracy 5.5673 6.7890 9.3423 8.2732 8.4351 10.1431 R2 4.28512 4.3482 7.9563 8.0321 8.4321 9.1452 RMSE 8.5702 8.6054 8.9434 10.1524 7.1243 6.4368 12 days MAE 8.3872 8.7682 8.4326 9.8170 5.6710 4.7166 Accuracy 4.2830 4.8920 8.2192 8.5742 8.7246 9.1527 R2 3.7581 4.1268 7.3734 8.1289 8.4430 9.2721 RMSE 8.2301 8.3436 8.5293 9.8425 6.2882 5.4397 18 days MAE 8.3487 8.4018 7.7845 9.4696 4.4520 4.1625 Accuracy 4.7557 4.8361 8.1395 8.5729 8.8314 9.0765 R2 3.3912 3.8852 8.3254 8.8772 8.7431 9.0293 RMSE 8.2568 8.2578 8.2456 9.5742 4.5890 4.5174 24 days MAE 8.1863 8.2146 7.6781 7.5682 4.1379 4.0764 Accuracy 4.1732 4.5185 8.8563 8.9567 9.0137 9.2738 R2 3.2754 3.8571 8.3264 9.0753 8.1432 9.1432 tively. Considering that vertex features as follows. hvi =  s1,1 s1,2 · · · s1,m s2,1 s2,2 · · · s2,m ... ... . . . ... sn,1 sn,2 · · · sn,m  Vertex v’s neighbors hl+1 v = AGG{ml+1 u , u ∈ N(v)} can be used to calculate the vertex em- bedding under the aggregation sum(.), where l = 0, 1, 2, 3, ..., k. hl+1 v = SUM{ml+1 u , u ∈ N(v)}, therefore, with regard to the matrix B = A + 1, where A, I denote the adjacency matrix and the identity matrix, respectively. Proof. We can find the matrix adjacency A by graph G. Given that each vertex in G needs to consider the self adjacency, we must add A by the identity matrix I in order to get matrix B as follow. B = A+ I =  b1,1 b1,2 · · · b1,n b2,1 b2,2 · · · b2,n ... ... . . . ... bn,1 bn,2 · · · bn,n  The single layer STGNN technique requires that the learning weight matrix be initial- A. I. Kristiana et al. / Eur. J. Pure Appl. Math, 17 (4) (2024), 3356-3369 3364 Table 2: The prediction results of STGNN model for dataset-2 T Matric HA ARIMA SVR GCN GRU STGNN RMSE 10.7632 12.6281 10.8932 12.2971 13.8912 9.1378 6 days MAE 10.4632 11.8714 10.1252 11.5318 11.6219 9.0374 Accuracy 8.4778 9.6425 9.8687 10.3562 8.6315 10.6574 R2 7.0246 7.3526 9.3829 8.4912 7.0541 10.8831 RMSE 10.4516 11.4354 9.8931 11.4871 11.2673 8.8576 12 days MAE 9.7320 11.9034 9.4965 11.2765 10.6490 8.6970 Accuracy 8.1754 9.3292 9.8286 9.7605 9.0794 9.9521 R2 8.1642 7.3759 9.8342 8.7524 9.0836 9.9536 RMSE 9.1765 11.5443 9.4870 10.8290 10.1230 8.9860 18 days MAE 8.7662 10.2872 8.8267 10.6390 8.5503 8.0346 Accuracy 8.2280 9.4782 9.1678 9.0894 7.1190 9.8570 R2 7.4581 7.3467 9.0340 8.4890 7.3095 9.3271 RMSE 8.3604 10.5849 9.3235 10.7590 9.7208 8.2987 24 days MAE 8.0045 10.2348 8.6903 10.6537 8.2782 7.5048 Accuracy 8.1372 9.4573 9.2675 9.8362 7.7832 9.8653 R2 7.2670 7.4563 9.1703 8.2467 7.4561 9.5672 ized in the way that is described below. W =  w1,1 w1,2 · · · w1,m w2,1 w2,2 · · · w2,m ... ... . . . ... wm,1 wm,2 · · · wm,m  The value of mvi will be determined using this weight, and the new weight will be updated in the following iteration. There are two phases to the STGNN vertex embedding process: message passing and aggregation. First, we perform massage passing mu = MSG(hu). For linear layer we have ml+1 u = W l.hlu, where l = 0, 1, 2, ...k. The calculation can be started in an iterative manner as follows. m1 vi = H0 vi ·W 0 =  s1,1 s1,2 · · · s1,m s2,1 s2,2 · · · s2,m ... ... . . . ... sn,1 sn,2 · · · sn,m ×  w1,1 w1,2 · · · w1,m w2,1 w2,2 · · · w2,m ... ... . . . ... wm,1 wm,2 · · · wm,m  =  s1,1 × w1,1 + . . .+ s1,m × wm,1 . . . s1,1 × w1,m + . . .+ s1,m × wm,m s2,1 × w1,1 + . . .+ s2,m × wm,1 . . . s2,1 × w1,m + . . .+ s2,m × wm,m ... . . . ... sn,1 × w1,1 + . . .+ sn,m × wm,1 . . . sn,1 × w1,m + . . .+ sn,m × wm,m  Following completion of the aforementioned process, we go on to the second phase, which is aggregation in regrads with v’s neighbors. By ultilizing the aggregation sum(.), A. I. Kristiana et al. / Eur. J. Pure Appl. Math, 17 (4) (2024), 3356-3369 3365 Figure 5: The companion farming layout based on b−Coloring theorem Figure 6: The illustration of companion farming using b−Coloring for hl+1 v = AGG{ml+1 u , u ∈ N(v)} we have hl+1 v = SUM{ml+1 u , u ∈ N(v)} in regrads to the matrix B = A+ 1, the embedding vector h1vi can compose as follows. hl+1 vi =  ml+1 v1,1 ml+1 v1,2 · · · ml+1 v1,m ml+1 v2,1 ml+1 v2,2 · · · ml+1 v2,m ... ... . . . ... ml+1 vn,1 ml+1 vn,2 · · · ml+1 vn,m  The next step is to determine the error value, which shows how near two neighboring vertices are to one another in the embedding space. The separation of the two vertices gets smaller as the error value decreases. One can formulate the error as follows: errorl = h(vi)−h(vj)inf |E(G)| where i, j ∈ {1, 2, ..., n}. We need to check whether error ≤ ϵ. If no, we need to update new W l using the obtained hlvi in the previous iteration. We revise the matrix of learning weights by using W l+1 = W l + α× errorl × (hlvi) T × hl+1 vi until error ≤ ϵ. A. I. Kristiana et al. / Eur. J. Pure Appl. Math, 17 (4) (2024), 3356-3369 3366 3.4. The Performance of STGNN Training and Testing Furthermore, a computer simulation of the STGNN architecture will be carried out for training, testing, and forecasting companion farming data using the one-layer STGNN algorithm. Then analyzed soil moisture and pH at 64 planting vertex on the graph Pn ▷v1 Pm. The first stage of this research performs the process of vertex embedding of single layer STGNN on the given graph with 2 data features, namely soil moisture and pH data for 30 days of observation. Overall, the data consists of 64×2×30 = 3840, which consists of 64 planting vertex, two features and 30 days of observation. The data is obtained from several soil sensors placed in one of the companion planting. After performing the algorithm above, the adjacency matrix of the graph Pn ▷v1 Pm can be seen in Figure 7. Furthermore, the distribution graph of soil moisture and pH with 64 planting vertex for 30 days is shown in Figure 8. The results of training and testing of companion farming at 64 planting vertex are shown in Figure 9. After that, the results of the multi-step time series forecasting graph for the next 6 days are shown in Figure 10. Figure 7: Pn ▷v1 Pm graph with 64 vertices and companion farming adjacency matrix Figure 8: The distribution of soil moisture, temperature and pH with 64 companion farming vertex on 30 days to training and testing dataset Based on the previously described algorithm, an vertex embedding with 64 planting vertices is required. In the process of message passing, it assumes that each vertex has some information and sends the information to its neighbours. With the above algorithm steps, A. I. Kristiana et al. / Eur. J. Pure Appl. Math, 17 (4) (2024), 3356-3369 3367 Figure 9: The result of training and testing data of companion farming Figure 10: The result of multi-step time series forecasting of companion farming time series data is obtained to be analyzed using STGNN. To consider how effective the result of vertex embedding is, next determine the error by considering every two adjacent vertices. Then, a multi-step time series prediction algorithm is developed. STGNN to train 60% of the data and obtain the smallest Root Mean Square Error (RMSE) and Mean Square Error (MSE) of the test data. After the algorithm of soil moisture and pH data, the MSE value obtained on the planting layout Pn ▷v1 Pm is 0.0267. To convince the robustness of the STGNN model, we compare six models, namely historical average (HA), auto regressive integrated moving average (ARIMA), support vector regression (SVR), graph convolutions networks (GCN), gated recurrent unit (GRU), spatial temporal graph neural networks (STGNN) can be seen in Table 1 and Table 2. The STGNN model also shows that time series forecasting for 6, 12, 18, 24 days ahead, either RMSE, MAE, Accuracy and R2 show the best values compare with other models. The STGNN model shows the best forecasting for 6, 12, 18, 24, days ahead, both RMSE, MAE, Accuracy and REFERENCES 3368 R2. It also shows the best value of STGNN compared to other models. Thus, it can be concluded that the STGNN model can be used to perform forecasting and monitoring at 64 planting vertices using b−Coloring. 4. Concluding Remarks In this research, we have studied b−Coloring of graphs. We have determined the exact value of the b-chromatic number of Pn ▷v1 Pm graph for n,m ≥ 8 and Ln ▷v1 Pm graph for n,m ≥ 5. We found the b-chromatic numbers attain the best upper bound. However, since there is currently little research on the topic of b−Coloring, we propose the open problem. Find the exact values of b−Coloring on other graphs and apply the obtained results in STGNN time series forecasting. Acknowledgements We gratefully acknowledge the support from PUI-PT Combinatorics, Graph Theory and Network Topology and LP2M University of Jember of year 2024. References [1] K. Akalyadevi and A. S. Ramaswamy. On b-chromatic number of net graph. Inter- national Journal of Research and Analytical, 41, 2019. [2] N. Ansari, R. S. Chandel, and R. Jamal. The b-chromatic number of helm graph. International Journal of Advanced Research in Computer Science, 8(7), 2017. [3] Nadeem Ansari, RS Chandel, and Rizwana Jamal. On b-chromatic number of prism graph families. Applications and Applied Mathematics: An International Journal (AAM), 13(1):20, 2018. [4] RS Chandel, Rizwana Jamal, and Nadeem Ansari. The b-chromatic number of ladder graph. Jñ–an–abha, page 139, 2017. [5] Darmaji Darmaji and Ridho Alfarisi. On the partition dimension of comb product of path and complete graph. In AIP Conference Proceedings, volume 1867. AIP Publishing, 2017. [6] Frank Harary, Stephen Hedetniemi, and Geert Prins. An interpolation theorem for graphical homomorphisms. Portugal. Math, 26:453–462, 1967. [7] Robert W Irving and David F Manlove. The b-chromatic number of a graph. Discrete Applied Mathematics, 91(1-3):127–141, 1999. [8] Mekkia Kouider and Maryvonne Mahéo. Some bounds for the b-chromatic number of a graph. Discrete Mathematics, 256(1-2):267–277, 2002. REFERENCES 3369 [9] R Nagarathinam and N Parvathi. On b-coloring line, middle and total graph of tadpole graph. In AIP Conference Proceedings, volume 2277. AIP Publishing, 2020. [10] R Nagarathinam and N Parvathi. b-coloring on graph operators. In Journal of Physics: Conference Series, volume 1850, page 012080. IOP Publishing, 2021. [11] NK Sudev, KP Chithra, and Johan Kok. Some results on the b-colouring parameters of graphs. arXiv preprint arXiv:1707.00140, 2017. [12] J Vernold Vivin and M Vekatachalam. On b-chromatic number of sun let graph and wheel graph families. Journal of the Egyptian Mathematical Society, 23(2):215–218, 2015.