Naming in Multichannel with Beeps in the Strong Model

: In this paper, a system of anonymous processes is considered that communicates with beeps through multiple channels in a synchronous communication model. In beeping channels, processes are limited to hearing either a beep or a silence from the channel with no collision detection. A strong model is assumed in which a process can beep on any single channel and listen on any speciﬁc channel during a single round. The goal is to develop distributed naming algorithms for two models where the number of processes is either known or unknown. A Las Vegas algorithm was developed for naming anonymous processes when the number of processes is known. This algorithm has an optimal time complexity of O ( n log n ) rounds and uses O ( n log n ) random bits, where n is the number of processes for the largest group. For the model with an unknown number of processes, a Monte Carlo algorithm was developed, which has an optimal running time of O ( n log n ) rounds and a probability of success that is at least 1 − 12 Ω ( log n ) . The algorithms solve the naming problem in new models where processes communicate through multiple channels.


Introduction
Processes in a distributed system must be assigned unique names to communicate and perform the required computations. Naming anonymous processes is a critical problem and is at the core of building distributed systems. The assignment of unique names to anonymous processes is known as the naming problem [1][2][3]. The naming problem is also known as an initialization protocol for ad hoc networks, where no central control or infrastructure exist. This implies the necessity of an initialization step for assigning unique names to all processes [4][5][6][7][8]. Having unique names for all processes is necessary for them to communicate and perform useful computations.
In wireless communication, processes typically communicate by transmitting messages consisting of binary bits. A new topic of research was introduced in which the processes have limited communication capabilities [9]. This type of communication is known as the beeping model or beeping channels, where processes are limited to carrier sensing. Compared to messaging models, the beeping model is typically more reliable and has significantly less energy consumption [9]. Beeping channels are also known as Beep Listen (BL), where a process can either listen or beep on the channel. Two models for beeping channels have been studied in which a channel can either have collision detection or not [10,11]. We consider beeping channels without collision detection, which makes the design of naming algorithms more challenging.
The beeping model received significant attention in recent years due to its simplicity and generality, which makes it applicable in many scenarios [12][13][14][15]. It provides an abstraction that is appropriate The algorithm has an optimal time complexity of O(n log n) rounds. These are the first naming algorithms that work in the multiple beeping channel environment, and there is no existing work on such a model. Our developed naming algorithms allow anonymous processes to have unique names even when they are assigned to different channels and communication capability is very limited. For the single beeping channel case, our naming algorithms have the same time complexity as [20,21], whereas the authors in [21] developed deterministic and randomized algorithms that require processes to have internal unique IDs. However, their randomized algorithm does not guarantee consecutive unique names in the range (1, n). The MCBN and UMCBN algorithms will generally speedup the initialization step in real-world applications and solve the performance bottleneck of a single beeping channel. These algorithms will be useful for many applications in several fields such as wireless sensor networks and distributed cloud computing. This paper is organized as follows. Section 2 presents an overview of related work from the literature. Section 3 describes some technical preliminaries of the studied model. After that, the MCBN algorithm is described in Section 4 including the proof of correctness and analysis. Then, in Section 5, the UMCBN algorithm is described along with the proof of correctness and analysis. Finally, in Section 6 we present the conclusions of our work.

