Mathematical Aspects of Public Transportation Networks

Niels Lindner

July 9, 2018

July 9, 2018 1 / 48 Reminder Dates

I July 12: no tutorial (excursion)

I July 16: evaluation of Problem Set 10 and Test Exam

I July 19: no tutorial

I July 19/20: block seminar on shortest paths

I August 7 (Tuesday): 1st exam

I October 8 (Monday): 2nd exam

Exams

I location: ZIB seminar room

I start time: 10.00am

I duration: 60 minutes

I permitted aids: one A4 sheet with notes

July 9, 2018 2 / 48 Chapter 6 Metro Map Drawing

§6.1 Metro Maps

July 9, 2018 3 / 48 §6.1 Metro Maps Berlin, 1921 (Pharus-Plan)

alt-berlin.info July 9, 2018 4 / 48 §6.1 Metro Maps Berlin, 1913 (Hochbahngesellschaft)

Sammlung Mauruszat, u-bahn-archiv.de July 9, 2018 5 / 48 §6.1 Metro Maps Berlin, 1933 (BVG)

Sammlung Mauruszat, u-bahn-archiv.de July 9, 2018 6 / 48 §6.1 Metro Maps London, 1926 ()

commons.wikimedia.org July 9, 2018 7 / 48 §6.1 Metro Maps London, 1933 (Harry Beck)

July 9, 2018 8 / 48 §6.1 Metro Maps Plaque at Central station

Nick Cooper, commons.wikimedia.org July 9, 2018 9 / 48 §6.1 Metro Maps Berlin, 1968 (BVG-West)

Sammlung Mauruszat, u-bahn-archiv.de July 9, 2018 10 / 48 §6.1 Metro Maps Berlin, 2018 (BVG)

Wittenberge RE6 RB55 Kremmen Stralsund/Rostock RE5 RB12 Templin Stadt Groß Schönebeck (Schorfheide) RB27 Stralsund/Schwedt (Oder) RE3 RE66 Szczecin (Stettin) RB24 Eberswalde Legende Barrierefrei durch Berlin Key to symbols Step-free access

Sachsenhausen (Nordb) RB27 Schmachtenhagen 7 6 S-Bahn-/U-Bahn : Aufzug Oranienburg 1 RB20 : Wandlitzsee urban rail/underground lift Vehlefanz Rüdnitz Berlin Lehnitz RB27 Wensickendorf RE1 Wandlitz RE1 RB22 Bahn-Regionalverkehr Rampe Bärenklau Borgsdorf Bernau 2 : RB22 regional rail ramp Basdorf Birkenwerder 8 : Zühlsdorf : Einige Linien halten nicht überall : nur zur S-Bahn Velten (Mark) Hohen Neuendorf West RB20 RE5.RB12 Bernau-Friedenstal Schönwalde (Barnim) Some trains do not stop at all stations only to urban rail RB2 Zepernick : Flughafen : Hennigsdorf bE RB55 : :Hohen Neuendorf Bergfelde : Schönfließ Mühlenbeck-Mönchmühle 7 Schönerlinde 0A nur zur U-Bahn Röntgental : airport only to underground Heiligensee : :Frohnau Fernbahnhof : bF : Buch : nur zum Bahn-Regionalverkehr : :Hermsdorf Waidmannslust mainline station only to regional rail Schulzendorf Karow RB27 : Wittenau 8 : ZOB Zentraler Omnibusbahnhof :Rathaus Reinickendorf bus terminal : Tegel : : Wilhelmsruh A B C VBB-Tarifteilbereiche Berlin :6 Alt-Tegel Karl-Bonhoeffer- :Blankenburg Nervenklinik VBB fare zones Berlin 0 Borsigwerke . RB2 Eichborndamm : Alt-Reinickendorf Schönholz : Kein Zugverkehr Holzhauser Str. :Pankow-Heinersdorf eE Stand: 7. Mai 2018 RE6 : . RB27 no service © Berliner Verkehrsbetriebe (BVG) :Otisstr. :Lindauer Allee RB1 . RE66 2 . 05.06. - 11.12.2018 600-1-18.1-2 RB24 :Scharnweberstr. :Paracelsus-Bad . RE5 RE3 :Kurt-Schumacher-Platz 128 Residenzstr. :hE 2 Pankow Werneuchen RB25 : Franz-Neumann-Platz Osloer Str. 9 : Wollankstr. : 0A Tegel TXL Afrikanische Str. Am Schäfersee Seefeld (Mark) 28 Blumberg 1 : gE Blumberg-Rehhahn TXL 128 Wartenberg Nauen Seestr. Nauener Platz Vinetastr. : Ahrensfelde Nord RB10 Pankstr. RB14 09 7 Ahrensfelde Ahrensfelde Friedhof TXL Brieselang Leopoldplatz : X9 1 : Bornholmer RE2 Amrumer Str. : Wismar : Str. : Hohenschönhausen : : Siemens- RE6 RE66 RB27 Mehrower Allee Finkenkrug Zitadelle Haselhorst Paulsternstr. Rohrdamm damm : : : : Schönhauser Allee : Prenzlauer Allee : < Beusselstr. Westhafen Wedding Gesundbrunnen RE2 5 Strausberg Nord . RE6 Falkensee : 5 . Jakob-Kaiser-Platz . . . . Gehrenseestr. RB2 RB1 RE4 RE6 RB10 RE3 RE5 RE6 : Greifswalder Str. : Raoul-Wallenberg-Str. Strausberg Stadt 0 Altstadt Spandau : Voltastr. > Reinicken- 0 . Seegefeld : 1 Jungfernheide :Humboldthain :

