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

Loading in 2 Seconds...

play fullscreen
1 / 28

DM OR - PowerPoint PPT Presentation

  • 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 .

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


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



graphs koenigsberg bridges
Graphs: Koenigsberg bridges

Leonard Euler problem (1736)



Hamiltonian cycle

Travelling salesman problem

tsp cycle
TSP - cycle


2 d 7 h 2 m Length:

3615 km

tsp trail
TSP - trail


2 d 4 h 37 m


3436 km

tsp a real walk
TSP – a real walk


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 ???
  • Isthisall?
  • Let’ssayoursolutionwith 5 citiesisx12=x23=x31=x45=x54=1
  • Itsatisfiesalltheconstraints. But itinvolvessubtours (cyclesinvolvingfewerthanallcities)
  • We need to introduceadditionalconstraints
subtour elimination
  • 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.
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



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



  • 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


dijkstra algorithm

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

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)


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


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

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