Related Work
Naming in a single beeping channel was studied by Chlebus et al. [20]. The problem of naming anonymous processes was examined in the synchronous communication model when the number of processes is either known or unknown. They developed a Las Vegas algorithm for naming anonymous processes when the number of processes is known. The concept for the algorithm is to simulate the assignment of balls into bins, where a beep in a round represents the selection of a bin. A process is assigned the first name in the namespace when it is the only beeping process. The algorithm iterates until every process has been assigned a unique name in the range (1, n) where n is the number of processes. The algorithm has a run time complexity of O(n log n). The Monte Carlo algorithm was developed for the model with an unknown number of processes and has a run time complexity of O(n log n). In this algorithm, the execution is run in phases where a process selects a random string of k bits in each phase. The random string is sent on the channel by each process. A process becomes a winner when the binary string from the channel matches the generated binary string from the process. The algorithm terminates when no additional processes remain and when no collisions are detected.
Similar work that focuses on energy efficiency was done by Andriambolamalala and Ravelomanana on the same model [21]. They developed energy-efficient randomized algorithms for both naming and counting that have an optimal running time of O(n log n) and an optimal energy complexity of O(log n). A system of anonymous processes was considered in which M nodes (M ≤ n) have unique IDs. The naming algorithms are built on a deterministic algorithm that runs as seasons. For each season, the processes contend for the next name by sending their unique IDs bit by bit through beeps. The process with the maximum IDs obtains the next label.
Naming of anonymous processes was studied in ad-hoc networks by Nakano and Olariu, in which they communicate through broadcasting of messages [4]. They developed randomized initialization protocols for two models with either a known or unknown number of processes. The naming protocol has a probability of success that exceeds 1 − 1 n to assign unique names in en + O( (n log n)) time slots when the number of processes is known, whereas it requires 10n/3 + O( (n log n)) time slots when the number of processes is unknown. These naming protocols were used for naming n processes in k channels that use collision detection, which requires 10n/3k + O( ((n ln n)/k)) time slots. Nakano and Olariu have also extended the work and proposed energy-efficient initialization protocols for both single and multiple channels without collision detection, where the awake time for the processes is minimized [5].
Bordim et al. constructed energy-efficient initialization protocols for nodes communicating through either single or multiple-channel radio networks [7]. These initialization protocols require O(log log n) awake time slots, which is better compared to the number of awake time slots of the existing developed initialization protocols.
Myoupo developed several initialization protocols for multiple channels even when the group sizes are not uniform [22]. The algorithm consists of a single-channel initialization protocol and a k-channel initialization protocol. The single-channel initialization protocol requires O(n/ log 2) time slots on average, whereas the k-initialization protocol requires O((n − k + 1)/ log 2) time slots in the worst case.
Dufoulon et al. studied leader election in multi-hop networks in which nodes communicate with beeps [12]. A deterministic leader election was developed for a synchronous beeping model when the nodes have unique identifiers (IDs), whereas both the size of the network and degree of a node are unknown. The algorithm has an optimal time complexity of O(D + log n) rounds, where D is the diameter of the network and n is the number of nodes in the network. Forster et al. has conducted similar work on leader election [23].
Brandes et al. developed an algorithm for estimating the size of a single-hop radio network that consists of n nodes [24]. All nodes have an identical state and no identifiers. The algorithm offers a (1 + ) approximation of the network size with a probability of success that is at least 1 − 1/ f . Casteigts et al. analyzed the problem of counting nodes in single-hop radio networks [25].A counting algorithm was developed for a stronger beeping model where nodes can identify collisions. The algorithm has a lower bound of Ω(n) on the number of rounds needed to count the nodes. They also developed a counting algorithm for the beeping model without collision detection, which has a log n increase in the number of required rounds and a probability of error where > 0.
Much work has been done on single beeping channels to solve different distributed system problems. Fundamental tasks such as broadcasting and multi-broadcast have been studied by Czumaj and Davies in beeping channels [13]. They have presented broadcasting and multi-broadcasting algorithms for both directed and undirected networks that are in most cases optimal. Several improvements to the multi-broadcast algorithms were proposed in [14]. They enhance the required time for the source identification part of the algorithm. The new algorithms use efficient and simple group testing strategies known as list disjunct matrices (LDM) and CLDM, which is an extended scheme of LDM.

