Page 1

PeterEades

y

QingwenFeng

y

XueminLin

z

HiroshiNagamochi

x

June???????

Abstract

Hierarchicalgraphsandclusteredgraphsareusefulnon?classicalgraphmodelsforstructured

relationalinformation?Hierarchicalgraphsaregraphswithlayeringstructures?clusteredgraphs

aregraphswith recursiveclusteringstructures?BothhaveapplicationsinCASEtools?software

visualization? andVLSIdesign? Drawing algorithmsfor hierarchical graphshaveb eenw ellinv es?

tigated?Howev er?theproblemofstraight?linerepresentation hasnotbeensolvedcompletely?

Inthis paper?we answer the question?does ev ery planarhierarc hical graphadmita planar

straight?linehierarc hicaldrawing?We presentanalgorithm thatconstructssuchdrawings in

lineartime?Also?we answ erabasicquestion for clusteredgraphs?thatis?do esev eryplanar

clusteredgraphadmitaplanarstraight?linedra wing withclusters drawnasconvexpolygons?

Wepro videamethod forsuch drawingsbased onouralgorithmforhierarchicalgraphs?

Keywords?Computational geometry?automaticgraph dra wing? hierarchicalgraph?clustered

graph?straight?linedrawing?

?Introduction

A graphG??V?E?consists ofa setVofv ertices anda setEofedges?that is?pairsofvertices?

Graphsarecommonlyusedto mo delrelationsincomputing?andmanysystemsformanipulating

graphs have recentlybeen develop ed?Examples includeCASEtools??? ??knowledgerepresentation

systems ??? ??softw arevisualizationtools??? ??andVLSI designsystems?????Agr aphdrawing

algorithmreads asinputacom binatorialdescriptionofagraph? and producesasoutputavisual

representationofthegraph?Suchalgorithmsaimto producedrawingswhich areeasytoreadand

easytorememb er? Manygraph dra wing algorithmshaveb eendesigned? analyzed? tested andused

in visualizationsystems?? ??

With increasingcomplexityof the informationthatwew antto visualize?we need more structure

ontop ofthe classical graphmo del?Sev eralextended graphmo delshavebeen proposed?????????

??? ?? ??In thispaper?weconsidertwo suchmo dels?

?

Thisw orkw as supp ortedbya research grant fromtheAustralianResearc hCouncil andthesubsidyfromKyoto

UniversityFoundation?Anextendedabstract ofthispap erw aspresen tedat theSymp osiumonGraphDra wing

?GD?????Berkeley?California??????

y

Department ofComputerScience and Softw areEngineering?Univ ersityofNewcastle?Univ ersity Drive?

Callaghan?NSW ?????Australia?Email?feades?qwfengg?cs?newcastle?edu?au

z

SchoolofComputerScienceandEngineering?University ofNew SouthW ales?SydneyNSW?????Australia?

Email?lxue?cse?unsw?edu?au

x

Departmentof AppliedMathematics and Physics?Ky otoUniversity?Ky oto ?????????Japan?Email?

naga?kuamp?kyoto?u?ac?jp

?

Page 2

ELEC170

COMP112

Discrete Str.

COMP114

Society

MATH112

MATH111

MATH151

Discr. Math

COMP222

Th. Comp.

COMP223

Algs.

COMP221

SE I

COMP224

OS

Networks

COMP328

COMP333

Mach Int

COMP329

Compilers

COMP325

DB

COMP226

CPL

COMP326

Data Sec

SE II

COMP321

Graphics

COMP332

COMP330

GUI

COMP331

Adv Algs

COMP324

Par Proc

COMP441

Cryptog

COMP443

FR in AI

COMP445

CGeom

COMP453

Inf Vis

GraphAlgs

COMP447

COMP451

ParProc

DisOS

COMP450

COMP452

DataBases

COMP448

Adv Comp

COMP111

Intro to CS

COMP444

Prog Sem

COMP421

SE PROJ

Assumed Knowledge

Prerequisite

Core Subject

Sem 3

Sem 4

Sem 7

