Giuseppe Buttazzo

Berardo Ruffini

Bozhidar Velichkov

Shape Optimization Problems for Metric Graphs

Keywords: shape optimization, rectifiable sets, metric graphs, quantum graphs, Dirichlet energy 2010 Mathematics Subject Classification: 49R05, 49Q20, 49J45, 81Q35

We consider the shape optimization problem

where H 1 is the one-dimensional Hausdorff measure and A is an admissible class of onedimensional sets connecting some prescribed set of points D = {D 1 , . . . , D k } ⊂ R d . The cost functional E(Γ) is the Dirichlet energy of Γ defined through the Sobolev functions on Γ vanishing on the points D i . We analyze the existence of a solution in both the families of connected sets and of metric graphs. At the end, several explicit examples are discussed.

Introduction

In the present paper we consider the problem of finding optimal graphs in a given admissible class consisting of all connected graphs of prescribed total length and containing a prescribed set of points. The minimization criterion we consider along all the paper is the Dirichlet energy, though in the last section we discuss the possibility of extending our results to other criteria, like the first Dirichlet eigenvalue or similar spectral functionals.

A graph C in R d is simply a closed connected subset of R d with finite 1-dimensional Hausdorff measure H 1 (C). Since such sets are rectifiable (see for instance [START_REF] Ambrosio | Topics on Analysis in Metric Spaces[END_REF]) we can define all the variational tools that are usually defined in the Euclidean setting:

• Dirichlet integral C 1 2 |u ′ | 2 dH 1 ; • Sobolev spaces H 1 (C) = u ∈ L 2 (C) : C |u ′ | 2 dH 1 < +∞ , H 1 0 (C; D) = u ∈ H 1 (C) : u = 0 on D ; • Energy E(C; D) = inf C 1 2 |u ′ | 2 -u dH 1 : u ∈ H 1 0 (C, D) .
In particular, for a fixed set D consisting of N points, D = {D 1 , . . . , D N }, we consider the shape optimization problem min E(C; D) :

H 1 (C) = l, D ⊂ C , (1.1)
where the total length l is fixed. Notice that in the problem above the unknown is the graph C and no a priori constraints on its topology are imposed.

In spite of the fact that the optimization problem (1.1) looks very natural, we show that in general an optimal graph may not exist (see Example 4.3); this leads us to consider a larger admissible class consisting of the so-called metric graphs, for which the embedding into R d is not required. The precise definition of a metric graph is given in Section 3; roughly speaking they are metric spaces induced by combinatorial graphs with weighted edges.

Our main result is an existence theorem for optimal metric graphs, where the cost functional is the extension of the energy functional defined above. In Section 4 we show some explicit examples of optimal metric graphs. The last section contains some discussions on possible extensions of our result to other similar problems and on some open questions.

2 Sobolev space and Dirichlet Energy of a rectifiable set Let C ⊂ R d be a closed connected set of finite length, i.e. H 1 (C) < ∞, where H 1 denotes the one-dimensional Hausdorff measure. On the set C we consider the metric

d(x, y) = inf 1 0 | γ(t)| dt : γ : [0, 1] → R d Lipschitz, γ([0, 1]) ⊂ C, γ(0) = x, γ(1) = y ,
which is finite since, by the First Rectifiability Theorem (see [START_REF] Ambrosio | Topics on Analysis in Metric Spaces[END_REF]Theorem 4.4.1]), there is at least one rectifiable curve in C connecting x to y. For any function u : C → R, Lipschitz with respect to the distance d (we also use the term d-Lipschitz), we define the norm ≤ d(x, y) 1/2 u ′ L 2 (C) , and so, u is 1/2-Hölder continuous. On the other hand, for any x ∈ C, we have that

u 2 H 1 (C) = C |u(x)| 2 dH 1 (x) + C |u ′ |(x) 2 dH 1 (x),
C u(y)dH 1 (y) ≥ C u(x) -d(x, y) 1/2 u ′ L 2 (C) dH 1 (y) ≥ lu(x) -l 3/2 u ′ L 2 (C) ,
where l = H 1 (C). Thus, we obtain the L ∞ bound

u L ∞ ≤ l -1/2 u L 2 (C) + l 1/2 u ′ L 2 (C) ≤ (l -1/2 + l 1/2 ) u H 1 (C)
. and so, by the Ascoli-Arzelá Theorem, we have that the inclusion is compact.

Remark 2.2. By the same argument as in Remark 2.1 above, we have that for any u ∈ H 1 (C), the (1, 2)-Poincaré inequality holds, i.e.

C u(x) - 1 l C u dH 1 dH 1 (x) ≤ l 3/2 C |u ′ | 2 dH 1 1/2 . (2.1)
Moreover, if u ∈ H 1 (C) is such that u(x) = 0 for some point x ∈ C, then we have the Poincaré inequality:

u L 2 (C) ≤ l 1/2 u L ∞ (C) ≤ l u ′ L 2 (C) . (2.2)
Since C is supposed connected, by the Second Rectifiability Theorem (see [2, Theorem 4.4.8]) there exists a countable family of injective arc-length parametrized Lipschitz curves

γ i : [0, l i ] → C, i ∈ N and an H 1 -negligible set N ⊂ C such that C = N ∪ i Im(γ i ) ,
where Im(γ i ) = γ i ([0, l i ]). By the chain rule (see Lemma 2.3 below) we have

d dt u(γ i (t)) = |u ′ |(γ i (t)), ∀i ∈ N
and so, we obtain for the norm of u ∈ H 1 (C):

u 2 H 1 (C) = C |u(x)| 2 dH 1 (x) + i l i 0 d dt u(γ i (t)) 2 dt. (2.3)
Moreover, we have the inclusion

H 1 (C) ⊂ ⊕ i∈N H 1 ([0, l i ]), (2.4)
which gives the reflexivity of H 1 (C) and the lower semicontinuity of the H 1 (C) norm, with respect to the strong convergence in L 2 (C).

Lemma 2.3. Let u ∈ H 1 (C) and let γ : [0, l] → R d be an arc-length parametrized Lipschitz curve with γ([0, l]) ⊂ C. Then we have