Technical Preliminaries
In this work, a system of anonymous processes communicates through multiple channels with beeps. A beeping channel represents a limited form of communication in which a process can only sense the presence/absence of a signal on the channel. Therefore, when a process hears a beep on the channel, it represents a signal on the channel. Otherwise, when no beep is detected, it represents silence. The processes communicate through beeping on any of the k channels, and each channel is identified by its unique name from the range (1, k). The number of channels k is significantly less than n, where n is the number of processes for the largest group. All processes know k, the number of channels, and they can beep on any specific channel using the channel's name.
A distributed system is considered that consists of N anonymous processes that are partitioned into k channels, see Figure 1. Each channel j has n j processes, where j ∈ (1, k) such that ∑ k j=1 n j = N. The N processes are arbitrarily assigned to k channels. A process that is assigned to channel j is said to be a member of group j. The number of processes for group j is denoted by n j , where n j ≥ 1. The model of communication is synchronous and the time is partitioned into equal time slots, also known as rounds. The clocks of all processes are synchronized such that each process knows the start and the end of each round. All processes begin execution simultaneously with synchronized clocks and identical initial states. A strong communication model is assumed in which a process can only beep on a single channel in any given round. In addition, the processes can only listen for beeps on a single channel in a single round. Although a process is assigned to a specific channel, it can choose to listen to any other channel during an execution. During a round, when two or more processes beep on the same channel, each process listening to the channel cannot identify the source of the beep. Otherwise, when no beep is transmitted on a channel, the feedback is silence.

Known Number of Processes Multichannel Naming with Beeps
In this section, the MCBN algorithm is described for assigning unique names to all processes when they communicate in multiple channels with beeps and the number of processes is known. The algorithm is a Las Vegas algorithm, which is guaranteed to terminate, and on termination all processes are assigned unique names with no errors. In the MCBN algorithm, the problem of assigning unique names to all processes is divided into two sub-problems: assigning unique names to each group individually, and forming a consecutive set of unique names. Therefore, the MCBN algorithm consists of two main parts, see Figure 2. In the first part, all processes in all channels execute the Single Group Beep Naming (SGBN) algorithm to assign unique names for each group individually, see Figure 3. The SGBN algorithm is designed based on the algorithm Beep-Naming-LV, which was developed in [20] for assigning unique names to all processes in a single channel. When the SGBN algorithm terminates successfully for group j, all processes that are members of group j are assigned unique names in the range (1, n j ).    Next, how the SGBN algorithm assigns unique names to all processes is described in detail. The pseudocode for the algorithm is shown in Algorithm 1. In the beginning, a process randomly chooses its round, say r, uniformly at random from the range (1, αn log n), where n is the number of processes and α is an arbitrary value greater than or equal to 1. Each process keeps track of the round number through an internal variable round initialized to 0, which is incremented by 1 for every elapsed round. Therefore, when the value of round matches the selected random round r, the process transmits a beep on its assigned channel. Because all channels have no collision detection, a beep that is heard on the channel during round j may come from one or more transmitting processes in the same round. Therefore, any beep heard in the round loop must be verified for the collision of two or more processes, so that a unique name is assigned to a single process.

Algorithm 1: SINGLE GROUP BEEP NAMING
repeat /* algorithm repeat loop */ j ← current group number n ←number of processes in the group The Check-Collision procedure in Algorithm 2 verifies whether one or more processes have chosen the same round. Thus, all processes enter a collision-checking segment in which the counting of the round is temporarily paused. In the collision-checking segment, all processes that have chosen the same round participate in the execution of the Check-Collision procedure, which is executed α log n times, where n is the number of processes in the current group. Each call to the Check-Collision procedure consists of two rounds. The Check-Collision procedure begins by using a random coin flip method, which determines whether the process beeps in the first or the second round. The process continues listening to the channel on both rounds. A collision is detected when a beep is heard in both rounds, which causes the termination of the collision-checking segment. Therefore, all processes that have participated in the collision-checking segment choose new random rounds.
After α log n calls to the Check-Collision procedure with no collisions detected, the collision-checking segment is terminated and the participating process increments the internal counter c, which was originally 0, and assigns itself the new value of c as a name. Because all other processes continue listening to the channel, they can identify that a process has successfully assigned itself a name. Thus, all processes in the group increment the internal counter value by 1. This ensures that all processes are assigned unique names from a consecutive set of names starting from 1. Similarly, all processes beep during their specifically selected random round and verify whether a collision has taken place.
One additional step remains regarding the termination condition, where each group only knows about the termination of the SGBN algorithm for that same group but not for the other groups. Therefore, the Termination Notification (TN) algorithm allows each group of processes to be notified about the termination of all other groups, see Algorithm 3. This is a necessary step so that all groups of processes know when to begin the second part of the naming algorithm in which all processes communicate to form a contiguous set of unique names with a namespace size of n. At the start of the TN algorithm, a process is designated as a leader for each group. Because each group of processes has been assigned unique names, designating a leader process becomes trivial. The process with the lowest name (ID) is designated as the group leader. The leader process executes the TN algorithm, which is described below.
The process of notifying other processes about the termination requires the use of a channel dedicated for control communication. Therefore, Channel 0 is designated as a control channel through which the leader processes from each channel group will use to notify other group leaders about the termination of the SGBN algorithm. The execution of the TN algorithm is partitioned into segments, where each segment consists of a cycle of k rounds. For each group j, the leader process P j will beep on the j th round of a segment, while listening for beeps on all other rounds. The termination of the SGBN algorithm for all groups is detected when a total of k beeps have been heard in a segment. Otherwise, when the number of beeps is less than k, each leader process keeps beeping on its designated round in each segment. The algorithm is executed repeatedly for each segment until a beep is heard in all k rounds. This means that all group leaders are notified about the termination of the SGBN algorithm in all groups.

