Phylogenetic Networks as Circuits With Resistance Distance

Phylogenetic networks are notoriously difficult to reconstruct. Here we suggest that it can be useful to view unknown genetic distance along edges in phylogenetic networks as analogous to unknown resistance in electric circuits. This resistance distance, well-known in graph theory, turns out to have nice mathematical properties which allow the precise reconstruction of networks. Specifically we show that the resistance distance for a weighted 1-nested network is Kalmanson, and that the unique associated circular split network fully represents the splits of the original phylogenetic network (or circuit). In fact, this full representation corresponds to a face of the balanced minimal evolution polytope for level-1 networks. Thus, the unweighted class of the original network can be reconstructed by either the greedy algorithm neighbor-net or by linear programming over a balanced minimal evolution polytope. We begin study of 2-nested networks with both minimum path and resistance distance, and include some counting results for 2-nested networks.


INTRODUCTION
Consider an electrical circuit: a network made of wires joining resistors in parallel and in sequence, with some portion hidden inside an opaque box. It is not always possible to determine that portion by testing the visible leads. However, we prove here that if the hidden portion has a particular form made of connected cycles, and we can test the resistance between all the pairs of leads, then the lengths and connected structure of the cycles in the circuit are uniquely determined. The mathematics used to recover that circuit is more typically found in work on phylogenetic networks.
Modeling heredity as the flow of genetic information suggests that mutations in DNA might be analogous to resistance in an electrical circuit. The weights of edges in a phylogenetic network can represent genetic distances: if we have the genomes of the two endpoints of an edge then we can use a model of mutation rates to calculate a real number distance. For several edges that form the unique path between two taxon-labeled leaves, the total distance is the sum of those edge weights. Paths between leaves are only unique if the network is a tree. When paths between are not unique, one option is to take the distance to be that of the minimum length path. This option may correspond to a parsimonious approach-assuming the least complicated history. This minimum path length distance is studied for instance in Forcey and Scalzo (2020a).
Instead, however, a greater weight of an edge could represent a greater loss of information. Dividing and rejoining of edges illustrates events such as speciation, recombination, or hybridization. If the genetic information of an ancestor genome can be shared among descendants, and then collaboratively recovered upon hybridization, then a different metric than minimum distance may be appropriate. Here we consider weighted phylogenetic networks with the resistance distance, or resistance metric. The distance between two leaves of the network is found by considering the edge weights as electrical resistance, obeying Ohm's law. The metric resistance distance for all nodes (not only leaves) of a graph is introduced in Klein and Randić (1993), and studied closely in subsequent papers such as Yang and Klein (2015) and Yang and Klein (2019). To study graphs, the resistance of each edge is often assumed to have unit value, but the definitions allow any weight. We review the definitions in section 2.2.3.
In Curtis et al. (1998) and Morrow (1990, 1991), the authors study circular planar graphs with boundary nodes that are analogous to the leaves of our phylogenetic networks. They consider resistance values (or conductivity) on the edges. They prove that complete information about the linear map which transforms electric current values at each boundary node to electric current values at all the edges can be used in some cases to recover the resistance values. In our applications there is no way to know the complete map of boundary currents to edge currents. However, we seek only to recover the graphical structure of the network, not the original edge weights.
In Ejov et al. (2019), the authors consider the entire set of resistance distances (again using unit values for edges), between any pair of nodes (not only leaves.) They show that using this metric is useful for discovering Hamiltonian cycles via algorithms for the Traveling Salesman problem. There is a close connection to our applications, since the algorithm neighbor-net can be used as a greedy approach to the Traveling Salesman problem as shown in Levy and Pachter (2011).

Main Results and Overview
In section 2, we start by reviewing Ohm's law and resistance distance. Then we review the relevant definitions of mathematical phylogenetics, many taken from other sources to help make this paper self-contained. In section 3, we state and prove the main results for 1-nested phylogenetic networks N. The upshot is that when the distances between taxa are effective FIGURE 1 | The total resistance from i to k is R i,k = R 1 R 2 R 1 + R 2 + R 3 + R 4 . On the left is the circuit itself, on the right we see it as a pairwise circuit within a phylogenetic network. Here we have chosen i to be an outgroup, so the network is rooted at the top and the downward direction is forward in time.
resistances based on unknown connections, then using well known methods we can recover an unweighted circular split network, which gives us the precise class of (unweighted) 1nested phylogenetic network. Specifically, this recovery is via the (greedy) algorithm neighbor-net as described in Theorem 3.3 or linear programming; see Theorem 4.5. Several features of the resistance distance seem exactly suited to phylogenetic networks with weighted edges. First, from Theorem 3.1, the resistance distance of 1-nested phylogenetic networks is Kalmanson, allowing the circular split network to be uniquely reconstructed from the measured distances. Second, from Theorem 3.2, that reconstructed circular split network always displays precisely the same splits as the original network. As a consequence, the trivial splits which are the traditional final edges to the leaves of a phylogenetic network are automatically guaranteed to be represented in the split network-this is a condition beyond the basic Kalmanson condition. Finally, triangular subgraphs are interchangeable with three-edge stars when measuring resistance distance. This is known as the Ytransform, pictured in Figure 2. The Y-equivalence mirrors the fact that triangles in a phylogenetic network, when attached via bridges to the rest of the network, are indistinguishable from degree-three tree-like vertices by the linear functionals used for balanced minimal evolution. As well, the split networks are bipartite, so triangle free.
In section 4, we review the balanced minimal evolution polytopes, and show how our results can be interpreted geometrically, in Theorems 4.2 and 4.5. In section 5, we point out some interesting counterexamples and limiting cases, and conjecture about how to extend our results to more complicated networks. Section 5.1 contains some new results on 2-nested networks with regard to the minimum path distance. Finally in section 6, we consider qualifications of experimental distance measurements in phylogenetics that would give justification for assuming the resistance analogy to be valid in practice.

DEFINITIONS AND CITED RESULTS
We start by reviewing some equations from electric circuit theory.