d dt u(γ(t)) = |u ′ |(γ(t)), for L 1 -a.e. t ∈ [0, l]. (2.5)
Proof. With no loss of generality we may assume that u : C → R is a Lipschitz map with Lipschitz constant Lip(u) with respect to the distance d and that the curve γ is injective. We prove that the chain rule (2.

|(γ(0)) ≥ d dt u(γ(0)) . We have that |u ′ |(γ(0)) ≥ lim sup t→0 |u(γ(t)) -u(γ(0))| d(γ(t), γ(0)) = d dt u(γ(0)) ,
since γ is arc-length parametrized. On the other hand, we have

|u ′ |(x) = lim sup y→x |u(y) -u(x)| d(y, x) = lim n→∞ |u(y n ) -u(x)| d(y n , x) = lim n→∞ |u(γ n (r n )) -u(γ n (0))| r n ≤ lim n→∞ 1 r n rn 0 d dt u(γ n (t)) dt (2.7)
where y n ∈ C is a sequence of points which realizes the lim sup and

γ n : [0, r n ] → R d is a geodesic in C connecting x to y n . Let S n = {t : γ n (t) = γ(t)} ⊂ [0, r n ], then, we have rn 0 d dt u(γ n (t)) 2 dt ≤ Sn d dt u(γ(t)) 2 dt + Lip(u) (r n -|S n |) ≤ rn 0 d dt u(γ(t)) 2 dt + Lip(u) (H 1 (B rn (γ(0)) ∩ C) -2r n ), (2.8)
and so, since γ(0) is of density 1, we conclude applying this estimate to (2.7).

Given a set of points D = {D 1 , . . . , D k } ⊂ R d we define the admissible class A(D; l) as the family of all closed connected sets C containing D and of length H 1 (C) = l. For any C ∈ A(D; l) we consider the space of Sobolev functions which satisfy a Dirichlet condition at the points D i :

H 1 0 (C; D) = {u ∈ H 1 (C) : u(D j ) = 0, j = 1 . . . ,
k}, which is well-defined by Remark 2.1. For the points D i we use the term Dirichlet points. The Dirichlet Energy of the set C with respect to D 1 , . . . , D k is defined as

E(C; D) = min J(u) : u ∈ H 1 0 (C; D) , (2.9)
where

J(u) = 1 2 C |u ′ |(x) 2 dH 1 (x) - C u(x) dH 1 (x).
(2.10) Remark 2.4. For any C ∈ A(D; l) there exists a unique minimizer of the functional J :

H 1 0 (C; D) → R.
In fact, by Remark 2.1 we have that a minimizing sequence is bounded in H 1 and compact in L 2 . The conclusion follows by the semicontinuity of the L 2 norm of the gradient, with respect to the strong L 2 convergence, which is an easy consequence of equation (2.3). The uniqueness follows by the strict convexity of the L 2 norm and the sub-additivity of the gradient |u ′ |. We call the minimizer of J the energy function of C with Dirichlet conditions in D 1 , . . . , D k . Remark 2.5. Let u ∈ H 1 (C) and v : C → R be a positive Borel function. Applying the chain rule, as in (2.3), and the one dimensional co-area formula (see for instance [START_REF] Ambrosio | Functions of bounded variation and free discontinuity problems[END_REF]), we obtain a co-area formula for the functions u ∈ H 1 (C):

C v(x)|u ′ |(x) dH 1 (x) = i l i 0 d dt u(γ i (t)) v(γ i (t)) dt = i +∞ 0 u•γ i (t)=τ v • γ i (t) dτ (2.11) = +∞ 0 u(x)=τ v(x) dτ.

Optimization problem for the Dirichlet Energy on the class of connected sets

We study the following shape optimization problem:

min {E(C; D) : C ∈ A(D; l)} , (2.12)
where D = {D 1 , ..., D k } is a given set of points in R d and l is a prescribed length.

Remark 2.6. When k = 1 problem (2.12) reads as

E = min E(C; D) : H 1 (C) = l, D ∈ C , (2.13)
where D ∈ R d and l > 0. In this case the solution is a line of length l starting from D (see Figure 1). A proof of this fact, in a slightly different context, can be found in [START_REF] Maggi | Sets of Finite Perimeter and Geometric Variational Problems[END_REF] and we report it here for the sake of completeness. Let C ∈ A(D; l) be a generic connected set and let w ∈ H 1 0 (C; D) be its energy function, i.e. the minimizer of J on C. Let v : [0, l] → R be such that µ w (τ ) = µ v (τ ), where µ w and µ v are the distribution function of w and v respectively, defined by

µ w (τ ) = H 1 (w ≤ τ ) = i H 1 (w i ≤ τ ), µ v (τ ) = H 1 (v ≤ τ ).
It is easy to see that, by the Cavalieri Formula, v L p ([0,l]) = w L p (C) , for each p ≥ 1. By the co-area formula (2.11)

C |w ′ | 2 dH 1 = +∞ 0 w=τ |w ′ | dτ ≥ +∞ 0 w=τ 1 |w ′ | -1 dτ = +∞ 0 dτ µ ′ w (τ ) , (2.14)
where we used the Cauchy-Schwartz inequality and the identity

µ w (t) = H 1 ({w ≤ t}) = w≤t |w ′ | |w ′ | ds = t 0 w=s 1 |w ′ | ds which implies that µ ′ w (t) = w=t 1 |w ′ | .
The same argument applied to v gives:

l 0 |v ′ | 2 dx = +∞ 0 v=τ |v ′ | dτ = +∞ 0 dτ µ ′ v (τ )
.

(2.15)

Since µ w = µ v , the conclusion follows.

The following Theorem shows that it is enough to study the problem (2.12) on the class of finite graphs embedded in R d . Consider the subset A N (D; l) ⊂ A(D; l) of those sets C for which there exists a finite family γ i : [0, l i ] → R, i = 1, . . . , n with n ≤ N , of injective rectifiable curves such that ∪ i γ i ([0, l i ]) = C and γ i ((0, l i )) ∩ γ j ((0, l j )) = ∅, for each i = j. where N = 2k -1. Moreover, if C is a solution of the problem (2.12), then there is also a solution C of the same problem such that C ∈ A N (D; l).

Proof. Consider a connected set C ∈ A(D; l). We show that there is a set

(a 3 ) ∈ η 1 ([0, a 1 ]) ∪ η 2 ([0, a 2 ]
). Repeating this operation, we obtain a family of geodesics η i , i = 1, . . . , k -1 which intersect each other in a finite number of points. Each of these geodesics can be decomposed in several parts according to the intersection points with the other geodesics (see Figure 2). So, we can consider a new family of geodesics (still denoted by η i ), η i : [0, l i ] → C, i = 1, . . . , n, which does not intersect each other in internal points. Note that, by an induction argument on k ≥ 2, we have n ≤ 2k -3. Let C ′ = ∪ i η i ([0, l i ]) ⊂ C. By the Second Rectifiability Theorem (see [START_REF] Ambrosio | Topics on Analysis in Metric Spaces[END_REF]Theorem 4.4.8]), we have that

D 1 η 1 D 2 η 3 D 4 η 4 D 5 η 2 D 3
C = C ′ ∪ E ∪ Γ,
where H 1 (E) = 0 and Γ = +∞ j=1 γ j , where γ j : [0, l j ] → C for j ≥ 1 is a family of Lipschitz curves in C. Moreover, we can suppose that H 1 (Γ ∩ C ′ ) = 0. In fact, if H 1 (Im(γ j ) ∩ C ′ ) = 0 for some j ∈ N, we consider the restriction of γ j to (the closure of) each connected component of γ -1 j (R d \ C ′ ). Let w ∈ H 1 0 (C; D) be the energy function on C and let v : [0, H 1 (Γ)] → R be a monotone increasing function such that |{v ≤ τ }| = H 1 ({w ≤ τ } ∩ Γ). Reasoning as in Remark 2.6, we have that 1 2

H 1 (Γ) 0 |v ′ | 2 dx - H 1 (Γ) 0 v dx ≤ 1 2 Γ |w ′ | 2 dH 1 - Γ w dH 1 .
(2.17)

Let σ : [0, H 1 (Γ)] → R d be an injective arc-length parametrized curve such that Im(σ)∩ C ′ = σ(0) = x ′ , where x ′ ∈ C ′ is the point where w |C ′ achieves its maximum. Let C = C ′ ∪Im(σ). Notice that C connects the points D 1 , . . . , D k and has length H 1 ( C) = H 1 (C ′ )+ H 1 (Im(σ)) = H 1 (C ′ ) + H 1 (Γ) = l. Moreover, we have E( C; D) ≤ J( w) ≤ J(w) = E(C; D), (2.18)
where w is defined by

w(x) = w(x), if x ∈ C ′ , v(t) + w(x ′ ) -v(0), if x = σ(t).
(2.19)

We have then (2.18), i.e. the energy decreases. We conclude by noticing that the point x ′ where we attach σ to C ′ may be an internal point for η i , i.e. a point such that η -1 i (x ′ ) ∈ (0, l i ). Thus, the set C is composed of at most 2k -1 injective arc-length parametrized curves which does not intersect in internal points, i.e. C ∈ A 2k-1 (D; l). Remark 2.8. Theorem 2.7 above provides a nice class of admissible sets, where to search a minimizer of the energy functional E. Indeed, according to its proof, we may limit ourselves to consider only graphs C such that:

1. C is a tree, i.e. it does not contain any closed loop; 2. the Dirichlet points D i are vertices of degree one (endpoints) for C;

3. there are at most k -1 other vertices; if a vertex has degree three or more, we call it Kirchhoff point;

4. there is at most one vertex of degree one for C which is not a Dirichlet point. In this vertex the energy function w satisfies Neumann boundary condition w ′ = 0 and so we call it Neumann point.

The previous properties are also necessary conditions for the optimality of the graph C (see Proposition 3.11 for more details).

As we show in Example 4.3, the problem (2.12) may not have a solution in the class of connected sets. It is worth noticing that the lack of existence only occurs for particular configurations of the Dirichlet points D i and not because of some degeneracy of the cost functional E. In fact, we are able to produce other examples in which an optimal graph exists (see Section 4).

Sobolev space and Dirichlet Energy of a metric graph

Let V = {V 1 , . . . , V N } be a finite set and let E ⊂ e ij = {V i , V j } be a set of pairs of elements of V . We define combinatorial graph (or just graph) a pair Γ = (V, E). We say the set V = V (Γ) is the set of vertices of Γ and the set E = E(Γ) is the set of edges. We denote with |E| and |V | the cardinalities of E and V and with deg(V i ) the degree of the vertex V i , i.e. the number of edges incident to V i .

A path in the graph Γ is a sequence V α 0 , . . . , V αn ∈ V such that for each k = 0, . . . , n-1, we have that {V α k , V α k+1 } ∈ E. With this notation, we say that the path connects V i 0 to V iα . The path is said to be simple if there are no repeated vertices in V α 0 , . . . , V αn . We say that the graph Γ = (V, E) is connected, if for each pair of vertices V i , V j ∈ V there is a path connecting them. We say that the connected graph Γ is a tree, if after removing any edge, the graph becomes not connected.

If we associate a non-negative length (or weight) to each edge, i.e. a map l : E(Γ) → [0, +∞), then we say that the couple (Γ, l) determines a metric graph of length

l(Γ) := i<j l(e ij ). A function u : Γ → R n on the metric graph Γ is a collection of functions u ij : [0, l ij ] → R, for 1 ≤ i = j ≤ N , such that: 1. u ji (x) = u ij (l ij -x), for each 1 ≤ i = j ≤ N , 2. u ij (0) = u ik (0), for all {i, j, k} ⊂ {1, . . . , N },
where we used the notation