Algorithm 3: TERMINATION NOTIFICATION
totalGroups ← number of groups name ← current name of the process j ← current group number n ← the number of processes for group j totalBeeps ← 0 round ← 1 FB ← ∅ /* waiting for k beeps to be heard */ repeat if round = j then The second part of the algorithm begins when each group of processes detects the termination condition. In this part of the algorithm, all processes execute the Multi Group Renaming (MGR) algorithm shown in Algorithm 4. The goal is to make the set of all names for all processes form a consecutive set of unique names starting from 1 until N. The previously designated leaders communicate with other processes in other groups. The leader of group j sends the total number of processes n j to the processes in the next group, i.e., group j + 1. The procedure of sending the number of processes n j is performed by encoding the number to its binary form: representation Binary(n j ). The binary representation is then sent to group j + 1 through a special encoding of bits called binary beep encoding. Sending a single bit requires a pair of rounds, such that a single beep in the first round represents 0, whereas a single beep in the second round represents 1 (similar to Morse code). The end of a binary number is encoded in a pair of rounds with a beep in the first and second rounds. All processes that are members of group j + 1 receive the number of processes from the previous group and update their assigned names as follows, where P id is the current name of the process P.
The MGR algorithm for forming a consecutive set of names begins from the first group in the group set (Group 1). The leader of Group 1 starts sending the number of processes to the next group in sequence, which is Group 2, as soon as the termination condition is detected for the first part of the naming algorithm. Because all processes in Group 2 continue listening to their assigned channel, each process receives the number of processes of Group 1 as a binary number encoded using beeps. When the number of processes is received from the previous group, all processes in Group 2 update their names accordingly. Similarly, the leader of Group 2 sends the total number of processes for Groups 1 and 2 to the next group in sequence. The next group, Group 3, receives the value n y , where n y = n 1 + n 2 , which represents the total number of processes in all previous groups. This process continues until Group k receives the total number of processes in all previous groups. Afterward, all processes from all groups are assigned unique names with an optimal namespace size of N, where N = ∑ k i=1 n i .

Algorithm 4: MULTI GROUP RENAMING
name ← current name of the process j ← current group number n ← the number of processes for group j TransformAndSend(totalProcesss, j + 1) else if IsLeader(j) = true then TransformAndSend(n, j + 1)