Electricity
Given a conductive circuit with a power supply, the materials have resistance R and the power causes a current I. The classic Ohm and Kirchoff equations include: R = V/I and I = I 1 + I 2 . The first depends on the conductive material-it must be experimentally verified. It relates the resistance in a circuit to the constant voltage drop over the circuit and the constant current in all of the circuit. The second states that total current must equal the sum of circuit-parallel portions of that current after a branching in the circuit. Together, these rules imply the law for total resistance R T for a pair of circuit-parallel resistances R 1 , R 2 . We have R T = R 1 R 2 /(R 1 + R 2 ), which we refer to as Ohm's law for parallel resistance. Also, the voltage drop over a closed circuit must equal the total voltage: this implies that resistors in series are summed to find the total resistance. We illustrate the basic calculation of a total resistance in Figure 1. We illustrate the implied Y-equivalence in Figure 2.

Phylogenetic Definitions
Many of the definitions and notes here are repeated (sometimes verbatim) from Forcey and Scalzo (2020a) for the sake of self-containment. For further reference, see Steel (2016) and Gambette et al. (2017).
A split A|B is a bipartition of [n] = {1, . . . , n}. That is, A and B are non-empty disjoint subsets whose union is [n]. The two parts of a split are often called clades. If one clade of a split has only a single element, we call that split trivial. A split system is a set s of splits of [n] which contains all the trivial splits. We say a split system s refines another split system s ′ when s ⊃ s ′ . In this paper all graphs are simple (no multi-edges) and connected.
Definition 2.1. An (unrooted) phylogenetic network on [n] is a simple connected graph with: i. Labeled leaves: n degree-1 vertices, labeled bijectively with the elements of [n], FIGURE 2 | The two networks shown here have identical resistance between any two corresponding pairs of nodes at the three corners. Here ii. Unlabeled nodes: all these must have degree larger than 2.
For the remainder of the paper, all phylogenetic networks are assumed to be unrooted and without any edge directions.
A split A|B is displayed by a phylogenetic network N when there is (at least) one subset of edges of N whose deletion (keeping all nodes) results in two connected components with A and B their respective sets of labeled leaves. We call that collection of edges a minimal cut displaying the split when the collection contains no proper subset displaying the same split. A bridge is a single edge which displays a split. A trivial bridge displays a trivial split. A phylogenetic tree is a cycle-free phylogenetic network, so every edge is a bridge. Figure 3 shows examples of splits displayed, for the trees and their two generalizations described here: phylogenetic networks and split networks. Recall that a cycle in a graph is a path of edges that does not revisit any nodes except for the node at which it starts and ends. The following is defined in Gambette et al. (2017): Definition 2.2. An unrooted phylogenetic network N is called 1nested when each edge of N is contained in at most one cycle, and N is triangle-free-all cycles are of length greater than 3 edges.
A 1-nested phylogenetic network can be drawn in the plane with its leaves on the exterior, which is referred to as outer planarity. We consider two 1-nested networks to be split-equivalent if they display the same set of splits. See Figure 4 for examples. Twisting a phylogenetic network around a bridge (reflecting one side through the line of the bridge), or around a cut-point node, does not change the list of splits. Any cyclic order of the leaves seen around the exterior in some representative drawing of a 1-nested phylogenetic network is said to be consistent with that split system. Figure 7 shows examples. A binary phylogenetic network is one in which the unlabeled nodes each have degree 3. A phylogenetic network N refines another, written N ≥ M, when the splits displayed by M are a subset of those displayed by N. Several of these terms are exhibited in Figure 7. Next we review the definition of another generalization of a phylogenetic tree. Definition 2.3. A split network displaying a split system s on [n] is an embedding in Euclidean space of a simple connected graph, also called s, with the following: i. Labeled leaves: n degree 1 nodes are bijectively labeled by [n]. ii. Unlabeled nodes: these have degree larger than 1. iii. A partition of the set of edges: the parts of this partition are called split-classes. There is one split-class for each split A|B in the system. It is required that for any two leaves, the set of edges on a shortest path between them intersects each split-class in at most one edge, and that the set of splits thus traversed is the same for any shortest path between those two leaves. iv. The split-class of edges corresponding to a split A|B comprises a minimal cut displaying that split: deletion of those edges results in two connected components with respective labeled leaves A and B.
The resulting bipartite graph is often shown with each class of edges embedded as a set of equal length parallel line segments.  Forcey and Scalzo (2020a). In a phylogenetic tree t, on the left, splits are always single edges. The highlighted edge is the split {2, 3}|{1, 4, 5, 6, 7, 8, 9}. That same split is a pair of edges making a minimal cut in the 1-nested phylogenetic network N, center. Finally on the right, that same split is a set of parallel edges in a circular split network s. (Note: here parallel means geometrically parallel.) Alternate definitions use colors; the edges in a split-class are colored alike, as in, Dress et al. (2012) and Steel (2016). A split-class of size one is a bridge. Two split networks are defined to be equivalent when they represent the same split system.
Definition 2.4. A circular split system is a split system which allows the embedding of a representative split network in the plane, with the labeled nodes all on the exterior, and thus arranged in a circular order. We refer to these representatives as circular split networks.
Just as for phylogenetic networks, twisting a circular split network around a bridge (reflecting one side through the line of the bridge), or around a cut-point node, does not change the list of splits. Any cyclic order of the leaves seen in some representative circular split network is said to be consistent with that split system. Two circular split networks are equivalent if they display the same split system. For instance see Figure 5. The following lemma is from Forcey and Scalzo (2020a), included here without proof for the terminology that will be useful in the next section.
Lemma 2.5. Given a circular split network s, the nodes and edges adjacent to the exterior of the graph are a subgraph which is invariant: that is, this exterior subgraph will be identical to the exterior subgraph of any circular split network representing the same set of splits as s.
Again for example see Figure 5. Introduced in Forcey and Scalzo (2020a) is a subclass of circular split networks.
Definition 2.6. Forcey and Scalzo (2020a) An outer-path circular split system is a split system whose representative circular split networks have shortest paths between pairs of leaves which can all be chosen to lie on the exterior of the diagram, that is, using only edges adjacent to the exterior.
For examples, see Figure 6.