l ij = l(e ij ). A function u : Γ → R is said continuous (u ∈ C(Γ)), if u ij ∈ C([0, l ij ]
), for all i, j ∈ {1, . . . , n}. We call L p (Γ) the space of p-summable functions (p ∈ [1, +∞)), i.e. the functions u = (u ij ) ij such that

u p L p (Γ) := 1 2 i,j u ij p L p (0,l ij ) < +∞, where • L p (a,b) denotes the usual L p norm on the interval [a, b].
As usual, the space L 2 (Γ) has a Hilbert structure endowed by the scalar product:

u, v L 2 (Γ) := 1 2 i,j u ij , v ij L 2 (0,l ij ) .
We define the Sobolev space H 1 (Γ) as:

H 1 (Γ) = u ∈ C(Γ) : u ij ∈ H 1 ([0, l ij ]), ∀i, j ∈ {1, . . . , n} , (3.1)
which is a Hilbert space with the norm

u 2 H 1 (Γ) = 1 2 i,j u ij 2 H 1 ([0,l ij ]) = 1 2 i,j l ij 0 |u ij | 2 dx + l ij 0 |u ′ ij | 2 dx . (3.2) Remark 3.1. Note that for u ∈ H 1 (Γ) the family of derivatives u ′ ij 1≤i =j≤N is not a function on Γ, since u ′ ij (x) = ∂ ∂x u ji (l ij -x) = -u ′ ji (l ij -x)
. Thus, we work with the function

|u ′ | = |u ′ ij | 1≤i =j≤N ∈ L 2 (Γ). Remark 3.2. The inclusions H 1 (Γ) ⊂ C(Γ) and H 1 (Γ) ⊂ L 2 (Γ)
are compact, since the corresponding inclusions, for each of the intervals [0, l ij ], are compact. By the same argument, the H 1 norm is lower semicontinuous with respect to the strong L 2 convergence of the functions in H 1 (Γ).

For any subset W = {W 1 , . . . , W k } of the set of vertices V (Γ) = {V 1 , . . . , V N }, we introduce the Sobolev space with Dirichlet boundary conditions on W :

H 1 0 (Γ; W ) = u ∈ H 1 (Γ) : u(W 1 ) = • • • = u(W k ) = 0 . (3.3)
Remark 3.3. Arguing as in Remark 2.1 we have that for each u ∈ H 1 0 (Γ; W ) and, more generally, for each u ∈ H 1 (Γ) such that u(V α ) = 0 for some α = 1, . . . , N , the Poincaré inequality

u L 2 (Γ) ≤ l 1/2 u L ∞ ≤ l u ′ L 2 (Γ) , (3.4)
holds, where

u ′ 2 L 2 (Γ) := Γ |u ′ | 2 dx := i,j l ij 0 |u ′ ij | 2 dx.
On the metric graph Γ, we consider the Dirichlet Energy with respect to W :

E(Γ; W ) = inf J(u) : u ∈ H 1 0 (Γ; W ) , (3.5)
where the functional J :

H 1 0 (Γ; W ) → R is defined by J(u) = 1 2 Γ |u ′ | 2 dx - Γ u dx. (3.6) Lemma 3.4. Given a metric graph Γ of length l and Dirichlet points {W 1 , . . . , W k } ⊂ V (Γ) = {V 1 , . . . , V N }, there is a unique function w = (w ij ) 1≤i =j≤N ∈ H 1 0 (Γ; W ) which minimizes the functional J. Moreover, we have (i) for each 1 ≤ i = j ≤ N and each t ∈ (0, l ij ), -w ′′ ij = 1;
(ii) at every vertex V i ∈ V (Γ), which is not a Dirichlet point, w satisfies the Kirchhoff 's law:

j w ′ ij (0) = 0,
where the sum is over all j for which the edge e ij exists; Furthermore, the conditions (i) and (ii) uniquely determine w.

Proof. The existence is a consequence of Remark 3.2 and the uniqueness is due to the strict convexity of the L 2 norm. For any ϕ ∈ H 1 0 (Γ; W ), we have that 0 is a critical point for the

function ε → 1 2 Γ |(w + εϕ) ′ | 2 dx - Γ (w + εϕ) dx.
Since ϕ is arbitrary, we obtain the first claim. The Kirchhoff's law at the vertex V i follows by choosing ϕ supported in a "small neighborhood" of V i . The last claim is due to the fact that if u ∈ H 1 0 (Γ; W ) satisfies (i) and (ii), then it is an extremal for the convex functional J and so, u = w. Remark 3.5. As in Remark 2.5 we have that the co-area formula holds for the functions u ∈ H 1 (Γ) and any positive Borel (on each edge) function v : Γ → R:

Γ v(x)|u ′ |(x) dx = 1≤i<j≤N l ij 0 |u ′ ij (x)| v(x) dx = 1≤i<j≤N +∞ 0 u ij (x)=τ v(x) dτ (3.7) = +∞ 0 u(x)=τ v(x) dτ.

Optimization problem for the Dirichlet Energy on the class of metric graphs

We say that the continuous function γ

= (γ ij ) 1≤i =j≤N : Γ → R d is an immersion of the metric graph Γ into R d , if for each 1 ≤ i = j ≤ N the function γ ij : [0, l ij ] → R d is an
injective arc-length parametrized curve. We say that γ : Γ → R d is an embedding, if it is an immersion which is also injective, i.e. for any i = j and i ′ = j ′ , we have

1. γ ij ((0, l ij )) ∩ γ i ′ j ′ ([0, l i ′ j ′ ]) = ∅, 2. γ ij (0) = γ i ′ j ′ (0), if and only if, i = i ′ .
Remark 3.6. Suppose that Γ is a metric graph of length l and that γ : Γ → R d is an embedding. Then the set C := γ(Γ) is rectifiable of length H 1 (γ(Γ)) = l and the spaces H 1 (Γ) and H 1 (C) are isometric as Hilbert spaces, where the isomorphism is given by the composition with the function γ.

Consider a finite set of distinct points D = {D 1 , . . . , D k } ⊂ R d and let l ≥ St(D), where St(D) is the length of the Steiner set, the minimal among the ones connecting all the points D i (see [START_REF] Ambrosio | Topics on Analysis in Metric Spaces[END_REF] for more details on the Steiner problem). Consider the shape optimization problem:

min E(Γ; V) : Γ ∈ CM G, l(Γ) = l, V ⊂ V (Γ), ∃γ : Γ → R d immersion, γ(V) = D , (3.8)
where CM G indicates the class of connected metric graphs. Note that since l ≥ St(D), there is a metric graph and an embedding γ : Γ → R d such that D ⊂ γ(V (Γ)) and so the admissible set in the problem (3.8) is non-empty, as well as the admissible set in the problem

min E(Γ; V) : Γ ∈ CM G, l(Γ) = l, V ⊂ V (Γ), ∃γ : Γ → R d embedding, γ(V) = D .
(3.9) We will see in Theorem 3.10 that problem (3.8) admits a solution, while Example 4.3 shows that in general an optimal embedded graph for problem (3.9) may not exist.

Remark 3.7. By Remark 3.6 and by the fact that the functionals we consider are invariant with respect to the isometries of the Sobolev space, we have that the problems (2.12) and (3.9) are equivalent, i.e. if Γ ∈ CM G and γ : Γ → R d is an embedding such that the pair (Γ, γ) is a solution of (3.9), then the set γ(Γ) is a solution of the problem (2.12). On the other hand, if C is a solution of the problem (2.12), by Theorem 2.7, we can suppose that

C = N i=1 γ i ([0, l i ])
, where γ i are injective arc-length parametrized curves, which does not intersect internally. Thus, we can construct a metric graph Γ with vertices the set of points Proof. We repeat the argument from Theorem 2.7. We first construct a connected metric graph Γ ′ such that V (Γ ′ ) ⊂ V (Γ) and the edges of Γ ′ are appropriately chosen paths in Γ. The edges of Γ, which are not part of any of these paths, are symmetrized in a single edge, which we attach to Γ ′ in a point, where the restriction of w to Γ ′ achieves its maximum, where w is the energy function for Γ.