RB1 dorfer Str. Eberswalder Str. < 2 RB S4 RB13 : RE3 Bernauer Str. : S42 Hegermühle 4 . Albrechtshof S42 RE4 : S4 Marzahn : : < Birkenstr. Schwartz- :Nordbahnhof :5 Rathenow Dallgow- : 7 : . 1> Hönow Elstal Döberitz : Rathaus Spandau RE5 kopffstr. Senefelderplatz : RE4 . :Oranien- TXL RB1 :Wuster- RE4.RB13 RE2.RE4.RE6.RB10.RB13.RB14 RE4.RE6.RB10.RB13 09 Naturkunde- Rosenthaler Louis-Lewin-Str. :Staaken Spandau 0 burger Poelchaustr. mark 3 9 :museum :Platz Rosa-Luxemburg-Platz : Stresow : X9 1 Str. Kostrzyn

RB13 4 Mierendorffplatz Hellersdorf (Küstrin)

RB21 :Turmstr. eE : :Oranien- Weinmeisterstr. 1 RB RB26 : . : Hauptbahnhof burger Tor Hackescher Markt : Strausberg

2 dF :5 : Landsberger Allee : Springpfuhl : RE2

Westend RB25 Cottbusser Platz .

Alexanderplatz 4 X9 Petershagen Nord

:Pichelsberg :Olympia- Schillingstr. : 2 RB :

Richard-Wagner-Platz : RE1.RE2.RE7.RB14 . Kienberg 2 Stadion 09 Bundestag Fried- Gärten der Welt :Fredersdorf 1 :

Neu-Westend richstr. Strausberger Platz 1 : : RB Bellevue RB21 RB22 : :Friedrichs- Neuenhagen Weberwiese : Storkower Str. : Kaulsdorf-Nord :Olympiastadion Sophie- : Branden- Jannowitz- felde Ost RB26 Kaiserdamm Charlotte-Platz Bismarckstr. TXL :Tiergarten burger ToreE : Klosterstr. brücke : Frankfurter Tor : Magdalenen- Biesdorf Wuhletal Kaulsdorf Mahlsdorf Birkenstein Hoppegarten : Theodor-Heuss-Platz : Messe Nord/ Deutsche Ernst-Reuter- : : Französische Str. :Märkisches : Samariterstr. : Heerstr. ICC : Hansaplatz Mohrenstr. : Museum str. : Friedrichsfelde : : : : : : Messe ZOB Oper Platz Potsdamer Platz Ostbahnhof Priort Wilmers- : Elsterwerdaer Platz : Frankfurter Lichtenberg Messe :dorfer Str. Savignyplatz Mendelssohn-Bartholdy- :Stadtmitte Hausvogtei-Spittel- Heinrich- 1 3 : : Süd :Park Allee RB26 : : platz markt Heine-Str. Warschauer Str. Biesdorf-Süd Zoologischer Garten : Anhalter Bhf : : Nöldnerplatz : Kochstr. : Moritzplatz

Westkreuz Charlotten- : Checkpoint Charlie Wittenberg- Kurfürsten- < Rummelsburg : :5 :burg :1 Uhlandstr. platz str. Prinzenstr. : RE1 : . Schlesisches Tor Ostkreuz RE2 :Halensee Adenauer- gE RB12 RB25 . Betriebsbahnhof Rummelsburg : :Kurfürsten- Gleis- Hallesches Tor :Kottbusser Tor Görlitzer Bhf RE7 platz . damm Nollen- Bülow- dreieck Möckern- RB1 2 : : : brücke 4 Karlshorst Grunewald : : Schönleinstr. RB24 . RB2 Augsburger dorfplatz str. A B C 1

RB21 4 . Str. : : Wuhlheide : 0 . RB2 Spichernstr. Mehringdamm Hermannplatz : :Treptower Park

. RE7 Viktoria-Luise- 2 RB Konstanzer Str. Hohenzollern- RE1 Platz :platz :Yorckstr. Gneisenaustr. Südstern : Rathaus Köpenick : Güntzelstr. Großgörschenstr. Neukölln : Yorckstr. : : :Fehrbelliner Platz Berliner Str. : :Kleistpark Platz der Boddinstr. >

Luftbrücke S42 RB24 Plänterwald : 4 Hirschgarten 5 :Hohenzollerndamm RE 1

. Karl-Marx- 1 Blissestr. Bayerischer Platz Eisenacher S4 RB < < .

S4 Paradestr. : : Str. 4

Str. RE Leinestr. RE1 .

1 0 7 S42 Rathaus : RE :

Julius- Sonnenallee : . Friedrichshagen