Functions for Unweighted Networks
The definitions in this section are repeated from Forcey and Scalzo (2020a), but originate in Gambette et al. (2017).
Definition 2.7. For a 1-nested phylogenetic network N define (N) to be the circular split system made up of the splits displayed by N. Thus the map takes a 1-nested phylogenetic network and outputs the set of splits displayed by N.
In Gambette et al. (2017), it is shown that (N) is a circular split system, since it can be represented by a circular split network, also referred to as (N). Examples of representations of (N) are seen in Figure 8. Note that since the bridges in a split network are invariant, every representation of (N) will have the same bridges: these will match the maximal set of bridges of any representation of N. The range of (N) will be referred to as the faithfully phylogenetic circular split networks.  Forcey and Scalzo (2020a). A trio of equivalent split networks. All three represent the same split system. The highlighted edges display the same split in each network. The third is the invariant exterior subgraph of all three. FIGURE 7 | Here we see (A) a split system s, with only the non-trivial splits listed (trivial splits are assumed to be included), (B) a circular split network representing s, (C) the exterior subgraph of s as a step in the process of applying L, (D) the output 1-nested phylogenetic network N = L(s), (E) the split system (N) displayed by N, again showing only the non-trivial splits, and (F) a representative circular split network also referred to as (N). We see that (N) ≥ s, and that the cyclic orders (1, 2, 3, 4, 5, 6) and (1, 2, 4, 3, 5, 6) are both consistent with N and with s. (2020a) and Gambette et al. (2017), we repeat an algorithm for drawing a circular split network to represent (N). Each split of N must correspond to a class of parallel edges in (N). The simplest representing network would just subdivide the edges of N to make a class for each split, but we show how to construct a representative which makes the splits more visible via bridges and parallelograms. For m ≥ 5, each m-cycle in N is replaced by an m-marguerite: a collection of exactly m 2 − 4m parallelograms arranged in a circle, each sharing sides with two neighbors, specifically organized as follows: each node of the original m-cycle is replaced by a rhombus, and then each edge of the cycle is replaced by m − 5 parallelograms in a row. The rows are attached to the rhombi along adjacent edges of each rhombus, so that the whole arrangement has m(m − 5) sides on the interior of the original m-cycle, and m(m − 3) sides on the exterior. Bridges are attached to the m remaining degree-2 vertices, one at each of the rhombi that replaced the original m nodes of the cycle. Now for a function that takes circular split networks to 1-nested phylogenetic networks. This function is shown to exist in Gambette et al. (2017), and described on the split networks which are images of the function . In Durell and Forcey (2020) and Forcey and Scalzo (2020a), we define the general function L as follows:

From Forcey and Scalzo
Definition 2.8. For a circular split system s, define L(s) to be the smoothed exterior subgraph of a representative split network s. Thus, L takes a circular split system (with a given representation) and outputs a 1-nested phylogenetic network. The operation of L is easy to describe as (1) erasing the interior edges of split network s and (2) smoothing, which here refers to removing any degree-2 nodes that are seen in the exterior subgraph. Such a node is removed, but the two edges adjacent to it are joined to form a single edge.
Recall that the nodes and edges adjacent to the exterior of a circular split network are an invariant subgraph for the split system, so the function L is well-defined on split systems. Examples exhibiting and L are in Figures 7, 8. Remark 2.9. Note that by its construction, L preserves bridges and cut-point nodes. When restricted to phylogenetic trees, the functions L and are both the identity. In Forcey and Scalzo (2020a), several other properties of the two functions are listed, in the process of showing that L and form a Galois reflection, as in Erné et al. (1993). These include the facts that L is surjective but not injective, is injective but not surjective, and that L • is the identity map.

Weights and Metrics
We continue to repeat definitions from Forcey and Scalzo (2020a). Weighted networks can be constructed in two distinct ways: by assigning non-negative real numbers to splits or to edges. Definition 2.10. A weighted phylogenetic network N has nonnegative real numbers assigned to its edges, described by a weight function w N .
Definition 2.11. A weighted split network s has non-negative weights assigned to each split, by a weight function w s . Equivalently, w s assigns a weight to every edge, with the requirement that each edge in a (geometrically parallel) split-class of s has the same weight. Definition 2.12. For a weighted phylogenetic network N, or a weighted split network s, we denote by N, respectively s, the unweighted networks found by forgetting the weights.
As in Forcey and Scalzo (2020a): a pairwise distance function assigns a non-negative real number to each pair of values from [n]. We call the lexicographically listed outputs for distinct pairs a distance vector d, with entries denoted d ij = d(i, j) = d(j, i) for each pair of taxa i = j ∈ [n] (also known as a dissimilarity matrix, or discrete metric when obeying the metric axioms.) Definition 2.13. When the distance vector is Kalmanson, or circular decomposable it means there exists a cyclic order of [n] such that for any subsequence (i, j, k, l) of that order, d obeys this condition: Definition 2.14. Given a weighted split system s on [n] we can derive a metric d s on [n], where the sum is over all splits of s with i in one part and j in the other. The metric is often referred to as the distance vector d s .
It is well-known that Kalmanson metrics are in one-toone correspondence with weighted circular split networks. Specifically, from Steel (2016), and as repeated in Forcey and Scalzo (2020a), we have the following: Lemma 2.15. A distance vector d is Kalmanson with respect to a circular order c if and only if d = d s for s a unique weighted circular split system s, (not necessarily containing all trivial splits) with each split A|B of s having both parts contiguous in that circular order c.
Definition 2.16. We define the minimum path distance vector d N for a weighted 1-nested phylogenetic network N, where where the minimum is over paths p from leaf i to leaf j, and each sum is over edges in one of those paths. Examples are calculated in Figures 9, 17.