{γ i (0), γ i (l i )} N i=1 ⊂ R d ,
Suppose that V 1 , . . . , V k ∈ V ⊂ V (Γ) are such that γ(V i ) = D i , i = 1, . . . , k. We start constructing Γ ′ by taking V := {V 1 , . . . , V k } ⊂ V (Γ ′ ). Let σ 1 = {V i 0 , V i 1 , . . . , V is } be a path of different vertices (i.e. simple path) connecting V 1 = V is to V 2 = V i 0 and let σ2 = {V j 0 , V j 1 , . . . , V jt } be a simple path connecting V 1 = V jt to V 3 = V j 0 . Let t ′ ∈ {1, . . . , t} be the smallest integer such that V j t ′ ∈ σ 1 . Then we set V j t ′ ∈ V (Γ ′ ) and σ 2 = {V j 0 , V j 1 , . . . , V j t ′ }. Consider a simple path σ3 = {V m 0 , V m 1 , . . . , V mr } connecting V 1 = V mr to V 3 = V m 0 and the smallest integer r ′ such that V m r ′ ∈ σ 1 ∪ σ 2 . We set V m r ′ ∈ V (Γ ′ ) and σ 3 = {V m 0 , V m 1 , . . . , V m r ′ }.
We continue the operation until each of the points V 1 , . . . , V k is in some path σ j . Thus we obtain the set of vertices V (Γ ′ ). We define the edges of Γ ′ by saying that {V i , V i ′ } ∈ E(Γ ′ ) if there is a simple path σ connecting V i to V i ′ and which is contained in some path σ j from the construction above; the length of the edge {V i , V i ′ } is the sum of the lengths of the edges of Γ which are part of σ. We notice that Γ ′ ∈ CM G is a tree with at most 2k -2 vertices and 2k -2 edges. Moreover, even if Γ ′ is not a subgraph of Γ (E(Γ ′ ) may not be a subset of E(Γ)), we have the inclusion

H 1 (Γ ′ ) ⊂ H 1 (Γ).
Consider the set E ′′ ⊂ E(Γ) composed of the edges of Γ which are not part of none of the paths σ j from the construction above. We denote with l ′′ the sum of the lengths of the edges in E ′′ . For any e ij ∈ E ′′ we consider the restriction w ij : [0, l ij ] → R of the energy function w on e ij . Let v : [0, l ′′ ] → R be the monotone function defined by the equality |{v ≥ τ }| = e ij ∈E ′′ |{w ij ≥ τ }|. Using the co-area formula (3.7) and repeating the argument from Remark 2.13, we have that 1 2

l ′′ 0 |v ′ | 2 dx - l ′′ 0 v(x) dx ≤ e ij ∈E ′′ 1 2 l ij 0 |w ′ ij | 2 dx - l ij 0 w ij dx . (3.11)
Let Γ be the graph obtained from Γ by creating a new vertex W 1 in the point, where the restriction w |Γ ′ achieves its maximum, and another vertex W 2 , connected to W 1 by an edge of length l ′′ . It is straightforward to check that Γ is a connected metric tree of length l and that there exists an immersion γ : Γ → R d such that D = γ( V). The inequality (3.10) follows since, by (3.11), J( w) ≤ J(w), where w is defined as w on the edges E(Γ ′ ) ⊂ E( Γ) and as v on the edge {W 1 , W 2 }.

Before we prove our main existence result, we need a preliminary Lemma. Lemma 3.9. Let Γ be a connected metric tree and let V ⊂ V (Γ) be a set of Dirichlet vertices. Let w ∈ H 1 0 (Γ; V) be the energy function on Γ with Dirichlet conditions in V, i.e. the function that realizes the minimum in the definition of E(Γ; V). Then, we have the bound w ′ L ∞ ≤ l(Γ).

Proof. Up to adding vertices in the points where |w ′ | = 0, we can suppose that on each edge e ij := {V i , V j } ∈ E(Γ) the function w ij : [0, l ij ] → R + is monotone. Moreover, up to relabel the vertices of Γ we can suppose that if e ij ∈ V (Γ) and i < j, then w(

V i ) ≤ w(V j ). Fix V i , V i ′ ∈ V (Γ) such that e ii ′ ∈ E(Γ).
Note that, since the derivative is monotone on each edge, it suffices to prove that |w ′ ii ′ (0)| ≤ l(Γ). It is enough to consider the case i < i ′ , i.e. w ′ ii ′ (0) > 0. We construct the graph Γ inductively, as follows (see Figure 3):

1. V i ∈ V ( Γ); 2. if V j ∈ V ( Γ) and V k ∈ V (Γ)
are such that e jk ∈ E(Γ) and j < k, then V k ∈ V ( Γ) and e jk ∈ E( Γ).

V i (b) w(V j ) > w(V k ) whenever e jk ∈ E( Γ) and j > k;

V i ′ N N N N N N N N N
(c) if V j ∈ V ( Γ) and j > i, then there is exactly one k < j such that e kj ∈ E( Γ);

(d) for j and k as in the previous point, we have that

0 ≤ w ′ kj (l kj ) ≤ s w ′ js (0),
where the sum on the right-hand side is over all s > j such that e sj ∈ E( Γ). If there are not such s, we have that w ′ kj (l kj ) = 0.

The first three conditions follow by the construction of Γ, while condition (d) is a consequence of the Kirchkoff's law for w.

We prove that for any graph Γ and any function w ∈ H 1 ( Γ), for which the conditions (a), (b), (c) and (d) are satisfied, we have that

j w ′ ij (0) ≤ l( Γ),
where the sum is over all j ≥ i and e ij ∈ E( Γ). It is enough to observe that each of the operations (i) and (ii) described below, produces a graph which still satisfies (a), (b), (c) and (d). Let V j ∈ V ( Γ) be such that for each s > j for which e js ∈ E( Γ), we have that w ′ js (l js ) = 0 and let k < j be such that e jk ∈ E( Γ).

(i) If there is only one s > j with e js ∈ E( Γ), then we erase the vertex V j and the edges e kj and e js and add the edge e ks of length l ks := l kj + l js . On the new edge we define w ks : [0, l sk ] → R + as w ks (x) = -x 2 2 + l ks x + w kj (0), which still satisfies the conditions above since w ′ kjl kj ≤ l js , by (d), and w ′ ks = l ks ≥ w ′ kj (0).

(ii) If there are at least two s > j such that e js ∈ E( Γ), we erase all the vertices V s and edges e js , substituting them with a vertex V S connected to V j by an edge e jS of length

l jS := s l js ,
where the sum is over all s > j with e js ∈ E( Γ). On the new edge, we consider the function w jS defined by

w jS (x) = - x 2 2 + l jS x + w(V j ),
which still satisfies the conditions above since We apply (i) and (ii) until we obtain a graph with vertices V i , V j and only one edge e ij of length l( Γ). The function we obtain on this graph is -x 2 2 + l( Γ)x with derivative in 0 equal to l( Γ). Since, after applying (i) and (ii), the sum j>i w ′ ij (0) does not decrease, we have the thesis.

(iv) if there is no vertex of degree one in V (Γ) \ V, then the graph Γ has at most 2k -2 vertices and 2k -3 edges;

(v) if there is exactly one vertex of degree one in V (Γ) \ V, then the graph Γ has at most 2k vertices and 2k -1 edges.

Proof. We use the notation V (Γ) = {V 1 , . . . , V N } for the vertices of Γ and e ij for the edges {V i , V j } ∈ E(Γ), whose lengths are denoted by l ij . Moreover, we can suppose that for j = 1, . . . , k, we have γ(V j ) = D j , where D 1 , . . . , D k are the Dirichlet points from problem (3.8) and so, {V 1 , . . . , V k } ⊂ V. Let w = (w ij ) ij be the energy function on Γ with Dirichlet conditions in the points of V.

1. Suppose that we can remove an edge e ij ∈ E(Γ), such that the graph

Γ ′ = (V (Γ), E(Γ)\ e ij ) is still connected. Since w ′′ ij = -1 on [0, l ij ]
we have that at least one of the derivatives w ′ ij (0) and w ′ ij (l ij ) is not zero. We can suppose that w ′ ij (l ij ) = 0. Consider the new graph Γ to which we add a new vertex: V ( Γ) = V (Γ) ∪ V 0 , then erase the edge e ij and create a new one e i0 = {V i , V 0 }, of the same length, connecting V i to V 0 : E( Γ) = (E(Γ) \ e ij ) ∪ e i0 . Let w be the energy function on Γ with Dirichlet conditions in V. When seen as a subspaces of ⊕ ij H 1 ([0, l ij ]), we have that H 1 0 (Γ; V) ⊂ H 1 0 ( Γ; V) and so E( Γ; V) ≤ E(Γ; V), where the equality occurs, if and only if the energy functions w and w have the same components in ⊕ ij H 1 ([0, l ij ]). In particular, we must have that

w ij = w i0 on the interval [0, l ij ], which is impossible since w ′ ij (l ij ) = 0 and w ′ i0 (l ij ) = 0.
2. Suppose that there is a vertex V j ∈ V with j > k and let w be the energy function on Γ with Dirichlet conditions in {V 1 , . . . , V k }. We have the inclusion H 1 0 (Γ; V) ⊂ H 1 0 (Γ; {V 1 , . . . , V k }) and so, the inequality J( w) = E(Γ; {V 1 , . . . , V k }) ≤ E(Γ; V) = J(w), which becomes an equality if and only if w = w, which is impossible. Indeed, if the equality holds, then in V j , w satisfies both the Dirichlet condition and the Kirchoff's law. Since w is positive, for any edge e ji we must have w ji (0) = 0, w ′ ji (0) = 0, w ′′ ji = -1 ad w ji ≥ 0 on [0, l ji ], which is impossible.

