KAZUO IWANO+ AND KENNETH STEIGLITZ+. Abstract. ... with a convex polygon a yw as follows: auw is the convex hull of all points associated. * Received by ...
SIAM J COMPUT Vo1 19,No 5,pp 883 901,Octobcr 1990
0 1990 SOcicty for indust
at and Applicd Mathcmatics
008
A SEplEIRING ON CONVEX POLYGONS AND ZERO… PROBLE IS*
SU
I CYCLE
KAZUO IWANOtt AND KENNETH STEIGLITZI Abstract. Two natural opcrations on thc sct of convex polygons are sho、 vn to form a closcd scmiring; vo operations arc vector summation and convex hull ofthe union Various propcrtics ofthcsc operations arc investigatcd Kleene's algorithm applied tO this closed semiring solves the problem of determining 、 vhether a dirccted graph with two― dimensional labels has a zcro― sum cycle or not This algorithm is sh6、 vn
the t、
to run in polynomial timc in the special cases or graphs with one‐
dimensional labcls,BWSP(BackCdgCd
Two― Tcrrninal Serics― Parallel)graphs,and graphs with bounded labels Thc undirected zero― sum cycle problem and thc zcro― sum sj“ ′′ `cycle problcm are also invcstigatcd
Key words. semiring,convex polygon,dynamic graph,algorithm,complcxity AMS(MOS)Subject classl■ cations.05,13,16,52,68
1. Introduction. In this paper,we show that two natural operations on the set of
convex polygons form a closed senliring;the two operations are vector sumination and cOnvex huH ofthe union.We then investigate the tilne complexity of each operation and its ettect on the number of edges ofthe polygons. Kleene's algorithn■ applied to variouS closed senlirings leads to emcient algorithms
for a varicty of prOblems;for example,inding the shOrtest,paths for all pairs of nodes
[3], conVerting a inite automaton into a regular expression, and inding the most capacity patl[5].In thiS paper we use the above closed semiring
rcliable or largest― to solve the zθ
― ″つcツ
θprθ b″ θ
rο s“
in doubly weighted directed graphst
“ havc a two‐ dilnensional weight on each edge, Doubly weighted graphs,which have been studied by Lawler[19],Dantzig,Blattner,and Kao[7],and Reiter[24]. `′
οッb″ The cost of a path is denned as the suln of weights of edges on the path.Theグ is to nnd a cycle whose costin each dimension is O. (ッ CJ`′ rο bた ″θなあた′ Z`rO‐ s“ “ saW that certain problems in VLSI applications “ In[12],[13],[14];[15],[17],we
inv01ving a regularstructure can betransformed to problemsin two‐ diinensionalininite graphs consisting of repeated inite graphs.Repeated use of a dOubly weighted digraph, εgrapλ G2.As shown in Fig.1,cach label aグ ッ4α ′ “ coordinates of χ―andッ ‐ indicates the diferences between the
た gre′ 力 6° ,fOrms called the s′ α″ of the static graph G°
two conneOted vertices in C2.The absence of a zerO_sunl cycle in the specifled static
graph is then necessary and sumcient fOr the acyclicity of the associated dynanlic graph. If a two― dimenslonal regular clectrical circuit is associated with a dynanlic graph,acyclicity of the dynamic graph implies that the associated electrical circuit is free of an electrical``short circuit"[12]. since the cOst of each path bet、 veen any two vertices can be regarded as a point υ and″ in the two‐ dilnensiO,al Euclidean plane,we can associate a pair of vertices
with a convex polygon
αυ
=aS fOHOWS:
αow is the convex huH of aH points assOCiated
*Received by the editors Scptcmber 15,1986;acccpted for publication(in revised form)Fcbruary 6, 1990 This work was supported by National Science Foundation grant ECS-8307955;U S Army Rcscarch
OmCc,Durham,North Carolina,under grant DAAG29-82-K-0095;Dcfcnsc Advanced Rcscarch Projects Agcncy contract N00014-82-K-0549;and IBM― 」apan Thcse results appearcd in prcliminary form in Procecd― ings ofthc 19th Annual ACM Symposium on Theory of Computing,Association for Comluting Machincry, Ncw York,May 25-27, 1987,pp 46-55 The original titlc was``Testing for cyclcs in ininitc graphs with pcriodic structure" 十1BM
Rcsearch,Tokyo Research Laboratory,Sanbancho,Chiyodaku,Tokyo 102,Japan
l Dcpartment or Computer sciencc,Princeton Univcrsity,Princeton,Ncw Jcrsey 08544 883
K Iヽ VANO
884
AND K STEIGLITZ
A static graph G。
The dynamic graph CZ FIG 1
4s`α
rrc grα PII C°
Sllο
ws llο lt rο cο 72`cr rlο
“
α′′′αr`α グ `sill G2 7■ `s力
sみ
O14S αbα Sic c´ 〃
with costs of paths from υto w.` Ve apply the t、 vo opcrations above to the set ofthcse convex hulls,and use the closed senliring denned by thcse t、 vo operations to solve thc
doubly wcighted zero_suln cycle problcm.ヽ Ve show that this algorithn■ runs in poly― nolllialtiinc in thc special cases ofbounded label graphs,BTTSP graphs(the Backedged Two― Terrninal Scries― Paranel graphs),and graphs with one― dimensional labels.The l‐
bο lr7″ `′
grα ′あs,whose
labels are O, 1,or-1,arise in VLSI applications where the
interconnections between regular basic cells are lnade locally.The BTTSP graphs are an extcnsion of the class of Tll・
′ θ7[1],[8],[26],[27].When the ο‐ T`r′ lj“ αI Sarた s― Pα rα ′
cxtended abstract of the present paper appcared in[16],the question of whether the zcro―
sum cyclc problcm for general graphs is in P remained open.Kosaraiu and
SuHivan[18]subsequcntly showed that the zero―
sun■
cycle problem for any diinension
can be forlllulated in tcrlms of linear progralnining and is thus solvable in polynonlial―
time.Recently Cohen and Mcgiddo[6]provCd that the zero_sum cyclc problem for any 6xed dilnension belongsto the class NC,and can be solved in the two― dilnenslonal case in serial tilne O(4′ 2),the best result to date.We hope the present paper retains
indepcndent interest as a ncw connection bet、 veen convex polygons and senlirings, and as a novcl application of Kleene's closure algorithm. Finally,we discuss variations of the zero― and the zero― sunl s'7η ′Jθ Cyclc problcm.
suln cyclc problen■ ,the undirected case,
2.Two operations and a semiring.恥 Ze deane our closed semiring[21]as f0110Wsi Let S be the set of an convex polygons whose vertices have intcger coordinatcs.That
A SEMIRING Ulα
885
U indicates the convex hull of
that this deflnition anows p01ytopes with an inflnite number of edges,unbounded area,or zero υθ χ pOレ gο r iS mOre area,but does not anow curves.Thus our usage of the term`ο “ general than the conventional oneo We cOnventionaHy denote an element in S by a lowercase Greck letter.We regard a point or a line segment as an element of S ο r s夕 αand β For any two sets α ,β ∈鳥 We denne the new set callcd a υ ′ `ノ “ “ *β α and(4,ら st elements(α ,)∈ as folloWs:α ={(為 ノ x,ら )∈ βSuch that )lthere c χ=α χ+bx,ノ =ら +ら }.See[11]fOr details of this operation.Let O={(0,0)}∈ S and
is,S={α
∈ 2ZXZ},Where
α
α.Notice
の be the empty set. we dcnnethe∪ operation as the convex hun ofthe union oftwo convex polygons
l ln this paper,we can the u Operation in S;that is,α ∪ β =(α ∪ β)U fOr any α,β ∈だ j04‐ S“ ″ 2. We Can naturaHy denne a union‐ sum of a countable number of convex "′ polygons as fonows: Let r be a cOuntable(inite Or ininite)indeX Set and αi∈ S for ∪ icr αi by U icr αi=(∪ icr α′ aH′ ∈二 Then we deflne“ J04-s“ )∪ .Since∪ icr αi exists “ U icl “ αi eXiSts and is uniquc.Note that αiis the convex and is unique,its convex hun hun ofsome setin 2ZXZ,and thus every vertex of∪
icr
α :iSin
2Z×
Z.Hence Uた
′αi
c,
and thus the union‐ suln above is well deflned.
We now deflne the+operation as the convex huH of the vector sunllnation of two convex polygonsin S;that is,α +β =(α *β )∪ .By COnvention,we denne α+② = 0+α =0.Note as we show later(Cor01lary 3.4,§ 3),that α*β iS itSelf a convex polygon when αand β are cOnvex polygons.Therefore α+β =(α *β )U=α *β fOr
any α,β ∈S TherefOre,we identlfy+with*,and call the+operation
ο s“ υ″ r‐
`ε
From the deflnitions,the vector― sum operation is conlmutative.Fig.2 shows an example
.
“
sum oftwo convex polygons. We now have the fonowing theorem.
of the vector―
THEOREM 2.1.動
`ッ
s′
:
ι (■ “
:
11′ : ′
′:
U,+,0,0)お
α εわSθ ′ s`“ frj4g.
イ
/ ′
,
:
′ ::: ′ !6: : : FIG 2. α+β ″ ″bars “
グbッ iS bο t411グ ′
`グ
g`s′ llα ′α ″ ′ グgas f′ な71ο グ″j′ ll′ 力ι′ `α
αο″βA′ jg′
gι s力 `グ `′
αυ
。
`rrla sα “
K Iヽ VANO AND K STEIGLITZ
886
Before proving this theorcnl,、 ve need the foHo、ving lenlma. Zメ
LEMMA 2.2.L`′ Ib`α
(∪
l..′
αP)∪ =(∪
l_′
α,)∪
′′θχ s`r.Lα α:∈ 2Z× εοン4rα b′ θ′
br αJ′ ′∈正 777θ ′ ″
`あ
αυβ
.
οげ Let A be the left― hand side of the above equation and B the right― hand side.Since αi⊂ A for allた ム wc haVe∪ icr α:⊂ A Since A is a convex hull,we have )∪ =3⊂ ス (∪ l_′ α′ Note that α P⊂ B for all j∈ 二Therefore∪ ,c′ (α P)⊂ ユ and :⊂ 3 and thus α Pr・
.
moreover,since B is a convex polygon,A=(∪
i∈
′αP)∪ ⊂B.
□
Now we prove Theorcll1 2.1. Prο げ
ぽ 動 `ο rθ
2.1.We show that thc systcm(SU,十 ,0,0)satisnes the six
propertics of a closed “ sclniring.
(1)(■ U,0)'Sα Lel■ ma
2.2.
`ο
″αrjυ θ ο40ja This is immediate from the deanition and ““ “
′.From the dcnnition,this is tri al. (2)(鳥 +,0)JS α ο′ο′ jbツ r`s “ ∈S be convex polygons.Since α+(β ∪ γ) α Js″ ο υ α (3)+ `rU.Let ,β ,γ is convex and contains(α tt β)and(α tt γ),We have(α tt β)∪ (α +γ )⊂ α十(β ∪ γ).
as
Forthe opposite direction,lct χbe a pointin α十(β ∪ γ).ThCn χ can be expressed )C, WhCre λ∈[0,1]. ThCn we have χ=α +λ b+(1-λ )C=
α+λ b十 (1-λ
λ(α +b)+(1-λ
)(α
+C)∈
β)∪
(α tt
(α
+γ ).Therefore,+distributes over U.Note that
、 ve can also prove that tt distributes over flnite union― sums by induction. ∪ Sincc α U α=(α ∪ α)U=α =α ,十 is idempotent. (4)Let r={jl,ゴ 2,・ ・・,′ た}be a nnite nonempty index sct.Let αj∈ S for aH j∈ 二 Then we can prove∪ ic′ αi=α lU αら∪・・・∪ αなby induction onた and Lemma 2.2. For the empty index set f=(3,we have∪ icの α,=(3・
(5)2Ъ θr`S“ ′
夕′ ο4-s“
グθ
`S′
οrグ リ
“ dcnnition of∪ proof is straightfor、`Q′ vard “ fronn the
`4′
rれ g`ノ οη′ あ rグ θ `ο and Lemina 2.2.
θ′χ ε ′ οだ.The
`Й
′ たν jο 4‐ s“ SU.Let β∈S “ αi=∪ “I(α ,十 β)Lct and α,cS for f={1,2,・ ・}. Then we prove that β+∪ icl “ Zt=∪ ,c′ αi and zα +β =U icI(α :十 β).We flrst prove that β+Zα C Zα +β .Let ρ=b+χ be an arbitrary point in β+2iα With b∈ β and χ∈2iα .If there exists a nnite set of indexes J such that χ∈∪7_′ 9ル then from (3), p=b+χ ∈β+∪ た′%∈ ∪,c′ (β +9ブ )⊂ Zα +β .If χis not in the union_sunl of a flnite number of αi's,then χ θ s ο υ (6)In additiOn to(3),十 グJs″ jbッ ′
`″
`0ツ
′′ αbケ
jz′
i∈
can bc represented as the lilnit point of a sequence of points,each of which isin some
・,}SuCh αi;that is,there exists a countably ininite set ofindexes J={ブ 1,ブ 2,・ ・・,ブ ・ ',・ Then 91・ =b十 P=b tt χ i=1雲 (b+為 1)∈ 1雲 (β +%i) 1雲 ぅ
that χ=lim′ →∝ 乃i where tti∈
⊂ U(β +%)⊂ U(β +α l)=Zα +β ノC′
.
iC r
Therefore β+Zα ⊂ Zα +β The converse can be proved similarly, and thus multiplication distributes over .
□ ininitc sums. Ha ng established that the structure(S∪
,十 ,0,0)is a closed semiring,we can apply Klecnc's algorithm to solvc certain problems related to paths in a graph[2],
[21].Ⅵ
rith this goal in inind wc ncxt investigate the basic properties of the operations
+and U. 3. Some properties of the tt and∪ operations. Before stating some propcrties,we α in tt we denOte its edge sct by αE and its vcrtex sct by αv.Let′ be an edge of α or a line that does notintersect α.Then wc regard ′as an oriented line with respect to α and deflne its direction, denoted by θ′ gθ θ θ {θ 争 }.動 魚 E ら ,,.2%ι sα α `Jο `た `“ ““ `ノ “θ ,s cα JJ`グ ′ あθ gθ sθ 9“ 6θ ″あ “ θ 4′ わ θθ た rs ο α r`′ α s α bο υ θ ′ E αr′ Orグ θ `グ `“ “ “ 3.1. □ Prο げ The pr00fis clear frOm Lemma .
To analyze hOw the+OperatiOn attects the number Of distinct
vectors, we will
use the foHo、 ving weH_known theorem.
THEOREM 3.3([11]).Lα
α,β
b`′ ″ο Cο ″υθχ ′θ夕 gο sf“ S ttθ
プら″ θυθν
`∈ αE U βE,′ みθ r``χ おrs α “ブ “ 9′ ηθ sα ′ グg`/c(α +β )E′ Йα′げ グ″ ル み α′Js9 なθ =θ 1%ゴ s `;′ ι 4α b′ θ s"s″ Od手 θα “ ″ ′ crjο 4/=9(θ ο α メ )ル E∪ βE′ ο(α +β )E.Mor`ο υ ルθ げ ο /1Z′ `ち 2′ JJ“ s′ raた srあ おr力 θ ψJs οrO.Fig“ rθ “ “ ο r`““ . □ “ COROLLARY 3.4. Lθ ′α εο υθχ 0″ g04S.動 *β +β *α c・
6″
,β
=α
+α
=β
=β `4α “ PrOげ For the proof see[11],[20],[28]. □ COROLLARY 3.5. Lθ ″αα グβbθ ε ο′υ θ χ′01ソgο sfr S s“ ε /7′ 力 α′bο ″ あ77α υ ノれたθ bθ
′
.
“.動 “4ι θ α+β ε α4グ =lα +β ルθ α4 bC Cο `α た θsθ 92θ ′ げ ′ツたグゴ θ “ θsθ9“ ι s `4′ αE α ごβE. “ `む “ Theorem ““ edge “ c in α+β Prο げ From 3.3,every has an assOciated edge/in
bθ
rげ θ た
`S “““ 0(4)S″ のsル ο αE∪ β E
r″
SuCh thatら =θ ε・ Thus the edge sequence Of(α +β )E Can be Obtained by
merging the two sets{θ
εθ∈αE}and{θ θl`∈ βE}。
□
l
COROLLARY 3.6.Ij`′ αl,α 2,・ … ,α グαηb`cο υ θ χ′Olygθ 4sブ 4 s ttθ 4″ αυ β `あ “… ∪ “ α 0″ 0ル ′crJο 9/rο (α l)E∪ (α 2)E∪ ・ (α ″ )E to(α l+α 2+・ …+α r)Es“ 6カ ′ あα′ “ “ “ θ ・・・∪(α ,(a)=θ cル rα ッ `c(α l)E∪ (α 2)E∪ ")E・ “ PrOο ′The proofis by inductiOn On“ and Theoren1 3.3. □ THЁ OREM 3.7.F♭ ″α′ッ α,β
CS″
+β l≦
αυ
│{α ,β
`Й `lα PrOげ The pr00f is straightfOrward from Theorem 3.3.
Next we analyze the ettect of the∪ First wc have the fol10wing theorem.
THEOREM 3.8.Lθ lα
l十 lβ
″α αη′ β be bο
l.
}≦
lα
l+lβ
l.
□
OperatiOn on the number of distinct vectors. ′θ″ ““
cο
υ pθ レgο Sげ 4 “ `χ “
S ttβ ′lα
∪ βl≦
Before proving ThcOren1 3.8,we need the fOHOwing lemina.
LEMMA 3.9.Ij`′ α c S α4′ ′1,P2,・ … ,′ ηb`′ 0ブ ′な。コらθ′ lα
U′ lU′ 2U・ … ∪ Pη l≦
lα
l+4.
PraQ/ This can be prOved by lnductiOn On 4. Suppose ′=1. If α cOntains pl,
Ul∬ 江 ・ TrI算胤 議 譜 噌 l訛 爛認 α∪ … U′ 。 thuS
el:rfl∬ dサ
lξ
′1∪ ′2U・ たThen from the inductiOn hypothesis,lβ ηll≦ lβ □ lβ 燿11+1≦ lα l+4. "│≦
lα
“ LF準
l十
(4-1),and
888
VANO AND K STEIGLITZ
K Iヽ
οr`“ 3.8.Note that αU βiS αU Pl∪ P2U… ・UP′ where βv= げ 動θ ・ ・ Thus from Lemma 3.9,lα ∪ βl≦ αl+4=lα l十 βl. □ ,p“ {′ 1,P2,・ *, Theorem 3.1l covers the case when αOr βiS an unbounded convex polygon α Prο げ
}・
町評W#ず ∬「 ι脚詈 Tゾ∬∵Ⅲ∬81継 ∫ ::l11礼 規 龍】
Since a system(鳥 ∪,十 ,0,0)iS a closed semiring,we can denne the cOnvex polygon*iS *is∪ l∪ ・… ° >。 λ ′).ThuS α =∪ 庭。αL As shown in Fig.2,α Pcα (∪ λ α*by α U α essentially a cone emanating from the origin.As a special case,α plane,a half plane,a line,a half line,or the origin itself.Now、
*Inay be the entire
ve analyze the enect
of the*operation on the number of distinct vectors.
LEMMA 3.10.Fθ
*is either the
*≦
+γ ι lα l+1. ′θ″ gο れSα α ′ %Wι λαυ lα plane,a half “ plane,a line,a halfline,or the origin
r″ ″ο cO′ υ
`χ entire
1f γ *is a cone emanating from the origin itselt the pr00f is straightforward.Otherwise γ υ and has tヽvo edges g( and gち ・Let gl(respectively, g2)be the Support lines at Prο o/
(reSpectively, ″)of :き
the COnvcx polygon
α such that θgl(α )=θ gi(γ
II'11::]:∫ 躙 ∫ :lЪ ¶ :TI:iに :LI:隼 専 寝 all:il‖ ξ 」 よ 1を
FIc 3 1α +γ *│≦
lα
*)and
θ&(α
)=
1lsl:ι :L:lerel]ust
* グα∪(β +γ *)=(α ∪β)+γ l+lα ′
The above lemlna shows that replacement of
*does nOt increase the α by α+γ
ving number ofedges by lnorethan one.Moreovcr,wc have a stronger resultin the foHo、 theorenl,、 vhich shows thc same result for any number ofsuch replacemcnts in a series of∪ operations.We、 vill use this theorcm in§ §5 and 6.
THEOREM 3.11.Lcr │(β
)∪ l+γ †
・・,4・ 動 θあαυ βi,γ ,∈ Sメ,rJ=1,2,・ ` `4″
(β 2+γ
)≦ 」)U・ … U(β ′十γ芳
lβ
l U
Before proving Theoren1 3.11,ヽ ve need some lelnlnas.
β2 U… ・Uβ "│+1.
A SEMIRING
LEMMA 3.12.Lα γic
Sメ 9r j=1,2,…
889
・,4.η り θ “
γ手+γ l+・ …+γ 斎=(γ l∪ γ2∪ …・∪ γη)*. Prο q′
We prove this by lnduction on 4,usingた
lemma trivially holds forた
for the index of inductiOn.The U γ 2)*・ SinCe We next prove the opposite direc‐
=1.Whenた =2,we prove that γl+γ 」=(γ l
γす,γ 」⊂(γ l U γ2)*,WC have γ芋+γ J⊂ (γ l U γ2)*・ tion.Since O∈ γr+γ 」 we have from the distributive law γl U γ 2⊂ (γ l∪ γ 2)+ +γ す (γ † )=(γ l+γ す+γ す )∪ (γ l+γ2+γ 」 )⊂ γ す+γ J.Thus the lelnma holds forた =2.
Assume that the lemma holds for
た0・ Thcn we have A(C)≦ ス(Gl)+A(G2)≦ 7721+“ 2=rll.Notc
“ that the nrst inequality uses Theorems 3.7 and 3.8,while the second uses the induction hypothesis.Thus A(7 「 SP(“ ))≦ .Since L“ ∈TFSP(“ ),frOm Lemma 63,ス (L″ )= “ ″1,which shows this bound is achievable。 □
We will show the samc result forthe class of BTTSP multidigraphs.The foHOwing lelllllla says that every backedge in an s― r path in a BWSP graph lies on a cycle that lies on thc s― r path.
LEMMA 6.5. L`′ GB b`α BWSP grα ′あ″J′Йsο rc`sα グsブ 4た ″ あ ,α 79′ Jθ ′Pら pα ′ `α “ θ″gβ sげ 4 GB.5助“ ′ b`′ υ r`Sθ 4r`″ αsル ′ ′ ο″S: ル θ S`ο r′ οssめ ″ sブ 4g Sο `た `4 Pcα “ Cilら C夕 … 。 “ “`bα P=Pl Pl島 ・… ■ Sο νκβ″ O Si4た ′ ″rル ′グθrヶ J4g aC》 whcrc Pα ル/rο 'Sα “ WSP graprl C,rrl`ci's are cyclcs in CB,and 4≧ ≧O fOr“l≦ J三 ≦た。 Pr・ ο □ ぼ For the proof sec§ 7.
THEOREM 6.6.A(BTTSP(“ ))=“ Pr・ ο =A(TTSP(/71))≦ げ Since TTSP(“ )⊂ BWSP(“ ), We have A(BTTSP(“ )).ヽ Ve nOw prove that for an arbitrary graph CB∈ “BTTSP(“ )With at
least one backedge,ス (GB)≦
.Let C=(yl,El)be the underlying TTSP graph of
“ GB,and let r be a two_dimensional labeling of GB Lct PB(S,r)bC the set of s―
r
paths in GB,and lct P(s,r)be the set of s― r paths in C Let P be an arbitrary path in′ 3(S,r).Then from Lemma 6.5,P can be expressed as P=Pl C争 ら C夕 … ・acか
,
898
K IWANO AND K STEIGLITZ
where PlP.・ ・・IRk iS a path from source to sink in the underlying TTSP graph c the Ci's are cycles in CB,and為 ≧ O for l≦ :≦ た。Lct βP=T(P122・ … Pk)and γR=T(Ci)
it.ュ 」 易 ごし 出P=属 醜 常飢 ,↓ 鳥ld 4き ∪ Let T(P*)be denned as T(P*)=∪ 1.γ
=c神
,十
QcP*T(Q).SinCc P*⊂ PB(s,r),we have
1≦ J≦ た}。
r(P*)=β P+(γ PI
U γP.U… ・ Uγ .)*⊂
+
∪
Pc P3(s,′
T(P). )
Note that T(P)⊂ T(P*).TherefOre∪ Pc P3(s,r)T(P)=U Pcち (s,r)T(P*).ThuS We nOw have
隠劉=│ぷm・ 01=1製 001 =│』 ≦
m pP・
IPc躍 (劇
み
い…Uプ
lL Uし
│
TheoК m刷
画
1判
≦1馴 竃めIH ゛ ≦ lα ,(C)│+1 (from the dennition) ≦ A(7‐ rsP(IEll))+1
=IEl+1(using Theorem 6.2) ≦ “
-l by the assumption that C has a backedge.Thus A(B7‐ rsP(“ ))≦“ . □ “ ′BTTSP,″ λθαJgο ′ COROLLARY 6.7.Fο Й ZSC″ sj′ 0(43“ )′ J“ θ″あθ is
because lEll≦
rθ
r′
rあ
bθ r
O/υ θ″たθS α4α
,srあ θ
“
“ b`r`ノ θ αg`s.
`“ ““ “ from Theorems “““ Prο げ The prOofis clear 4.4 and 6.6.
7.Proof of Lemma`.5。 sinkム A bJ′ αッ グ26ο
Let C=(ZE)bea T「 SP
′οsj″ 0′ rκ θメ9r(l
“
□
multidigraph with source s and
denOted by BDT(C),WhiCh was discussed
in [26], represents the “ construction proccss of G by a binary tree. A binary tree BDT(C)can be created by following the sequcnce of series and parallel compositions that construct C.Initially we have a set of singletons{ι l`∈ E}.Suppose we apply a
two terminal parallel(respectively,series)COmposition to two TTSP graphs cχ νand C)“ υand obtain the new TTSP graph Gab Where χ , ッ,α are sources and y,υ ,b are sinks.Then we create BDT(Gα ゎ)by creating thc root αPb(respect ely,α Sb)and make BDT(cxソ )a left Subtree and BDT(G“ υ)a right Subtree.Thusin BDT(G),eVery leaf represents an edge in C and each internal node aPb(respectively, aSb)represents a parallel(reSpect ely,series)composition.Fig.5(b)shOWS an example.Note that every
path in C has a corresponding route in BDT(G).For example,the path
P=υ -3-b-5-`-7-グ
ー8-θ
-9-喝
A SEMIRING
899
shown in bold lines in Fig.5(a),haS thc foHowing corresponding route in BDT(G): PBDT: (V,b)=3-υ
Pb― αSb― αSc― α2c― sSc―
ζL一 、S`― dS′
―d鳥 ―d亀 ―d島 一eP/― eS7-9 =(e,W)
Note that the vertices shown in bold face in thc path PBDT,(b,ら
4 and`),appcar in
P in this order.
Let Lw bC the smallest subtree in BDT(C)that includes vertices
υand w(Find
the nearest colllinOn ancestor and include the appropriate subtree.)Lct l%(respcctively,
71)be the subtrcc of■ ,w in which υ(reSpectively,″ )eXists as shOwn in Fig.5(d). ヽ Ve use α Aゎ for rcprcsenting cither α tt Or a2b.Let α スぁ α スc,and′ スゎbe the root Of the subtrecs■ w,■ ,and τ ely.Then wc have the following lemma: ",rcspect LEMMA 7.1.Sィ ′′οs`.ス ッ α′′ β ブ4 PBDT・ JxAソ 9′ ′ tt j′ ■ ),′ λ ッ プSれ Pゲ (Aν
⊇pβ αぉ j4コ %,′ ЙC′ χJS j′
P
`α
`α
`“
Prθ げ Suppose./Lソ appears in 5島 .The Vertex υis in thc TTSP graph with sOurce χ and sinkノ .Thus cvery path frolll υ tO a Vertex that is not in■ must pass through
ッ.ヽ Ve can provc the other case in the same way. COROLLARY 7.2.Sttpθ s`′ あ ′ sα υ 一 ll pα
αs αbο υθ ノ .L`′ α 生 /1ゎ め ,α /1c,α 4グ ど 動
`rθ bθ rあ
`rο ル ル′ ′ θ″ブ ′g: `“ `′ αrゴ s,′ 力θ″ οο′げ ■ (1)α Aゎ =α .Sb;′ み
□ ′ 4Gα
′グ ■ w αr`グ グ ′θグ
″グ
`Й ="=",α οrs 6り rr」 l`s夕 brr``s71,ll・ ■,α η″■ ,″
″θ力αυ
`ψ `crゴ
υ `rll.
rr`ψ ο ′′Srο αs`″ ′ θ s cO“ ′ ο′ ′ ο4,α ′′ "`ο `=′ θ α ル ο rll υ′ 0′ α sS`Srか gλ θ ッ r"υ ′ ε (2)Eυ ク′ タ ρ `″ `χ θ ″ たχc. υ (3)Eυ θ り′αrヵ ルο S rθ ″′αssCS r/2rο gあ `ル αrsO“ “ “ j“ たな ― r′ α α ys― 4″ α ltl pα ル βυθrた χ (4)A4yυ s′
.
P″ ο o/
om
`Й
.
`α
“
(1)If the rOot of■ w COrrcsponds tO a paraHcl composition,therc is no
=:島 .And thc series composition identines the sink Of ac and the source of′ Ab,thus c=グ path fl・
υto″ .Thus α Aゎ
.
(2)Sincc there is a w一 r path,′ だ 71 TherefOrc,from the proof Of the above lelnlna,every path from LltO r passes through the vcrtex 6.
(3)Wc can prOve this in the samc way as(2).
(4)This is obviOus from(2)and(3).
□
L`“ α 6.5.Letた be the number of backedgesin P Letム ソ(■ ソ)dcnOte “ prove the lelnllla by inductiOn onた an χ―ッ path in CB(G).We Supposeた =l and let θ=(″ ,υ )be the backedge in P Notc thatthcrc must bc a υ―″ path in the underlying T「 SP graph C.P can be representcd as P=R.,`=υ r.R″ and Pυ ′are paths in Gら sinCeた =1,sO that from Coronary 7 2,they pass through thc samc vcrtex 6 Therefore,we can express P as P=ム (Rw`鳥 (え ′ .ThuS wc obtain thc Prο げ げ
cycle Cl=2ぃ `民 Suppose thc lemma holds for numbers less thanた Lct EB={θ l,θ 2,・ ・・,O}be .(
the backedgcsthat appearin P in this ordcr.Let θ.=(″ ぉυ,)for l≦ J≦ ムLct`/=(叫 ,ν ) ′ bc the last backedge in fB such that there is a path froln ν′tO Wlin C.Assume that
≠θ (When`/=θ l,We can easily modi∼ the n011。 wing proO■ )Then as shown in Fig.5(e),P Can be representcd as P=」 、.ド lBυ :.′ B彎 ′ `′ ・Let fヽ be an arbitrary s― ν path in C,and let Pl=f■ ′3./・ Then Pl has′ backedgcs wherc′ ≦ た-1,bccause al `′ l・
/
P′
is not on Pl.From the induction hypothesis,Pi can bc fOrmed from an s―
and cycles{qブ ∈J}.Note that R.iS part ofム r;that
is,there e
sts a彎
r path」 ヽ
―J
r
path ftr
such thatス ′ =民 .ら ′ Suppose not.Let θ=(χ ,ッ )bC the nrst edge inス ,Such that “ ッだR′ .Then there cxists a backcdge(ろ χ)in 3.r and a cycle c suCh that(z,χ )∈ q. ―ν Since thcre exists an χ― ′path and a彎 ―″l path in C,there exists an χ―141 path
K Iヽ VANO
900
AND K STEIGLITZ
in C This cOntradicts the deflnition of ν/,since the backedge(z9χ )iSin 3.lr,and thus appears after cr in EB・
i.笛 町 襲
嬌 β
年 瀧 LTl惚
Tr輝
∴∬
巧零 崎│みギ
I :轟 ∴ .lif宝 跳 Ofぬ e ptth ぬ e ptth P CO面 飩s 「 eb∝ fTh∝ 1:宵 iiル 禁 □
Rc鳥 ′ ,Cycle a and cycles{qlプ ∈J}・
=・
8。
Conclusiono We showcd that the two operations of vector summation(+)and
convex hull of union(U)deflned on the set of cOnvex polygons form a closed semiring.
We then investigated some properties ofthese operations.For example,the+operation
can be doncin O(“ )time,where“ is the number of edges involved in the operation. we then obtained the algorithm ZS(〕 by using Kleene's closure algorithm on the above closed sclniring.The algorithm ZSC solVes the two‐
dilnensional zero‐ sun■ cyclc
dilnensional problenl,ヽ Ⅳhich has a close relationship to the problenl of acycHcity in two‐ regular electrical circuits.The colnplexities of our algorithm ZSC in some special cases イ‐ bounded are ο (43)time fOr the one‐ dimensional labeling case,0(44ル ィ)time fOrル
graphs,and O(“
3“
)time fOr BTTSP graphs,where r is the number of vertices and
sum
is the number of edges.We also showed that the undirected version ofthe zero― θcycle “ cycle problem can be solved in O(“ 10g“ )time and that the zero― sum s'“ P′ problem is NP‐ complete.
we make the following coniecture about the number of edges of the convex thm ZS『 y s加 sα α グ α″ (■ CONJECTURE.Ij`′ ■ ,(T)b( ;げ 4θ `″
動 た χ ム 力 θ ″ αα ′ ι ル“ 加′ グ
pdygons that appear in the」 go
A(C)=■
鸞
α J(T)│≦
“ '
where“ is the number of edges in C
If this conieCture is truc,then algorithm ZSC runs in O(43“ )time On general
graphs.
After the extended abstract ofthis paper appeared in[16],Kosaraiu and SuHivan [18]showed that the zero‐ sum cycle problem for any dimension can be formulated in terms of linear programlning, and thus is solvable in polynonlial― time; Cohen and Megiddo[6]proved that the zero‐ sunl cycle problen■ for any nxed dilnension belongs to the class NC and can be solved in the two‐ dimensional case in serial time O(4“ ).
As rnentioned in the lntroduction,we hope the results in the prcsent paper are of interest as a new connection between cOnvex polygons and senlirings,and as a novel application of Kleene's closure algorithm, even though faster algorithms are now available for the zero― sum cycle problem. Acknowledgmento We are grateful to the referees for their careful reading of the
paper and valuable cominents that improved the quality of the paper.In particular, they suggested references[11],[20],[28],a simpler proof for Theorem 2.1(3),and a bettcr tilne complexity in Theorem 3.15.
REFERENCES g“ ′グ [1]A ADAM,0″ g″ ′力sf″ wあ ic力 r"ο υ′rrfcas araグ isrj“ isあ ,Acta Math Acad Sci,12(1961),pp 377-397 s, ち sig′ α″グ ハ′αfl sisげ εο ρ″ ′′Algο rl`力 [2]A V AHo,J E HOPCROFT,ANDJ D ULLMAN,η `D′ “ “ Addison― Wcsley,Reading,MA,1974
[3]B CARRE,G″
′力sα ″′ JV′ rll οrた s,Ciarendon
Press,Oxford,1979
A SEMIRING [4]B cHAZELLE AND D DoBKIN,D`″
αれ
901
r″ α
な
οψ
″
“
::lた
靴 ]ぷ
ll篭
PrOc 12th ACM sympOdum
d…a、 りhn J°
″動
ⅧしNew Y∝
kュ 984
cOmp■ ∝ 鋪
″t PhD thcsIち
踊 ″
瞥 響
[切
″ο″,
`α
∽∝
_ど 4漱胤L}蠍 ル滋 嶽 み勝T離
同ど 群捻′ 瀞枕″li児ソ :ル ∬ 槻 ,`
jOグ P′ ″ JC S″ ″c`″ た
,in PrOc 19th ACM sympOsium On
ira grf′ ″ら NctwOrks,18(1988),pp
回 E職 拙
畿脚
響
205-222
撚 鮮 為 鮮乳l轡 瞥た It;,〕 31:}胤 現 フ NIセ £ル 胤」 鶴n『 ト ∝n cOmЫ 血 J optl m, :謬 宅1ぶ 『 ″ ″ ′ ″ レα ″ 万′ み″ I球
bj4α
Jα
`ο
21(1942),pp 83-93
9′
“
:ス rgο
`わ
sα ″ グc。
′たχ″光 “
L鹿開 胤 i鍵も 翼 虚麗 汎fi:就為 lllふ
pq■ VALDE■ R E TARJA、 AND B L LAWLElご
i∬ 努¶ 1翼al雛 郵 猟 1雰 ∫
Phy',
なり みら hR° α
'謂 義 ll逮 霧 yギ 鴇∬ 亀職し ilttl士 品 t