Sem 8

Sem 2

Sem 1

Sem 6

Sem 5

Figure ??An exampleofa hierarchicalgraph?

? Hier archic al graphsare graphs withvertices assignedtolay ers? Hierarchicalgraphsapp earin

applicationswhere hierarchicalstructures are inv olv ed????????Forexample?Figure?shows

aprerequisitediagramfor subjectsina Bachelor?sdegree inComputerScience? anedgefrom

atobmeans thata isaprerequisiteofb? andeach layerrepresentsasemester ofstudy? In

the exampleof Figure??thevertices areassigned tolayers for semantic reasons?Inother

examples?the lay erassignment ischosen toimprovethe readability of thedrawing?see? for

example? ?????

? Clustered graphsaregraphswithrecursiveclustering structures which appearin many struc?

tureddiagrams ???? ??? ????? ??Forexample? Figure?showsarelationaldiagram ofsome

organizations in NewSouthWales? anedgeb etw eena andbindicatesajoint projectb etw een

a andb?and eachclusterrepresentsa group oforganizations?

Both hierarchicalgraphsandclustered graphshave thepow erofrepresentingcertainadditional

structures requiredbyapplications? Thedra wings ofhierarchical graphs andclustered graphs

should re?ect these structures?and thereforem ustmeetadditional constraints?

A graphG??V?E?isdra wnby specifyinga location inthe planefor eachv ertex inV and

a route?a simpleJordan curve? for eachedge inE? Thedrawing isplanar if no pairof edge

?

Page 3

UNcstle

ANU

UNSW

Universities

Institutions

UTS

CSIRO

Telstra

BHP

Industry

Figure??An example ofaclustered graph?

routes cross? andthegraph isplanar if itadmitsa planar drawing? The planarity prop erty has

b een theob ject ofm uch ofGraph Theory?For visualization purp oses?it isw ellestablishedthat

edgecrossings signi?can tlyinhibitreadability ????? andmanyalgorithms for constructingplanar

drawings havebeen dev eloped ?? ??

A hierarc hicalgraphis drawnwithv erticesofa lay er on thesame horizon talline? andedges as

curves monotonicinydirection?Ahierarchical graphishierar chical planar?h?planar? ifit admitsa

drawingwithoutedge crossings?Algorithms fortestinghierarc hicalplanarityarepresentedin ?????

F ora clusteredgraph? theclustering structureisrepresentedbyaclosed curvethatde?nesa

region? The region containsthedra wing ofall thevertices whichbelong tothatcluster?Aclustered

graph iscompound planar ?c?planar? if itadmitsadrawing with no edgecrossings oredge?region

crossings? Algorithms for testingcompoundplanarit yarepresen ted in???? ?? ??

Thehierarchicalstructure inhierarchical graphs imposesconstrain tsonthey ?coordinate? since

allverticesof the samelay erhastobe drawnon exactlythesamehorizon talline? How ev er?there

arenoconstrain tson theotherdimension? thatis? thex?coordinate?Theclusteringstructure in

clustered graphscanbe viewedasconstrain ts onb othdimensions? that is?allv erticesof thesame

cluster are restrictedtoaregion?

One of thebasic graph drawing conv entions consistsof representing edges as straight?line seg?

ments?Thestraigh t?line dra wingconv entionis widely usedinvisualization?Graph drawing systems

suchasthe GraphLay outTo olkit ????? GraphEd???? andDiagram Serv er??? containa mo dule

for creating straight?line dra wingsof classical graphs? In tuitiv ely? theeye canfollowa straigh t?line

easily?Sugiy ama????and Batini ???? liststraigh tness oflinesas an importantaim forgraph drawing

algorithms? This intuitionhasb eencon?rmedbyhuman experiments ???? ???? More imp ortantly?

there are sev eralgeneralmethods for drawing graphswhichb eginbyadding dummyv erticeson

edges andthenapplyastraight?linedra wingalgorithm? Thisdemand has spa wnedaconsiderable

amount ofattentionto straight?linedra wingsinthe researchcomm unity?