Proof of Correctness and Analysis
In this section, we prove the correctness of both parts of the MCBN algorithm and analyze the time complexity and the number of random bits needed. The procedure for the SGBN algorithm is represented as the operation of assigning a process to a random round until it is singleton. A process is a singleton when no other processes have selected the same round. Checking for a collision in the selected round requires a maximum of α log n calls to the Check-Collision procedure. Proof. There are i processes calling the Check-Collision procedure. Each call consists of two rounds. For each call, two possibilities exist for the outcome of choosing which round to beep in, which is determined by a random coin flip. Thus, a process can either beep in the first or second round, but not both. If the outcome of the first process is denoted as R, then the probability of another process choosing R is 1 2 . A collision is not detected when all remaining i − 1 processes choose the same round R. When the number of processes i is equal to 1, the probability of detecting a collision is 0, because no other processes call the Check-Collision procedure. Otherwise, the probability of not detecting a collision when i processes call the Check-Collision procedure is 1 2 (i−1) , given i ≥ 2. To derive the probability of k different calls of the Check-Collision procedure, the probability is multiplied k times. Therefore, the probability of failing to detect a collision for k Check-Collision procedure calls is 1 2 Next, the number of times a process chooses a random round before getting a name is estimated. We recall the result from [20], which states: The authors in [20] also proved the following theorem, which we refer to regarding the correctness of the SGBN algorithm. Theorem 1. The SGBN algorithm is guaranteed to terminate, and on termination, it assigns unique names to all processes that require at most cn log n rounds and uses at most cn log n random bits with a probability of success at least 1 − ( 1 2 α(n log n−log n) ) m .
Based on Lemma 1, the time complexity of the SGBN algorithm is computed. At most 3n round selections are needed before all processes are assigned unique names. For each round selection, α log n Check-Collision procedure calls are made, and each call takes exactly two rounds. Therefore, the time complexity is O(n log n) rounds because the algorithm requires at most 6 α n log n rounds. Thus, at most, 3 α n log n Check-Collision procedure calls are made, which implies that the algorithm uses at most cn log n random bits. The SGBN algorithm continues repeating the procedure of choosing unique rounds for all processes until they are all assigned unique names in the range (1, n) and counter = n.
Next, the correctness of the second part of the algorithm is proved, which consists of the TN algorithm and the MCBN algorithm. First, the correctness of the TN algorithm is demonstrated in which each group is notified about the termination of the SGBN algorithm by every other group. We begin with the initial step when the SGBN algorithm terminates for group j, and the process with the lowest name is designated as the leader for the group. Afterward, it is demonstrated that exactly one process is assigned as a leader for each group j. From Theorem 1, all processes are assigned unique names from the range (1, n). Thus, a process knows that it is the leader of its group when its name is 1. Assuming that two or more processes are assigned as group leaders, it would imply they are assigned the same name of 1. This contradicts Theorem 1, which states that when the algorithm terminates all processes are assigned unique names. Therefore, exactly one process is assigned as a leader for group j.

