Energy Complexity of Distance Computation in Multi-hop Networks

05/10/2018
by   Yi-Jun Chang, et al.
University of Michigan
0

Energy efficiency is a critical issue for wireless devices operated under stringent power constraint. Following prior works, we measure the energy cost of a device by its transceiver usage, and the energy complexity of an algorithm is defined as the maximum number of time slots a device transmits or listens, over all devices. In a recent paper of Chang et al. (PODC 2018), it was shown that broadcasting in a multi-hop network of unknown topology can be done in poly n energy. In this paper, we continue this line of research, and investigate the energy complexity of other fundamental graph problems in multi-hop networks. Our results are summarized as follows. 1. To avoid spending Ω(D) energy, the broadcasting protocols of Chang et al. (PODC 2018) do not send the message along a BFS tree, and it is open whether BFS could be computed in o(D) energy, for sufficiently large D. In this paper we devise an algorithm that attains Õ(√(n)) energy cost. 2. We show that the framework of the Ω(n /^2 n) round lower bound proof for computing diameter in CONGEST of Abboud et al. (DISC 2017) can be adapted to give an Ω̃(n / ^3 n) energy lower bound in the wireless network model (with no message size constraint), and this lower bound applies to O( n)-arboricity graphs. From the upper bound side, we show that the energy complexity of Õ(√(n)) can be attained for bounded-genus graphs (which includes planar graphs). 3. Our upper bounds for computing diameter can be extended to other graph problems. We show that exact global minimum cut or approximate s--t minimum cut can be computed in Õ(√(n)) energy for bounded-genus graphs.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

09/02/2018

The Complexity of Leader Election: A Chasm at Diameter Two

This paper focuses on studying the message complexity of implicit leader...
05/08/2020

Communication memento: Memoryless communication complexity

We study the communication complexity of computing functions F:{0,1}^n×{...
05/16/2021

Near-Optimal Time-Energy Trade-Offs for Deterministic Leader Election

We consider the energy complexity of the leader election problem in the ...
12/16/2021

Sparse Euclidean Spanners with Tiny Diameter: A Tight Lower Bound

In STOC'95 [ADMSS'95] Arya et al. showed that any set of n points in ℝ^d...
06/15/2020

Computing Shortest Paths and Diameter in the Hybrid Network Model

