Upcoming SlideShare
×

# A Markov Chain Monte Carlo approach to the Steiner Tree Problem in water network optimization

762 views

Published on

A seminar about water network optimization via MCMC I gave in January at AIRO Winter 09

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

Views
Total views
762
On SlideShare
0
From Embeds
0
Number of Embeds
11
Actions
Shares
0
17
0
Likes
0
Embeds 0
No embeds

No notes for slide

### A Markov Chain Monte Carlo approach to the Steiner Tree Problem in water network optimization

1. 1. Minimal water networks serving a farm district A Metropolis algorithm for the Steiner Tree Problem Carlo Lancia, Alessandro Checco University of Rome TorVergata Cortina D’Ampezzo, January 28, 2009 Carlo Lancia, Alessandro Checco Minimal Water Networks
2. 2. Outline 1 A Model for the Shortest Network Problem Farm Districts and Water Networks The Minimal Steiner Tree Problem 2 Metropolis Algorithm The Statistical Mechanics approach to Optimization Markov Chain Monte Carlo for the Steiner Tree Problem 3 Numerical Data and Conclusions Numerical Comparison with Primal-Dual Conclusions Carlo Lancia, Alessandro Checco Minimal Water Networks
3. 3. A Model for the Shortest Network Problem Farm Districts and Water Networks Introduction Deﬁnition A farm district is a set of neighboring farmlands Deﬁnition A water network is a set of pipes bringing water to the lands Constraints We look for the minimal water network such that Its pipes lie on land boundaries only, so no land bridging It does reach at least a corner of each land boundary Carlo Lancia, Alessandro Checco Minimal Water Networks
4. 4. A Model for the Shortest Network Problem Farm Districts and Water Networks Modeling the District It is very difﬁcult to model the shortest network problem on the graph induced by the district topology. Graph induced by the district Carlo Lancia, Alessandro Checco Minimal Water Networks
5. 5. A Model for the Shortest Network Problem Farm Districts and Water Networks Modeling the District We do prefer to work on a slightly different graph. =Steiner Nodes; =Distribution Node; =Terminal Nodes Creation of a new graph G Carlo Lancia, Alessandro Checco Minimal Water Networks
6. 6. A Model for the Shortest Network Problem The Minimal Steiner Tree Problem Water Networks and Steiner Trees Water networks are equivalent to Steiner Trees on G: Example Carlo Lancia, Alessandro Checco Minimal Water Networks
7. 7. A Model for the Shortest Network Problem The Minimal Steiner Tree Problem Water Networks and Steiner Trees Water networks are equivalent to Steiner Trees on G: Example Carlo Lancia, Alessandro Checco Minimal Water Networks
8. 8. A Model for the Shortest Network Problem The Minimal Steiner Tree Problem The Shortest Network Problem Some Notation We call VS the set of Steiner nodes, VT the set of Terminals A Steiner Tree is any tree T ⊂ G spanning VT The cost vector c E → R+ is such that c(u) = c(v) for ﬁctitious edges u, v situated in the same land ﬁctitious-edge cost is comparable with regular-edge cost Formulation as Minimal Steiner Tree Problem On graph G a water network serving the district is a Steiner Tree, so what we are looking for is the shortest Steiner Tree having root in , with the additional requirement of terminal nodes being leaf nodes (no land crossings allowed) Carlo Lancia, Alessandro Checco Minimal Water Networks
9. 9. A Model for the Shortest Network Problem The Minimal Steiner Tree Problem The Shortest Network Problem Some Notation We call VS the set of Steiner nodes, VT the set of Terminals A Steiner Tree is any tree T ⊂ G spanning VT The cost vector c E → R+ is such that c(u) = c(v) for ﬁctitious edges u, v situated in the same land ﬁctitious-edge cost is comparable with regular-edge cost Minimal Steiner Tree Problem – NP-hard min ∑ c(x) T ⊂G x ∈ E(T ) s.t. VT ⊂ V (T ) deg(v) = 1 ∀ v ∈ VT Carlo Lancia, Alessandro Checco Minimal Water Networks
10. 10. Metropolis Algorithm The Statistical Mechanics Approach The Statistical Mechanics Approach Optimization Problem Many Particles System Problem instance Particles conﬁguration Cost function, f (ξ) Hamiltonian, H(ξ) Optimal solutions Ground states Carlo Lancia, Alessandro Checco Minimal Water Networks
11. 11. Metropolis Algorithm The Statistical Mechanics Approach The Statistical Mechanics Approach Optimization Problem Many Particles System Problem instance Particles conﬁguration Cost function, f (ξ) Hamiltonian, H(ξ) Optimal solutions Ground states Carlo Lancia, Alessandro Checco Minimal Water Networks
12. 12. Metropolis Algorithm The Statistical Mechanics Approach The Statistical Mechanics Approach Optimization Problem Many Particles System Problem instance Particles conﬁguration Cost function, f (ξ) Hamiltonian, H(ξ) Optimal solutions Ground states Carlo Lancia, Alessandro Checco Minimal Water Networks
13. 13. Metropolis Algorithm The Statistical Mechanics Approach The Statistical Mechanics Approach Optimization Problem Many Particles System Problem instance Particles conﬁguration Cost function, f (ξ) Hamiltonian, H(ξ) Optimal solutions Ground states Carlo Lancia, Alessandro Checco Minimal Water Networks
14. 14. Metropolis Algorithm The Statistical Mechanics Approach The Statistical Mechanics Approach Optimization Problem Many Particles System Problem instance Particles conﬁguration Cost function, f (ξ) Hamiltonian, H(ξ) Optimal solutions Ground states All we need is a sampling algorithm e−β H(ξ) When β → ∞ Gibbs distribution is concentrated on Z ground states, that is to say optimal conﬁgurations Carlo Lancia, Alessandro Checco Minimal Water Networks
15. 15. Metropolis Algorithm The Statistical Mechanics Approach MCMC Sampling Let Ω be the set of all Steiner trees over G Deﬁne a Markov chain (Xt ) on Ω that is ergodic with limit measure equal to Gibbs distribution Sampling Algorithm 1 Follow the evolution of the chain for a very long time τ 2 Return min {Xt } t∈[0,τ ] Carlo Lancia, Alessandro Checco Minimal Water Networks
16. 16. Metropolis Algorithm The Statistical Mechanics Approach MCMC Sampling Let Ω be the set of all Steiner trees over G Deﬁne a Markov chain (Xt ) on Ω that is ergodic with limit measure equal to Gibbs distribution Sampling Algorithm 1 Follow the evolution of the chain for a very long time τ 2 Return min {Xt } t∈[0,τ ] Carlo Lancia, Alessandro Checco Minimal Water Networks
17. 17. Metropolis Algorithm MCMC for the Steiner Tree Problem Cooking Up An Appropriate Markov Chain Target e−β H(ξ) We want a chain which limit measure is π(ξ) = Z Transition Probabilities Metropolis rule allow us to design a chain that is reversible with respect to Gibbs distribution π(η) P (ξ, η) = min π(ξ) , 1 = exp{−β [H(η) − H(ξ)]+ } Such design strategy is very general and independent of the functional form of Hamiltonian Carlo Lancia, Alessandro Checco Minimal Water Networks
18. 18. Metropolis Algorithm MCMC for the Steiner Tree Problem Which Hamiltonian? It is quite natural to choose the Hamiltonian as the cost function of the problem, that is the length of tree ξ H(ξ) = c(x) x∈ξ Upgrading the Hamiltonian We rather prefer to work with the following Hamiltonian function H(ξ) = c(x) + h (deg(v) − 1) x∈ξ v∈VT where the second sum is extended to all terminal vertices. Carlo Lancia, Alessandro Checco Minimal Water Networks
19. 19. Metropolis Algorithm MCMC for the Steiner Tree Problem Which Hamiltonian? Land Bridging Penalties Employing this Hamiltonian, Steiner trees crossing one or more lands have energy proportional to h. When temperature is low and h is large such conﬁgurations are nearly never sampled. Upgrading the Hamiltonian We rather prefer to work with the following Hamiltonian function H(ξ) = c(x) + h (deg(v) − 1) x∈ξ v∈VT where the second sum is extended to all terminal vertices. Carlo Lancia, Alessandro Checco Minimal Water Networks
20. 20. Metropolis Algorithm MCMC for the Steiner Tree Problem Chain Evolution At time t denote current tree by Xt . Select an edge x ∈ E(G) u.a.r., then set Xt+1 according to the following rule: Current tree Carlo Lancia, Alessandro Checco Minimal Water Networks
21. 21. Metropolis Algorithm MCMC for the Steiner Tree Problem Chain Evolution Selected edge is the red one. Removing body edges from the tree would result in two separate components ⇒ Xt+1 = Xt Body edges are not removed from current tree Carlo Lancia, Alessandro Checco Minimal Water Networks
22. 22. Metropolis Algorithm MCMC for the Steiner Tree Problem Chain Evolution Adding edges non-adjacent to current tree would result in two separate components ⇒ Xt+1 = Xt Separate edges are not added to current tree Carlo Lancia, Alessandro Checco Minimal Water Networks
23. 23. Metropolis Algorithm MCMC for the Steiner Tree Problem Chain Evolution When edge x connects a terminal leaf to current tree we set Xt+1 = Xt not to compromise solution feasibility Branch edges connecting terminal leaves are never removed Carlo Lancia, Alessandro Checco Minimal Water Networks
24. 24. Metropolis Algorithm MCMC for the Steiner Tree Problem Chain Evolution If x connects a steiner leaf to current tree we cut it out and set Xt+1 = Xt {x} Branch edges connecting steiner leaves are always removed Carlo Lancia, Alessandro Checco Minimal Water Networks
25. 25. Metropolis Algorithm MCMC for the Steiner Tree Problem Chain Evolution If edge x is adjacent to current tree we may add it. We set Xt+1 = Xt ∪ {x} with probability exp{−β c(x)} Edges adjacent to current tree may be added to it Carlo Lancia, Alessandro Checco Minimal Water Networks
26. 26. Metropolis Algorithm MCMC for the Steiner Tree Problem Chain Evolution In case adding x to the tree results in a land crossing we set Xt+1 = Xt ∪ {x} with probability exp{−β(c(x) + h)} Attention must be paid to land crossing and penalty applied Carlo Lancia, Alessandro Checco Minimal Water Networks
27. 27. Metropolis Algorithm MCMC for the Steiner Tree Problem Chain Evolution When adding x to the tree would result in a loop we observe the following procedure which removes the cycle: Edges introducing a loop may be added by swap procedure Carlo Lancia, Alessandro Checco Minimal Water Networks
28. 28. Metropolis Algorithm MCMC for the Steiner Tree Problem Chain Evolution We select uniformly at random an edge y of the loop adjacent to x, then swap x and y with probability exp{−β [c(x) − c(y)]+ } Edges introducing a loop may be added by swap procedure Carlo Lancia, Alessandro Checco Minimal Water Networks
29. 29. Metropolis Algorithm MCMC for the Steiner Tree Problem Chain Evolution We select uniformly at random an edge y of the loop adjacent to x, then swap x and y with probability exp{−β [c(x) − c(y)]+ } Swap procedure: edge (+) is added and (–) is removed Carlo Lancia, Alessandro Checco Minimal Water Networks
30. 30. Metropolis Algorithm MCMC for the Steiner Tree Problem Chain Evolution In case adding x to the tree results in a land crossing loop swap procedure must be performed more carefully: Attention must be paid to possible land crossing Carlo Lancia, Alessandro Checco Minimal Water Networks
31. 31. Metropolis Algorithm MCMC for the Steiner Tree Problem Chain Evolution Interchanging edges may lead to a land crossing, in such cases we swap x and y with probability exp{−β [c(x) − c(y) + h]+ } Swapping must be penalised if it leads to a land bridging Carlo Lancia, Alessandro Checco Minimal Water Networks
32. 32. Metropolis Algorithm MCMC for the Steiner Tree Problem Chain Evolution Interchanging edges may lead to a land crossing, in such cases we swap x and y with probability exp{−β [c(x) − c(y) + h]+ } Swapping (+) and (–) leads to bridging ⇒ penalty imposed Carlo Lancia, Alessandro Checco Minimal Water Networks
33. 33. Metropolis Algorithm MCMC for the Steiner Tree Problem Chain Ergodicity The chain we have just described is found to be irreducible and aperiodic It has a unique stationary distribution, namely Gibbs one e−β H(η) lim P t (ξ, η) = t→∞ Z Proving irreducibility Swap procedure grants that the chain can move from a Steiner tree to another, stepping through feasible solutions only Carlo Lancia, Alessandro Checco Minimal Water Networks
34. 34. Numerical Data and Conclusions Numerical Comparison with Primal-Dual Numerical Comparison with Primal-Dual Both Metropolis and Primal-Dual procedure were implemented in Fortran 90 and run on a 1.6 GHz Intel Dual Core Processor Shortest Network Length (km) Metropolis Primal-Dual Test District #1 4,288 5,867 Test District #2 6,052 7,123 Test District #3 6,588 9,353 Test District #4 16,359 20,378 Test District #5 5,131 6,660 Test District #6 8,123 10,176 Test District #7 16,044 22,222 Carlo Lancia, Alessandro Checco Minimal Water Networks
35. 35. Numerical Data and Conclusions Numerical Comparison with Primal-Dual Numerical Comparison with Primal-Dual Algorithm Execution Time (sec) lands edges Metropolis Primal-Dual T-D #1 110 909 8 58 T-D #2 132 1091 11 62 T-D #3 201 1670 16 71 T-D #4 458 3858 23 380 T-D #5 169 1413 15 66 T-D #6 274 2450 20 75 T-D #7 605 5117 38 744 Total runtime 131 1456 Carlo Lancia, Alessandro Checco Minimal Water Networks
36. 36. Numerical Data and Conclusions Numerical Comparison with Primal-Dual Test District #1 - Primal Dual Carlo Lancia, Alessandro Checco Minimal Water Networks
37. 37. Numerical Data and Conclusions Numerical Comparison with Primal-Dual Test District #1 - Metropolis Carlo Lancia, Alessandro Checco Minimal Water Networks