Upload
others
View
15
Download
0
Embed Size (px)
Citation preview
Lookatthefollowingpicture.Thisisarepresentationofastreetnetwork.Thebluedotsrepresentparkingmeters.Makeagraphicalrepresentationofthisstreetnetwork.Notethatanysidewalkswithoutparkingmetersarenotrepresentedbyedgesbecausethosestreetsarenotnecessaryinournetwork.Verticesshouldrepresentstreetintersections.
DoesthisnetworkhaveanEulerCircuit?DoesthisnetworkhaveanEulerPath?WhywouldanEulerPathnotbeoptimalforthisspecificproblemaboutparkingmeters?
Et start*
*
End
no
yes ↳ Found.SE#ttopedD9Ffret
Don't end upback at
my ca
Sowhatisthebestrouteforcollectingthemoneyfromthemeters?Canyoumakeacircuitforthisgraph?(rememberacircuitjuststartsandendsatthesameplace,itcanpassthesameedgemorethanonce)
Isthereawaytoaddonlyafew(oronly1)edgetomakethisintoanEulercircuit?
¥*
)*
Byaddingjustoneedge,wecanmakeanEulercircuit,butnote,theedgeisnotreallynew,itisjustreused
Whatwejustdidiscalledeulerizingagraph.• Wetookagraphandaddededgesbyduplicatingexistingedgestomakeaconnectedevenvalentgraph
• WefoundanEulercircuitontheeulerizedgraph
EulerizingaGraph—addingedgesthatduplicateexistingedgestoaconnectedgraphtomakeallvalenceseven.
Goal → make m Euler Circuit
EulerizingaGraphExample:1) locatetheverticeswithoddvalence
2
3z
2
2) addoneendofanedgeateachoddvertex,matchupthenewedgewithanexistingedgeintheoriginalgraph
duplicated
124fdplicafd
→
•
31
$44
z.
3) createanEulercircuit
4) “Squeeze”theEulercircuitontotheoriginalgraph.Notethattherewillbetworeusesofedgesandeachreusecorrespondstoanaddededge
GeneralRule:Thenumberofreusesofedgesequalsthenumberofaddededgesduringeulerization
Howdowefindthebesteulerization?Didwefindthemostefficientpathforthelastgraph?
Isthereawaywherewecanhaveonlyonereuseinsteadoftwo?
.
Optimal colorization
$-4
Obviouslyonereusededgeisbetterthantwo.Sothisisabettereulerization.Thereisanalgorithmtofindthebesteulerization,butitisacomplicatedalgorithmthatwearenotgoingtoexamine.