Forclassical graphs?itiswellknownthateveryplanargraphadmits astraight?line drawing

withoutedgecrossings ???? ???????Tutte????prov edthatev erytriconnectedplanargraph ad?

mitsaplanarstraight?line drawing whereallthe faceboundariesaredrawnas convexpolygons?

Algorithmsfor such drawingsha vealsobeen investigatedbyChibaet al???????Morerecently?

?

Page 4

ings??The ?rstquestionwe addressis offundamentalsigni?cance for drawinghierarchicalgraphs?

doesev eryplanarhierarchical graphadmita planar straight?linehierarchical drawing?While many

algorithms haveb eendevelop ed todrawhierarc hicalgraphs ??? ?????? ??? ??? ??? ?? ?? theyallintro?

duceb endstoroutetheedges?and the basicproblem ofplanar straight?line dra wingshas notb een

solv edcompletely? It hasb een shownby diBattista andT amassia ???that everyplanar st?graph

admits an upward drawing? that is?a dra wingwhere all arcsare dra wnas straight?linesegmen ts

p oin ting upw ard? How ev er? theproblem forhierarc hicalgraphs isdi?eren t?b ecausewe have more

constraints?v ertices of thesame lay ershouldbe drawn on the same horizontal lineand the layers

shouldbe an equaldistance apart?A method toconstruct straight?line drawings ofplanar hier?

archical graphswas presen tedby Eades?Lin andT amassia ??? ??Theyusea tec hniquesimilar to

thatin????byTutte??nding thepositionfor ev eryvertex ina globalmanner? Intheiralgorithm?

dummyvertices areaddedto transform anedge that spans morethantwolay ers toasequence of

edges? each ofwhichspanstwoconsecutive layers? Infact?by theconv exityofthe drawing?the

dummyvertices donotproduceb ends?The problemwiththe algorithmof ???? isthatit onlyw orks

foraspecialclass ofhierarchicalgraphs?

Herewepresen tanalgorithm thatw orks for any planar hierarchicalgraphs?We useadivide

and conquerapproac h??nding theposition for everyvertex inarecursive manner?Thecore ofthe

algorithm is?ndingasuitablepartition ofthegraph?

Thesecondquestionaddressed inthis paper isfor clusteredgraphs?do esev eryplanarclustered

graphadmita planarstraight?linedrawingwithclustersdra wn asconvexpolygons?Analgorithm

forstraight?linedrawing ofclustered graphshasbeen presentedbyFeng?CohenandEades?????

Again?however?it onlyappliestoaspecialclassofgraphs? In particular?it onlyappliesto graphs

witha certain strongconnectivity property?

Therestofthepaperisorganized asfollows? Insection ??wepresentsome terminologyfor

hierarchical graphs?Insection??we provethat ev eryplanarhierarchicalgraphadmitsaplanar

straight?linedrawing?Alineartimealgorithmthatproducessuchdrawingsispresen ted?We

in troduce theclusteredgraphmodel insection ??Insection??weshowthateveryplanarclustered

graphadmitsa planarstraight?lineconvexclusterdrawing?Thisisaccomplished by transforming

clustered graphsinto hierarchicalgraphs?Basedonthis?we presentanalgorithmthatcomputes

suchdrawings inlineartimeinterms ofthe outputsize? In section??we discusssomeexamples?

andposesomeopenproblems?

?HierarchicalGraphs

Inthissectionweintroduce theterminology?and somefundamen talprop ertiesofhieorarchical

graphs?

Adirected edge witha tailu andaheadvis denotedby?u?v??Ahier archicalgraphH?

?V?A???k?consistsofadirectedgraph?V?A??ap ositivein tegerk? and? for eachvertexu?an

integer??u??????????k? withthe prop ertythat if?u?v??A?then??u????v??F or??i?k?

thesetfuj??u??igis theithlayerofH andisdenotedbyL

i

?Thesp anof anedge?u?v?is

??v????u??Anedge ofspangreaterthanoneislong?andahierarchicalgraphwith nolongedges

?

Page 5