RB1 3 > Schöneberg Leber-Brücke RE : : Tempelhof Neukölln RE2 Köllnische Heide : :Heidelberger Platz Baumschulenweg : Rahnsdorf : :Bundesplatz Innsbrucker Schöneberg : Südkreuz : Hermannstr. : Marquardt Rüdesheimer Platz Alt-Tempelhof < : :4 Platz dE RB10 dG 8 Grenzallee Wilhelmshagen Breitenbachplatz Oberspree Spindlersfeld dG Frankfurt :Friedrich-Wilhelm-Platz Kaiserin-Augusta-Str. : :Schöneweide (Oder) Podbielskiallee 3 : Friedenau : Blaschkoallee : Erkner RE1 Ullsteinstr. : Eisen- :Dahlem-Dorf :Walther-Schreiber-Platz hütten- :Betriebsbahnhof Schöneweide stadt :Priesterweg Westphalweg Parchimer Allee Freie Universität Feuerbachstr. : RE1 Thielplatz Schloßstr. 6 : : Fangschleuse Oskar-Helene-Heim Alt-Mariendorf Adlershof : Britz-Süd : : Attilastr. :Onkel Toms Hütte :9 Rathaus Steglitz Südende hE : Johannisthaler Grünau : : Schlachtensee Krumme Lanke Lankwitz Marienfelde Chaussee 3 : :Botanischer Garten Lipschitzallee : :Mexikoplatz :Altglienicke Eichwalde : Golm Lichterfelde West Wutzkyallee : :Nikolassee :Lichterfelde Ost RE2 Zeuthen 8 Frankfurt 2 Buckower Chaussee Grünbergallee . (Oder)

RB22 : Niederlehme Zernsdorf Kablow 2 RB Zwickauer Damm Wildau RB36 . 1 RB33 :Wannsee . Branden- 1 Zehlendorf : Sundgauer Str. : RB2 RB36 . RE5

4 2

burg RB 2 .

0 : : : : . RE4 7 RE1 1 Osdorfer Str. Schichauweg : : . RB2 dF RB22 RB36 :

Park Char- : Griebnitz- 4 Königs Wusterhausen 2 RB RB2 RE3 Magde- . 3 burg Sans- lotten- Babelsberg see . RB1 souci hof . RE7. RB3 RE1 2 X7 1 RE7 RE1 Zeesen :Werder Potsdam Hbf : RB2 :Lichterfelde Süd 71 N7 (Havel) 7 RB20 RB21 RB22 Medienstadt Babelsberg Lichtenrade Cottbus RB23 RE2 Pirschheide Rehbrücke RB22 RB24 Teltow Caputh- < :bE bFTeltow Stadt < Mahlow : Flughafen Berlin-Schönefeld dE 9 RB14 Senftenberg Geltow Wilhelmshorst RB22 Großbeeren RE5.RB22 RE7.RB22 0A Schönefeld SXF Caputh Saarmund Ludwigsfelde Struveshof : 2 Blankenfelde Schwielowsee RB23 Michendorf RB23 : > Birkengrund Waßmannsdorf Dahlewitz Ferch- Ludwigsfelde : Lienewitz Seddin Thyrow Rangsdorf Flughafen Berlin Brandenburg Airport Ein Verbund. Ein Tarif. Dessau RE7 RB33 Jüterbog Jüterbog RE4 RE3 Lutherstadt Wittenberg/Falkenberg (Elster) Elsterwerda RE5 RE7 Wünsdorf-Waldstadt Berliner Verkehrsbetriebe, bvg.de July 9, 2018 11 / 48 §6.1 Metro Maps London, 2018 ()

Tube map

