## 3 API Protocol  
In this section, we explain the API protocol. The main idea of the API is that only the nodes required to run a specific application are initialized via the repetition of the same process by considering an underwater channel. In the API, we assume the following conditions:  
* A master node already knows the information of slave nodes, including their identification number and the number of slave nodes. * Network protocol (e.g., MAC, routing, etc.) information required for the operational stage is fully delivered to all slave nodes by the master node through the initialization message. * Once the initialization stage is terminated, the operational stage follows based on the given network protocol, which is controlled by the master node. The API is based on one-to-one initialization between a master and a slave node. To begin initialization, a master node transmits an initialization request message to a slave node. The slave node, which received the initialization request message without error, then completes initialization by sending an initialization response message to the master node. Although a complex scheduling method can be applied in the initialization stage, a simple round-robin method where a master node sequentially initializes a slave node one by one is applied due to the following reasons:  
* It clearly shows the performance difference between the API and the FI by excluding complicated collisional situations. * It reduces the algorithm complexity and enables the API to be compatible by avoiding complex scheduling or time synchronization. * It focuses on enhancing the initialization success rate by avoiding performance degradation due to both transmission and reception collisions. Before explaining the algorithm, let us define several terminologies used in the API protocol as follows:  
* Round. This is used to represent the repetition of the initialization process. As illustrated in Figure 2, a master node executes the one-to-one initialization with multiple slave nodes in one round. The index of a round is defined as \(k\). \(k\) does not increase to infinity but can increase to the maximum value \(K\) (\(k\leq K\)), where \(K\) is a network parameter and can be determined according to network conditions. Here, the \(k_{th}\) round is simply denoted by \(R_{k}\). * Sub-Round. This represents the order of the one-to-one initialization. In a sub-round, a master node initializes a slave node. The index of a sub-round is defined by \(l\). * The number of sub-rounds of the \(k_{th}\) round is defined as \(Q_{k}\). As described earlier, a master node initializes as many slave nodes as the application requirement in the initialization stage. In \(R_{1}\), the number of sub-rounds should be at least the application requirement in order to perform a sufficient number of one-to-one initializations. Thus, \(Q_{1}\) is determined to be the same as the application requirement (i.e., the number of active nodes). If we define the number of slave nodes as \(N\), the range of \(Q_{1}\) is given as \(1\leq Q_{1}\leq N\) and determined according to the application requirement. If the channel condition is good, \(Q_{1}\) slave nodes can be initialized successfully in \(R_{1}\). Otherwise, the application requirement cannot be satisfied in \(R_{1}\) and the next round (\(R_{2}\)) must be performed. Let us denote the number of slave nodes that were successfully initialized in \(R_{1}\) as \(\overline{Q}_{1}\). The number of sub-rounds in \(R_{2}\) can then be expressed as \(Q_{1}-\overline{Q}_{1}\). If this is generalized to \(R_{k}\), \(Q_{k}\) can be expressed as: \[Q_{k}= \begin{cases}Q_{1},&k=1\\ Q_{k-1}-\overline{Q}_{k-1},&k>1\end{cases} \] (1)
* All sub-rounds are set to have the same time duration as \(\tau\) in order to avoid a complex scheduling considering spatial-time reuse. The value of \(\tau\) is determined by considering the maximumpropagation delay between the master and a slave node, the transmission delay, and the guard time.