dm or n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
DM OR PowerPoint Presentation
Download Presentation
DM OR

Loading in 2 Seconds...

play fullscreen
1 / 28

DM OR - PowerPoint PPT Presentation


  • 170 Views
  • Uploaded on

DM OR. Networks. Graphs : Koenigsberg bridges. Leonard Euler problem (1736). Nodes. Edges. Is there a walk which uses each edge exactly once ?. Build two more bridges . Each such walk has to enter and leave any given node . The degree of any node has to be even .

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'DM OR' - ayoka


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
dm or

DMOR

Networks

graphs koenigsberg bridges
Graphs: Koenigsberg bridges

Leonard Euler problem (1736)

slide8

Euleriancycle

Hamiltonian cycle

Travelling salesman problem

tsp cycle
TSP - cycle

Duration:

2 d 7 h 2 m Length:

3615 km

tsp trail
TSP - trail

Duration:

2 d 4 h 37 m

Length:

3436 km

tsp a real walk
TSP – a real walk

Duration:

29 d 11 h 21 m Length:

3485 km

t ravelling salesman problem tsp
Travelling salesman problem TSP
  • Mathematically
  • Variablexij= 1, ifthesalesmanpassesfromitoj, 0 otherwise
  • Goingfrom one city to the same city isforbidden
  • Isthisall ???
slide14
TSP
  • Isthisall?
  • Let’ssayoursolutionwith 5 citiesisx12=x23=x31=x45=x54=1
  • Itsatisfiesalltheconstraints. But itinvolvessubtours (cyclesinvolvingfewerthanallcities)
  • We need to introduceadditionalconstraints
subtour elimination
Subtourelimination
  • For twocities
  • For threecities
  • For fourcities
  • Etc.
  • In practicalimplementationtoo many constraints: with30 citiestherewould be 870 constraintseliminatingonlysubtours of length 2
subtour eleimination second approach
Subtoureleimination– secondapproach
  • Introducenonnegativevariablesui:
  • Subtoursareeliminated
  • How many suchconstraints?
  • (N-1)2-N, i.e. with30 citiestherewould be 812constraints.
slide18
Game
  • http://www.tsp.gatech.edu/games/index.html
introduction to networks
Introduction to networks
  • Twomainelements:
    • arcs/edges
    • nodes
  • A graphis a structureconsisting of nodes and arcsbewteennodes
  • A directedgraph(a digraph)is a graphinwhicharcshave a givendirection
  • A networkis a graph(ordigraph), inwhicharcshave a flowassigned to it
  • Simple examples:
introduction to networks1
Introduction to networks
  • Chainis a sequence of arcsconnectingtwonodesiandj, e.g.figure on theright: ABCE, ADCE
  • Pathis a sequence of directedarcsconnectingtwonodes , e.g. figure on therightABDE, but not ABCE
  • Cycle is a chain, whichconnects a nodewiththe same nodewithoutanyrepetition (retracing) e.g. figure on therightABCEDA, but not ABCDECBA
  • Connectedgraph/network hasonly one part

Graph

Directedgraph

introduction to networks2
Introduction to networks
  • Tree – a connectedgraphwhichdoes not havecycles.
  • Spanningtreeis a treechosenamongarcsinthegraph so thatallnodesinthetreewereconnected

Twospanningtrees

Twotrees

  • Flowcapacity – upper (sometimesalsolower) limit for theflowat a givenarcinthenetwork, e.g. maximalnumber of cars thatcan pass per minuteat a givenroad
  • Sourceis a nodewhichintroduces a flowintothenetwork
  • Sinkis a nodewhichtakestheflow out of thenetwork
the shortest route problem
The shortest route problem
  • Formulation:For a givengraphinwhicheveryarcisassignedwith a distancebewteenthetwonodesitconnects, whatistheshortestpathbetweennode i and j.
  • Example: Whatistheshortestroutebewteen A and H?

Enumeration – impractical

Dijkstraalgorithm

dijkstra algorithm
Dijkstraalgorithm

http://optlab-server.sce.carleton.ca/POAnimations2007/DijkstrasAlgo.html

m inimum spanning tree
Minimum spanning tree
  • Formulation:For a givengraph, inwhicheveryarcisassignedwith a distancebetweenthetwonodesitconnects, find a spanningtreethathasminimaltotallength.
  • Example: Findminimallength for a wirethatconnectsalltheofficesinthebuildingwhenalltheavailablewirepathsaregiven.
  • Algorithm:

http://optlab-server.sce.carleton.ca/POAnimations2007/MinSpanTree.html

An example of the so calledgreedy algorithm –itdoeswhat’sbestin a given step not lookingattheotherstages of the problem (usuallyineffective – hereitiseffective!)

One can do a maximalspanningtreethe same way

m aximum flow and the minimum cut
Maximum flow and the minimum cut
  • Formulation:Whatisthemaximalflowbetweentwogivennodesin a graph? Eachnodeisassignedwith a maximalflow.
  • Example: Find a maximalflow of cars from an underground parking lot downtown to themotorwayentrance.
  • Eacharcisassignedwith a maximalsimultaneousflowbetweenthetwonodesitconnects
    • Maximalflowmaydifferdepending on theflowdirection (e.g. one-waystreets)

Examplesolution:

4 cars/m on route A-D-E-G

3 cars/m ojnroute A-B-E-G

4 cars/m on route A-C-F-G

Total flowbetween A and G is11 cars/m

Isthisoptimal???

m aximum flow and the minimum cut1
Maximum flow and the minimum cut
  • Algorithm: Ford and Fulkerson (Canadian Journal of Mathematics 1956)

http://optlab-server.sce.carleton.ca/POAnimations2007/MaxFlow.html

maximum flow minimum cut
Maximumflow/minimum cut
  • In Ford Fulkersonalgorithm, why do we need to addflowintheoppositedirection?
    • Accountingconventionthatkeepstrack of theflowthat, ifnecessary, can be reversed.
maximum flow minimum cut1
Maximumflow/minimum cut
  • Maximumflowiscloselyrelated to minimum cut:
    • A cutin a graphis a set of directedarcswhichcontainsatleast one arcineverypossiblepathfromthesource to thesink. If we removearcsfrom a givencut, theflowfromthesource to thesink will no longer be possible.
    • Cutvalueisthe sum of allflowcapacities (directionfromthesource to thesink) for eacharcin a cut.
  • Possiblecutswithcutvaluesindicated on them