123456789 Special fares apply Special fares Check before you travel 978868 7 57Cheshunt Epping § Brixton Chesham 9 apply Watford Junction No step-free access until September. Chalfont & Enfield Town Theydon Bois Latimer Theobalds Grove ------Watford High Street Bush Hill Debden Shenfield § Watford Heathrow Amersham Cockfosters Park Turkey Street High Barnet Loughton 6 TfL Rail customers should change at A Chorleywood Bushey A Terminals 2 & 3 for free rail transfer to Croxley Totteridge & Whetstone Oakwood Southbury Buckhurst Hill Chingford Terminal 5. Rickmansworth Brentwood Carpenders Park Woodside Park Southgate 5 ------Edmonton Green Moor Park Roding Grange Valley § Hounslow West Hatch End Mill Hill East West Finchley Arnos Grove Hill Northwood 4 Silver Street Highams Park Step-free access for manual wheelchairs only. Chigwell Harold Wood West Ruislip Headstone Lane Edgware Bounds Green ------White Hart Lane Northwood Hills Stanmore Hainault Gidea Park Finchley Central Woodford § Kennington Hillingdon Ruislip Harrow & Wood Green Pinner Wealdstone Burnt Oak Harringay Bruce Grove Bank branch trains will not stop between Ruislip Manor Canons Park Wood Street Fairlop East Finchley Green South Woodford Saturday 26 May and mid-September. Uxbridge Ickenham North Harrow Colindale Turnpike Lane Lanes South Tottenham Eastcote Kenton Barkingside ------Queensbury Highgate Crouch Snaresbrook Emerson Park Blackhorse Harrow- Preston Hendon Central Hill Tottenham 4 Chadwell § Victoria 3 Road Newbury on-the-Hill Road Seven Heath Kingsbury Archway Sisters Hale Park Rayners Lane Brent Cross Redbridge Step-free access is via the Cardinal Place Ruislip Manor House Walthamstow Gardens West Northwick Gospel Oak Central Goodmayes entrance. Harrow Park Golders Green Hampstead Wanstead Gants Stamford Hill Seven Kings Upminster ------South Kenton Heath Upper Holloway Hill Walthamstow B Neasden Hampstead Leytonstone B South Harrow Wembley Park Arsenal Queen’s Road Ilford § Services or access at these stations are North Wembley 3 Upminster Bridge Finsbury Midland Road Dollis Hill Tufnell Park Stoke subject to variation. Park Manor Park South Ruislip Wembley Central Holloway Road Newington Hornchurch Kentish St James Street Leytonstone Wanstead Please search ‘TfL stations’ for full details. Willesden Green Finchley Road Kentish Town Sudbury Hill Stonebridge Park Belsize Park Town West Rectory High Road Park Woodgrange Elm Park & Frognal Park Road Clapton Forest Kilburn Caledonian Road Highbury & Dalston Leyton Harlesden Islington Gate Kensal Brondesbury West Chalk Farm Camden Kingsland Dagenham Northolt Rise Park Hampstead Stratford Sudbury Town Willesden Junction Road Hackney International Maryland East Hackney Camden Town Caledonian Downs Brondesbury Central Dagenham Heathway Finchley Road 2 Road & Canonbury Kensal Green Barnsbury Stratford Becontree Swiss Cottage Alperton Mornington Dalston Junction Homerton Hackney Queen’s Park Kilburn South Crescent Wick High Road Hampstead St John’s Wood Upney King’s Cross London Fields Stratford St Pancras Greenford Haggerston High Street Barking Cambridge Heath Kilburn Park Paddington Edgware Road Marylebone 2 Baker Great Portland Euston Street East Ham Maida Vale Street Hoxton Bethnal Green Pudding Abbey Warwick Angel Mill Lane Road Perivale Avenue Bethnal Green Mile End Upton C Euston Old Street Bow Park C Edgware Warren Street Square Road Road Plaistow Royal Oak Farringdon Shoreditch Hanger Lane Regent’s Park High Street - Stepney Green West Westbourne Park by-Bow Ham Acton Goodge Russell Bow Street Square Barbican Park Royal Main Line 1 Church Ladbroke Grove Bayswater Bond Aldgate Oxford East Whitechapel Street Devons Road Latimer Road Circus Moorgate Liverpool Star Lane North Ealing Marble Arch Street Hanwell Tottenham Holborn Chancery Lane Langdon Park East White Shepherd’s Notting Court Road City Aldgate 22343 Acton Bush Hill Gate Bank Covent Garden All Saints / Canning West 1 Lancaster Town Ealing Royal Southall Ealing West North Holland Queensway Gate St Paul’s Hayes & Acton Park Green Park Leicester Square Limehouse Victoria Harlington Broadway Acton Poplar Wood Lane Hyde Park Corner Piccadilly 5 4 3 Acton Central Shepherd’s Cannon Street Tower Shadwell Westferry Blackwall East Custom House for ExCeL High Street Kensington Circus Monument Emirates Bush Market Hill India Ealing Common Kensington Royal (Olympia) Mansion House Fenchurch Street Tower Docks Prince Regent South Acton Knightsbridge Charing Gateway Wapping West India Goldhawk Road Cross D Blackfriars Quay D South Barons Gloucester River Thames West Silvertown Royal Albert Ealing Court Road St James’s Acton Town Hammersmith Rotherhithe Victoria Park Temple Canary Wharf Beckton Park 8 01 North Emirates Northfields Chiswick Turnham Stamford Ravenscourt West Earl’s South Sloane Westminster Embankment London Bermondsey Canada Greenwich Pontoon Park Green Brook Park Kensington Court Kensington Square Bridge Water Greenwich Peninsula Dock Cyprus Boston Manor Heron Quays T ransport for Osterley Waterloo South Quay London Gallions Reach ondon May 2 Gunnersbury L City Airport Hounslow East West Brompton Key to lines Crossharbour Beckton Hounslow Central L King George V ondon May 2 Southwark 2 Surrey Quays Bakerloo Hounslow 2 ransport for Mudchute T West Kew Gardens Pimlico Borough Heathrow Fulham Broadway Island Gardens Central Hatton Cross 1 Lambeth North Terminals 2 & 3 0 Parsons Green 18 Richmond Imperial Wharf Circle Putney Bridge Cutty Sark for Woolwich Maritime Greenwich Arsenal Queens Road District E Peckham Greenwich E East Putney Vauxhall New Elephant & Castle Cross Gate Hammersmith & City Heathrow 6 5 4 3 New Cross Deptford Bridge Southfields 3 4 Terminal 5 Brockley Peckham Rye Jubilee Wimbledon Park Elverson Road Heathrow Kennington Terminal 4 Clapham Wandsworth Oval 2 Honor Oak Park Metropolitan Wimbledon Junction Road Lewisham Stockwell Forest Hill Beckenham Clapham High Street Denmark Hill Birkbeck Road Northern Clapham North Sydenham Avenue Beckenham Piccadilly Clapham Common 3 Road Junction Dundonald Brixton Penge West Key to symbols Explanation of zones Road Clapham South Harrington Road Victoria Anerley Interchange stations 9 Station in Zone 9 Balham 4 Elmers End Waterloo & City 8 8 Crystal Palace Norwood Junction Step-free access from street to train Station in Zone Tooting Bec Arena DLR 7 Station in Zone 7 3 Step-free access from street to platform Station in both zones Tooting Broadway Woodside London Trams 6 Merton Park Station in Zone 6 5 Emirates Air Line National Rail Colliers Wood West Croydon fare zone cable car 5 Station in Zone 5 Blackhorse Lane F South Wimbledon F (special fares apply) Airport 4 Station in Zone 4 Reeves Corner Centrale Wellesley Road Lebanon Addiscombe Station in both zones Road London Overground Riverboat services 3 Station in Zone 3 Victoria Coach Station 2 Station in Zone 2 Morden Phipps Belgrave MitchamMitcham Beddington Therapia Ampere Waddon Wandle Church George East Sandilands TfL Rail Station in both zones Morden Road Bridge Walk Junction Lane Lane Way Marsh Park Street Street Croydon Lloyd Park Emirates Air Line cable car 1 Station in Zone 1 Gravel Addington King Henry’s New Hill Village Fieldway Drive Addington London Trams 4 Coombe Lane Transport for London May 2018 District open weekends and on some public holidays 1 2345689 7

