## 5 CRS Distribution and Computations  
The unique CRS protocol uses the dispersed responsibilities of both CH and BS in the smart city environment. The BS allocates balanced transmission slots and determines each cluster's services (R, P, or E). In contrast, CHs assign balanced transmission slots to each of its mn. Because the services are dynamic in smart cities, the transmission slots are customizable. For this, we have adapted the DD-TDMA scheduler, which highly suits the desired scenario. The upcoming discussions delineate further information about this scheduling technique. The configuration stage in CRS involves the formation of clustering and selection of CHs and mn of the corresponding clusters. Each mn in a cluster function is a potential contender to be chosen as the CH. During the transmission stage, sensed data are collected from all the mn within their respective slot, and then the CH processes the aggregated data to send them to the BS through single or multi-hop transmission. CRS's objective is to form clustering as per the service, determine optimal CH among potential nodes with heterogeneity factors, and ultimately route the data across the network with perfect load balancing and energy efficiency through DD-TDMA. In addition to these features, alternative routes are identified dynamically as an FT strategy for managing possible communication failures. A vital element of this approach is a streamlined categorization of nodes, selection procedures of CH, and inter- and intra-cluster routing that depends on each active node's service weight-age and residual energy. To route packets across clusters in the event of communication failure due to potential faults, each CH re-routes the packets to its neighbors based on the rank determined by BS and shares the same during the allocation of transmission slots. As noted previously, service-based clustering is determined by three factors, and the smart city administrator redefines those factors. It is crucial to comprehend a few definitions to understand the integrated functionalities of the clustering and routing system. 1. Regular Services: Public service routinely provided on a need or condition basis. The least weight-age has been assigned to this kind of service and is proactive and reactive. 2. Periodic Services: The provision of service at pre-arranged intervals with or without users' requests and the performance of work that is scheduled ahead of time. Moderate weight-age has been assigned to this type of service and is of the reactive type. 3. Emergency Services: Critical services that need immediate action under high priority to cope with crises when they arise. High weight-age is preferred for this type of service and is of a bold type. Service-oriented clustering in CRSs intends to save time for cluster formation, neighbor node discovery, and CH selection. The knowledge provided here is significant during the selection of the CH and throughout the development of the complex network architecture. The values of the weight-age of each service are fixed in terms of percentage (50: 75: 100 for R: P: E, respectively), which is constant throughout the network operations. After the clustering process as per the weight-age, the heterogeneity communication among different clusters is handled through BS. Here, the communication range of BS is assumed to be greater than the range of CH. Algorithm 1 depicts the clustering process. \[BS_{T_{x}}^{i}>CH_{T_{x}}^{i}>mn_{T_{x}}^{i} \tag{7}\]  
Upon completion of the clustering process, each node sends a beacon signal to its fixed area BS, wherein, as a response to the beacon signal, BS assigns ranking order to each node in the respective cluster. The ranking strategy is based on the \"first reach, first assign\" basis, which states that the first reached beacon at BS is assigned as \(rank\_1\) node, whereas the second arrived as \(rank\_2\). This ranking process halts when all the nodes in the cluster are assigned with ranking order.