The 𝖧𝖸𝖡𝖱𝖨𝖣 model, introduced in [Augustine et al., SODA '20], provides a...
07/19/2020

The Energy Complexity of BFS in Radio Networks

We consider a model of energy complexity in Radio Networks in which tran...
03/10/2021

An FFT-based method for computing the effective crack energy of a heterogeneous material on a combinatorially consistent grid

We introduce an FFT-based solver for the combinatorial continuous maximu...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

In many wireless networks (e.g., sensor networks), devices are operated under a limited power constraint (e.g., capacity of the battery). To maximize the lifetime of a network, it is important that the devices operate in an energy efficient manner. For small devices, the majority of energy is often spent on radio transceiver usage (sending and receiving packets), and not on computation. Rather than assigning a different energy cost per each mode of operation, we simply assume that a device spends one unit of energy when it sends a message or listens to the channel. This is a common assumption; see, e.g., [8, 19, 20, 22, 21].

Wireless Network Models.

A network is modeled as a connected undirected graph , where each vertex is a device, and each edge represents a communication link. We assume that the local clock of each device is synchronized to a global time (e.g., they can use GPS technology). Communication proceeds in synchronized rounds, and all devices agree on the same starting time. In each round, each device can listen to the channel, send a message to its neighbors, or be idle. We do not allow a device to simultaneously send and listen (i.e., we are in the half-duplex model). We assume that there is no message size constraint. The energy cost of a device is measured by the total number of channel accesses (i.e., the number of rounds that the device sends or listens). The energy cost of an algorithm is the maximum energy cost of a device, among all devices.

In one round, if a device listens to the channel, and exactly one device in transmits a message, then receives the message sent by . If the number of transmitting devices in is not 1, then receives a channel feedback which depends on the underlying model.

Without Collision Detection: .

If the number of transmitting devices in is not 1, then receives “silence”.

With Collision Detection: .

If the number of transmitting devices in is greater than 1, then receives “noise”. If the number of transmitting devices in is 0, then receives “silence”.

Each transmitting or idle device does not receive any feedback from the communication channel. In particular, a transmitting device does not know whether its message is successfully received by its neighbors.

Throughout the paper, unless otherwise stated, we are always in the randomized

model. We assume that each device has access to an unlimited local random source, but there is no shared randomness between devices. We do not consider deterministic algorithms in this paper. The maximum allowed failure probability is, by default,

, and the term “with high probability” refers to probability of . Note that randomized algorithms can generate private random bits to break symmetry, e.g., they can assign themselves -bit IDs, which are distinct with high probability. Therefore, we may assume that each device already has a distinct ID of length .

The graph topology of the underlying network is initially unknown to all devices; but we assume that the two parameters and are initially known to everyone.

Whether the assumption that transmitting and listening both cost one unit of energy is valid depends on the underlying wireless network technology. Note that, in general, there is also a difference between the energy consumption of receiving packets and that of idle listening (i.e., the transceiver circuits are active, but no message is received). There are examples of networks where the difference between these costs is small; see e.g., [31, Table 1].

In real world, a wireless device might be allowed to adjust the power of transmission, which affects the range that its message can reach. In this paper, we assume that all devices send with a fixed power. This is not an uncommon assumption; see e.g., [5].

Message-Passing Models.

The model considers the setting where there is no collision at all, and each message sent along each edge is successfully transmitted [27, 28]. The model is a variant of the model that requires each message to have length at most .

1.1 Related Works

Energy saving is a critical issue for wireless networks, and there have been a lot of efforts in designing energy efficient algorithms in networking and systems research. In what follows, we briefly summarize prior works in theory research that considered channel accesses as a complexity measure.

Single-hop Networks.

First, we consider an important special case where all devices are within a single hop (i.e., is a clique), but the number of devices is unknown. The computation model for single-hop networks is simpler than that of general mult-hop networks. Variants of the models that are often considered include: (i) whether or not a device can simultaneously send and listen (i.e., full duplex and half duplex), (ii) the ability to detect collision (i.e., and ), (iii) whether to allow randomness.

There has been a line of research on the energy complexity of fundamental problems such as leader election (all vertices in the network agree on a leader), and approximate counting (all vertices estimate the number of vertices within a constant factor) 

[19, 21, 22, 23, 4, 8]. In the randomized half-duplex model, both problems have energy complexity and , in and , respectively, for -time algorithms that succeeds with probability  [8].

Multi-hop Networks.

Chang et al. [7] extended the above single-hop network model to the multi-hop setting, and they showed that broadcasting can be done in energy. They presented randomized algorithms for and using energy and , respectively, but it takes super-linear time to attain these energy complexities. There is a constant such that for any , if one is allowed to spend energy, then broadcasting can be solved in time. They also showed three lower bounds: (i) an lower bound, which applies to even the model on path graphs, (ii) an lower bound for randomized , and (iii) an lower bound for randomized .

Klonowski and Pajak [25] investigated a variant of the model where only transmitting costs energy, and they showed that in , for any , broadcasting can be solved in time using transmission per vertex.

Other than [7, 25], there are a number of works that studied energy efficiency of multi-hop networks from different perspectives. In wireless networks, the power of a signal received is proportional to , where is the distance to the sender, and is a constant related to environmental factors. Kirousis et al. [24] studied the optimization problem of assigning transmission ranges of devices subject to some connectivity and diameter constraints, and the goal is to minimize the total power consumption; see also [32, 9, 2] for related works.

A major cost of energy loss is due to collision of multiple signals. A number of papers studied the problem of minimizing the number of rounds or transmissions to realize certain communication task [11, 30, 5]. In the setting of known network topology, Gsieniec et al. [15] designed a randomized protocol for broadcasting in rounds such that each device transmits at most times.

1.2 Our Contribution

As observed in [7], for graphs of bounded degree , all graph problems can be solved in energy (we will see this in Section 2). Thus, the main challenge for achieving energy efficiency is to deal with “vertex congestion” at high degree vertices. If the energy budget is , then only (at most) messages can be transmitted across each vertex . For comparison, the well-studied distributed model only captures the issue of “edge congestion”. For simpler problems like broadcasting, vertex congestion might not be a critical issue. For more complicated tasks like computing diameter, it might be necessary to have a large amount of messages sent across a vertex to solve the problem. Our results are briefly summarized as follows.

Breadth-first Search.

In the BFS problem, we are given a specific source vertex , and the goal is to let each vertex learn . Note that the broadcasting protocols of Chang et al. [7] do not send the message along a BFS tree so as to avoid spending energy, and it is open whether BFS can be computed in energy, for sufficiently large . In this paper, we show that there is a randomized algorithm for BFS in time and energy. For large , this improves upon the trivial/standard approach (which constructs the BFS tree along the BFS tree itself) that takes time and energy.

Our BFS algorithm for Theorem 3 is a result of a combination of some communication building blocks and a known approach in distributed and parallel shortest path algorithms [14, 18, 33, 10]. The algorithm samples distinguished vertices, each of them builds a local BFS tree of depth , and the final BFS tree rooted at can be constructed by combining the local BFS trees.

Diameter.

We show that the framework of the time lower bound for computing diameter of Abboud et al. [1] can be adapted to give an energy lower bound in the wireless network model, even allowing unbounded message size and runtime. This lower bound applies to even -arboricity graphs. This adaptation is very specific to this lower bound proof and does not apply to other lower bounds, in general. For instance, the lower bounds in [29] do not seem to extend to the energy complexity in wireless networks (with no message size constraint), and we are not aware of any non-trivial energy lower bound.

Due to the energy lower bound for -arboricity graphs, in order to design energy efficient algorithms for computing diameter, we have to consider graph classes that are “more specialized” than low arboricity graphs. Note that arboricity is a graph parameter that measures the density of the graph. A graph has arboricity if its edge set can be partitioned into forests.

We show that the energy complexity of can be attained for the class of bounded-genus graphs, which includes planar graphs. Our algorithm is based on a partition of vertices into a high degree part and a low degree part, and a classification of small degree components into three types. We show that for some small degree components, we only need to extract a small amount of information in order to compute the diameter.

Minimum Cut.

Our approach for computing diameter in bounded-genus graphs is sufficiently generic that it can be applied to other graph problems as well. In particular, we show that both exact global minimum cut and approximate minimum cut can be computed in energy for bounded-genus graphs. In contrast, there are energy lower bounds for computing the exact value of (i) an minimum cut (for planar graphs), and (ii) a global minimum cut (for unit disc graphs).

Remark.

Our results about bounded-genus graphs also fit into a recent line of research on distributed computing for planar or near-planar graph classes. Ghaffari and Haeupler [13] showed that minimum spanning tree can be computed in time for planar graphs via low-congestion short cuts. This approach has been extended to any graph class that can be characterized by an exclusion of a set of minors (which includes bounded-genus graphs) by Haeupler, Li, and Zuzic [16].

2 Basic Building Blocks and a Simple BFS Algorithm

In this section we present the basic tools that we use in our algorithms. Some of them are extensions of the techniques developed in [7]. Based on these building blocks, we devise a simple BFS algorithm that achieves energy complexity.

2.1 SR-communication

Let and be two not necessarily disjoint vertex sets. The task  [7] is defined as follows. Each vertex holds a message that it wishes to transmit, and each vertex wants to receive a message from vertices in , where is the inclusive neighborhood of . An algorithm for guarantees that for each with , the vertex receives a message from at least one vertex , with high probability. Several variants of are defined as follows.

Finding Minimum: .

The message sent from each vertex contains a key from the key space , and we require that w.h.p., every with receives a message such that . We define analogously.

Multiple Messages: .

Each vertex holds a set of messages . For each message , all vertices holding have access to shared random bits (associated with ). We assume that for each , the number of distinct messages in is upper bounded by a number , which is known to all vertices. We require that each vertex receives all distinct messages in w.h.p.

All Messages: .

Every needs to receive the message , for each w.h.p. We let be an upper bound on , for each . If is unknown, then we can set .

Approximate Sum: .

The message sent from each vertex is an integer within the range . Every needs to approximately learn the summation within an -factor w.h.p.

The following table summarizes the time and energy complexity of our algorithms for these tasks; see Appendix A for proofs. These algorithms serve as basic communication primitives in subsequent discussion. Note that we do not optimize some of the complexities.

Task Time Energy





For the special case of and for each , the runtime of can be improved to .

2.2 Vertex Labeling and Broadcasting

A good labeling is a vertex labeling such that each vertex with has a neighbor with  [7]. A vertex is called a layer- vertex if . Note that if there is a unique layer-0 vertex (which is also called the root), then represents a tree rooted at . However, since a vertex could have multiple choices of its parent, the tree might not be unique. The following lemma was proved in [7].

Lemma 1.

A good labeling with a unique layer-0 vertex can be constructed in time and energy. We are allowed to choose whether or not to designate a specific vertex .

A good labeling allows us to broadcast messages in an energy-efficient manner. In particular, we have the following lemma.

Lemma 2.

Suppose that we are given a good labeling with a unique layer-0 vertex . Then we can achieve the following.

  1. It takes time and energy for every vertex to broadcast a message to the entire network.

  2. It takes time and energy for vertices to broadcast messages to the entire network.

Proof.

For the first task, consider the following algorithm. We relay the message of each vertex to the root using the following converge cast algorithm. For down to , do with being the set of all layer- vertices, and being the set of all layer- vertices. For each execution of , each vertex in transmits not only its message but also all other messages that it has received so far. Although we perform times, each vertex only participates at most twice. Thus, the cost is time and energy.

After that, the root has gathered all messages. The root then broadcasts this information to all vertices via the diverge cast algorithm, as follows. For to , do with being the set of all layer- vertices, and being the set of all layer- vertices. Similarly, although we perform for times, each vertex only participates at most twice. Thus, the cost is time and energy.

The second task can be solved similarly. Let be a size- set of vertices that attempt to broadcast a message. We present two different algorithms solving this task. Both of them take time and energy.

We can solve this task by first doing a converge cast (using with ) to gather all messages to the root, and then do a diverge cast (using ) to broadcast these messages from root to everyone. Note that in order to use , the initial holder of each message needs to first generate a sufficient amount of random bits and attach them to the message; these random bits serve as the shared randomness associated with the message (which is needed in ). The cost of with is time and energy.

Alternatively, the task can be solved using only . Consider the following procedure which broadcasts at least one message among all messages. Do a converge cast using , and then it is guaranteed that at least one message is reached to the root . Next, we do a diverge cast using to broadcast the message to everyone. This takes time and energy. To solve the task we repeat this procedure for times, and so the total cost is time and energy. ∎

A Note about Energy Efficiency for Small Degree Graphs.

For the model, it is possible to construct a good labeling with a unique layer-0 vertex in energy [7]. Note that in each vertex is able to gather the list of IDs of its neighbors in one round. Given , the root is able to gather the entire graph topology in energy in (using a converge cast to relay the information to the root layer-by-layer). Thus, all graph problems in the model can be solved using merely energy. In [7], they also showed that we can simulate any algorithm in the or models on bounded degree graphs (i.e., ) with only -factor overhead on both time and energy costs. Thus, all graph problems in wireless network models on bounded degree graphs can be solved using energy.

We can establish this result formally via Lemma 2(1). Note that we can let each vertex learn the ID list of by doing with , where the message of each vertex is its ID; this takes time and energy. After each vertex knows the ID list of , we apply Lemma 2(1) to let every vertex learn the entire network topology; it takes time and .

In view of the above, in this work we only focus on unbounded degree graphs in wireless network models.

2.3 A Simple Breadth-first Search Algorithm

In the BFS problem, we are given a specific source vertex , and the goal is to let each vertex learn . It is straightforward to see that a BFS labeling can be constructed in time and energy (using to construct the BFS tree layer-by-layer). In this section, we show that BFS can be solved in energy, for a general graph . This is more energy efficient than the trivial/standard method for large diameter graphs.

Theorem 3.

There is a randomized algorithm for BFS taking time and energy.

The BFS algorithm for Theorem 3 is based on a combination of the building blocks and a known approach in distributed and parallel shortest path algorithms [14, 18, 33, 10]. More specifically, we sample a set of distinguished vertices such that each vertex joins independently with probability (and with probability 1). Note that with high probability (by a Chernoff bound). We have the following lemma, which first appeared in [33].

Lemma 4.

Let be a specified source vertex. Let be a subset of vertices such that each vertex joins with probability , and joins with probability 1. With probability , the following is true. For each vertex , there is an shortest path that contains no -vertex subpath such that .

Proof.

Given any set of vertices, the probability that is at most . The lemma follows by a union bound over choices of , and a union bound over at most choices of -vertex subpaths of a given shortest path . ∎

In view of Lemma 4, if each vertex knows (i) for each within distance to , and (ii) all-pair distances of vertices in , then has enough information to calculate . The reason is as follows. Let be an shortest path. Then we can decompose into subpaths , , , , such that , and each subpath has length at most . Since knows the length of all these subpaths, can calculate its distance to . In what follows, we show how to let each vertex acquire this information.

Step 1: Local BFS Searches.

At a high level, we let each initiate a distance- local BFS-tree rooted at , in parallel; we assign each local BFS search with a random starting time so as to minimize the amount of local contention. That is, we show that during the algorithm, for each time slot, and for each vertex , the number of local BFS searches hitting is small. The idea of using random starting time to schedule multiple algorithms is from [26], and this technique is later extended in [12].

Our goal in Step 1 is to let each vertex know for each such that . We aim at devising an algorithm that takes time and energy. The algorithm consists of epochs. Each epoch consists of time slots, which is enough for executing with .

Each vertex selects a number (indicating the starting epoch) uniformly at random from the numbers ; the following lemma is straightforward.

Lemma 5.

Suppose . For each vertex , and for each integer , with high probability, the number of vertices such that is at most .

Proof.

Given two vertices and , and a fixed number , the probability that is at most . Let be the total number of such that . The expected value of is at most , since . By a Chernoff bound, for any , we have . As long as , we have . ∎

Each vertex starts its local BFS search at epoch . For each , at the beginning of epoch , (by the inductive hypothesis) all vertices that are within distance to already know their distance to ; by the end of epoch , we require that all vertices that are within distance to know their distance to . This can be achieved via an application of with . Recall (Lemma 5) that in one epoch each vertex only needs to learn at most distances (each corresponds to a local BFS search initiated at a distinct vertex ), and so the number of distinct messages needs to receive is at most .

In what follows, we describe the details of in an epoch . We set . For each such that for some , the layer- vertices in the local BFS tree rooted at are included in the set , and these vertices transmit the same message containing the following three components: (i) the number , (ii) the ID of , and (iii) the (shared) random bits generated by . Recall that requires that all holders of the same message have shared randomness. That is, we need the vertices participating in the local BFS search initiated by to agree on the same choices of random bits. We let generate all random bits needed at the beginning of the algorithm, and these random bits are sent to other vertices through along the local BFS tree rooted at .

To summarize, we perform number of with , and the runtime for each is , and so the time complexity of Step 1 is .

Step 2: Gathering Distance Information.

Recall that by the end of the previous step, each vertex knows for each such that . If we let each vertex gather all information stored in all vertices in , then is able to locally calculate the all-pair distances among vertices in . The task of letting all vertices in broadcast a message can be done via Lemma 2(2) with . The cost is time and energy.

3 Diameter

In this section, we show that the energy complexity of computing diameter is in both and , even for -arboricity graphs. For the upper bound side, we show that for bounded-genus graphs, diameter can be computed in energy. The genus of a graph is the minimum number such that can be drawn on an oriented surface of handles without crossing. A graph with genus is called bounded-genus. For example, planar graphs are genus-0 graphs; graphs that can be drawn on a torus without crossing have genus at most 1. Bounded-genus graphs is a much wider graph class than planar graphs. For instance, the 5-vertex complete graph is not planar, but the genus of is ; see [17, p. 118].

Theorem 6.

There is a randomized algorithm for computing diameter in time and energy for bounded-genus graphs.

Theorem 7.

The energy complexity of computing diameter is in both and . This is true even for graphs of arboricity .

Note that the lower bound proof naturally extends to the setting where the maximum degree is . In this setting, computing diameter takes energy.

3.1 A Partition of the Vertex Set

Let be a bounded-genus graph. Let be the set of vertices that have degree at least ; let . We assume ; since otherwise we can already solve all problems in energy, in view of the discussion in Section 2.2.

We divide the connected components induced by vertices in into three types. For each component , denote as the subgraph induced by all edges that have at least one endpoint in .222In most of the literature, is used to denote the subgraph induced by ; but in this paper we write to denote the subgraph induced by .

Type 1.

A connected component induced by vertices in is of type-1 if and . For each vertex , we write to denote the set of type-1 components such that .

Type 2.

A connected component induced by vertices in is of type-2 if and . For each pair of two distinct vertices , we write to denote the set of type-2 components such that .

Type 3.

A connected component induced by vertices in is of type-3 if it is neither of type-1 nor of type-2.

Since is of bounded-genus, we have , and so . In what follows, we show that the number of type-3 components is also .

Lemma 8.

Let be a bipartite graph with bipartition and genus at most . If for each , then .

Proof.

Let , , and be the edge set, vertex set, and face set of . Note that in a bipartite graph, each face has at least 4 edges, and each edge appears in at most 2 faces, and so . Combining this inequality with Euler’s polyhedral formula (note that the genus of is at most ), we obtain that .

Since for each , we have . Note that we also have , and so . Therefore, , as desired. ∎

Therefore, as long as is of bounded-genus, we have by Lemma 8. The reader might wonder whether we can replace the bounded-genus requirement to the weaker requirement of being bounded-minor-free. It is not hard to see that being bounded-minor-free is in general not enough to guarantee , as the complete bipartite graph does not contain as a minor, for any .

Lemma 9.

Given that is of bounded-genus, the number of type-3 components is at most .

Proof.

By its definition, if a type-3 component satisfies , then . Thus, the number of type-3 components such that is at most . Let be the set of all type-3 components such that .

Consider a bipartite graph with the bipartition , where each is adjacent to all . Note that for each . The property that the genus is at most is closed under edge contraction and vertex removal. Note that can be obtained from via a sequence of edge contractions and vertex removals, and so is of bounded-genus. By Lemma 8, we have . ∎

We let be the graph defined by the vertex set and the edge set . The following lemma is useful in subsequent discussion.

Lemma 10.

Given that is of bounded-genus, the number of edges in is at most . Furthermore, there is an edge orientation of such that each vertex has out-degree .

Proof.

The graph can be obtained from via a sequence of edge contractions and vertex removals, and so is of bounded-genus. Note that bounded-genus graphs have arboricity , and so the number of edges in is at most linear in the number of vertices in , which is , and we can orient the edges of in such a way that each vertex has out-degree of . ∎

Note that the number of type-3 components is still even if the graph genus is as high as , and so in a sense Lemma 10 is the bottleneck of our approach.

3.2 Computing Diameter via Graph Partition

Before we proceed, we briefly discuss our proof idea. First of all, learning the entire graph topology of the subgraph induced by and all type-3 components is doable using energy via Lemma 2; this is based on the following facts: (i) , (ii) for each in a type-3 component, and (iii) the number of type-3 components is .

More specifically, we can use to let each vertex approximately learn its degree. Then, we use to let all vertices in learn the set of all its neighbors. Since , we can do another to let each learn . For each component of , we use Lemma 2(1) to let each vertex broadcast the IDs of vertices in to all vertices in ; after that, each vertex knows the topology of . Recall that (i) and (ii) the number of type-3 components is , and so we can use Lemma 2(2) with to do the following.

  • Each broadcasts the IDs of vertices in .

  • A representative of each type-3 component broadcasts the topology of .

At this point, all vertices know the topology of the subgraph induced by and all type-3 components. See Section 3.3 for details.

It is much more difficult to extract information from type-1 and type-2 components. For example, a vertex could be connected to type-1 components (i.e., ). Since the energy budget for is , throughout the entire algorithm can only receive information from at most components in . The challenge is to show that the diameter can still be calculated with limited amount of carefully chosen information about type-1 and type-2 components.

The goal of this section is to define a set of parameters of type-1 and type-2 components, and to show that with these parameters, the diameter can be calculated. In subsequent discussion, denote as . By default, all distances are with respect to the underlying network ; we use subscript to indicate distances within a specific vertex set, edge set, or subgraph.

Parameters for Type-1 Components.

We first consider type-1 components in , for a vertex .

, :

Denote as a component that maximizes , and denote as a component that maximizes . For , denote .

, :

Denote as a component that maximizes , and denote as .

Some of the above definitions are undefined when is too small. For example, if , then and are undefined. In such a case, we set these parameters to their default values: zero for numerical parameter (e.g., ), and empty set for vertex set parameter (). It is also possible that there are multiple choices of a parameter, and we may break ties arbitrarily.

Observe that any path connecting a vertex in to the rest of the graph must passes the vertex . We only need to extract the following information from for the calculation of diameter:

  • The longest distance between two vertices within , and this is .

  • The longest distance between and a vertex in , and this is .

Thus, regardless of the size of , we only need to learn , , and from the components of . These parameters can be learned via , as follows. For each , there will be a representative vertex responsible of communicating with , and the vertex already knows the topology of . Then, can learn one of the above parameters by doing one with and , and this takes only time. See Section 3.3 for details.

Parameters for Type-2 Components.

The issue about type-2 components is more complicated, as we need to extract parameters from each . We first describe the parameters, and later explain their purposes. Consider two distinct vertices .

, :

Let be a component that minimizes , and we write . Intuitively, corresponds a component that offers the shortest route between and , among all components in .

, :

For a component , denote as the set of vertices . Intuitively, is the set of all vertices in whose distance to (in the subgraph ) is shorter than that to by at least units.

Denote as a component that maximizes , and denote as a component that maximizes . We write . We only consider .

, :

For a component , denote as the graph resulting from adding to a length- path connecting and ; and denote as the maximum value of over all pairs of vertices . A useful observation is that if , then equals the maximum value of over all pairs of vertices .

Denote as a component that maximizes , and write . We only consider .

Similar to parameters of type-1 components, all above parameters are set to their default values if undefined. Note that the definition of and are asymmetric in the sense that we might have and . All remaining parameters for type-2 components are symmetric.

We explain the relevance of the above parameters to the calculation of diameter. Let be an shortest path in whose length equals the diameter. Consider three possible ways that involves vertices in .

  • The two endpoints and are within , for a component . In this case, if , then the length of equals .

  • There is a subpath of whose intermediate vertices are all in ; in this case, the length of equals .

  • Suppose for a component , but is not in . Suppose is a subpath of such that all vertices in are all in . If , then we must have , and so the length of equals (for the case ) or (for the case ).

The above discussion also explains why we need to consider different values of and . For example, the choice of the vertex and are unknown to vertices in a component , and so there is a need to go over all possibilities to ensure that all candidate shortest paths are considered.

Even though each is associated with parameters, all these parameters can still be learned using energy per vertex. By Lemma 10, there is an assignment mapping each pair to one vertex in such that each is mapped at most times, and so we can let each be responsible of learning at most parameters. Learning one parameter can be done using or in time. See Section 3.3 for details.

The Graph .

To show that one can compute the diameter from a set of parameters extracted from type-1 and type-2 components (and the topology of the subgraph induced by

and all type-3 components), a plausible proof strategy is to classify all shortest paths into classes, and to show how to compute the longest path length in each class. This approach would probably end up being a long case analysis, and so we adopt a different approach, as follows. Since we have no message size constraint, instead of only learning the aforementioned distance parameters associated with type-1 and type-2 components, we also learn the topology of

for each component associated with these distance parameters.

Define as the subgraph induced by (i) , (ii) all type-3 components, (iii) , , and , for each , and (iv) , , , and , for each pair of distinct vertices , , , and .

In the rest of this section, we prove that the diameter of equals the diameter of , and so the task of computing the diameter of is reduced to learning the topology of .

Lemma 11.

The diameter of equals the diameter of .

Proof.

The proof strategy is to show that the following two statements are correct.

(S1)

For each pair of vertices in the graph , we have ; this is proved in Lemma 12.

(S2)

For each pair of vertices in the graph , there exists a pair of vertices in the graph satisfying ; this is proved in Lemma 14.

The two statements together imply that and have the same diameter. ∎

Lemma 12.

For any two vertices and in , we have .

Proof.

We choose to be an path in whose length is that uses the minimum number of vertices not in . If is entirely in ,