MAYOR OF LONDON

Online maps are strictly for personal use only. To license the for commercial use please visit tfl.gov.uk/maplicensing Transport for London, tfl.gov.uk July 9, 2018 12 / 48 §6.1 Metro Maps Saint Petersburg, 2018

Петербургский Метрополитен, metro.spb.ru July 9, 2018 13 / 48 Chapter 6 Metro Map Drawing

§6.2 Planar Graphs

July 9, 2018 14 / 48 §6.2 Planar Graphs Planar Embeddings Let G = (V , E) be a (simple) graph. Definition 2 A planar embedding of G consists of an injective map ψ : V → R , and a 2 family of continuous and injective functions fe : [0, 1] → R for each edge e ∈ E such that

I fvw (0) = ψ(v) and fvw (1) = ψ(w) for all vw ∈ E, S I fe ((0, 1)) ∩ e06=e fe0 ([0, 1]) = ∅ for all e ∈ E. G is called planar if it admits some planar embedding. Remark This embeds a graph into the plane using simple Jordan curves.

July 9, 2018 15 / 48 §6.2 Planar Graphs Faces Definition 2 S A connected component of R \ e∈E fe ([0, 1]) is called a face. Observations I There is exactly one unbounded face (Jordan curve theorem).

I The boundary of a bounded face F gives rise to a face circuit CF in G. Lemma {CF | F is a bounded face} is an undirected cycle basis of G. Proof. 2 S Let C be a circuit in G. Then R \ e∈E(C) fe ([0, 1]) is the union of a bounded and an unbounded component. Let F1,..., Fk be the faces contained in the bounded component. Then C = CF + ··· + CF . P 1 k Suppose F bounded face λF CF = 0 for some λF ∈ F2. If e is an edge between a bounded face F and the outer face, then λF = 0. Proceed by induction on the number of bounded faces.

July 9, 2018 16 / 48 §6.2 Planar Graphs Euler’s formula Let G be a planar graph with n vertices, m edges, f faces and c connected components. Corollary (Euler, 1758) f − 1 = m − n + c.

Lemma Suppose that G is connected and n ≥ 3. (1)2 m ≥ 3f (2) m ≤ 3n − 6 (3) f ≤ 2n − 4 Proof. P P (1) Handshake: 2m = v∈V deg(v) = F face #{vertices along F } ≥ 3f . If n ≥ 3, then the outer face contains at least 3 vertices. (2)2 m ≥ 3f = 3(m − n + 2) = 3m − 3n + 6 ⇒ m ≤ 3n − 6. (3)3 n − 6 ≥ m = n + f − 2 ⇒ f ≤ 2n − 4.

July 9, 2018 17 / 48 §6.2 Planar Graphs

K5 and K3,3 Lemma The complete graph K5 is not planar. Proof. 5 We have n = 5 and m = 2 = 10, so m = 10 > 9 = 3 · 5 − 6 = 3n − 6.

Lemma The complete bipartite graph K3,3 is not planar. Proof. Every circuit in K3,3 has length at least 4. In particular, if K3,3 was planar, then 2m ≥ 4(f − 1) + 3 = 4(m − n + 1) + 3 = 4m − 4n + 7 and therefore 2m ≤ 4n − 7. But 2m = 2 · 32 = 18 and 4n − 7 = 4 · 6 − 7 = 17.

July 9, 2018 18 / 48 §6.2 Planar Graphs Minors

Definition Let G and M be undirected graphs. M is a minor of G if a series of the following operations transforms G into M:

I delete a vertex

I delete an edge

I contract an edge

Theorem (Wagner, 1937)

An undirected graph is planar if and only if it contains neither K5 nor K3,3 as a minor. Proof. (⇒) Any minor of a planar graph must be planar. (⇐) Omitted.