Resistance Distance
Now we define a new kind of pairwise distance functions on the leaves of a phylogenetic network. Isolating sections of circuitparallel paths between two leaves allows the Ohm relations, together with the Y-transformation, to be used to find the effective resistance between those leaves. A simplifying fact is that the resistance between two leaves only depends on the resistances of edges that are in paths between those leaves. (We use the term pairwise circuit P ij to refer to the edges that are in any path between leaves i, j. For example see Figure 15.) There is a well-known alternate method for calculating effective resistances. As defined in Klein and Randić (1993) and FIGURE 9 | Example of the action of S w . Here d N = (4, 5, 6.5, 6.5, 7, 4, 3, 4.5, 4.5, 5, 4, 3.5, 3.5, 4, 5, 1, 3.5, 6.5, 3.5, 6.5, 7) .
Bapat (2004) the resistance distance matrix for a graph G with n total vertices (leaves and non-leaf nodes) is given by: where Ŵ = L + 1/n, the Laplacian matrix of G plus the n × n matrix with 1/n for every entry. Our resistance distance for phylogenetic networks uses entries of the matrix .
Definition 2.17. We define the resistance distance vector d R N for a positive weighted phylogenetic network N, where d R N (i, j) is the resistance distance on the graph between leaves i and j. That is, d R N (i, j) = ij for leaves i and j. The distance can also be calculated using the basic relations of Ohm's law. Examples of the resistance distance vector are in Figures 10, 20, 22.

Weighted Functions
We next define functions between the weighted split networks and the weighted phylogenetic networks. As previously explained in Durell and Forcey (2020) and Forcey and Scalzo (2020a), we begin by extending the function L to a weighted version L w .
Definition 2.18. Forcey and Scalzo (2020a) For a weighted circular split network s we define L w (s) to be the 1-nested phylogenetic network L(s) (the smoothed exterior subgraph of the unweighted version of s), with weighted edges. The weight of an edge in the image is found by summing the weights of splits which contribute to that edge. Let p s (e) be the set of splits A|B of s, such that A|B is represented by edges in s one of which is used to form the edge e in L(s). [Recall that e in L(s) is formed by smoothing a path of edges from the exterior subgraph of s.] If w s is the weight function on s then the weight function on L w (s) is: By this definition we have the following (from Forcey and Scalzo, 2020a): For an example of L w see Figure 18. From Forcey and Scalzo (2020a), we have the fact that the minimum path distance is Kalmanson for planar networks. Therefore, as in that source, we can make the following: Definition 2.20. Given a weighted unrooted phylogenetic network N that can be drawn on the plane with leaves on the exterior, we define S w (N) to be the unique weighted circular split network with the same minimum path distance vector as N. That is, d N = d S w (N) . This image is calculable, for instance, as the circular split network S w (N) = N (d N ), where N is the neighbornet algorithm defined by Bryant et al. (2007) and implemented as in Splits-Tree (Huson, 1998). Thus, to find S w (N) we first calculate the minimum path distance vector, d N , and then use any algorithm (such as neighbor-net) to find the split network.
For an example see Figure 9. Another example of S w , on a 2nested network, is in Figure 18. When we restrict to the domain of weighted circular split networks arising from weighted 1nested networks, the codomain of S w is the outer-path circular split networks, and the distance vector is preserved by the map L w . Specifically from Forcey and Scalzo (2020a) we have: Lemma 2.21. For any weighted 1-nested phylogenetic network N, if s = S w (N) then s is outer-path and thus d L w (s) = d s .
S w is defined using the minimum path distance metric. Similarly, since we will see that the resistance distance is Kalmanson in Theorem 3.1, then by Lemma 2.15 we can make the following definition using resistance distance.
Definition 2.22. For a weighted 1-nested phylogenetic network N we define R w (N) to be the unique weighted circular split network corresponding to the resistance distance d R N . This image is calculable, for instance, as the circular split network R w (N) = N (d R N ), where N is the neighbor-net algorithm defined by Bryant et al. (2007) and implemented as in Splits-Tree (Huson, 1998).
FIGURE 10 | Example of the function R w which takes a weighted phylogenetic network and outputs the split network associated to its resistance distance. Neighbor-net can be run on input d R N , or the results of Theorem 3.2 can be used: for instance the value 0.95 for the split {1, 2, 3, 7}|{4, 5, 6} is found by 95 (1) The algorithm neighbor-net is guaranteed to produce R w (N) using input d R N .
There are several algorithms for finding the unique circular split system associated to a Kalmanson network; here we recommend neighbor-net and its implementation in Huson (1998). That algorithm finds both the circular split network and its weighting. However, for a weighted 1-nested phylogenetic network N, due to our Theorems 3.1 and 3.2 we can calculate the weighted circular split network R w (N) directly, bypassing both the calculation of the metric and the use of neighbor-net. The function R w is shown by example in Figure 10. For another example, on a 2-nested network that happens to be Kalmanson, see Figure 22.

Remark 2.23.
When restricted to phylogenetic trees, the functions L w and S w are both the identity, and S w = R w . In Forcey and Scalzo (2020a), several other properties are listed, in the process of showing that L w and S w form a Galois coreflection when restricted to weighted 1-nested phylogenetic networks and outer-path circular split networks. These include the facts that L w is injective but not surjective, S w is surjective but not injective, and S w • L w is the identity map.

