# Edge Data Center Organization and Optimization by Using Cage Graphs
## 5 Constructing a Petersen Graph for Small Data Centers  
The first step to build up a model for a Petersen graph is to establish the node distribution. In order to perform this, two circles must be considered: the outer one, corresponding to the vertices of a pentagon, and the inner one, representing the vertices of a pentagonal star. Then, nodes from 0 to 4 are assigned to the former, while nodes from 5 to 9 are assigned to the latter. Furthermore, the first node within each circle is allocated to the upper position, thus marking the 12 hours in a clock layout, whereas the rest of nodes within a circle are sequentially assigned in a clockwise direction, as shown in Figure 3.  
Figure 1: Petersen graph as a combination of a regular pentagon and a pentagonal star. Figure 2: Petersen graph represented as a hierarchical layout. Once the node identification scheme is established, the ports going from a particular node \(i\) to its neighboring nodes need to be identified as well, as depicted in Figure 4, where the predecessor node is the one linked through the counterclockwise link, namely port 0; the successor node is the one linked through the clockwise link, namely port 1; and the opposite node is the one located within the opposite circle through the intercircle link, namely port 2. The outer circle belongs to a pentagon, such that the counterclockwise link from a particular node \(i\) connects to node \((i-1)_{|5}=(i+4)_{|5}\), whereas its clockwise link leads to node \((i+1)_{|5}\). Additionally, the inner circle belongs to a pentagonal star, such that the counterclockwise link from a given node \(i\) heads for node \((i-2)_{|5}=(i+3)_{|5}\), while its clockwise link heads for node \((i+2)_{|5}\). Furthermore, the opposite link from a particular node \(i\) always results in \((i+5)_{|5}=(i)_{|5}\), although it leads to node \(i+5\cdot(-1)^{|i/5|}\), being located in the opposite circle (outer or inner). With this scheme, traffic forwarding among nodes is facilitated by applying arithmetic operations, such as integer divisions or modular arithmetic, compared with applying searching through forwarding tables, as is the case in traditional networks, such as routing tables or MAC-address tables, thus improving performance. In order to forward traffic from a given source node \(i\) to a particular destination node \(j\), consider the circles in which both are located, resulting in four different scenarios to be studied on an individual basis:  
1. \(i\) and \(j\) are both in the outer circle, resulting in \(\lfloor i/5\rfloor=\lfloor j/5\rfloor=0\): \(\circ\) If \((j-i)_{|5}<5/2\), then traffic is sent through port 1 to the successor node; otherwise, it is forwarded through port 0 to the predecessor node. 2. \(i\) and \(j\) are both in the inner circle, resulting in \(\lfloor i/5\rfloor=\lfloor i/5\rfloor=1\): \(\circ\) If \(i_{|2}=j_{|2}\), then traffic is sent through port 1 to the successor node; otherwise, it is forwarded through port 0 to the predecessor node. Figure 4: Petersen graph node with ports going to their neighboring nodes. Figure 3: Petersen graph represented as a hierarchical layout. \(i\) is in the outer circle and \(j\) is in the inner one, where \(\lfloor i/5\rfloor=0\) and \(\lfloor i/5\rfloor=1\): \(\circ\quad\lfloor i/5\rfloor<\lfloor i/5\rfloor\); hence, if \((i+1)_{5}=j_{\parallel 5}\), then traffic is sent through port 1 to the successor node; otherwise, if \((i+4)_{\mid 5}=j_{\mid 5}\), then it is sent through port 0 to the predecessor node, otherwise through port 2 to the opposite node within the inner circle. \(i\) is in the inner circle and \(j\) is in the outer one, where \(\lfloor i/5\rfloor=1\) and \(\lfloor j/5\rfloor=0\): \(\circ\quad\lfloor i/5\rfloor>\lfloor i/5\rfloor\); hence, if \((i+2)_{\mid 5}=j_{\mid 5}\), then traffic is sent through port 1 to the successor node. Otherwise, if \((i+3)_{\mid 5}=j_{\mid 5}\), then it is sent through port 0 to the predecessor node; otherwise, it is sent through port 2 to the opposite node within the outer circle.