July 9, 2018 19 / 48 §6.2 Planar Graphs More on Minors

Theorem (Robertson/Seymour, 2004) A family of graphs is closed under taking minors if and only if it has a finite number of minimal forbidden minors. Example

Planar graphs: K5, K3,3 Forests: C3 (circuit on 3 vertices) Theorem (Robertson/Seymour, 1995) For any fixed minor M, there is a O(n3) algorithm deciding whether a graph on n vertices has M as a minor. This is nice, but the proof is not constructive. For planarity testing, there are better (and explicit) algorithms: Theorem (Hopcroft/Tarjan, 1974) Planarity testing can be done in O(n) time.

July 9, 2018 20 / 48 §6.2 Planar Graphs Subdivisions Definition Let G and M be undirected graphs. M is a subdivision of G if it is obtained from G by consecutively replacing an edge uw with two edges uv, vw, inserting a new vertex v. u w u v w →

The reverse process is called smoothing. Theorem (Kuratowski, 1930) An undirected graph is planar if and only if it contains no subgraph that is a subdivision of K5 or K3,3. Proof. (⇒) Any subgraph and any smoothing of a planar graph must be planar. (⇐) Omitted.

July 9, 2018 21 / 48 §6.2 Planar Graphs 2-bases Observation Let G be a planar embedded graph. Then every edge is contained in at most two face circuits. Definition A cycle basis B of a graph is called a 2-basis if every edge is contained in at most two cycles of B. Theorem (MacLane, 1937) A graph is planar if and only if it admits a 2-basis. Proof (O’Neill, 1973). Planar graphs have 2-bases. The following would prove the converse: (1) Admitting a 2-basis is closed under taking subgraphs and smoothings.

(2) K5 and K3,3 do not admit a 2-basis.

Then any graph with a 2-basis does not contain a subdivision of K5 or K3,3, and must hence be planar by Kuratowski’s theorem. July 9, 2018 22 / 48 §6.2 Planar Graphs MacLane’s planarity criterion

Proof of (1).

Let {C1,..., Cµ} be a 2-basis of a graph G = (V , E). Deleting an edge e ∈ E: If e is not contained in any cycle, nothing happens. Otherwise this reduces the cyclomatic number by 1. If e is contained in a single cycle (w.l.o.g. C1), then {C2,..., Cµ} is a 2-basis of (V , E \{e}). If e is contained in two cycles (w.l.o.g. C1, C2), then {C1 + C2,..., Cµ} is a 2-basis of (V , E \{e}). Deleting a vertex: Delete first all adjacent edges. Removing an isolated vertex does not affect the cyclomatic number. Smoothing uv and vw to uw: The columns of uv and vw in the cycle matrix are the same, so smoothing does not change anything about the 2-basis.

July 9, 2018 23 / 48 §6.2 Planar Graphs MacLane’s planarity criterion

Proof of (2). P6 Let {C1,..., C6} be a 2-basis for K5. Set C7 := i=1 Ci . Observe that P7 C7 6= 0 and i=1 Ci,e = 0 ∈ F2 for all e ∈ E. In particular, every edge is contained in exactly two of the cycles C1,..., C7. Hence P7 i=1 |E(Ci )| = 2|E(K5)| = 20. P7 On the other hand, |E(Ci )| ≥ 3 for all i, so i=1 |E(Ci )| ≥ 21. P4 Now let {C1,..., C4} be a 2-basis for K3,3. Set C5 := i=1 Ci . Again P5 P5 i=1 Ci,e = 0 for all e ∈ E, so i=1 |E(Ci )| = 2|E(K3,3)| = 18. Since P5 |E(Ci )| ≥ 4 for all i, i=1 |E(Ci )| ≥ 20.

July 9, 2018 24 / 48 §6.2 Planar Graphs More on 2-bases

Lemma The cycle matrix of a 2-basis of a directed graph is totally unimodular. In particular, any 2-basis is integral. Proof. Orient all cycles counter-clockwise w.r.t. some planar embedding. Proceed by induction on the size q of a quadratic submatrix A of the cycle matrix. The case q = 1 is clear. If q ≥ 2, there are two cases: (1) A contains a column with a single non-zero entry. Use Laplace expansion and induction. (2) All columns of A have at least two non-zero entries. Since we have a 2-basis, there are exactly two non-zeros, a +1 and a −1. So all rows of A add up to 0, showing det A = 0.

July 9, 2018 25 / 48 §6.2 Planar Graphs Graph drawings

Let G be a planar graph. Types of planar embeddings

I polygonal: All edges are embedded as polygonal arcs.

I straight line: All edges are drawn as straight line segments.

I rectilinear: All edges are drawn as straight line segments with slopes ◦ k · 90 , k ∈ Z. I octilinear: All edges are drawn as straight line segments with slopes ◦ k · 45 , k ∈ Z.

July 9, 2018 26 / 48 §6.2 Planar Graphs Combinatorial type

Definition Let G = (V , E) be a planar graph with some planar embedding. For each vertex v ∈ V , the embedding defines an ordering of the neighborhood of v by counter-clockwise sorting of the edges incident to v. This is the combinatorial type of the embedding. B D

A A

