# QoS Enabled Layered Based Clustering for Reactive Flooding in the Internet of Things
## 4 Proposed CBF for IoT
### The IntraLayer Clustering (IALC)
Every peripheral mote B(t) holds almost one neighbor in unqueried m\({}^{\text{c}}\) (t) (B(t) \(\rightarrow\) m\({}^{\text{C}}\)(t)), peripheral motes are the covered motes that construct a boundary between queried and unqueried clusters in the network, as listed in Equation (3). \[\text{m(t_{1})}\ \subset\ \text{m(t_{2})}\ \text{and}\ \text{m}^{\text{C}} \text{(t_{2})}\ \subset\ \text{m}^{\text{C}}\text{(t_{1})},\ \text{for}\ t_{1}\ \leq\ t_{2} \tag{3}\]

In Equation (3), once a mote has been queried, it cannot be unqueried or uncovered. Therefore, m(t\({}_{1}\)) \(\subset\) m(t\({}_{2}\)). From the fundamental set principle, it also follows that m\({}^{\text{C}}\)(t\({}_{2}\)) \(\subset\) m\({}^{\text{C}}\)(t\({}_{1}\)), as shown in Equation (4):

\[\left|\text{m}^{\text{C}}\text{(t)}\right|>0,\ \left|\text{B(t)}\right|>0 \tag{4}\]

From Equation (4), since all motes that belong to uncovered m\({}\in\) m\({}^{\text{C}}\)(t) are accessible from other motes, which has a covered peripheral neighbor b \(\in\) B(t) (b signify the set of queried motes which resides on the cluster boundary). Hence peripheral mote b was visited by a query, Therefore, b either be an interior or a peripheral mote of the source mote. If b is an interior mote, then every b's neighbor means to be queried as well. Though, even some of b's neighbors are unqueried which we referred as uncovered m\({}\in\) m\({}^{\text{C}}\)(t). Therefore, b needs to be the border or a peripheral mote of a source mote as shown in Equation (5) as:

\[\text{b}\ \in\ \text{B(t_{1})}:\text{b}\ \
ot\in\ \text{B(t_{2})};\ \left|\text{Mc(t_{2})} \right|<\left|\text{Mc (t_{1})}\right| \tag{5}\]

From Equation (5), assume that N\({}_{\text{b}}\) is symbolized as the set of motes which are the neighbors of mote b. Then, the following two conditions will occur at p:

1. If (b \(\in\) B(t\({}_{1}\)), then m\({}^{\text{C}}\)(t\({}_{1}\)) \(\cap\) N\({}_{\text{b}}\) \(\
eq\) \(\emptyset\)
2. If (b \(\
otin\) B(t\({}_{2}\)), then m\({}^{\text{C}}\)(t\({}_{2}\)) \(\cap\) N\({}_{\text{b}}\) \(\
eq\) \(\emptyset\)

The above conditions simply follows that m\({}^{\text{C}}\)(t\({}_{1}\)) \(\
eq\) m\({}^{\text{C}}\)(t\({}_{2}\)), we have also shown earlier that m\({}^{\text{C}}\)(t\({}_{2}\)) \(\subset\) m\({}^{\text{C}}\)(t\({}_{1}\)), so \(\left|\text{m}^{\text{C}}\)(t\({}_{2}\)) \(<\left|\text{m}^{\text{C}}\text{(t_{1})}\right|\). If a mote b is a broadcast receiver of a source mote and obtains the route query updates at interval t\({}_{2}\) then b \(\
otin\) B(t\({}_{2}\)). The second type (interlayer/reactive) is a sort of two player game, in this game one player 1 acts as a \"maximizer\" and player 2 acts as a \"minimizer\". The aim of the maximizer (player 1) is to attain utmost volume of energy gains, while the minimizer (player 2) strives to retain the least volume of energy gains [34]. Selection of this approach is because of, every more (player) in the IoT network have

Figure 5:0 Cluster-based flooding (CBF) model formulation. the tendency to make the maximum use of resources referred as network gains during transmission of the route query packets. These players act as an observer mote and have the responsibility to detect the unwanted flooding in the network. The players are denoted as X1 and X2, where X1 stands for the inspecting mote and X2 denotes the flooder mote. Figure 5:1

The back and forth in the cluster-based flooding (CBF) model designing are (Ic) constant inspecting and (Ip) periodic inspecting, which permit the communicating motes to inspect the link either constantly or at a preset interval of time. The adopted reactive flooding strategy is symbolized as \"ReFa\". To inspect the communication link, inspecting mote uses the (Ic, Ip) strategies, denoted as:

Figure 5:2

Figure 5:3

Figure 5:4

where X1 and X2 are player 1 and 2, respectively. To indicate the inspecting mote efficacy, here we consider the player utility function, to verify that either the flooding attacks are detected effectively or not.