Theorem 2. The Termination Notification algorithm terminates after O(n log n) rounds and when it terminates, the processes in all groups are notified about the termination of the SGBN algorithm.
Proof. It is shown that the leader of each group j for all j ∈ (1, k) obtains the knowledge about the termination in all other groups. First, we begin with the initial state where the SGBN algorithm has terminated for group h, 1 ≤ h ≤ k. Then, the leader process of group j begins executing the TN algorithm on which the leader keeps counting the number of beeps heard on Channel 0 for every k rounds. The leader process of group j beeps on Channel 0 during the j th round. When the total number of beeps is less than k, the same process is repeated for every k rounds. When the leader process of group j has heard k beeps during the current cycle, this implies that group j has finished executing the TN algorithm. Because the leader process of group j has heard k beeps, it implies that all other processes in other groups have also heard k beeps during the current cycle of k rounds. Thus, the algorithm terminates for all groups, and when it terminates, the processes of each group obtain knowledge regarding the termination of the SGBN algorithm in all other k − 1 groups. Next, the time required for the TN algorithm to terminate is analyzed. Assuming that group h has finished the execution of the SGBN algorithm and began executing the TN algorithm, the number of times the TN algorithm repeats is estimated. From Theorem 1, the SGBN algorithm has a time complexity of O(n log n) rounds, which implies that the leader process of group j must wait for at most O(n log n) rounds. Because the leader processes of each group run the TN algorithm simultaneously, the time complexity for the algorithm is O(n log n) rounds. Two cases need to be examined to calculate the time complexity. If the number of processes n is the same for all groups, then the time complexity is O(n log n) rounds. Otherwise, the time complexity is O(n i log n i ) rounds, where i is the group with the highest number of processes. Proof. Initially, from Theorems 1 and 2 it is known that all processes in each group are assigned unique names from the range (1, n j ) where 1 ≤ j ≤ k, and that the leader process of each group knows about the termination of the SGBN algorithm for all other groups. Therefore, all processes in Group 1 are assigned unique names in the range (1, n 1 ), where n 1 is the number of processes in Group 1.
Next, it is demonstrated that when the number of processes is sent by the leader process of group x to the next group in the sequence, the combined names of the processes in the two groups form a unique set of names in the range (1, n y ), where n y is the total number of processes for all groups from 1 to n x+1 . In the multichannel naming algorithm, each group apart from Group 1 waits until the total number of processes is received. The leader of Group 1 immediately begins the transmission of the total number of processes n 1 to the next group in sequence, which is Group 2. The leader process transforms n 1 into its binary form and sends it using the previously described binary beep encoding. When the processes of Group 2 receive the number of processes, each process updates its name by adding the total number of processes n 1 received from Group 1 to its name. Now, all processes in Groups 1 and 2 are assigned unique names in the range (1, (n 1 + n 2 )). Next, it is illustrated that, when the leader process of group x sends the total number of processes to group x + 1, the combined names of all processes in all groups from 1 to x + 1 are unique. When the processes of group x + 1 receive the total number of processes of all groups from 1 to x, each process that is a part of group x + 1 updates its name by adding the total number of processes. This results in the assignment of new unique names for the processes in group x + 1. All processes in all groups are assigned unique names in the range (1, n z ), where n z is the total number of processes for all groups from 1 to x + 1.
Finally, it is demonstrated that all processes in all groups from 1 to k are assigned unique names in the range (1, N), where N = ∑ k i=1 n i . It was proved that when the leader process of group x sends the total number of processes to group x + 1, the combined names of all processes are assigned unique names. Therefore, when the leader process of group k − 1 sends the total number of processes to group k, the processes in group k update their names, which results in unique names that are different from the existing names in the groups (1, (k − 1)). Thus, all processes in all groups are assigned unique names from the range (1, N), which completes the uniqueness part of the proof.
Next, the expected number of rounds needed to finish assigning unique names to all process in all groups (1, k) is computed. The time complexity for the MGR algorithm is computed as the total sum of rounds needed to transmit the number of processes from each group. The binary representation of each number is transmitted using log n + 1 rounds. The number of rounds required to finish forming a consecutive set of unique names is (k − 1)(log n + 1) rounds. Thus, the time complexity of the second part of the naming algorithm is O(n log n) rounds. The total time complexity is the sum of the time complexities for each part of the MCBN algorithm, which is O(n log n) rounds.
As the lower bounds for the single channel naming algorithm is O(n log n) [20], then that bound carries to the multiple beeping channels problem addressed in this paper, thus making the asymptotic optimality of our algorithm obvious.