KALMANSON NETWORKS
The main result in this section is that the resistance metric is Kalmanson for 1-nested phylogenetic networks, and that the unique associated split network has the same exterior form as the original 1-nested phylogenetic network. First we show that d R N obeys the Kalmanson condition: there exists a circular ordering of [n] such that for all i < j < k < l in that ordering, Theorem 3.1. Given a 1-nested phylogenetic network N with positive weighted edges and n leaves, the resistance metric on its leaves is Kalmanson.
Proof: The cyclic order that we need to exist in order to demonstrate the Kalmanson property is found by choosing any cyclic order of [n] consistent with N. That is, we choose an outer planar drawing of N and use the induced cyclic order of the leaves arranged around the exterior of that drawing.
Begin by noting that for each pair of the four leaves i, j, k, l there is a sub-graph, called the pairwise circuit, for instance P ik , made of all the edges which are part of any path between those two leaves. The pairwise circuit will contain perhaps some cycles-it will in fact be a series of cycles connected by paths. We are especially interested in the intersection I of the two "crossing" pair circuits, I = P ik ∩ P jl . There are three basic cases to consider.
Case 1: The intersection I is a single cycle. Here the four leaves i, j, k, l have pairwise circuits that reach the cycle I at four different nodes. Notice that any of the two pairwise circuits summed in the Kalmanson condition will include all four of the smaller pairwise circuits from each of the four leaves i, j, k, l to the node of I closest to that respective leaf. We will call those closest nodes v i , v j , v k , v l . The three sums in the Kalmanson condition all share some terms in common: those which come from the weighted edges in pairwise paths between the four leaves and the respective nodes v i , v j , v k , v l . Discarding these common terms, we are left with terms that come from the weighted edges in I. Thus, the only differences between the three sums in the Kalmanson condition arise from the different contributions of the cycle I. We denote by a, b, c, d the cumulative edge weights between the four nodes v i , v j , v k , v l , following the cyclic order. For instance, in Figure 11, a is the weight of the edge between v l and v i and b is the sum of the weights on edges of I between the nodes v i and v j .
Thus, we can write the sums explicitly: After discarding the common terms, we consider just the remaining sums of fractions. All the edge weights are positive, and the denominators of all three are the same. Clearly the third sum, when expanded, has a numerator larger than either of the first two. Case 2: The intersection I is a series of cycles containing at least two cycles. In this case there are two possible ways that the inequalities are satisfied, depending on which pair of consecutive leaves (i, j or j, k) reach the same end of I, that is, have their attaching nodes (v i , v j or v k ) in I at the same end of I. In Figure 12, below we choose i, j to do so, on the left-hand cycle, but the other option is similar. Checking this case can be done visually for the equality: since the two sums end up using precisely the same effective resistances. That is, both d R N (i, k) + d R N (j, l) and d R N (i, l) + d R N (j, k) have all terms in common: both the portions from the paths outside of I as in case 1, and the summands contributed by I, which are the terms: l) (for the subcase where again i, j reach the same end of I) is easily checked.   Here, after discarding the terms in common, the larger sum contains more terms than the smaller (from the parts of I not in the pairwise circuits for i, j and k, l). As well, when the smaller sum has terms with denominator matching a term in the larger, the numerator is indeed larger in the latter. For instance, in Figure 12, after discarding the common terms contributed by the paths outside of I, the sum d R N (i, j) + d R N (k, l) has the sum contributed by I: The numerator here is exceeded by the sum contributed by I in d R N (i, k) + d R N (j, l) as just listed above. Finally, notice that there are sub-cases of Case 2 in which the smaller sum will have fewer or no terms at all contributed by I; these occur when I includes a path at one end or at both ends. See Figure 13 for example.
Case 3: The intersection I is a path. In this case it is quickly verified that the Kalmanson inequality is satisfied as an equality. See Figure 14 for example.
The fact that effective resistance distance is a Kalmanson metric immediately suggests that it would be a good candidate for modeling weighted phylogenetic networks. First there is the intuition from experience that if two pathways of heredity exist, the ancestor individual or species will have more in common with the extant individual or species. Thus, mutations in the genetic code play the role of resistors to the flow of information.
Secondly, Kalmanson metrics are known to be the only example for which each metric is represented uniquely by a circular split system, as seen in Lemma 2.15. In the case of the resistance distance, the associated unique split network has an additional advantage: it is guaranteed to represent faithfully every split displayed by the original 1-nested network.
Theorem 3.2. Given a 1-nested phylogenetic network N with positive weighted edges and n leaves, and letting d R N be the resistance metric on the n leaves, then the unique associated split network R w (N) = N (d R N ) displays precisely the same splits as displayed by N.
Proof: A split A|B can be displayed by N in three possible ways: either it is displayed by a single bridge e with weight w(e), by a pair of edges both in the same cycle c with respective weights a c and x c , or in more than one way. Let the weight of a specific display of a split in N be w(e) in the first case and (a c x c )/z c in the second case, where z c is the sum of all the weights in the cycle. We claim: if the split A|B in (N) is assigned the sum of the weights of all distinct displays of that split as displayed in N, then the resulting distance metric d from the weighted split network thus constructed is indeed d R N . Therefore, we will conclude, since Theorem 3.1 shows that d R N is Kalmanson, that the weighted split network thus constructed is equal to the unique split network corresponding to d R N , as found for instance by the algorithm neighbor-net.
First we check that the claim holds. Consider the pairwise circuit P ij in N for a given pair i, j of leaves. It will be a series of paths and cycles, as seen for example in Figure 15. Thus each cycle c in P ij will be split into two circuit-parallel paths p c and q c of respective lengths p, q. Both paths begin and end at the two nodes where that cycle is attached to the rest of the series. Now the resistance distance d R N (i, j) will be the sum of the weights of the (non-circuit-parallel) paths, and of the effective resistances of the circuit-parallel paths. Specifically, every weighted edge of P ij not in a cycle will contribute its weight to the sum, and every weighted edge in a cycle of P ij will appear in one of two factors in the numerator of the term giving the effective resistance from those circuit-parallel paths. We see that (c 1 + · · · + c p )(c p+1 + · · · + c p+q ) c 1 + · · · + c p+q where c 1 , . . . , c p and c p+1 , . . . , c p+q are the weights of the circuitparallel paths of cycle c ∈ P ij , with z c = c 1 + · · · + c p+q being the total weight of c. That is, we expand the numerator of each term from a cycle. Now, the distance metric corresponding to the weighted split network we constructed using (N) has distance Now splits in N, and thus in (N), which separate leaves i, j are precisely those displayed by a bridge in P ij or by a pair of circuitparallel edges in a cycle of P ij . Thus, using the weights for splits (as stated above): in the split metric, gives us the desired claim: d = d R N . Then we conclude that since the weighted circular split network associated to the original Kalmanson metric d R N is the unique such network where the split metric equals the original Kalmanson metric, then N (d R N ) will have precisely the splits of N and thus of (N).
Remark: The fact that we can take a weighted 1-nested phylogenetic network N and build a weighted circular split network s which has the same metric, d s = d R N , implies another proof that the resistance distance is Kalmanson. Since the circular split network is planar, and the split metric on it is the same as the minimum path network on it, that metric is guaranteed to be Kalmanson. However, our original proof has the advantage that we see which of the inequalities are strict, and which are actually equalities.
The first important implication of these theorems is that the resistance distance on any 1-nested phylogenetic network N is precisely represented by a unique circular split network N (d R N ). Exactly all the splits displayed by the original N are present in N (d R N ). Thus the function L applied to the unweighted version of N (d R N ) returns the unweighted version of N itself.   Figure 10, we find N ′ as in the proof of Theorem 4.5. In the vector x(N) the first component is x 1,2 = 2 1−0 , since there are no non-trivial bridges traversed between leaves 1 and 2. As well, there are two consistent circular orders, with leaves 1 and 2 adjacent, found by twisting around the single non-trivial bridge. The 19th entry is x 5,6 = 2 1−1 , since the path between leaves 5 and 6 traverse the non-trivial bridge. Here the minimum path distance vector is: 3.99, 4.96, 6.43, 6.43, 6.84, 3.99, 2.99, 4.46, 4.46, 4.93, 3.96, 3.49, 3.49, 3.96, 4.93, 1, 3.49, 6.34, 3.49, 6.34, 6.75) .
Proof: The first equality follows directly from Theorem 3.2, since neighbor-net is guaranteed to output the splits of the unique circular split network associated to the Kalmanson metric given by the resistance distance, which is indeed all the splits displayed by the network N. Then from Forcey and Scalzo (2020a), we have the second equality since L • is shown there to be the identity map.
The first application implied by this result is that when using neighbor-net on a measured distance matrix, if we assume that it reflects a resistance distance, we can always recover the form of the original network. The weights of splits in the result of neighbor net are interesting, they are in fact terms in the expansion of the calculated resistance distance. However, the first advantage we see is that the original unweighted phylogenetic network can be directly recovered by taking the exterior of the result of neighbor-net.
As an alternative to neighbor-net, there are polytopes which can serve as the domain for linear programming that finds the best-fit 1-nested phylogenetic network for a measured distance matrix.