3. Suppose that there are two vertices V i and V j of degree one, which are not in V, i.e. i, j > k. Since Γ is connected, there are two edges, e ii ′ and e jj ′ starting from V i and V j respectively. Suppose that the energy function w ∈ H 1 0 (Γ; {V 1 , . . . , V k }) is such that w(V i ) ≥ w(V j ). We define a new graph Γ by erasing the edge e jj ′ and creating the edge e ij of length l jj ′ . On the new edge e ij we consider the function w ij (x) = w jj ′ (x) + w(V i )w(V j ). The function w on Γ obtained by this construction is such that J( w) ≤ J(w), which proves the conclusion.

The points (iv) and (v) follow by the construction in Theorem 3.8 and the previous claims (i), (ii) and (iii). Remark 3.12. Suppose that V j ∈ V (Γ) \ V is a vertex of degree one and let V i be the vertex such that e ij ∈ E(Γ). Then the energy function w with Dirichlet conditions in V satisfies w ′ ji (0) = 0. In this case, we call V j a Neumann vertex. By Proposition 3.11, an optimal graph has at most one Neumann vertex.

Some examples of optimal metric graphs

In this section we show three examples. In the first one we deal with two Dirichlet points, the second concerns three aligned Dirichlet points and the third one deals with the case in which the Dirichlet points are vertices of an equilateral triangle. In the first and the third one we find the minimizer explicitly as an embedded graph, while in the second one we limit ourselves to prove that there is no embedded minimizer of the energy, i.e. the problem (3.9) does not admit a solution.

In the following example we use a symmetrization technique similar to the one from Remark 2.6.

Γ; {V 1 , V 2 }) : Γ ∈ CM G, l(Γ) = l, V 1 , V 2 ∈ V (Γ), exists γ : Γ → R immersion, γ(V 1 ) = D 1 , γ(V 2 ) = D 2 }. (4.1)
has a solution (Γ, γ), where Γ is a metric graph with vertices

V (Γ) = {V 1 , V 2 , V 3 , V 4 } and edges E(Γ) = {e 13 = {V 1 , V 3 }, e 23 = {V 2 , V 3 }, e 43 = {V 4 , V 3 }} of lengths l 13 = l 23 = 1 2 |D 1 -D 2 | and l 34 = l -|D 1 -D 2 |, respectively. The map γ : Γ → R d is an embedding such that γ(V 1 ) = D 1 , γ(V 2 ) = D 2 and γ(V 3 ) = D 1 +D 2 2
(see Figure 4).

V 1 l-ε 2 V 3 l-ε 2 V 2 ε V 4
Figure 4: The optimal graph with two Dirichlet points.

To fix the notations, we suppose that |D 1 -D 2 | = lε. Let u = (u ij ) ij be the energy function of a generic metric graph Σ and immersion σ :

Σ → R d with D 1 , D 2 ∈ σ(V (Σ)). Let M = max{u(x) : x ∈ Σ} > 0. We construct a candidate v ∈ H 1 0 (Γ; {V 1 , V 2 }
) such that J(v) ≤ J(u), which immediately gives the conclusion.

We define v by the following three increasing functions

v 13 = v 23 ∈ H 1 ([0, (l -ε)/2]), v 34 ∈ H 1 ([0, ε]),
with boundary values

v 13 (0) = v 23 (0) = 0, v 13 ((l -ε)/2) = v 23 ((l -ε)/2) = v 34 (0) = m < M,
and level sets uniquely determined by the equality µ u = µ v , where µ u and µ v are the distribution functions of u and v respectively, defined by

µ u (t) = H 1 ({u ≤ t}) = e ij ∈E(Σ) H 1 ({u ij ≤ t}), µ v (t) = H 1 ({v ≤ t}) = j=1,2,4 H 1 ({v j3 ≤ t}).
As in Remark 2.6 we have

v L 1 (Γ) = u L 1 (C) and Σ |u ′ | 2 dx = M 0 u=τ |u ′ | dτ ≥ M 0 n 2 u (τ ) u=τ 1 |u ′ |(τ ) -1 dτ = M 0 n 2 u (τ ) µ ′ u (τ ) dτ (4.2)
where n u (τ ) = H 0 ({u = τ }). The same argument holds for v on the graph Γ but, this time, with the equality sign:

Γ |v ′ | 2 dx = M 0 v=τ |v ′ | dτ = M 0 n 2 v (τ ) µ ′ v (τ ) dτ, (4.3)
since |v ′ | is constant on {v = τ }, for every τ . Then, in view of (4.2) and (4.3), to conclude it is enough to prove that n u (τ ) ≥ n v (τ ) for almost every τ . To this aim we first notice that, by construction

n v (τ ) = 1 if τ ∈ [m, M ] and n v (τ ) = 2 if τ ∈ [0, m).
Since n u is decreasing and greater than 1 on [0, M ], we only need to prove that n u ≥ 2 on [0, m]. To see this, consider two vertices

W 1 , W 2 ∈ V (Σ) such that σ(W 1 ) = D 1 and σ(W 2 ) = D 2 .
Let η be a simple path connecting W 1 to W 2 in Σ. Since σ is an immersion we know that the length l(η) of η is at least lε. By the continuity of u, we know that n u ≥ 2 on the interval [0, max η u). Since n v = 1 on [m, M ], we need to show that max η u ≥ m. Otherwise, we would have

l(η) ≤ |{u ≤ max η u}| < |{u ≤ m}| = |{v ≤ m}| = |D 1 -D 2 | ≤ l(η),
which is impossible.

Remark 4.2. In the previous example the optimal metric graph Γ is such that for any (admissible

) immersion γ : Γ → R d , we have |γ(V 1 ) -γ(V 3 )| = l 13 and |γ(V 2 ) -γ(V 3 )| = l 23 , i.e. the point γ(V 3 ) is necessary the midpoint D 1 +D 2 2
, so we have a sort of rigidity of the graph Γ. More generally, we say that an edge e ij is rigid, if for any admissible immersion γ : Γ → R d , i.e. an immersion such that D = γ(V), we have |γ(V i )γ(V j )| = l ij , in other words the realization of the edge e ij in R d via any immersion γ is a segment. One may expect that in the optimal graph all the edges, except the one containing the Neumann vertex, are rigid. Unfortunately, we are able to prove only the weaker result that:

1. if the energy function w, of an optimal metric graph Γ, has a local maximum in the interior of an edge e ij , then the edge is rigid; if the maximum is global, then Γ has no Neumann vertices;

2. if Γ contains a Neumann vertex V j , then w achieves its maximum at it.

To prove the second claim, we just observe that if it is not the case, then we can use an argument similar to the one from point (iii) of Proposition 3.11, erasing the edge e ij containing the Neumann vertex V j and creating an edge of the same length that connects V j to the point, where w achieves its maximum, which we may assume a vertex of Γ (possibly of degree two).

For the first claim, we apply a different construction which involves a symmetrization technique. In fact, if the edge e ij is not rigid, then we can create a new metric graph of smaller energy, for which there is still an immersion which satisfies the conditions in problem (3.8). In this there are points 0 In fact, we show that all the possible solutions of the problem min {E(Γ; V) : Γ ∈ CM G, l(Γ) = l, V ⊂ V (Γ), ∃γ : Γ → R immersion, D = γ(V)} (4.5) are metric graphs Γ for which there is no embedding γ : Γ → R 2 such that D ⊂ γ(V (Γ)). Moreover, there is a sequence of embedded metric graphs which is a minimizing sequence for the problem (4.5).

< a < b < l ij such that l ij -(b -a) ≥ |γ(V i ) -γ(V j )| and min [a,b] w ij = w ij (a) = w ij (b) < max
More precisely, we show that the only possible solution of (4.5) is one of the following metric trees:

