ebook img

Graph Partitioning with AMPL PDF

26 Pages·2009·0.43 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Graph Partitioning with AMPL

GraphPartitioningwithAMPL Graph Partitioning with AMPL Antonio Mucherino Laboratoried’Informatique,ÉcolePolytechnique CourseonOperationsResearch (ISC610A) SemesterI- 2008/09 TD5-December4th 2008 GraphPartitioningwithAMPL Graphpartitioning Introduction Recalling some definitions: Clustering Wealreadyknowwhataclusteringproblemis. LetX beasetofsampleswhosepartitionisunknown. Letussupposethatthereisnopreviousknowledgeaboutthe data(notrainingsetisavailable). Definition Clusteringisaimedatfindingapartition{C ,C ,...,C }ofthesetof 1 2 K data,suchthat K X = C, ∀i,j|1≤i <j ≤K C ∩C =∅. i i j i[=1 Eachclusterrepresentsasubsetoffeaturesofthesamplesthat itcontains. GraphPartitioningwithAMPL Graphpartitioning Introduction Recalling some definitions: Graph Wealreadyknowwhatagraphis. Definition AgraphisanorderedpairG =(V,E)comprisingasetV ofvertices ornodestogetherwithasetE ofedgesorlinks,whichare2-element subsetsofV. Undirectedgraph: agraphinwhichedgeshavenoorientation. DirectedgraphorDigraph: agraphG =(V,A),whereAisa setoforderedpairsofvertices,evencalledarcsordirected edges. Weightedgraph: agraphinwhichnumbers(weights)are assignedtoeachedge. Itcanbedirectedandundirected. Itis denotedbyG =(V,E,w)orG =(V,A,w),wherew represents theweights. GraphPartitioningwithAMPL Graphpartitioning Introduction Recalling some definitions: Graph partitioning Definition Graphpartitioning istheclusteringproblemoffindingasuitable partitionofasetofdatarepresentedthroughagraphG. EachclusterisasubgraphofthegraphG,i.e. asubsetofits vertices. Intuitively,thebestpartitionistheonethatseparatessparsely connecteddensesubgraphsfromeachother. sparselyconnected: thenumberofedgesbetweenvertices belongingtodifferentclustersisminimal. dense: thenumberofedgesbetweenverticesbelongingtothe sameclusterismaximum. GraphPartitioningwithAMPL Graphpartitioning Mathematicalformulation Formulating an optimization problem Howcanwesolveagraphpartitioningproblem? Weneedtofindapartitioninclustersofaweightedundirected graphG=(V,E,c),where V isthesetofverticesofG, E isthesetofedgesofG, c isthesetofweightseventuallyassignedtotheedges. Thisproblemcanbeformulatedasaglobaloptimization problem. Wewantthenumberofedgesbetweenverticesbelonging to differentclusterstobeminimal. Therefore,weneedtosolveaminimizationproblem,subjecttoa certainnumberofcontraints. WewillsolvethisproblembyCPLEX/AMPL. GraphPartitioningwithAMPL Graphpartitioning Mathematicalformulation Parameters and Variables Parameters V,setofverticesofG E,setofedgesofG c,setofweightsofG K,numberofdesiredclustersinthepartition Variables x ,binary,indicatesifthevertexu iscontainedinto uk theclusterk ≤K: 1 ifu ∈kthcluster x = uk (cid:26) 0 otherwise GraphPartitioningwithAMPL Graphpartitioning Mathematicalformulation Objective function Whatdoweneedtominimize? Wewantthetotalweightsoftheedgesbetweendifferent clusterstobeasminimumaspossible: Thinkitout: youshouldbeabletogiveananswerwithin1 minute! GraphPartitioningwithAMPL Graphpartitioning Mathematicalformulation Objective function Whatdoweneedtominimize? Wewantthetotalweightsoftheedgesbetweendifferent clusterstobeasminimumaspossible: 1 min c x x 2 uv uk vl k6=Xl≤K(uX,v)∈E Thinkitout: youshouldbeabletogiveananswerwithin1 minute! GraphPartitioningwithAMPL Graphpartitioning Mathematicalformulation Constraints ConstraintI Eachvertexmustbeassignedtoonlyonecluster: ∀u ∈V x =1 uk kX≤K ConstraintII Thetrivialsolution(allthevertecesintoonecluster)mustbe excluded: ∀k ∈K x ≥1 uk uX∈V GraphPartitioningwithAMPL Graphpartitioning Mathematicalformulation Constraints ConstraintIII (ingeneral,optional) Eachclustercannotexceedacertaincardinality: ∀k ≤K x ≤C uk uX∈V ConstraintIV (ingeneral,optional) Verticeshavingdifferentcolorcannotbeclusteredtogether: ∀u 6=v ∈V, k 6=l ≤K, x x ≤γ uk vl uv where 1 ifuandvhavethesamecolor γ = uv (cid:26) 0 otherwise

Description:
Graph Partitioning with AMPL Graph partitioning Introduction Recalling some definitions: Clustering We already know what a clustering problem is.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.