RESISTANCE DISTANCE AND POLYTOPES
In Durell and Forcey (2020), the authors describe a new family of polytopes. This family lies between the Symmetric Traveling Salesman Polytope [STSP(n)] and the Balanced Minimum Evolution Polytope [BME(n)]. Our polytopes are called the level-1 network polytopes BME(n, k) for 0 ≤ k ≤ n − 3. All have dimension n 2 − n. In Forcey and Scalzo (2020a), we looked at implications of the Galois connections studied there for these polytopes, especially using S w , the function based on minimum path distance. It turns out that if we assume an input distance metric represents the resistance distance on a 1-nested phylogenetic network N, then the result of neighbor-net or of linear programming on a BME polytope is a network accurately showing all the splits of N. Also, neighbornet is statistically consistent, as shown in Bryant et al. (2007). Therefore, as a measured set of pairwise distances approach the resistance distance of N, the output of neighbor-net will approach the faithfully phylogenetic circular split network N. This is in contrast to minimum path distance where some genetic connections are assumed to be negligible, and then are lost in the output of neighbor-net. However, the theorems about minimum path distance, specifically Theorems 8, 9, and 11 of Durell and Forcey (2020), play an important role in the proof of Theorem 4.5 here. Here we repeat some of the same introductory definitions and remarks and then extend the results to resistance distance.
Definition 4.1. For a binary, 1-nested phylogenetic network N, (weighted or unweighted) the vector x(N) is defined to have lexicographically ordered components x ij (N) for each unordered pair of distinct leaves i, j ∈ [n] as follows: where k is the number of bridges in N and b ij is the number of bridges traversed in a path from i to j. For example, see Figure 16.
The convex hull of all the x(N) such that binary N has n leaves and k nontrivial bridges is the level-1 network polytope BME(n, k). As shown in Durell and Forcey (2020), the vertices of BME(n, k) are precisely the vectors x(N) for N binary with n leaves and k nontrivial bridges. In light of Theorems 3.1 and 3.2, we can now characterize the vertices in terms of resistance distance: Theorem 4.2. Every 1-nested phylogenetic network found as an image L[R w (N)] gives rise to a face of BME(n, k) for some k. In particular, the vertices of the polytopes BME(n, k) correspond to images L[R w (N)] which exhibit k non-trivial bridges, for weighted 1-nested networks N with n leaves and such that any node not in a cycle has degree three.
Proof: The image R w (N) will faithfully represent all splits, as seen in Theorem 3.2. Thus, R w (N) will be faithfully phylogenetic, in the range of . Specifically, the function R w will introduce bridges that separate all cycles, thus insuring that any node in a cycle will have degree three. Therefore, if the non-cycle nodes of N are degree three, L[R w (N)] will be a binary unweighted 1-nested phylogenetic network.
Also as shown in Durell and Forcey (2020) and repeated in Forcey and Scalzo (2020a), an equivalent definition of the vector x(N) is the vector sum of the vertices of the STSP(n) which correspond to cyclic orders consistent with N. Recall that the vertices of STSP(n) are the incidence vectors x(c) for each cyclic order c of n, where the i, j component is 1 for i and j adjacent in the order c, 0 otherwise. This equivalent definition for binary 1nested phylogenetic networks may also be applied to any 1-nested phylogenetic network: Lemma 4.3. For a 1-nested phylogenetic network N, the vector x(N) is equal to c x(c) where the sum is over all cyclic orders c of [n] consistent with N.
We point out, for the sake of attribution, that for phylogenetic trees t (with nodes of any degree), Lemma 4.3 with N = t gives a formula for x(t) that agrees with the definition of the coefficient n t in Semple and Steel (2004), in the proof of Theorem 4.2 of that paper.
In Forcey and Scalzo (2020a), it is shown that the minimum path distance vector for a 1-nested phylogenetic network may be seen as a linear functional, and that it is minimized over the BME(n, k) polytope. Specifically, Theorem 4.4. Given any weighted 1-nested phylogenetic network N with n leaves, the product x(N)·d N is minimized over BME(n, k) precisely for the unweighted binary 1-nested networksN with k bridges such that S w (N) ≤ (N).
HereN is used to denote a variable binary 1-nested phylogenetic network, taking values from the set of networks which refine S w (N). By this refinement we mean taking values from the set of networks with a superset of the set of splits displayed by S w (N). Now we can extend that result to resistance distances. In fact it becomes stronger: binary networks can be directly recovered even when they have long edges, since the action of R w preserves all splits. Precisely, we have: Theorem 4.5. The minimum of x(N) · d R N is achieved at the face of BME(n, k) with vertices x(N), for unweighted binary networkŝ N with k bridges such thatN refines N.
Proof: We claim that x(N) · d R N is the same as x(N) · d ′ N for N ′ = L w (R w (N)). That is because the leaves which are adjacent in some circular order consistent with N and thus in R w (N) have distance between them which is the sum of the splits that separate them. Since those leaves are adjacent, the shortest path of splits between them will lie on the exterior of R w (N). In fact, for adjacent i, j an edge of a cycle on the path between them with weight a, contributes a(b+c+d+...) a+b+c+d+... to d R N (i, j), where the other edges of that cycle have weights b, c, d, .... Bridges e between them contribute their weights w(e). These values are the same as those for the splits displayed between i, j, seen in the proof of Theorem 3.2. Therefore: We know from Theorems 8, 9, and 11 of Durell and Forcey (2020) that for any weighted 1-nested phylogenetic network M with n leaves, the product x(M) · d M is minimized over BME(n, k) precisely for binary networksM with k bridges such that M ≤M.
Thus, in our case we have x(N) · d N ′ is minimized over BME(n, k) precisely for the unweighted binary networksN with k bridges such that N ′ ≤N. Here, (N ′ ) = N, since L w (R w (N)) = N. The inequality here is refinement.
For example compare Figures 10, 16. It is easily checked that The implication then is that using either linear programming on BME(n, 0) or neighbor-net, assuming that the resistance metric is valid, the resulting split network gives the true exterior form of the original 1-nested phylogenetic network.