(i) Γ 1 with vertices V (Γ 1 ) = {V 1 , V 2 , V 3 , V 4 } and edges E(Γ 1 ) = (e 14 = {V 1 , V 4 }, e 24 =
{V 2 , V 4 }, e 34 = {V 3 , V 4 } of lengths l 14 = l 24 = 1 and l 34 = n, respectively. The set of vertices in which the Dirichlet condition holds is

V 1 = {V 1 , V 2 , V 3 }. (ii) Γ 2 with vertices V (Γ 2 ) = {W i } 6 i=1
, and edges E(Γ 2 ) = {e 14 , e 24 , e 35 , e 45 , e 56 } ,where e ij = {W i , W j } for 1 ≤ i = j ≤ 6 of lengths l 14 = 1 + α, l 24 = 1α, l 35 = nβ, l 45 = βα, l 56 = α, where 0 < α < 1 and α < β < n. The set of vertices in which the Dirichlet condition holds is We start showing that if there is an optimal metric graph with no Neumann vertex, then it must be Γ 1 . In fact, by Proposition 3.11, we know that the optimal metric graph is of the form Γ 1 , but we have no information on the lengths of the edges, which we set as l i = l(e i4 ), for i = 1, 2, 3 (see Figure 6). We can calculate explicitly the minimizer of the energy functional and the energy itself in function of l 1 , l 2 and l 3 . The minimizer of the energy w : Γ → R is given by the functions w i : [0, l i ] → R, where i = 1, 2, 3 and

V 1 = {V 1 , V 2 , V 3 }. A possible immersion γ is described in Figure 5. V 1 1 V 4 1 V 2 V 3 n V 1 1 + α V 4 V 2 V 3 V 5 V 6
V 1 l 1 V 4 l 2 V 2 V 3 l 3
w i (x) = - x 2 2 + a i x. (4.6)
where

a 1 = l 1 2 + l 2 l 3 (l 1 + l 2 + l 3 ) 2(l 1 l 2 + l 2 l 3 + l 3 l 1 ) , (4.7)
and a 2 and a 3 are defined by a cyclic permutation of the indices. As a consequence, we obtain that the derivative along the edge e 14 in the vertex V 4 is given by

w ′ 1 (l 1 ) = -l 1 + a 1 = - l 1 2 + l 2 l 3 (l 1 + l 2 + l 3 ) 2(l 1 l 2 + l 2 l 3 + l 3 l 1 ) , (4.8)
and integrating the energy function w on Γ, we obtain

E(Γ; {V 1 , V 2 , V 3 }) = - 1 12 (l 3 1 + l 3 2 + l 3 3 ) - (l 1 + l 2 + l 3 ) 2 l 1 l 2 l 3 4(l 1 l 2 + l 2 l 3 + l 3 l 1 ) . (4.9)
Studying this function using Lagrange multipliers is somehow complicated due to the complexity of its domain. Thus we use a more geometric approach applying the symmetrization technique described in Remark 2.6 in order to select the possible candidates. We prove that if the graph is optimal, then all the edges must be rigid (this would force the graph to coincide with Γ 1 ). Suppose that the optimal graph Γ is not rigid, i.e. there is a non-rigid edge. Then, for n > 4, we have that l 2 < l 1 < l 3 and so, by (4.8), we obtain

w ′ 3 (l 3 ) < w ′ 1 (l 1 ) < w ′ 2 (l 2 )
. As a consequence of the Kirchoff's law we have w ′ 3 (l 3 ) < 0 and w ′ 2 (l 2 ) > 0 and so, w has a local maximum on the edge e 34 and is increasing on e 14 . By Remark 4.2, we obtain that the edge e 34 is rigid.

We first prove that w ′ 1 (l 1 ) > 0. In fact, if this is not the case, i.e. w ′ 1 (l 1 ) < 0, by Remark 4.2, we have that the edges e 14 is also rigid and so, l

1 + l 3 = |D 1 -D 3 | = n + 1, i.e. l 2 = 1.
Moreover, by (4.8), we have that w ′ 1 (l 1 ) < 0, if and only if l 2 1 > l 2 l 3 = l 3 . The last inequality does not hold for n > 11, since, by the triangle inequality, l 2 + l 3 ≥ |D 2 -D 3 | = n -1, we have l 1 ≤ 3. Thus, for n large enough, we have that w is increasing on the edge e 14 .

We now prove that the edges e 14 and e 24 are rigid. In fact, suppose that e 24 is not rigid. Let a ∈ (0, l 1 ) and b ∈ (0, l 2 ) be two points close to l 1 and l 2 respectively and such that w 14 (a) = w 24 (b) < w(V 4 ) since w 14 and w 24 are strictly increasing. Consider the metric graph Γ whose vertices and edges are where e ij = { V i , V j } and the lengths of the edges are respectively (see Figure 7) The new metric graph is still a competitor in the problem (4.5) and there is a function

V ( Γ) = {V 1 = V 1 , V 2 = V 2 , V 3 = V 3 , V 4 = V 4 , V 5 , V 6 }, E( Γ) =
l 15 = a, l 25 = b, l 45 = l 2 -b, l 34 = l 3 , l 46 = l 1 -a. V 1 a V 4 V 2 b V 3 V 1 V 6 V 4 V 2 V 5 V 3
w ∈ H 1 0 ( Γ; {V 1 , V 2 , V 3 }) such that E( Γ; {V 1 , V 2 , V 3 }) < J( w) = J(w)
, which is a contradiction with the optimality of Γ. In fact, it is enough to define w as

w 15 = w 14 | [0,a] , w 25 = w 24 | [0,b] , w 54 = w 24 | [b,l 2 ] , w 34 = w 34 , w 64 = w 14 | [a,l 1 ] ,
and observe that w is not the energy function on the graph Γ since it does not satisfy the Neumann condition in V 6 . In the same way, if we suppose that w 14 is not rigid, we obtain a contradiction, and so all the three edges must be rigid, i.e. Γ = Γ 1 .

In a similar way we prove that a metric graph Γ with a Neumann vertex can be a solution of (4.5) only if it is of the same form as Γ 2 . We proceed in two steps: first, we show that, for n large enough, the edge containing the Neumann vertex has a common vertex with the longest edge of the graph; then we can conclude reasoning analogously to the previous case. Let Γ be a metric graph with vertices V (Γ) = {V i } 6 i=1 , and edges E(Γ) = {e 15 , e 24 , e 34 , e 45 , e 56 }, where e ij = {V i , V j } for 1 ≤ i = j ≤ 6.

We prove that w(V 6 ) ≤ max e 34 w, i.e. the graph Γ is not optimal, since, by Remark 4.2, the maximum of w must be achieved in the Neumann vertex V 6 (the case E(Γ) = {e 14 , e 25 , e 34 , e 45 , e 56 } is analogous). Let w 15 : [0, l 15 ] → R, w 65 : [0, l 65 ] → R and w 34 : [0, l 34 ] → R be the restrictions of the energy function w of Γ to the edges e 15 , e 65 and e 34 of lengths l 15 , l 65 and l 34 , respectively. Let u : [0, l 15 + l 56 ] → R be defined as If the metric graph Γ is optimal, then the energy function on w 54 on the edge e 45 must be decreasing and so, by the Kirchhoff's law in the vertex V 5 , we have that w ′ 15 (l 15 )+w ′ 65 (l 65 ) ≤ 0, i.e. the left derivative of u at l 15 is less than the right one:

∂ -u(l 15 ) = w ′ 15 (l 15 ) ≤ w ′ 56 (0) = ∂ + u(l 15 ).
By the maximum principle, we have that

u(x) ≤ u(x) = - x 2 2 + (l 15 + l 56 )x ≤ 1 2 (l 15 + l 56 ) 2 .
On the other hand, w 34 (x) ≥ v(x) = -x 2 2 + l 34 2 x, again by the maximum principle on the interval [0, l 34 ]. Thus we have that max

x∈[0,l 34 ] w 34 (x) ≥ max x∈[0,l 34 ] v(x) = 1 8 l 2 34 > 1 2 (l 15 + l 56 ) 2 ≥ w(V 6 ),
for n large enough. Repeating the same argument, one can show that the optimal metric graph Γ is not of the form

V (Γ) = (V 1 , V 2 , V 3 , V 4 , V 5 ), E(Γ) = {V 1 , V 4 }, {V 2 , V 4 }, {V 3 , V 4 }, {V 4 , V 5 }.
Thus, we obtained that the if the optimal graph has a Neumann vertex, then the corresponding edge must be attached to the longest edge. To prove that it is of the same form as Γ 2 , there is one more case to exclude, namely: Γ with vertices, 8). By Example 4.1, the only possible candidate of this form is the graph with lengths l({V 1 , V

V (Γ) = (V 1 , V 2 , V 3 , V 4 , V 5 ), E(Γ) = {{V 1 , V 2 }, {V 2 , V 4 }, {V 3 , V 4 }, {V 4 , V 5 }} (see Figure
2 }) = |D 1 -D 2 | = 2, l({V 2 , V 4 }) = n-1
2 , l({V 3 , V 4 }) = n-1 2 , l({V 4 , V 5 }) = 2. In this case, we compare the energy of Γ and Γ 1 , by an explicit calculation:

E(Γ; {V 1 , V 2 , V 3 }) = - n 3 -3n 2 + 6n 24 > - n 2 (n + 1) 2 12(2n + 1) = E(Γ 1 ; {V 1 , V 2 , V 3 }), (4.11)
for n large enough. Before we pass to our last example, we need the following Lemma. In both cases,the parameter x is uniquely determined by the total length l and so, we have uniqueness up to rotation on 2π 3 . Moreover, in both cases the solutions are metric graphs, for which there is an embedding γ with γ(V i ) = D i , i.e. they are also solutions of the problem (3.9) with D = {D 1 , D 2 , D 3 } and l ≥ √ 3.

V 1 1 V 4 1 V 2 V 3 n V 1 2 V 2 V 3 n-1 2 V 4 n-1 2 V 5

Complements and further results

In this Section we present two generalizations of Theorem 3.10. The first one deals with a more general class of constraints D 1 , . . . , D k while in the second one we consider a larger class of admissible sets. admits a solution, where we say that Γ ∈ Adm(V; D 1 , . . . , D k ), if there exists an immersion γ : Γ → R d such that for each j = 1, . . . , k there is V j ∈ V such that γ(V j ) ∈ D j .

Proof. As in Theorem 3.8, we can restrict our attention to the connected metric trees Γ with the same vertices V (Γ) = {V 1 , . . . , V N } and edges E(Γ) = {e ij } ij . Moreover, we can suppose that V = {V 1 , . . . , V k } is fixed. By the compactness of the sets D j , we can take a minimizing sequence Γ n and immersions γ n such that for each j = 1, . . . , k, we have γ n (V j ) → X j ∈ D j , as n → ∞. The claim follows by the same argument as in Theorem 3.10.

Theorem 3.10 can be restated in the more general framework of the metric spaces of finite Hausdorff measure, which is the natural extension of the class of the one dimensional subspaces of R d of finite length. In fact, for any compact connected metric space (shortly CCMS) (C, d), we consider the one dimensional Hausdorff measure H 1 d with respect to the metric d and the Sobolev space H 1 (C) obtained by the closure of the Lipschitz functions on C, with respect to the norm u 2

H 1 (C) = u 2 L 2 (H 1 d ) + u ′ 2 L 2 (H 1 d )
, where u ′ is defined as in the case C ⊂ R d . The energy E(C; V) with respect to the set V ⊂ C is defined as in (2.9). As in the case of metric graphs, we define an immersion γ : C → R d as a continuous map such that for any arc-length parametrized curve η : (-ε, ε) → C, we have that |(γ • η) ′ (t)| = 1 for almost every t ∈ (-ε, ε). As a consequence of Theorem 3.10, we have the following: where the admissible set Adm(V; {D 1 , . . . , D k }) is the set of connected metric spaces, for which there exists an immersion γ : Γ → R d such that γ(V) = {D 1 , . . . , D k }. Moreover, the solution of the problem (5.2) is a connected metric graph, which is a tree of at most 2k vertices and 2k -1 edges.

  where |u ′ |(x) = lim sup y→x |u(y)u(x)| d(x, y) . The Sobolev space H 1 (C) is the closure of the d-Lipschitz functions on C with respect to the norm • H 1 (C) . Remark 2.1. The inclusion H 1 (C) ⊂ C d (C) is compact, where C d (C) indicates the space of real-valued continuous functions on C, with respect to the metric d. In fact, for each x, y ∈ C, there is a rectifiable curve γ : [0, d(x, y)] → C connecting x to y, which we may assume arc-length parametrized. Thus, for any u ∈ H 1 (C), we have that |u(x)u(y)| ≤

Figure 1 :

 1 Figure 1: The optimal graph with only one Dirichlet point.

Theorem 2 . 7 .

 27 Consider the set of distinct points D = {D 1 , . . . , D k } ⊂ R d and l > 0. We have that inf E(C; D) : C ∈ A(D; l) = inf E(C; D) : C ∈ A N (D; l) , (2.16)

Figure 2 :

 2 Figure 2: Construction of the set C ′ .

  and N edges of lengths l i such that two vertices are connected by an edge, if and only if they are the endpoints of the same curve γ i . The function γ = (γ i ) i=1,...,N : Γ → R d is an embedding by construction and by Remark 3.6, we haveE(C; D) = E(Γ; D). Theorem 3.8. Let D = {D 1 , . . . , D k } ⊂ R d bea finite set of points and let l ≥ St(D) be a positive real number. Suppose that Γ is a connected metric graph of length l, V ⊂ V (Γ) is a set of vertices of Γ and γ : Γ → R d is an immersion (embedding) such that D = γ(V). Then there exists a connected metric graph Γ of at most 2k vertices and 2k -1 edges, a set V ⊂ V ( Γ) of vertices of Γ and an immersion (embedding) γ : Γ → R d such that D = γ( V) and E( Γ; V) ≤ E(Γ; V).(3.10)

Figure 3 :

 3 Figure 3: The graph Γ; with the letter N we indicate the Neumann vertices. The graph Γ constructed by the above procedure and the restriction w ∈ H 1 ( Γ) of w to Γ have the following properties: (a) On each edge e jk ∈ E( Γ), the function w jk is non-negative, monotone and w ′′ jk = -1;

  l js = l jS = w ′ jS (0).

Example 4 . 1 .

 41 Let D 1 and D 2 be two distinct points in R d and let l ≥ |D 1 -D 2 | be a real number. Then the problem min{E(

  [a,b] w ij . Since the edge is not rigid, there is an immersion γ such that |γ ij (a)γ ij (b)| > |b -a|. The problem (4.1) with D 1 = γ ij (a) and D 2 = γ ij (b) has as a solution the T -like graph described in Example 4.1. This shows, that the original graph could not be optimal, which is a contradiction.

Example 4 . 3 .

 43 Consider the set of points D = {D 1 , D 2 , D 3 } ⊂ R 2 with coordinates respectively (-1, 0), (1, 0) and (n, 0), where n is a positive integer. Given l = (n + 2), we aim to show that for n large enough there is no solution of the optimization problem min {E(Γ; V) : Γ ∈ CM G, l(Γ) = l, V ⊂ V (Γ), ∃γ : Γ → R embedding, D = γ(V)} .(4.4)

Figure 5 :

 5 Figure 5: The two candidates for a solution of (4.5).

Figure 6 :

 6 Figure 6: A metric tree with the same topology as Γ 1 .

  {e 15 , e 25 , e 45 , e 34 , e 46 },

Figure 7 :

 7 Figure 7: The graph Γ (on the left) and the modified one Γ (on the right).

  u(x) = w 15 (x), x ∈ [0, l 15 ], w 56 (xl 15 ), x ∈ [l 15 .l 15 + l 56 ]. (4.10)

Figure 8 :

 8 Figure 8: The graph Γ 1 (on the left) has lower energy than the graph Γ (on the right).

Figure 10 : 2 .

 102 Figure 10: The optimal graphs for l < 1 + √ 3/2, l = 1 + √ 3/2, l > 1 + √ 3/2 and l >> 1 + √ 3/2.

2 .

 2 If l > 1 + √ 3/2, then the solution of the problem (3.8) with D = {D 1 , D 2 , D 3 } is of the form Γ 3 .

Corollary 5 . 1 .

 51 Let D 1 , . . . , D k be k disjoint compact sets in R d and let l ≥ St(d 1 , . . . , d k ), i.e. such that there exists a closed connected set C of length H 1 (C) = l, which intersects all the sets D 1 , . . . , D k . Then the optimization problem min {E(Γ; V) : Γ ∈ CM G, l(Γ) = l, V ⊂ V (Γ), Γ ∈ Adm(V; D 1 , . . . , D k )} (5.1)

Corollary 5 . 2 .

 52 Consider the set of points D = {D 1 , . . . , D k } ⊂ R d and a positive real number l ≥ St(D 1 , . . . , D k ). Then the following optimization problem has solution:min E(C; V) : (C, d) ∈ CCM S, H 1 d (C) ≤ l, C ∈ Adm(V; D 1 , . . . , D k ) ,(5.2)

  C ∈ A N (D; l) such that E( C; D) ≤ E(C; D). Let η 1 : [0, a 1 ] → C be a geodesic in C connecting D 1 to D 2and let η 2 : [0, a] → C be a geodesic connecting D 3 to D 1 . Let a 2 be the smallest real number such that η 2 (a 2 ) ∈ η 1 ([0, a 1 ]). Then, consider the geodesic η 3 connecting D 4 to D 1 and the smallest real number a 3 such that η 3

Acknowledgements. The authors would like to thank Dorin Bucur for some useful suggestions during the preparation of the work. They are also grateful to Mihail Minchev for the discussions on the metric graphs and explaining them the physical point of view on the topic.

Theorem 3.10. Consider a set of distinct points D = {D 1 , . . . , D k } ⊂ R d and a positive real number l ≥ St(D). Then there exists a connected metric graph Γ, a set of vertices V ⊂ V (Γ) and an immersion γ : Γ → R d which are solution of the problem (3.8). Moreover, Γ can be chosen to be a tree of at most 2k vertices and 2k -1 edges.

Proof. Consider a minimizing sequence (Γ n , γ n ) of connected metric graphs Γ n and immersions γ n : Γ n → R d . By Theorem 3.8, we can suppose that each Γ n is a tree with at most 2k vertices and 2k -1 edges. Up to extracting a subsequence, we may assume that the metric graphs Γ n are the same graph Γ but with different lengths l n ij of the edges e ij . We can suppose that for each e ij ∈ E(Γ) l n ij → l ij for some l ij ≥ 0 as n → ∞. We construct the graph Γ from Γ identifying the vertices V i , V j ∈ V (Γ) such that l ij = 0. The graph Γ is a connected metric tree of length l and there is an immersion γ : Γ → R d such that D ⊂ γ( Γ). In fact if {V 1 , . . . V N } are the vertices of Γ, up to extracting a subsequence, we can suppose that for each

as any injective arc-length parametrized curve connecting X i and X j , which exists, since

To prove the theorem, it is enough to check that

Let w n = (w n ij ) ij be the energy function on Γ n . Up to a subsequence, we may suppose that for each i = 1, . . . , N , w n (V i ) → a i ∈ R as n → ∞. Moreover, by Lemma 3.9, we have that if l ij = 0, then a i = a j . On each of the edges e ij ∈ E( Γ), where l ij > 0, we define the function

and so, it is enough to prove that w = (w ij ) ij is the energy function on Γ, i.e. (by Lemma 3.4) that the Kirchoff's law holds in each vertex of Γ. This follows since for each

The proof is then concluded.

The proofs of Theorem 3.8 and Theorem 3.10 suggest that a solution (Γ, V, γ) of the problem (3.8) must satisfy some optimality conditions. We summarize this additional information in the following Proposition. Proposition 3.11. Consider a connected metric graph Γ, a set of vertices V ⊂ V (Γ) and an immersion γ : Γ → R d such that (Γ, V, γ) is a solution of the problem (3.8). Moreover, suppose that all the vertices of degree two are in the set V. Then we have that:

(i) the graph Γ is a tree;

(ii) the set V has exactly k elements, where k is the number of Dirichlet points {D 1 , . . . , D k };

(iii) there is at most one vertex

Proof. It follows by performing the explicit calculations.

Example 4.5. Let D 1 , D 2 and D 3 be the vertices of an equilateral triangle of side 1 in R 2 , i.e.

),

).

We study the problem (3.8) with D = {D 1 , D 2 , D 3 } and l > √ 3. We show that the solutions may have different qualitative properties for different l and that there is always a symmetry breaking phenomena, i.e. the solutions does not have the same symmetries as the initial configuration D. We first reduce our study to the following three candidates (see Figure 9):

1. The metric tree Γ 1 , defined by with vertices

{e 14 , e 24 , e 34 }, where e ij = {V i , V j } and the lengths of the edges are respectively

) and E(Γ) = {e 14 , e 24 , e 34 , e 45 }, where e ij = {V i , V j } and the lengths of the edges l 14 = l 24 = l 34 = 1/ √ 3, l 45 = l -√ 3, respectively. The new vertex V 4 is of Kirchhoff type and V 5 is a Neumann vertex.

