optimizing cycles and bases · short course on computational topology january 5, 2011 jeff...

89
Optimizing Cycles and Bases AMS Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeff[email protected]

Upload: others

Post on 27-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

OptimizingCyclesandBasesAMSShortCourseonComputationalTopologyJanuary5,2011

JeffEricksonComputerScienceDepartment

UniversityofIllinoisatUrbana‐[email protected]

Page 2: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Optimalbasesandcycles

GivenatopologicalspaceX,findanyofthefollowing:

Optimalbases:‣ Shortestsetofloopsthatgenerateπ1(X)

‣ ShortestsetofcyclesthatgenerateH1(X)

‣ Minimum‐weightsetofk‐cyclesthatgenerateHk(X)

Optimalcycles:‣ Shortestpath/cyclehomotopictoagivenpath/cycleinX

‣ Shortest1‐cyclehomologoustoagiven1‐cycleinX

‣ Minimum‐weightk‐cyclehomologoustoagivenk‐cycleinX

2

Page 3: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Motivation:localization

3

[Dey,Sun,Cohen‐Steiner2008]

Page 4: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Motivation:surfaceparameterization

4

[Tong,Alliez,Cohen‐Steiner,Desbrun2006]

Page 5: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Anygenus‐ggraphadmitsastochasticembeddingintoaplanargraphwithexpecteddistortionO(logg).

⇒ Lotsofgoodapproximationalgorithmsforgenus‐ggraphs.

Motivation:planarembedding

5

[BorradaileIndykLeeSidiropoulos’07–‘10]

Page 6: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Motivation:minimalsurfaces

6

[Sullivan1990;Dunfield,Hirani2010]

Theminimum‐areasurfaceboundedbyaknotKistheminimum‐cost2‐chainhomologoustoanysurfaceboundedbyK

Page 7: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Preliminaries

7

Page 8: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Combinatorialspaces

‣ Inputspacesarefiniteabstractsimplicial,cubical,orotherCWcomplexes

‣ Cellshavenon‐negativeweights/lengths—“geometry”

‣Weonlyconsiderpaths/cyclesinthe1‐skeleton‣ Otherwise,wedon’tknowhowtocomputeshortestpathsefficiently!

‣ Weonlyconsiderk‐chainsinthek‐skeleton(cellularhomology)

‣Manyalgorithmsinthistalkarerestrictedto2‐manifolds

‣ Homotopyproblemsareundecidableotherwise.

8

Page 9: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Combinatorialsurfaces

‣ Abunchofpolygonsgluedtogetherintoasurface

‣GraphGembeddedona2‐manifoldΣsoeveryfaceisadisk

9

[Riemann1857;Heawood1890;Poincaré1895;Heffter1898;DehnHeegaard1907;Kerékjártó1923;Radó1937;Edmonds1960;

Youngs1963;GrossTucker1987;MoharThomassen2001]

Page 10: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Combinatorialsurfaces

‣ EdgesofGhavenon‐negativeweights

‣Weconsideronlywalkson(orsubgraphsof)thegraphG

10

‣ Theinternalgeometryoffacesisirrelevant/undefined

Page 11: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Inputparameters

Letn=|V|andassumegenusg=O(n1–ε)

Euler’sformula|V|–|E|+|F|=2–2g⟹|E|=O(n)and|F|=O(n)

11