Unknown Number of Processes Multichannel Naming with Beeps
In this section, the UMCBN algorithm is described for the model with unknown number of processes. The naming of anonymous processes in multiple channels comprises two parts, see Figure 4. First, unique names are individually assigned to each group of processes, where a group represents processes assigned to the same channel, see Figure 3. Second, processes from all groups communicate to construct a consecutive set of unique names.
In the first part, a Monte Carlo algorithm was developed for assigning unique names to all processes with a very small probability of error. The concept of the algorithm resembles the assignment of balls into several bins. The goal is for each ball to be a singleton in its own bin. When one of the balls is not a singleton in its bin, the number of bins is incremented by an exponential factor, and the assignment of processes to bins is repeated. This process continues until all balls become singletons in their bins. In the Unknown Single Group Beep Naming (USGBN) algorithm, each process chooses a random round from a predefined range of rounds. When two or more processes are assigned to the same round, the assignment of processes to random rounds is repeated using a larger range of rounds. This operation is repeated until all processes become singletons in their selected rounds.  Next, how the USGBN algorithm works is described. It is based on the pseudocode in Algorithm 5. The algorithm consists of two main loops, which are referred to as the repeat loop and the round loop. In the repeat loop, the processes are repeatedly assigned to random rounds when a collision is detected. The algorithm is repeated for a larger range of rounds, and the range is incremented based on the exponent t and a base of 2. The exponent is incremented by a factor of 2. If no collision is detected, then all processes have unique names and the main repeat loop is terminated.
Before beginning the execution of the round loop, each process chooses a random round from the range of rounds. During the round loop, each process waits for its selected round before beeping on the channel. When the round number matches the selected round, the process beeps on the channel. For each beep on the channel, a collision-checking segment begins. The objective for the collision-checking segment is to verify that a single process has chosen the selected round so that it is assigned a unique name. In the collision-checking segment, the procedure Check-Collision is run for α t times. When no collision is detected, all processes which selected that particular round are assigned a name based on the value of the counter. The value of the counter is identically incremented by all processes because all processes identify that no collision is detected. Otherwise, when a collision is detected, the round loop is restarted by setting the value of reset to "true". Before beginning a new round loop, the range of rounds is obtained as follows, where t is doubled for every restart of the round loop. After that, all processes choose random rounds from the new range of rounds. The round loop is repeated until no collision is detected for each beep that is heard during its execution. This implies that all processes have been assigned unique names.
where the value t denotes the t th iteration of the main loop.
For each beep heard during the round loop within the range_size, the Check-Collision procedure is executed αt times. The probability of error is derived based on the number of times the Check-Collision procedure is executed. Therefore, two cases must be considered in which range_size < n or range_size ≥ n where n is the number of processes. In each case, the probability of error is estimated in which a collision is not detected.
From Lemma 1, the probability of failing to detect a collision is obtained as follows, where i is the number of processes, and k is the number of times the Check-Collision procedure is called. In the first case, the upper bound of failing to detect a collision is estimated when t = 1, which is the initial value. The probability of error is at its highest value when n/2 processes choose the same round. The probability of failing to detect a collision is estimated to be at most Therefore, the probability of successfully assigning unique names is at least which is greater than 1 2 . When the range_size ≥ n, processes have a higher chance of choosing unique rounds. Thus, the upper bound of failing to detect a collection is obtained when exactly two processes choose the same round. When the range of rounds is greater than or equal to the number of processes then t = log n. From Lemma 1, the upper bound for the probability of error is derived as follows, Therefore, the probability of successfully assigning unique names is 1 − 1 2 Ω(log n) ≥ 1 2 . Thus, the USGBN algorithm assigns unique names to all processes with a probability of success that is at least 1 2 . This concludes the uniqueness of names portion of the proof. Now, we estimate the time complexity of the algorithm to successfully assign unique names to all processes by computing the number of rounds needed. For each beep heard during an iteration of the round loop, the Check-Collision procedure is called αt times. The algorithm terminates with a high probability of success when 2 t ≥ n, i.e., t ≥ log n. Thus, the total number of rounds required to assign unique names is obtained as follows, ∑ log n t=1 2 t α t = O(n log n). Therefore, the algorithm has a time complexity of O(n log n) rounds for assigning unique names to n processes with a high probability of success. As it was shown that the algorithms requires O(n log n) when t ≥ log n, then the expected number of bits is computed based on the number of times each process calls the Check-Collision procedure. Each process calls the Check-Collision procedure for at most α t = α log n and each call requires one random bit. Therefore, for n processes, the required random bits is αn log n.
Theorem 5. The Termination Notification algorithm terminates after O(n log n) rounds, and when it terminates, the processes in all groups are notified about the termination.
Proof. To prove the correctness of the algorithm, each group must obtain knowledge regarding the termination of the USGBN algorithm. When the USGBN algorithm terminates with a high probability of success, a leader process is designated for group j, where 1 ≤ j ≤ k. The process with the name 1 is designated as a leader process for each group. The TN algorithm is executed, as in the model with known number of processes. For every cycle of k rounds, the leader process continues beeping on the control channel at the j th round, while it continues counting the number of beeps. This process repeats until the number of beeps equals k. We know that the leader of group j has obviously terminated the execution of the TN algorithm in which k beeps occurred during a cycle of k rounds. It implies that the leader process of other groups have also been notified about the termination of all other groups. Thus, all groups obtain knowledge concerning the termination of the USGBN algorithm of all remaining groups.
Next, the time complexity of the algorithm is estimated. If group j has finished assigning unique names to all processes, then the leader process continues repeating the algorithm until the USGBN algorithm is terminated in all other groups. Thus, the time complexity is estimated based on the number of rounds needed to finish assigning unique names to a single group, which is O(n log n) rounds. Theorem 6. The UMCBN algorithm assigns unique names to all processes in all channels with a high probability of success that is at least 1 − 1 2 Ω(log n) and has a time complexity of O(n log n) rounds.
Proof. In order to prove the correctness, it is demonstrated that all processes are assigned unique names. At the beginning, from Theorem 4, all processes in each group are assigned unique names from the range (1, n) with a high probability of success. In addition, based on Theorem 5, all groups have obtained knowledge regarding the termination of the USGBN algorithm for all other groups. All processes in all groups, except Group 1, wait until the value n y is received through the binary beep encoding. The value n y represents the total number of processes that have been assigned unique names. The leader process of Group 1 begins executing the algorithm in which the number of processes for Group 1 is sent to the next group in the sequence. Before transmitting the number of processes of Group 1, the number of processes n 1 is transformed into its binary form and sent using the binary beep encoding as described in Section 4. When the number of processes is received by the processes in the next group, all processes update their names by adding the number of processes n 1 received from the first group. Thus, the combined names of all processes in the first two groups form a contiguous set of unique names with a namespace size of n 1 + n 2 . Similarly, the leader process of the next group begins transmitting the total number of processes for Groups 1 and 2, and so on. Therefore, for each group that receives its total number of processes, the combined names of these processes form a set of unique names for all processes. When group k receives the total number of processes ∑ k−1 i=1 n i , all processes in group k update their names by adding the total number of processes. As a result, all processes are assigned unique names. The expected run time of the MGR algorithm is (k − 1) log n because k − 1 number of processes are transmitted and each transmission requires 2(log n + 1) rounds. Thus, the time complexity of the second part of the algorithm is O(n log n) rounds.
Next, we compute the time complexity of assigning unique names to all processes when the number of processes is unknown. The complexity is computed as the sum of the time complexities for the first and second parts of the naming algorithm. Thus, the total time complexity of the UMCBN algorithm is O(n log n) rounds. The optimality of the algorithm is shown by considering the special case of a single group when k = 1. We refer to Proposition 3 in [20], which states that a randomized algorithm has an expected run time of Ω(n log n) rounds whether it is Las Vegas or Monte Carlo. Therefore, the time complexity of the UMCBN algorithm is optimal since it is designed for the general case when k ≥ 1.

Conclusions
We proposed two naming algorithms for assigning unique names to anonymous processes that communicate in multiple channels with beeps in the strong model. To our knowledge, no such algorithms have been proposed for naming anonymous processes in models wherein they communicate with beeps on multiple channels. For the model with a known number of processes, a novel Las Vegas algorithm, known as the MCBN, has an optimal time complexity of O(n log n) rounds and uses cn log n random bits. When the number of processes is not known, a novel Monte Carlo algorithm, known as the UMCBN, can assign unique names with a high probability of success. Its time complexity is O(n log n) rounds with a probability of success that is at least 1 2 Ω(log n) . The algorithms solve the naming problem in two new models and enable the design of solutions for other distributed system problems. They facilitate the deployment of anonymous processes in environments with limited communication capabilities and guarantee the assignment of unique names to all processes with a high probability of success for cases in which the number of processes is unknown. Solving the anonymity problem in multiple channels with beeps leads to the possibility for designing solutions to other distributed system problems in the same model, such as consensus and leader election. A future direction for this work could be to design naming algorithms that are energy efficient for the same models. Moreover, it will be interesting to find how having collision detection can make the algorithms more efficient. Another direction for the work is analyzing other communication models such as ones with extended or multiple beeps consisting of two or more signals.