The metric tree Γ

The new vertices V 4 and V 5 are of Kirchhoff type and V 6 is a Neumann vertex. Suppose that the metric graph Γ is optimal and has the same vertices and edges as Γ 1 . Without loss of generality, we can suppose that the maximum of the energy function w on Γ is achieved on the edge e 14 . If l 24 = l 34 , we consider the metric graph Γ with the same vertices and edges as Γ and lengths l 14 = l 14 , l 24 = l 34 = (l 24 + l 34 )/2. An immersion γ : Γ → R 2 , such that γ(V j ) = D j , for j = 1, 2, 3 still exists and the energy decreases, i.e. E( Γ; {V 1 , V 2 , V 3 }) < E(Γ; {V 1 , V 2 , V 3 }). In fact, let v = w 24 = w 34 : [0, l 24 +l 34 2 ] → R be an increasing function such that 2|{v ≥ τ }| = |{w 24 ≥ τ }| + |{w 34 ≥ τ }|. By the classical Polya-Szego inequality and by the fact that w 24 and w 34 have no constancy regions, we obtain that J( w 24 ) + J( w 34 ) < J(w 24 ) + J(w 34 ), and so it is enough to construct a function w 14 : [0, l 14 ] → R such that w 14 (l 14 ) = w 24 = w 34 and J( w 14 ) ≤ J(w 14 ). Consider a function such that w ′′ 14 = -1, w 14 (0) = 0 and w 14 (l 14 ) = w 24 (l 2 4) = w 34 (l 34 ). Since we have the inequality w 14 (l 14 ) ≤ w 14 (l 14 ) ≤ max [0,l 14 ] w 14 = max Γ w, we can apply Lemma 4.4 and so, J( w 14 ) ≤ J(w 14 ). Thus, we obtain that l 24 = l 34 and that both the functions w 24 and w 34 are increasing (in particular, l 14 ≥ l 24 = l 34 ). If the maximum of w is achieved in the interior of the edge e 14 then, by Remark 4.2, the edge e 14 must be rigid and so, all the edges must be rigid. Thus, Γ coincides with Γ 1 for some

