# The G-Convexity and the G-Centroids of Composite Graphs
## 3 Graph Compositions
### Cartesian Product  
In this section, we deal with the gcws of the cartesian product of two graphs. First, we prove that \(S\subseteq V\) is a g-convex set in \(G=G_{1}\otimes G_{2}\) if and only if \(S=S_{1}\times S_{2}\), where \(S_{1}\) and \(S_{2}\) are g-convex sets of \(G_{1}\) and \(G_{2}\), respectively. **Proposition 20**. : _Let \(G_{1}\) and \(G_{2}\) be two connected graphs. Let \(G=G_{1}\otimes G_{2}\). Then, \(S\subseteq V(G)\) is a g-convex set of \(G\) iff \(S=S_{1}\times S_{2}\), where \(S_{1}\) and \(S_{2}\) are g-convex sets of \(G_{1}\) and \(G_{2}\), respectively._  
Proof. : Let \(S\) be any g-convex set of \(G\). Let \(S_{1}=\{u:(u,v)\in S\}\) and \(S_{2}=\{v:(u,v)\in S\}\) (i.e., the projection of \(S\) on \(G_{1}\) and \(G_{2}\)). Then, clearly \(S\subseteq S_{1}\times S_{2}\). First, we show that \(S=S_{1}\times S_{2}\). Suppose \((u,v)\in S_{1}\times S_{2}\) and \((u,v)\
otin S\). As \(u\in S_{1}\) and \(v\in S_{2}\), by the definition of \(S_{1}\) and \(S_{2}\), there exist \(x,y\) such that \((u,x)\), \((y,r)\)\(\in S\). Let \(u=u_{1}\),\(u_{2}\), \(\cdots\), \(u_{r}=y\) be a \(u-y\) geodesic in \(G_{1}\) and \(x=x_{1}\), \(x_{2}\), \(\cdots\), \(x_{s}=v\) be a \(x-v\) geodesic in \(G_{2}\). Then \((u,x_{1})\), \((u,x_{2})\), \(\cdots\), \((u,v=x_{s})\), \((u_{2},v)\), \(\cdots\), \((u_{r}=y,v)\) is a geodesic joining \((u,x)\) and \((y,v)\) in \(G\). Since \(S\) is convex, \((u,v)\in S\), a contradiction. This proves that \(S=S_{1}\times S_{2}\). Our next task is to show that \(S_{1}\) and \(S_{2}\) are convex sets of \(G_{1}\) and \(G_{2}\), respectively. Let \(u,y\in S_{1}\) and \(u=u_{1}\),\(u_{2}\), \(\cdots\), \(u_{r}=y\) be any \(u-y\) geodesic in \(G_{1}\). Let \(x\) be any arbitrary vertex in \(S_{2}\). Then \((u,x)\), \((v,x)\in S\). Now, \((u_{1},x)\), \((u_{2},x)\), \(\cdots\), \((u_{r},x)\) is a geodesic joining \((u,x)\) and \((y,x)\) in \(G\). Since \(S\) is convex, \((u_{i},x)\in S\) for \(1\leq i\leq r\), and therefore \(u_{i}\in S_{1}\). Thus, \(S_{1}\) is a g-convex set of \(G_{1}\). Similarly \(S_{2}\) is a g-convex set of \(G_{2}\). The proof of the sufficiency part follows trivially. **Corollary 5**. : _Let \(G_{1}\) and \(G_{2}\) be two connected graphs. Let \(G=G_{1}\otimes G_{2}\). Let \(S_{1}\) and \(S_{2}\) be g-convex sets of \(G_{1}\) and \(G_{2}\) respectively, then \(S_{1}\times V(G_{2})\) and \(V(G_{1})\times S_{2}\) are g-convex sets of \(G\)._  
The proof follows from the above proposition and the fact that \(V(G_{1})\) and \(V(G_{2})\) are g-convex sets of \(G_{1}\) and \(G_{2}\). **Proposition 21**. : _Let \(G_{1}\) and \(G_{2}\) be two connected graphs. Let \(G=G_{1}\otimes G_{2}\). Let \((u,v)\in V(G)\). Then the weight of \((u,v)\) is_  
\[w(u,v)=max\{w(u:G_{1})\times\mid V(G_{2})\mid,w(v:G_{2})\times\mid V(G_{1})\mid\}\]  
Proof. : Let \(S\) be a maximum g-convex set of \(G\) not containing \((u,v)\). Then, by Proposition 20, \(S=S_{1}\times S_{2}\), where \(S_{1}\) and \(S_{2}\) are g-convex sets of \(G_{1}\) and \(G_{2}\), respectively. Since \((u,v)\
otin S\), one of the following holds good. 1. \(u\
otin S_{1}\) and \(v\
otin S_{2}\)
2. \(u\in S_{1}\) and \(v\
otin S_{2}\)
3. \(u\
otin S_{1}\) and \(v\in S_{2}\)  
By the maximality of \(S\), if \(u\
otin S_{1}\), then \(S_{1}\) is a maximum g-convex set of \(G_{1}\) not containing \(u\) and similarly, if \(v\
otin S_{2}\), then \(S_{2}\) is a maximum g-convex set of \(G_{2}\) not containing \(v\). Thus case (1) cannot happen (as \(\mid S_{u}(G_{1})\times V(G_{2})\mid>\mid S_{1}\times S_{2}\mid\). In case (2), \(S_{(u,v)}=V(G_{1})\times S_{v}\) and in case (3), \(S_{(u,v)}=S_{u}\times V(G_{2})\). Thus, we have  
\[w(u,v)=max\{w(u:G_{1})\times\mid V(G_{2})\mid,w(v:G_{2})\times\mid V(G_{1}) \mid\}\]  
From the Proposition 21, we see that if \(w(u:G_{1})\) and \(w(v:G_{2})\) are known, then \(w(u,v)\) can be computed. We now relate the centroid of \(G\) to those of \(G_{1}\) and \(G_{2}\).