D C B C A: (B, D, C) A: (D, B, C)

This defines an equivalence relation on planar embeddings of G.

July 9, 2018 27 / 48 §6.2 Planar Graphs Straight line drawings Theorem (F´ary, 1948) Any simple planar graph has a straight line drawing. Proof. Let G be a simple connected planar graph with n ≥ 3 vertices, embedded into the plane. W.l.o.g. G is maximally planar, i.e., m = 3n − 6, and every bounded face is a triangle. Claim: If uvw is a triangle, then there is a straight line embedding of the same combinatorial type where u, v, w are the vertices along the outer face. This is easy for n = 3. Thus let n ≥ 4, and let uvw be a triangle. Not all of u, v, w have degree 2 (connectedness). Assume that the other n − 3 vertices have degree at least 6. Then X deg(v) ≥ 6(n − 3) + 7 = 6n − 11 > 6n − 12 = 2m, v∈V contradicting the Handshaking Lemma.

July 9, 2018 28 / 48 §6.2 Planar Graphs Straight line drawings

Proof (cont.) In particular, we find a vertex z different from u, v, w with deg(z) ≤ 5. Now remove z from the graph and retriangulate the new face F . The new graph has n − 1 vertices and – by induction – admits a straight line embedding of the same combinatorial type where u, v, w are the vertices along the outer face. In particular, the face F has become a simple polygon with at most 5 sides. By the art gallery theorem (with b5/3c = 1 guards), there is a point inside this polygon that can be connected to all vertices of F by non-crossing straight lines (Short proof: Triangulations of simple polygons admit a 3-coloring.) Theorem (De Fraysseix/Pach/Pollack, 1990) Straight line drawings on a grid can be found in linear time.

July 9, 2018 29 / 48 §6.2 Planar Graphs Straight line drawings: Example

z

−−−−→delete z −−−−−→ induction

←−−−−insert z

July 9, 2018 30 / 48 §6.2 Planar Graphs Rectilinear and octilinear drawings Let G be a graph. Theorem (Garg/Tamassia, 2001) It is NP-hard to decide whether G admits a rectilinear drawing. Theorem (Tamassia, 1987) Fix some planar embedding of G. There is a polynomial-time algorithm that decides whether G admits a rectilinear drawing preserving the combinatorial type. Theorem (N¨ollenburg, 2005) Fix some planar embedding of G. It is NP-hard to decide whether G admits an octilinear drawing preserving the combinatorial type. Both NP-hardness proofs reduce (variants of) the 3-SAT problem. Remark Clearly, if G admits a rectilinear (octilinear) drawing, then deg(v) ≤ 4 (≤ 8) for all v ∈ V (G). July 9, 2018 31 / 48 Chapter 6 Metro Map Drawing

§6.3 Octilinear Layout Computation

July 9, 2018 32 / 48 §6.3 Octilinear Layout Computation Requirements Principles (taken from N¨ollenburg,2011)

I Preserve the combinatorial type.

I Octilinear drawing: All edges are drawn as line segments with slopes k · 45◦ for k ∈ {0, 1,..., 7}.

I Lines should avoid sharp bends, and pass straight through interchanges.

I Ensure a minimum distance between stations, and stations and non-incident edges.

I Minimize geometric distortion.

I Use uniform edge lengths.

I Use large angular resolution.

I Place station labels in a readable way.

I ...

July 9, 2018 33 / 48 §6.3 Octilinear Layout Computation Metro Map Layout Problem Input

I a line network consisting of a graph G = (V , E) of maximum degree 8 and a line cover L

I a planar embedding of G, e.g., by geographical coordinates

Output

2 I a map ψ : V → R inducing an octilinear drawing of G I satisfying/optimizing design principles

Solution Methods

I metaheuristics (hill climbing, simulated annealing, ant colonies, . . . )

I local optimization: least squares

I global optimization: mixed integer programming

July 9, 2018 34 / 48 §6.3 Octilinear Layout Computation U-Bahn Berlin: geographical layout

173 vertices, 184 edges, 10 lines July 9, 2018 35 / 48 §6.3 Octilinear Layout Computation U-Bahn Berlin: curvilinear layout

least squares method (Wang/Chi 2011, Wang/Peng 2016) July 9, 2018 36 / 48 §6.3 Octilinear Layout Computation U-Bahn Berlin: octilinear layout?

least squares method (Wang/Chi 2011, Wang/Peng 2016), naive python/cvxopt implementation: 36 s July 9, 2018 37 / 48 §6.3 Octilinear Layout Computation Octilinear Layout MIP We will use the formulation due to N¨ollenburg(2005): Hard constraints (feasibility)

I octilinearity

I combinatorial type preservation

I minimum edge length

I minimum distance for non-adjacent edges

In particular, a feasible solution guarantees octilinearity. Soft constraints (objective)

I bend minimization

I preservation of relative positions for adjacent stations

I minimum total edge length

July 9, 2018 38 / 48 §6.3 Octilinear Layout Computation Octilinear Layout MIP: Basic variables

I vertex coordinates xv , yv ∈ [0, |V |] for v ∈ V

I additional vertex coordinates zv := xv + yv , wv := xv − yv