2-NESTED NETWORKS, COUNTEREXAMPLES, AND CONJECTURES
In this section, we examine functions between 1-nested and 2nested networks, and circular split networks. We point out how well the various distance measurement distinguish or do not distinguish between network types, via examples. Then we make some conjectures based on observations.

2-Nested Networks
Toward the end of Gambette et al. (2017), the authors ask: is it possible to characterize split systems induced by more complex uprooted networks such as 2-nested networks (i.e., networks obtained from 1-nested networks by adding a chord to a cycle)? At first we interpret this question to be about the result of applying S w . That is, we specialize the question to asking more specifically which kinds of split systems correspond to 2-nested networks, via assigning them a weighting, finding the minimum path distance, and then finding the unique corresponding circular split network? The question is still open, but we begin by carefully defining 2-nested networks and making some initial observations. Definition 5.1. For N an unrooted phylogenetic network, if every edge of N is part of at most two cycles, we call it a 2-nested network. By this definition, 2-nested networks contain 1-nested networks as a subset, which in turn contain 0-nested networks, which are phylogenetic trees. By strict k-nested networks we mean k-nested but not (k − 1)-nested. We will add the extra descriptor of triangle-free-ness explicitly when desired.
A weighted 2-nested network is shown in Figure 17, with its minimum path distance vector.
The first case we note is that weighted 2-nested networks often have images under S w that are not outer-path circular split networks. For instance see Figure 18. Therefore, by Lemma 5.4, 2-nested networks can lead to split networks distinct from those induced via S w from 1-nested networks. Also, applying S w and then L w in sequence will produce a weighted 1-nested network that has a different distance vector than the original.
However, not all weighted 2-nested networks lead to distinct images from the 1-nested networks, under S w . In fact we have the following: Theorem 5.2. For every weighted 1-nested network M, there exists some (not unique) weighted 2-nested network N such that the minimum path distance vectors coincide: d M = d N .
Proof: Consider a 1-nested network M with positive values for its edges and a 2-nested network N that has the same exterior subgraph. Let N also have the same positive values for its exterior edges, but a positive value for its internal chord large enough such that on paths of least distance the internal chord of the 2-nested network is never used. Therefore, both networks will have the same distance vector d M = d N .

Counting 2-Nested Networks
We begin counting the total number of unweighted binary, triangle free, 2-nested networks. The numbers of unweighted binary, triangle free, 2-nested networks exist with n leaves are: 6, 120, 2,790 for n = 4, 5, 6.
First, consider structures with 4 leaves (n = 4). We start by considering the unlabeled pictures, and then count the ways to assign the values 1, . . . , 4 to the leaves. In fact, we can simplify further by finding the unlabeled 1-nested networks and showing the potential locations of chords simultaneously in each picture. There is one such unlabeled picture for n = 4 as shown in  (4,7,5,8,7,5,7,10,9,7,13,12,10,9,3). Note that d 14 = 5, for example, referring to the shortest distance between leaves 1 and 4. Figure 19, with two possible internal chords. There are 3! 2 ways to arrange the leaves before choosing a chord. Therefore, the total number of unweighted binary triangle-free 2-nested networks with n = 4 leaves is (2) 3! 2 = 6. For n = 5 the possible internal structures are shown in Figure 19. There are 5 possible internal chords for one structure, and 2 possible internal chords for the other. The number of ways to arrange the leaves of the first structure is n!, and the second structure is (n − 1)! (since the first is not rotationally symmetric.) However, rearranging the leaves clockwise and counterclockwise yield the same rearrangement, so we must then divide by 2 to eliminate half of the arrangements garnered from the counting of those leaves. Finally, if there were a bridge connecting any components of the structure, simply divide by 2 for the twisting around that bridge. The counting for each n = 5 structure in Figure 19 is as follows: The total number of networks for n = 5 is = 60 + 60 =120.
For n = 6 the counting for each structure is as follows (from a to f as pictured in Figure 19): The total number of networks for n = 6 is = 540 + 720 + 90 + 900 + 180 + 360 = 2,790. Notice for (f), reading the labels clockwise is not equivalent to reading them counterclockwise due to the FIGURE 18 | Here the output of S w (N) is a non-outer-path circular split network, and its image under L w has a distance vector that does not match the original: for instance d N (1, 4) = 4 but the distance from 1 to 4 in L w [S w (N)] is 5.
The resistance distance metric for complete bipartite graphs is found in Klein and Randić (1993). Consider that K m,n is the graph join if two edgeless graphs: K m,n = K m + K n with unit weight for each edge. Then the resistance distance on K m,n is 2/n for vertices that have no edge between them (they are both the same color), and (m + n − 1)/mn for vertices with an edge between them (Klein and Randić, 1993). For our example N, let the two (same-colored) parts of the graph (3 nodes each, say red and blue) be attached to the leaves {1, 2, 3} and {4, 5, 6}, respectively. Letting each edge have weight 1, we find the resistance distance between any two leaves attached to the same colored part is 2 + 2/3 = 8/3, while the distance between any two leaves, with one attached to each part, is 2 + 5/9 = 23/9. In any circular order of the leaves, there will be a sub-sequence i, j, k, l where the first two leaves i, j are attached to the same color, and the second two k, l are both attached to the other color. Thus d R N (i, j) + d R N (k, l) = 16/3 = 48/9 which is larger than d R N (i, k) + d R N (j, l) = 46/9. This counterexample raises the question of necessary conditions for a network with resistance distance to be Kalmanson.