. If the maximum of w is achieved in the vertex V 4 , then applying one more time the above argument, we obtain

Suppose that the metric graph Γ is optimal and that has the same vertices as Γ 2 . If w = (w ij ) ij is the energy function on Γ with Dirichlet conditions in {V 1 , V 2 , V 3 }, we have that w 14 , w 24 an w 34 are increasing on the edges e 14 , e 24 and e 34 . As in the previous situation Γ = Γ 1 , by a symmetrization argument, we have that l 14 = l 24 = l 34 . Since any level set {w = τ } contains exactly 3 points, if τ < w(V 4 ), and 1 point, if τ ≥ w(V 4 ), we can apply the same technique as in Example 4.1 to obtain that l 14 = l 24 = l 34 = 1 √ 3 . Suppose that the metric graph Γ is optimal and that has the same vertices and edges as Γ 3 . Let w be the energy function on Γ with Dirichlet conditions in {V 1 , V 2 , V 3 }. Since we assume Γ optimal, we have that w 45 is increasing on the edge e 45 and w(V 5 ) ≥ w ij , for any {i, j} = {5, 6}. Applying the symmetrization argument from the case Γ = Γ 1 and Lemma 4.4, we obtain that l 24 = l 34 = x and that the functions w 24 = w 34 are increasing on [0, l 24 ]. Let a ∈ [0, l 15 ] be such that w 15 (a) = w(V 4 ). By a symmetrization argument, we have that necessarily l 15a = l 45 an that w 45 (x) = w 15 (xa). Moreover, the edges e 15 and e 45 are rigid. Indeed, for any admissible immersion γ = (γ ij ) ij : Γ → R 2 , we have that the graph

Proof. Repeating the construction from Theorem 2.7, we can restrict our attention to the class of metric graphs. The thesis follows from Theorem 3.10.

The results from Theorem 2.7 and Theorem 3.10, hold also for other cost functionals as, for example, the first eigenvalue of the Dirichlet Laplacian:

where Γ is a metric graph and V ⊂ V (Γ) is a set of vertices, where a Dirichlet boundary conditions are imposed. Reasoning as in Remark 2.6, we have that among all connected metric graphs (shortly, CMG) of fixed length l and with at least one Dirichlet vertex, the one with the lowest first eigenvalue is given by the segment [0, l], with Dirichlet condition in 0. Moreover, for any pair

) is the graph described in Figure 4, i.e. the solution of (4.1) from Example 4.1. In the case when the set D is given by three points disposed in the vertices of an equilateral triangle, the solutions of (5.4) are quantitatively the same (see Figure 10) as the solutions of (4.5) from Example 4.5. In general, we have the following existence result Theorem 5.3. Consider a set of distinct points D = {D 1 , . . . , D k } ⊂ R d and a positive real number l ≥ St(D). Then there exists a connected metric graph Γ, a set of vertices V ⊂ V (Γ) and an immersion γ : Γ → R d which are solution of the problem (5.4). Moreover, Γ can be chosen to be a tree of at most 2k vertices and 2k -1 edges.

Proof. The proof is identical to the one of Theorem 3.10.

Remark 5.4. The question of existence of an optimal graph is open for general cost functionals J spectral type, i.e. J = F (λ 1 , λ 2 , . . . , λ k , . . . ), where F : R N → R is a real function and λ k is the k-th eigenvalue of the Dirichlet laplacian:

where the minimum is over all k dimensional subspaces K of H 1 0 (Γ). In fact, the crucial point in the proof of Theorem 3.10 is the reduction to the class of connected metric trees with number of vertices bounded by some universal constant. This reduction becomes a rather involved question even for the simplest spectral functionals λ k for k ≥ 2.