H

A drawing ofa graphG??V?E?assignsapositionp?v???x?v??y?v ??toeachv ertexv?V

anda curve joiningp?u? andp?v? to each edge?u?v??E?A hierarchical graphis conv entionally

dra wn withlayerL

i

on the horizontalliney?i ?thatis?y?v????v? forallv erticesv ?? andedges

as curvesmonotonic inydirection? If nopair ofnonincident edges intersect inthedrawing? thenwe

say it isa hier archic alplanar?h?planar?drawing? Note thatanon?prop erhierarchicalgraph canbe

transformed intoaprop erhierarc hicalgraphby adding dummyv ertices onlong edges? Itis easily

shown thatanon?prop erhierarchicalgraph is h?planarifandonlyifthe corresp onding proper

hierarc hicalgraph is h?planar?Ahierar chic al planar embedding ofaproperhierarchicalgraph is

de?nedby theorderingofverticesoneachlay er ofthegraph? Notethatev erysuchemb edding

hasa uniqueexternalface?Alsonotethat ev eryprop erh?planar graphadmitsastraight?line

hier archical drawing?thatis?a drawing whereedges aredra wn asstraigh t?linesegmen ts?How ev er?

fornon?proper hierarchicalgraphs?the problem isnottrivial?sincenob endsare allow ed onlong

edges?

Aplanegr aph referstoa planar graphembedded inthe plane?Inother words?aplanegraph

containsaplanargraphandaplanar embedding witha sp eci?edexternalface?We callaplane

embedded hierarchicalgraphahier archic alplanegraph? Ifahierarchicalplanegraph hasonlyone

sourcesandonesinkt? thenwecallitahier archical?stplanegraph?Observethatahierarchical?st

planegraph isaconnectedgraph?anditssourcesand sinktm ust lieonthebottomlayerand

thetoplayer? respectiv ely? InSection ????wewill showthat everyhierarchicalplanegraphcanbe

extendedtoahierarchical?stplanegraphby addingO?n? newverticesandedges?

Theemb edding ofahierarchical?stplane graphHdetermines?for ev eryvertexv?a left?right

relation amongup?neighb orsofv?seeFigure??? Theheadwof therightmost ?respectivelyleftmost?

edgeoutgoingfromviscalled theright up?neighbor?respectiv ely the left up?neighbor?ofv? andis

denotedbyr

?

H

?v??respectiv ely?

?

H

?v ???Therightdown?neighb orr

?

H

?v? and theleft down?neighbor

?

?

H

?v?ofv arede?ned analogously?

Hierarchicalgraphs aredirected graphs andthuswe canborrowmuchof the standardtermi?

nology of graph theory???? Theterms ?path???cycle?? and?biconnectivit y??when appliedtoa

directedgraphin this paper?refer totheunderlying undirected graph?To denoteacycleofa

plane graph?we usethesequenceofvertices onthe cyclein clockwiseorder?F oracycleorpath

P??v

?

?v

?

?????v

k

??anedgeb etweentwonon?consecutivev ertices inPiscalledachordofP?see

Figure??a???A cycleorpathis calledchordlessifithasnochord?Inhierarchical graphs?edges

aredirectedfroma low er lay er toahigher layer? Apathiscalledmonotonicifthe directionsof the

edges do notchangealongthepath?Inotherw ords?apathismonotonicifthe lay er increases?or

decreases?aswegoalongthepath?see Figure??b???Notethatfrom avertexv?amonotonicand

chordless pathfromvtoasinkcanbeobtainedbytraversing thehighest up?neighb orsoneafter

another?Similarly?amonotonicandchordlesspathfromasourcetovcanbefoundbytracingthe

low estdown?neighborsfromv?

Thefollowinglemma givessomebasicpropertiesofthebiconnectedcomponentsofhierarchical?

stplanegraphs?Essentiallyitimpliesthat?forhierarchical?stplanegraphs?we canrestrict our

attentionto thebiconnectedcomponents?

Lemma?LetH??V?A???k?beahier archical?stplanegraph?then?

?