Outer Planarity
We conjecture that outer planarity is a sufficient condition for Kalmanson: that if a weighted phylogenetic network can be drawn in the plane with its leaves on the exterior that the resistance distance is Kalmanson. We note that it this condition is not necessary: it can be checked that the complete graph K 5 with unit edges has the Kalmanson property.

Faithfully Phylogenetic Kalmanson Distance Vectors
Following the terminology in Definition 2.7, we call a Kalmanson distance vector d faithfully phylogenetic if the unique circular split network associated to d is in the range of (after Frontiers in Genetics | www.frontiersin.org forgetting weights). We conjecture that faithfully phylogenetic Kalmanson distance vectors always arise from resistance distances. Specifically we conjecture that if d is faithfully phylogenetic, then d = d R N for some weighted phylogenetic network N. Note that not all Kalmanson distance vectors arise from resistance distances, simply due to the fact that not all circular split networks are in the range of .

2-Nested Kalmanson Networks
A special case of 5.5 is the conjecture that 2-nested phylogenetic networks have Kalmanson resistance distance. For instance in Figure 22 we show a simple 2-nested network N whose resistance distance is clearly Kalmanson: in fact it is the same resistance distance as possessed by the shown 1-nested network.

Indistinguishable Weightings and Invariants
We conjecture that for every weighted 2-nested network there is a weighted 1-nested network with matching resistance distance. Again see Figure 22. However, in light of the above conjecture 5.4, we conjecture that the exterior shape of networks is an invariant of resistance distance: specifically that if any two outer planar networks N, N ′ have d R N = d R N ′ then L(R w (N)) = L(R w (N ′ )).

Limiting Case
Consider when an edge in a cycle of N has a very large weight, or high resistance. As this weight grows, the limit of L w (R w (N)) approaches a network with that edge being deleted entirely. We see this by considering any two circuit-parallel paths with resistance R 1 and R 2 the first of which uses an edge with variable weight w (all other weights constant). Then letting w → ∞ implies R 1 → ∞ and thus R 1 R 2 /(R 1 + R 2 ) approaches R 2 by L'Hospital's rule. Thus, as w goes to ∞ we see that the resistance distances using those circuit-parallel paths reduce to the path distances, and so the distance metric from that network approaches one without that edge. This is similar to the way in which S w , which uses the minimal path distance on N, serves to delete some edges as seen in Figure 10.

DISTANCE MEASURES
A question is raised about the mathematics which precedes the work described in this paper: what sort of measurement should actually yield the experimental resistance distances in a real example? What should play the role of attaching the ohmmeter to pairs of wires? Usually, DNA sequences of length m are aligned (a multi-step problem of its own) and then the number of disagreeing sites is counted. Let p be the proportion of disagreements to the length m of the sequence: p = (m − c)/m where c is the number of correct, matching sites. Then there is a selection of mutation models, such as the simplest Jukes-Cantor model, which predict a distance D which is the expected total number of mutations. Experimentally we find that distance D as a function of the observed disagreements. Alternately we could choose D from the list of evolutionary models: for instance for Kimura's two parameter model. Or, alignment-free models such as the k-mer distance measures as described in Allman et al. (2017).
Here, we would want a distance D = R which is summed when in sequence but obeys the Ohm equations. The answer will depend both on the model of mutation we choose and the model of recombination we choose. For instance, D = − 3 4 ln(1 − 4 3 p) for the Jukes-Cantor model, as described in Jukes and Cantor (1969). Rewriting using p = (m − c)/c we have: D has the graph in Figure 23. The c-axis is explained by the fact that in the Jukes-Cantor model, mutations of the 4 nucleotides A, G, T, C can replace any letter with another-including a self replacement. This implies that the smallest number of matching sites is m 4 , while the largest is m. We can use D for the resistance distance only if there is experimental evidence that for circuitparallel paths we have D = D 1 D 2 /(D 1 + D 2 ), where D 1 (c 1 ) and D 2 (c 2 ) are the distances for each path, in expected numbers FIGURE 24 | On the left is a simple parallel circuit with identical resistance on each branch. If the resistance is the Jukes-Cantor distance and obeys the Ohm laws, then the number c of matching sites at the end of the circuit will depend on the number c 1 of correct matching sites at the end of each branch before recombination. of mutations as a function of correct matching sites. There are certainly some features of D that look promising, including the shape of its graph: resistance typically ranges from 0 to infinity. Assuming that the formula for D over the circuit-parallel paths does hold, when one of the circuit-parallel resistances is infinite: say D 1 → ∞; then we see that D → D 2 . Similarly, as c 1 → m/4, we have that c, the number of correct sites after recombination, approaches c 2 .
When both branches have the same distance D 1 = D 2 , and it obeys Ohm's law, we see the total resistance D = D 1 /2. Using the formula for D(c) and D 1 (c 1 ) and solving for c we get the following function, graphed in Figure 24: Thus, as a first check the geneticist could compare two genomes and their hybrid genome with a common ancestor. When the two are close to the same distance from the common ancestor (both have c 1 matching sites), then the pair (c 1 , c) for c the number of matches between the hybrid and the common ancestor might fit the parabola as seen in Figure 24. If that fit is achieved, then it would be reasonable to apply the theorems of this paper.

DATA AVAILABILITY STATEMENT
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author/s.

AUTHOR CONTRIBUTIONS
SF did the majority of research and writing. DS: student researcher, contributed most of section 5.1, 2-nested networks, from his thesis, especially the combinatorics. All authors contributed to the article and approved the submitted version.