I edge directions dirvw , dirwv ∈ {0, 1,..., 7} for {v, w} ∈ E hj ^(v,w) 1 ki I original directions secvw := ◦ + , 45 2 8 ◦ ◦ where ^(v, w) ∈ (−180 , 180 ] is the slope of the edge {v, w}

N¨ollenburg(2005)

July 9, 2018 39 / 48 §6.3 Octilinear Layout Computation Octilinear Layout MIP: Directions

I binary variables αi,vw for i ∈ {−1, 0, 1} and {v, w} ∈ E such that ◦ αi,vw = 1 ⇔ edge {v, w} is in original direction +i · 45

α−1,vw + α0,vw + α1,vw = 1, {v, w} ∈ E

dirvw + Mαi,vw ≤ M + [secvw + i]8, i ∈ {−1, 0, 1}, {v, w} ∈ E

dirvw − Mαi,vw ≥ −M + [secvw + i]8, i ∈ {−1, 0, 1}, {v, w} ∈ E

dirwv + Mαi,vw ≤ M + [secvw + i + 4]8, i ∈ {−1, 0, 1}, {v, w} ∈ E

dirwv − Mαi,vw ≥ −M + [secvw + i + 4]8, i ∈ {−1, 0, 1}, {v, w} ∈ E M  0 is a large constant I relating directions with coordinates, e.g., for secvw = 2 and α0,vw :

xv − xw + Mα0,vw ≤ M

xv − xw − Mα0,vw ≥ −M

yv − yw + Mα0,vw ≤ M − minimum edge length

If α0,vw = 1, then xv = xw and yw ≥ yv + minimum edge length. July 9, 2018 40 / 48 §6.3 Octilinear Layout Computation Octilinear Layout MIP: Planar embedding

I preservation of combinatorial type: binary variables βi,v for i ∈ {1,..., deg(v)} and v ∈ V ,

deg(v) X βi,v = 1, v ∈ V , i=1

dirv,w − dirv,w + Mβj (v) ≥ 1, v ∈ V , j = 1,..., deg(v), j [j−1]deg(v)

where w1,..., wdeg(v) are the neighbors of v in counter-clockwise order

I planarity constraints: modeled by binary variables γi,e,e0 for i ∈ {0,..., 7} and e, e0 ∈ E non-incident (large number!)

July 9, 2018 41 / 48 §6.3 Octilinear Layout Computation Octilinear Layout MIP: Objective

I total edge length objective: by new variables lenvw , vw ∈ E, e.g., for secvw = 2 and α0,vw :

yv − yw + Mα0,vw = M − lenvw

If α0,vw = 1, then xv = xw , and yw ≥ yv = lenvw . Edge lengths are measured w.r.t. | · |∞: a diagonal line segment (x, y) → (x + 1, y + 1) has length 1. I bend objective: for each three consecutive stations (u, v, w) on a line of the network, add the constraints ( |diruv − dirvw | if |diruv − dirvw | ≤ 4 benduvw = 8 − |diruv − dirvw | if |diruv − dirvw | ≥ 5

I relative position objective:

−M · relvw ≤ dirvw − secvw ≤ M · relvw , vw ∈ E P P P I objective function: λ1 vw lenvw + λ2 uvw benduvw + λ3 vw relvw

July 9, 2018 42 / 48 §6.3 Octilinear Layout Computation Octilinear Layout MIP: Practical Aspects Size 0 P Suppose that G has n vertices and m edges. Let m := `∈L |E(`)|. Then the MIP formulation uses uses O(n + m0 + m2) variables and constraints. Example The Berlin U-Bahn example needs

I 3 046 variables (1 623 binary, 546 integer, 877 continuous) and 7 149 constraints without planarity constraints.

I 137 158 variables (135 735 binary, 546 integer, 877 continuous) and 560 361 constraints with planarity constraints

Pre-processing I Do not use all planarity constraints (heuristics, lazy constraints).

I Contract vertices of degree 2.

July 9, 2018 43 / 48 §6.3 Octilinear Layout Computation Crossing minimization Consider a line network (G, L). The metro line crossing minimization problem is to find an ordering of the lines at each station such that the total number of crossings of lines is minimized.

Results

I The problem is in general NP-hard (Fink/Pupyrev, 2013).

I There is an integer programming formulation (Asquith et. al., 2008).

I The key step is to determine the ordering of the lines at their terminals.

I For a fixed ordering at the terminals, there is a polynomial-time algorithm.

July 9, 2018 44 / 48 §6.3 Octilinear Layout Computation U-Bahn Berlin: octilinear layout!

mixed integer programming method (N¨ollenburg2005), solution found by CPLEX 12.7.1 after 66 s, optimality: 15 min 55 s July 9, 2018 45 / 48 §6.3 Octilinear Layout Computation S-Bahn Berlin: geographical layout

July 9, 2018 46 / 48 §6.3 Octilinear Layout Computation S-Bahn Berlin: curvilinear layout

least squares method, naive python/cvxopt implementation: 31 s July 9, 2018 47 / 48 §6.3 Octilinear Layout Computation S-Bahn Berlin: octilinear layout

mixed integer programming method, solution found by CPLEX 12.7.1 after 25 s, optimality gap: ≤ 3% July 9, 2018 48 / 48