The Scenario The Algorithms Neto The Experiments Conclusions
A FIRST ATTEMPT ON THE DISTRIBUTED PRIZE
COLLECTING STEINER TREE PROBLEM
Niccolo’ G. Rossetti
School of Engineering and Natural [email protected]
Master Thesis defence - August 2015
The Scenario The Algorithms Neto The Experiments Conclusions
OUTLINE
1 THE SCENARIO
2 THE ALGORITHMSRooted Tree AlgorithmUnrooted Tree AlgorithmMST-Heuristic
3 NETO
4 THE EXPERIMENTS
5 CONCLUSIONS
The Scenario The Algorithms Neto The Experiments Conclusions
OUTLINE
1 THE SCENARIO
2 THE ALGORITHMSRooted Tree AlgorithmUnrooted Tree AlgorithmMST-Heuristic
3 NETO
4 THE EXPERIMENTS
5 CONCLUSIONS
The Scenario The Algorithms Neto The Experiments Conclusions
THE CENTRALIZED SCENARIO
Image from: renewableenergymexico.com
The Scenario The Algorithms Neto The Experiments Conclusions
DEFINITION OF THE PROBLEM
NET-WORTH
NW (T ′) =∑v∈V ′
p(v)−∑e∈E ′
w(e)
EQUIVALENT IN OPTIMIZATION
GW (T ′) =∑v /∈V ′
p(v) +∑e∈E ′
w(e)
Notwithstanding the simple definition, the problem isNP-complete to solve.
The Scenario The Algorithms Neto The Experiments Conclusions
THE CENTRALIZED ALGORITHMS
THE CLASSICAL GW-ALGORITHM
It is a 2-approx of the optimal solution
OTHER ALGORITHMS
Further studies outperformed the GW-algorithm by using:different formulations of the mathematical problemheuristics
These algorithms are good in a centralized setting but...
The Scenario The Algorithms Neto The Experiments Conclusions
THE DISTRIBUTED SCENARIO
Image from: www.tcpipguide.com/free/diagrams/mobileiptunneling.png
The Scenario The Algorithms Neto The Experiments Conclusions
OUR DISTRIBUTED MODEL
nodes are independent computing entitiesnodes have only local knowledgenodes can communicate through messagesmessages are assumed to arrive at destination in finitetimeno global clockevery node in the network executes the given algorithmno failures or byzantine behaviourfocus on the message complexity: assume nodecomputation to be instantaneous
The Scenario The Algorithms Neto The Experiments Conclusions
OUTLINE OF MY WORK
To our knowledge, the distributed PCST has never beenaddressed in literature
WHAT I DID
Designed a distributed implementation of the GW-algorithmDesigned an optimal distributed algorithm for the PCST ontreesDesigned a distributed MST-based heuristicImplemented Neto: a Python framework to experimentdistributed algorithmsExperimented the MST-based heuristic with Neto
The Scenario The Algorithms Neto The Experiments Conclusions
OUTLINE
1 THE SCENARIO
2 THE ALGORITHMSRooted Tree AlgorithmUnrooted Tree AlgorithmMST-Heuristic
3 NETO
4 THE EXPERIMENTS
5 CONCLUSIONS
The Scenario The Algorithms Neto The Experiments Conclusions
ROOTED TREE ALGORITHM (RTA)
∀child if prize(child)−weight(child , self ) ≤ 0 then : prune(child)
The Scenario The Algorithms Neto The Experiments Conclusions
RTA (CONTINUED)
FIRST CONTRIBUTION
Also known as Strong Pruning (centralized) forpost-processingContribution: adapt it to the distributed model
COMPLEXITY
Exactly: 2E messages and 2 ∗ height time (if mex time = 1)
NAIVE UNROOTED APPROACH
Repeat RTA on every node as root and select the bestsolutionWorks better in centralized computationIt can be optimized
The Scenario The Algorithms Neto The Experiments Conclusions
UNROOTED TREE ALGORITHM (UTA)
TWO PHASES
1 Every node finds out the NW value of its rooted tree2 Find and build the best solution
The Scenario The Algorithms Neto The Experiments Conclusions
UTA (CONTINUED)
COMPLEXITY
Still linear as in RTA because it is based on a number ofconvergecasts and broadcasts
SECOND CONTRIBUTION
To our knowledge, no previous Strong Pruning for unrootedvariantUTA easily adapts to centralized computationProof of correctness
The Scenario The Algorithms Neto The Experiments Conclusions
MST-BASED HEURISTIC
THE IDEA
With UTA we can solve to optimality the distributed PCSTon treesGiven a general graph, build a tree and let UTA optimize itAny tree could work, which to build?
THE MIMINUM SPANNING TREE (MST)We chose the MST because:
Minimizes one of the components of the PCST definition(the edge costs)Distributed implementations existWorks well with similar problems
The Scenario The Algorithms Neto The Experiments Conclusions
MST-BASED HEURISTIC
THE IDEA
With UTA we can solve to optimality the distributed PCSTon treesGiven a general graph, build a tree and let UTA optimize itAny tree could work, which to build?
THE MIMINUM SPANNING TREE (MST)We chose the MST because:
Minimizes one of the components of the PCST definition(the edge costs)Distributed implementations existWorks well with similar problems
The Scenario The Algorithms Neto The Experiments Conclusions
MST-BASED HEURISTIC (CONTINUED)
The combination of the MST and UTA is an heuristics and itcannot guarantee the quality of the provided result!
We need to verify how it performs through experiments
The Scenario The Algorithms Neto The Experiments Conclusions
OUTLINE
1 THE SCENARIO
2 THE ALGORITHMSRooted Tree AlgorithmUnrooted Tree AlgorithmMST-Heuristic
3 NETO
4 THE EXPERIMENTS
5 CONCLUSIONS
The Scenario The Algorithms Neto The Experiments Conclusions
NETO
WHAT IS NETO FOR?Simulation and theoretical study of distributed algorithmsAlgorithmic level: no TCP/IP etc protocolsPython and its libraries (SimPy and networkx)Event-driven
SIMILAR TO
ComplexNetworkSim uses same tools, but it’s notdesigned for distributed modelPymote works with same model, with focus on wirelessnetworksPymote might be good for us, but it was published whenwe had already Neto working
The Scenario The Algorithms Neto The Experiments Conclusions
NETO (CONTINUED)
THE IDEA
User implements his event-driven algorithm: handlers,helper functionsBuild the graph (networkx)Easily register the Algorithm on nodes (as plug-and-play)Algorithm composition
N.register([my_algorithm(N)])
The Scenario The Algorithms Neto The Experiments Conclusions
NETO (CONTINUED)
HOW IT WORKS INSIDE
Neto nodes implement a dispatcher and incoming queueIf queue is not empty, the dispatcher delivers messages toregistered algorithms in FIFO orderNo preemptive, algorithms decide when to give controlback to dispatcherSimPy decides which node to simulate
THIRD CONTRIBUTION
Neto constitutes our third result as it proved to serve well duringour experiments!
The Scenario The Algorithms Neto The Experiments Conclusions
OUTLINE
1 THE SCENARIO
2 THE ALGORITHMSRooted Tree AlgorithmUnrooted Tree AlgorithmMST-Heuristic
3 NETO
4 THE EXPERIMENTS
5 CONCLUSIONS
The Scenario The Algorithms Neto The Experiments Conclusions
EXPERIMENTAL SETUP
We run the MST-based heuristic against set of instancesfrom literature for which opt is knownThe instances are taken from real (pipeline/cable) scenarioor built to reflect the same topologyUp to thousands of nodes and tens of thousands of edgesWe also created new instances with typical networktopologies (grid and scale-free)
Encouraging results!
The Scenario The Algorithms Neto The Experiments Conclusions
EXPERIMENTAL RESULTS
FIGURE: Probably the worst serie
The Scenario The Algorithms Neto The Experiments Conclusions
OUTLINE
1 THE SCENARIO
2 THE ALGORITHMSRooted Tree AlgorithmUnrooted Tree AlgorithmMST-Heuristic
3 NETO
4 THE EXPERIMENTS
5 CONCLUSIONS
The Scenario The Algorithms Neto The Experiments Conclusions
SUMMARY OF FINDINGS
We defined and studied a novel variant of the PCST1 RTA (adapted Strong Pruning to distributed model)2 UTA (first Strong Pruning alike optimized for unrooted
PCST)3 Neto4 MST-based heuristic is to our knowledge the first alg for the
dPCST and returns solutions comparable to GW
The Scenario The Algorithms Neto The Experiments Conclusions
FUTURE WORKS
FUTURE WORKS ON THE DPCSTHeuristic with other tree builder instead of MSTAnt Colony OptimizationFurther studies on how to parallelize the resolution of theproblem
FUTURE WORKS ON NETO
Python 3 and SimPy 3 compatibilityGUIFurther development on algorithm composition andrequirements
The Scenario The Algorithms Neto The Experiments Conclusions
THANKS EVERYBODY AND IN PARTICULAR TO
Pall Melsted for the suggestions and patient reviewsHelmut Neukirchen for his interesting commentsKristjan Jonasson for his swift helpsMagnus M. Halldorsson in advanceYimir Vigfusson for the incipit and initial part of the thesis