[Euler1726,L'Huilier1811]

Page 12: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Graphduality

12

AnysurfacegraphGhasanaturaldualgraphG*:‣ verticesofG*=facesofG

‣ edgesofG*=edgesofG

‣ facesofG*=verticesofG

u*

v*

f* g*f g

u

v

Page 13: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Tree‐cotreedecomposition

ApartitionoftheedgesofGintothreedisjointsubsets:‣ AspanningtreeT

‣ AspanningcotreeC—C*isaspanningtreeofG*

‣ LeftoveredgesL:=E\(C∪T)—Euler’sformulaimplies|L|=2g

13

[vonStaudt1847;Eppstein2003]

Page 14: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Tree‐cotreedecomposition

ApartitionoftheedgesofGintothreedisjointsubsets:‣ AspanningtreeT

‣ AspanningcotreeC—C*isaspanningtreeofG*

‣ LeftoveredgesL:=E\(C∪T)—Euler’sformulaimplies|L|=2g

13

[vonStaudt1847;Eppstein2003]

Page 15: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Tree‐cotreedecomposition

ApartitionoftheedgesofGintothreedisjointsubsets:‣ AspanningtreeT

‣ AspanningcotreeC—C*isaspanningtreeofG*

‣ LeftoveredgesL:=E\(C∪T)—Euler’sformulaimplies|L|=2g

13

[vonStaudt1847;Eppstein2003]

Page 16: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Tree‐cotreedecomposition

ApartitionoftheedgesofGintothreedisjointsubsets:‣ AspanningtreeT

‣ AspanningcotreeC—C*isaspanningtreeofG*

‣ LeftoveredgesL:=E\(C∪T)—Euler’sformulaimplies|L|=2g

13

[vonStaudt1847;Eppstein2003]

Page 17: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Optimalhomotopybases

14

Page 18: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

‣GivenacombinatorialsurfaceΣandabasepointx∈Σ,find2gloopsofminimumtotallengththatgenerateπ1(Σ,x).

Optimalhomotopybasis

15

Page 19: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Aneasyhomotopybasis

‣ Let(T,L,C)beanytree‐cotreedecompositionofG‣ ComputedinO(n)timeviadepth‐orbreadth‐firstsearch

‣ Foranyedgeuv∈L,letℓ(uv):=T[x,u]⋅uv⋅T[v,x]‣ T[s,t]=uniquepathinTfromstot

‣ ComputedinO(1)timeperedge

‣ ℓ(L):={ℓ(e)|e∈L}isabasisforπ1(Σ,x)

‣ Totalconstructiontime:O(n+k)=O(ng)

16

[Eppstein2003]

Page 20: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Agreedyhomotopybasis

‣ Let(T,L,C)bethegreedytree‐cotreedecompositionofG‣ T:=shortestpathtreerootedatx

‣ C*:=maximumspanningtreeofG*wherew(e*):=|ℓ(e)|

‣ ℓ(L):={ℓ(e)|e∈L}istheshortestbasisforπ1(Σ,x)[Erickson,Whittlesey2005;ColindeVerdière2010]

‣ TextbookalgorithmscomputeTandC*inO(nlogn)time[Dijkstra1959;Borůvka1926;Jarník1930=Prim1957;Kruskal1956]

‣ Ifg=O(n1–ε),bothTandC*canbecomputedinO(n)time[Henzinger,Klein,Rao,Subramanian1997;Borůvka1926;Mareš2004]

17

Page 21: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

[Erickson,Whittlesey2005]

Summary

‣ Shortestbasisofπ1(Σ,x)canbecomputedinO(n+k)=O(gn)time.

‣ Ifnobasepointspecified,tryeverybasepoint:O(n2)time.

18

Page 22: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Canonicalhomotopybasis

‣ Ahomotopybasiswithanyfixedincidencepattern(dependingonlyonthegenus)

‣ Theshortesthomotopybasisisnotnecessarilycanonical!

19

12

12 3

4

34

Page 23: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Canonicalhomotopybasis

‣ AcanonicalhomotopybasiswithanygivenbasepointcanbecomputedinO(gn)time.[Dey,Schipper1995;Lazarus,Pocchiola,Vegter,Verroust2001]

‣Givenahomotopybasiswithcomplexityk,theshortesthomotopicbasiscanbecomputedinO(g4nk4)time.[ColindeVerdière,Lazarus2005;ColindeVerdière,Lazarus2006]

Open:Cantheshortestcanonicalhomotopybasisbecomputedinpolynomialtime,oristhatproblemNP‐hard?

20

Page 24: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Optimalhomologybases

21

Page 25: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Optimalhomologybasis

‣GivenacombinatorialsurfaceΣ,find2gcyclesofminimumtotallengththatgenerateH1(Σ).

22

Page 26: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Aneasyhomologybasis

‣ Let(T,L,C)beanytree‐cotreedecompositionofG‣ ComputedinO(n)timeviadepth‐orbreadth‐firstsearch

‣ Foranyedgee∈L,letγ(uv)betheuniquecycleinT∪e‣ ComputedinO(1)timeperedge

‣ {γ(e)|e∈L}isabasisforΗ1(Σ)

‣ Totalconstructiontime:O(n+k)=O(ng)

‣ Theshortesthomologybasismaynothavethisform.

23

[Eppstein2003]

Page 27: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Shortesthomologybasis

‣ FixanarbitrarycoefficientfieldR.

‣ EachcycleintheshortesthomologybasisoverRisalsoaloopinthegreedyhomotopybasisatsomebasepoint.[Dey,Sun,Wang2010]

‣ AllO(gn)candidatecycles,alongwithvectorsencodingtheirhomologyclasses,canbecomputedinO(gn2)time.

24

[Erickson,Whittlesey2005]

Page 28: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

‣ BecauseH1(Σ;R)isavectorspace,findingtheshortestbasisamongthecandidatecyclesisamatroidoptimizationproblem.

‣ Solvedbystandardgreedyalgorithm[Kruskal1956]

‣GreedyalgorithmrunsinO(gnlogn+g3n)time‣ Sorthomologyvectors;useGaussianeliminationtotestindependence

Shortesthomologybasis

25

B←Øforeachcandidatecycleγinincreasinglengthorder

ifγislinearlyindependentfromBaddγtoB

[Erickson,Whittlesey2005]

Page 29: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

‣ BecauseH1(Σ;R)isavectorspace,findingtheshortestbasisamongthecandidatecyclesisamatroidoptimizationproblem.

‣ Solvedbystandardgreedyalgorithm[Kruskal1956]

‣GreedyalgorithmrunsinO(gnlogn+g3n)time‣ Sorthomologyvectors;useGaussianeliminationtotestindependence

Shortesthomologybasis

25

B←Øforeachcandidatecycleγinincreasinglengthorder

ifγislinearlyindependentfromBaddγtoB

[Erickson,Whittlesey2005]

Page 30: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

‣ BecauseH1(Σ;R)isavectorspace,findingtheshortestbasisamongthecandidatecyclesisamatroidoptimizationproblem.

‣ Solvedbystandardgreedyalgorithm[Kruskal1956]

‣GreedyalgorithmrunsinO(gnlogn+g3n)time‣ Sorthomologyvectors;useGaussianeliminationtotestindependence

Shortesthomologybasis

25

B←Øforeachcandidatecycleγinincreasinglengthorder

ifγislinearlyindependentfromBaddγtoB

[Erickson,Whittlesey2005]

Page 31: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Shortesthomologybasis

‣ ForanycombinatorialsurfaceΣandanyfieldR,theshortestbasisforH1(Σ;R)canbecomputedinO(gnlogn+g3n)time.

26

[Chen,Friedman2010;Dey,Sun,Wang2010]

Page 32: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Shortesthomologybasis

‣ ForanycombinatorialsurfaceΣandanyfieldR,theshortestbasisforH1(Σ;R)canbecomputedinO(gnlogn+g3n)time.

‣ ForanysimplicialcomplexΣandanyfieldR,theshortestbasisforH1(Σ;R)canbecomputedinO(n4)time.

‣ Usepersistenthomologyinsteadoftree/cotreedecompositionsandexplicitelimination.

26

[Chen,Friedman2010;Dey,Sun,Wang2010]

Page 33: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Higher‐dimensionalhomology

‣ Foranyfixedp≥2,forarbitrarycomplexesΣ,computingtheminimum‐volumebasisforHp(Σ;ZZ2)isNP‐hard.‣ volumeofp‐cycle=totalweightofallp‐cells

27

[Chen,Friedman2007;Chen,Friedman2010]

Page 34: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Higher‐dimensionalhomology

‣ Foranyfixedp≥2,forarbitrarycomplexesΣ,computingtheminimum‐volumebasisforHp(Σ;ZZ2)isNP‐hard.‣ volumeofp‐cycle=totalweightofallp‐cells

‣ Foranyp≥2,forarbitrarycomplexesΣ,theminimum‐radiusbasisforHp(Σ;R)canbecomputedinpolynomialtimeforanyfieldR.‣ radiusofp‐cycle=radiusofsmallestballcontainingthecycle

‣ usesexactlythesamegreedyapproach

27

[Chen,Friedman2007;Chen,Friedman2010]

Page 35: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

WhataboutZZ?

Openproblem:CantheoptimalbasisforH1(Σ,ZZ)becomputedinpolynomialtime,orisitNP‐hard?

‣ Thecharacterizationofcyclesrequiresthecoefficientringtobeafield!

‣ Thegreedyalgorithmrequiresthecoefficientringtobeafield!

‣ H1(Σ,ZZ)isnotavectorspace,soamaximalsetoflinearlyindependentvectorsisnotnecessarilyabasis,evenforsurfaces.

28

[Erickson,Whittlesey2005]

Page 36: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Shortesthomotopicpaths/cycles

29

Page 37: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Shortesthomotopicpaths

30

‣ Computetheshortestpathπ'homotopictoagivenpathπinacombinatorialsurfaceΣ.

‣ Thepathπ'istheprojectionoftheshortestpathintheuniversalcoverΣ~betweentheendpointsofanyliftπofπ.

‣ Thischaracterizationdoesnotimmediatelygiveusanalgorithm;theuniversalcoverΣ~isinfinite!

‣ InsteadweneedtoconstructsomefiniterelevantsubsetofΣ~.

Page 38: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Polygonswithholes

(1) Triangulatethepolygon,andlabeleachdiagonal

31

[HershbergerSnoeyink1994]

A

B

C

D

E

F GH

I

J

K

L

M

NO

P

Q

R

S

TU

V

W

X

YZ12

3

4

Page 39: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Polygonswithholes

(2) Computethecrossingsequenceofπ

32

[HershbergerSnoeyink1994]

UTSRR21Z4334YXWVTSRQPJIHHHGFCBBAABDEKLMNOPPJ

A

B

C

D

E

F GH

I

J

K

L

M

NO

P

Q

R

S

TU

V

W

X

YZ12

3

4

Page 40: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Polygonswithholes

(3) Reducethecrossingsequenceofπ

33

[HershbergerSnoeyink1994]

UTSRR21Z4334YXWVTSRQPJIHHHGFCBBAABDEKLMNOPPJUTS21Z44YXWVTSRQPJIHGFCBDEKLMNOJUTS21ZYXWVTSRQPJIHGFCBDEKLMNOJ

A

B

C

D

E

F GH

I

J

K

L

M

NO

P

Q

R

S

TU

V

W

X

YZ12

3

4

Page 41: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Polygonswithholes

(4) Computethesleeveofthereducedcrossingsequence

34

[HershbergerSnoeyink1994]

Thesleeveistherelevantsubsetoftheuniversalcover!

Page 42: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Polygonswithholes

(5) Computetheshortestpathinthesleevebetweenendpointsofπ

35

[HershbergerSnoeyink1994]

Usestandard“funnel”algorithm[Chazelle1982;Lee,Preparata1984]

Page 43: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Polygonswithholes

‣GivenapolygonalpathπwithksegmentsinapolygonPwithholes,theshortestpathinPhomotopictoπcanbecomputedinO(nlogn+kn)time.‣ BuildingtheinitialtriangulationtakesO(nlogn)time.

‣ EverythingelsetakesO(kn)time.

‣ Asimilaralgorithmfindstheshortestcyclefreelyhomotopictoagivencycle,inthesametimebound.

36

[HershbergerSnoeyink1994]

Page 44: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Combinatorialsurfaces

GivenapathπwithkedgesinacombinatorialsurfaceΣ,theshortestpathhomotopictoπcanbefoundinO(gn(logn+k))time.

(1) BuildatighthexagonaldecompositionofΣ—O(gnlogn)time

(2)Reducethepathπ—O(gnk)time

(3)BuildrelevantregionofΣ~—O(gnk)time

(4)Findtheshortestpathintherelevantregion—O(gnk)time

37

[ColindeVerdière,Erickson2006]

Page 45: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Tighthexagonaldecomposition

4gcycles,eachasshortaspossibleinitsfreehomotopyclass,thatdecomposeΣinto“right‐angledhexagons”

38

[ColindeVerdière,Erickson2006]

Page 46: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Universalcover

39

[ColindeVerdière,Erickson2006]

Page 47: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

40

M.C.Escher,CircleLimitIV:HeavenandHell(1960)

Universalcover

Page 48: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

40

M.C.Escher,CircleLimitIV:HeavenandHell(1960)

Universalcover

Page 49: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Relevantregion

41

[ColindeVerdière,Erickson2006]

Page 50: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Relevantregion

41

[ColindeVerdière,Erickson2006]

Page 51: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Relevantregion

42

[ColindeVerdière,Erickson2006]

Page 52: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Relevantregion

42

[ColindeVerdière,Erickson2006]

Page 53: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Relevantregion

42

[ColindeVerdière,Erickson2006]

Page 54: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Summary

‣GivenapathπwithkedgesinacombinatorialsurfaceΣ,theshortestpathhomotopictoπcanbefoundinO(gn(logn+k))time.

‣ AsimilaralgorithmcomputestheshortestcyclefreelyhomotopictoagivencycleinO(gnklognk)time.

43

[ColindeVerdière,Erickson2006]

Page 55: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Shortesthomologouscycles

44

Page 56: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Whatcoefficients?

45

Page 57: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Whatcoefficients?

45

Optimalhomologybases:‣ PolynomialtimeforH1withfieldcoefficients(likeZZ2orIR)

‣ NP‐hardforhigher‐dimensionalhomologywithZZ2coefficients

‣ OpenforH1withZZcoefficients,evenforsurfaces

Page 58: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Whatcoefficients?

45

Optimalhomologybases:‣ PolynomialtimeforH1withfieldcoefficients(likeZZ2orIR)

‣ NP‐hardforhigher‐dimensionalhomologywithZZ2coefficients

‣ OpenforH1withZZcoefficients,evenforsurfaces

Optimalhomologouscycles:‣ NP‐hardforH1withZZ2coefficients,evenforsurfaces

‣ NP‐hardforH1withZZcoefficients

‣ PolynomialtimeforanydimensionwithIRcoefficients

‣ PolynomialtimeformanifoldsofanydimensionwithZZcoefficients

Page 59: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

ShortestZZ2‐homologouscycles

46

Page 60: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

ZZ2‐Homology

47

‣ 1‐chain=subgraphof1‐skeleton

‣ 1‐cycle=evensubgraphof1‐skeleton

‣ 1‐boundary=boundaryoftheunionof2‐cells

‣ Twoevensubgraphsarehomologousifftheirsymmetricdifferenceisaboundarysubgraph

Page 61: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

ShortestZZ2‐homologous“cycles”

48

‣Givena{cycle,closedwalk,evensubgraph}γinacombinatorialsurface,findthe{cycle,closedwalk,evensubgraph}ofminimumlengthintheZZ2‐homologyclassofγ.

‣Unfortunately,everyvariantisNP‐hard![Chambers,ColindeVerdière,Erickson,Lazarus,Whittlesey2006;Chambers,Erickson,Nayyeri2009]

‣ Butsolvablein2O(g)nlogntime.[Erickson,Nayerri2011]

Page 62: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

NP‐hard

49

Hamiltoniancycleingridgraphs

[Chambers,ColindeVerdière,Erickson,Lazarus,Whittlesey2006]

Page 63: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

ZZ2‐homologycoverΣQ

TheuniqueconnectedcoveringspaceofΣwhosegroupofdecktransformationsisΗ1(Σ;ZZ2).

‣ CutΣalonganysystemofloopsℓ1,ℓ2,...,ℓ2gintoadiskD.

‣ Make22gcopies(D,h)ofD,oneforeachhomologyclassh∈Η1(Σ;ZZ2)=(ZZ2)2g.

‣ Foreachclasshandindexi,glue(D,h)to(D,h⊕2i)alongℓi.

‣ Σ�hasn=22gnvertices(v,h)andgenusg=22g(g–1)+1.

50

[Erickson,Nayerri2011]

Page 64: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

ZZ2‐homologycoverΣQ

51

00

10

01

11

1 2

1

1

1

1

1

1

1

1

2

2

2

2

2

2

2

2

00

11

01

10

1

1

1

12

2

2

2

[Erickson,Nayerri2011]

TheuniqueconnectedcoveringspaceofΣwhosegroupofdecktransformationsisΗ1(Σ;ZZ2).

Page 65: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

ShortestZZ2‐homologousclosedwalks

‣ EveryclosedwalkωinΣthroughavertexvistheprojectionofawalkωfrom(v,0)to(v,[ω])inΣ�.

‣ TheshortestclosedwalkinΣinclasshistheprojectionoftheshortestpathinΣ�fromanynode(v,o)tocorrespondingnode(v,h)

‣ nindependentshortestpathcomputations:O(nn)=O(22gn2)time.[Henzinger,Klein,Rao,Subramanian1997]

‣ parametricshortestpathdatastructures:O(ggnlogn)=2O(g)nlogntime.[Cabello,Chambers,Erickson2011]

52

[Erickson,Nayerri2011]

Page 66: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Moregeneralspaces

‣ Inmoregeneralsimplicialcomplexes,shortesthomologousevensubgraphsareNP‐hardtoapproximatetoanyconstantfactor,evenwhenβ1=1.[ChenFreedman2010]

53

Page 67: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

ShortestIR‐andZZ‐homologous“cycles”

54

Page 68: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

IR‐chains

55

‣ FixafinitecellcomplexXofanydimensionandanon‐negativeintegerp≥1.

‣ Letm=#p‐cellsandn=#(p+1)‐cells.

‣ Realp‐chainscanbeidentifiedbyrealvectorsc=(c1,c2,...,cm)∈IRm

‣ Theweightofap‐chainis||c||1=Σi|ci|

Page 69: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Minimum‐weightIR‐homologouschains

56

‣ Problem:Givenarealp‐chaincinsomecellcomplexX,computetheminimum‐weightp‐chainxthatisIR‐homologoustoc.

‣ Thisproblemcanbesolvedinpolynomialtimebyexpressingitasalinearprogrammingproblem.

[Sullivan1990;Dey,Hirani,Krishnamoorthy2010]

Page 70: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

IR‐homologylinearprogram

57

‣c∈IRm—inputp‐chain

‣x=x+–x–∈IRm—outputp‐chain

‣y∈IRn—(p+1)‐chain

‣ [∂]∈IRm×n—boundarymatrix

minimize Σi(xi++xi

–)subjectto x+–x–=c+[∂]y

x+,x–≥0

[Sullivan1990;Dey,Hirani,Krishnamoorthy2010]

Page 71: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Minimum‐weightZZ‐homologouschains

58

‣ SwitchingfromIR‐homologytoZZ‐homologymakestheproblemNP‐hard.[Hirani,Dunfield2010]

‣ Itcanbeformulatedasanintegerprogrammingproblem:

minimize Σi(xi++xi

–)subjectto x+–x–=c+[∂]y

x+,x–≥0x+,x–∈ZZmy∈ZZm

[Sullivan1990;Dey,Hirani,Krishnamoorthy2010]

Page 72: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Totalunimodularity

‣ Amatrixistotallyunimodularifeverysquareminorhasdeterminant–1,0,or1.

‣ IfAistotallyunimodular,thenforanyintegervectorb,everyvertexofthepolyhedron{x|Ax≤b}hasintegercoordinates.

‣ Iftheconstraintmatrixforalinearprogramistotallyunimodular,itssolutionisanintegervector.

59

[Veinott,Dantzig1968]

Page 73: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Totalunimodularity

‣ Theboundarymatrix[∂p+1]ofacellcomplexXistotallyunimodularifandonlyifHp(Y,Z)istorsion‐freeforallpuresubcomplexesZ⊂Y⊆XwithdimY=p+1anddimZ=p.

‣ Thisconditioncanbecheckedinpolynomialtime.[Seymour1980]

‣ Satisfiedbyanyorientable(p+1)‐manifoldwithboundary.

‣ IfXmeetsthiscondition,thenoptimalZZ‐homologouschainsinXcanbefoundinpolynomialtimebylinearprogramming.

60

[Dey,Hirani,Krishnamoorthy2010]

Page 74: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

IReal1‐cycles

‣ Real1‐chain=functionφ:E→IR‣ Assignsadirectionandnon‐negativevaluetoeachedge

‣ Boundary∂φ(v):=Σu∈Vφ(u→v)–Σw∈Vφ(v→w)

‣ Real1‐cycle=functionφ:E→IRsuchthat∂φ=0

‣Graphtheory/algorithms/optimizationpeoplecallthisacirculation.

61

Page 75: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Minimum‐costcirculations

‣DirectedgraphG=(V,E)whereeveryedgee∈Ehasanon‐negativecapacityc(e)andacost$(e)

‣ AfeasiblecirculationinGisafunctionφ:E→IRsatisfying...‣ capacityconstraint:0≤φ(e)<c(e)foreveryedgee∈E

‣ conservationconstraint:Σu∈Vφ(u→v)=Σw∈Vφ(v→w)foreveryvertexv∈V

‣ Thecostofacirculationφis$(φ)=Σe∈E$(e)⋅φ(e)

‣ Thefeasiblecirculationofminimumcostcanbecomputedinpolynomialtime[Tardos1985;Goldberg,Tarjan1989]

62

Page 76: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Orientablemanifolds

‣ IfXisanorientable(p+1)‐manifold,thedualoftheIR‐homologylinearprogramdescribesaminimum‐costcirculationproblem.‣ G=dual1‐skeletonofX

‣ nverticesdualto(p+1)‐cells

‣ mdirectededgesdualtoorientedp‐cells

‣ everyedgehascapacity1

‣ costofeachedgeisthecoefficientofcforcorrespondingp‐cell

‣ SooptimalZZ‐homologouschainsinorientablemanifoldscanbecomputedinpolynomialtimeviacirculationalgorithms.

‣ MuchfasterthangenericLPalgorithms,bothintheoryandinpractice.

63

[Sullivan1990]

Page 77: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Maximumflowsinsurfacegraphs

64

Page 78: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Maximumflows

65

‣DirectedgraphG=(V,E),capacityfunctionc:E→IR+,twoverticess,t

‣ Afeasible(s,t)‐flowinGisafunctionφ:E→IRsatisfying...‣ capacityconstraint:0≤φ(e)<c(e)foreveryedgee∈E

‣ conservationconstraint:Σu∈Vφ(u→v)=Σw∈Vφ(v→w)foreveryvertexv∈V\{s,t}

‣ Flowφhasvalue|φ|=Σw∈Vφ(s→w)–Σu∈Vφ(u→s)

‣ Acirculationisjustaflowwithvalue0

‣ Aflowisjustarelative1‐cycle

‣Wewantafeasible(s,t)‐flowwithmaximumvalue.[FordFulkerson1955]

Page 79: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Maximumflows

66

[HarrisRoss’55,FordFulkerson‘56]

Page 80: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

/54

Maximumflows

67

Howmuchwatercanweinjectatsandextractatt?

s

t

[“Blush”prototyperadiatordesignbyThorunnArnadottir]

Page 81: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Maximumflowalgorithms

‣ IngraphswithnverticesandO(n)edges:

‣O(n2logn)time[Sleator,Tarjan1983;GoldbergTarjan1988;Goldberg,Grigoriadis,Tarjan1991;Hochbaum2008]

‣O(n3/2lognlogU)timeforintegercapacitieslessthanU[Goldberg,Rao1998]

‣ Inplanargraphs:

‣Undirected:O(nloglogn)time[Wulff‐Nilsen2010;Italiano,Sankowski2010]

‣ OnlyrecentlyimprovedfromO(nlogn)time[Reif1983;HassinJohnson1985;Frederickson1987]

‣Directed:O(nlogn)time[Borradaile,Klein2009;Erickson2010]

68

Page 82: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Cocycles

‣ SupposeGisembeddedonanorientablesurfaceΣ

‣ AcocycleisasubgraphλofGdualtoadirectedcycleλ*inG*

‣Defineφ(λ)=Σe∈γφ(e)andc(λ)=Σe∈γc(e)

69

[Chambers,Erickson,Nayyeri2009]

Page 83: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Homologousflows

‣ An(s,t)‐flowφisjustareal1‐chainwithboundary|φ|(t–s)

‣ Easylemma:Flowsφandψarehomologousiffφ(λ)=ψ(λ)foreverycocycleλ.

‣ SetofhomologyclassesofflowsistherelativehomologygroupH1(Σ,{s,t})=IR2g+1

70

[Chambers,Erickson,Nayyeri2009]

Page 84: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Feasiblehomologyclass

‣ Ahomologyclassofflowsisfeasibleifitcontainsafeasibleflow

‣ Lemma:Thehomologyclass[φ]isfeasibleifandonlyifφ(λ)≤c(λ)foreverycocycleλ.

‣ Feasibilityof[φ]canbetestedinO(g2nlog2n)time‣ ShortestpathalgorithminthedualresidualnetworkG*

φ

‣ Findseitherafeasibleflowhomologoustoφoracocyclethatφoverflows.

71

[Venkatesan’83(planar);Klein,Mozes,Weimann2009(planar);Chambers,Erickson,Nayyeri2009]

Page 85: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Linearprogramming,again

‣ Representflowhomologyclasses[φ]asvectorsinIR2g+1

‣φ(λ)≤c(λ)isalinearconstraintonthehomologyvector[φ]

‣ Flowvalue|φ|isalinearfunctionofthehomologyvector[φ]

‣ Sofindingthefeasibleflowhomologyclassofmaximumvalueisalinearprogrammingproblem

72

[Chambers,Erickson,Nayyeri2009]

Page 86: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Linearprogramming,again

Findingthefeasiblehomologyclassofmaximumvalueisalinearprogrammingproblem

‣Goodnews:Only2g+1variables!‣ ThefeasiblehomologypolytopeisjusttheprojectionofthefeasibleflowpolytopeintoIR2g+1

‣ Badnews:nO(g)non‐redundantconstraints—toobigtosolveexplicitly!

73

[Chambers,Erickson,Nayyeri2009]

Page 87: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Linearprogramming,again

Wehaveamembership/separationoraclethatrunsinO(g2nlog2n)time,sowecansolvetheflowhomologyLPimplicitly:

‣O(g8nlog4nlog2C)timeforintegercapacitiesthatsumtoC,viacentral‐cutellipsoidmethod[ShorNemirovskyYudin‘72;Khachiyan‘79;GrötschelLovászSchrijver‘81,‘93]

‣ gO(g)n3/2timeviamultidimensionalparametricsearch[Cohen‘91;CohenMegiddo‘93;NortonPlotkinTardos‘92;AgarwalSharirToledo‘93]

74

[Chambers,Erickson,Nayyeri2009]

Page 88: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Flowsinsurfacegraphs

‣Maximumflowsinsurface‐embeddedgraphscanbecomputedinO(g8nlog4nlog2C)timeforintegercapacities,oringO(g)n3/2timeforarbitrarycapacities.

‣ Fasterthansparse‐graphalgorithmsbyO(n1/2)wheng=O(1).

‣ Similaralgorithmscomputeminimum‐costcirculationsinthesametimebounds.

‣Dualalgorithmscomputeminimum‐weightIR‐orZZ‐homologouscirculationsincombinatorialsurfacesinthesametimebounds.

75

Page 89: Optimizing Cycles and Bases · Short Course on Computational Topology January 5, 2011 Jeff Erickson Computer Science Department University of Illinois at Urbana‐Champaign jeffe@cs.illinois.edu

Thankyou!

76

Thankyou!Thankyou!Thankyou!Thankyou!Thankyou!Thankyou!