Download presentation
Presentation is loading. Please wait.
Published byLeon McGee Modified over 9 years ago
1
Trapezoid graphs and generalizations, geometry and algorithms Stefan Felsner, Rudolf Müller, LorenzWernisch
2
Outline Introduction Introduction Trapezoid graphs and trapezoid orders Trapezoid graphs and trapezoid orders Minimum antichain partition and maximum chain for k-trapezoid orders Minimum antichain partition and maximum chain for k-trapezoid orders Chain partitions of trapezoid orders Chain partitions of trapezoid orders Maximum antichain for trapezoid orders Maximum antichain for trapezoid orders
3
Introduction G is a trapezoid graph if G is a trapezoid graph if A trapezoid t v A trapezoid t v V The intersection between two trapezoid t1, t2 (v1, v2) The intersection between two trapezoid t1, t2 (v1, v2) E, t1 v1, t2 v2 n: # of vertices in G or order P
4
Box representation x=(x 1, …,x k ), y=(y 1, …,y k ), x,y x=(x 1, …,x k ), y=(y 1, …,y k ), x,y R k x is dominated by y, if x i <y i i, denoted by x<y Dominance order between points, boxes (l 1, …,l k ) is the lower corner,(u 1, …,u k ) is the upper corner of the box A box b dominates a box b ’ if the lower corner of b dominates the upper corner of b ’, l(b)>u(b ’ ) b, b ’ are comparable if b dominates b ’ else incomparable
5
Representation between box and trapezoid Lower channel x coordinate Lower channel x coordinate Upper channel y coordinate Upper channel y coordinate
6
Trapezoid graphs and trapezoid orders K-dimensional box representation (V,l,u) K-dimensional box representation (V,l,u) l:V R k, u:V R k l:V R k, u:V R k K-trapezoid graph K-trapezoid graph Weight w:V R Weight w:V R A set of mutually comparable elements of an order is a chain A set of mutually comparable elements of an order is a chain A set of mutually incomparable elements is an antichain A set of mutually incomparable elements is an antichain Maximal element v in chain, chain weight W(v) Maximal element v in chain, chain weight W(v)
7
Perfect graph A minimum clique cover of G is a minimum antichain partition of P A minimum clique cover of G is a minimum antichain partition of P A maximum weighted independent set of G is a maximum weighted chain in P A maximum weighted independent set of G is a maximum weighted chain in P A minimum coloring of G is a minimum chain partition of P A minimum coloring of G is a minimum chain partition of P A maximum weighted clique in G is a maximum weighted antichain in P A maximum weighted clique in G is a maximum weighted antichain in P
8
Minimum antichain partition and maximum chain Longest increasing subsequence Longest increasing subsequence Maximum chain problem for 2D order (V,p) Maximum chain problem for 2D order (V,p) Sort the points in x Sort the points in x Plane sweep L from left to right Plane sweep L from left to right W(m) is the weight of maximum weighted chain on the set dominated by m, for m W(m) is the weight of maximum weighted chain on the set dominated by m, for m M
9
Algorithm MAXCHAIN MAXCHAIN(V,l,u,w) MAXCHAIN(V,l,u,w) for each p from left to right do for each p from left to right do m first marker below p on L m first marker below p on L if p=l(v) for some v if p=l(v) for some v V then W(v) W(m)+w(v) link(v) origin(m) if p=u(v) for some v V then if W(v)>W(m) then insert a new m v at p y in L W(m v ) W(v) origin(m v ) v Remove all m ’ that are higher and lighter than m v from L x origin(uppermost marker on L) C {x} while link(x)≠nil do x link(x) C C ∪ {x} Return C
10
Correctness Lemma – At the end of the main loop in MAXCHAIN the following invariants holds true. If y is an arbitrary point on L and m is the next marker below y, then a maximum weighted chain dominated by point y has weight W(m) Lemma – At the end of the main loop in MAXCHAIN the following invariants holds true. If y is an arbitrary point on L and m is the next marker below y, then a maximum weighted chain dominated by point y has weight W(m) L stopped at point p=l(v) L stopped at point p=l(v) L stopped at point p=u(v) L stopped at point p=u(v) y < u y (v) or no new marker is inserted y < u y (v) or no new marker is inserted y ≥ u y (v) and m v is inserted y ≥ u y (v) and m v is inserted Let m’and m be the markers below y before after m v is inserted Let m’and m be the markers below y before after m v is inserted Two cases: (1)m=m’ (2)m≠m’ Two cases: (1)m=m’ (2)m≠m’
11
Minimum antichain partition Simulated by unit weights Simulated by unit weights # markers on L ≤ |maximum chain| # markers on L ≤ |maximum chain| No two points with the same weight are comparable No two points with the same weight are comparable A 1, …,A w w=|longest chain| A 1, …,A w w=|longest chain|
12
Conclusion Theorem – A maximum weighted chain and a minimum antichain partition of a trapezoid order on n points, given its box representation, can be computed in O(nlogn) time and linear space Theorem – A maximum weighted chain and a minimum antichain partition of a trapezoid order on n points, given its box representation, can be computed in O(nlogn) time and linear space
13
On k-trapezoid orders Adopt dynamic multi-dimensional range tree Adopt dynamic multi-dimensional range tree Theorem – If an order P=(V,P) is given by box representation in R k, then a minimum antichain partition and a maximum chain of P can both be obtained in O(nlog k-1 n) time and O(nlog k-2 n) space Theorem – If an order P=(V,P) is given by box representation in R k, then a minimum antichain partition and a maximum chain of P can both be obtained in O(nlog k-1 n) time and O(nlog k-2 n) space
14
Chain partitions of trapezoid orders Minimum chain partitions for 2D order (V,p) Minimum chain partitions for 2D order (V,p) Plane sweep from left to right Plane sweep from left to right Find the max y-value point on L below p Find the max y-value point on L below p Maximal elements of chains are maintained on L ordered by y-value Maximal elements of chains are maintained on L ordered by y-value C with maximum element v is closed when u(v) hasn ’ t been visited by L, otherwise open C with maximum element v is closed when u(v) hasn ’ t been visited by L, otherwise open
15
Algorithm MINCHAINPARTITION(V,l,u) MINCHAINPARTITION(V,l,u) MINCHAINPARTITION(V,l,u) for each p from left to right do for each p from left to right do q first element below p on L q first element below p on L if p=l(v) for some v if p=l(v) for some v V then if q=u(v) for some w V then chain(v) chain(w) ∪ {v} remove q from L else (q=d) chain(v) {v} p=u(v) for some v if p=u(v) for some v V then Insert p at p y in L return {chain(v): u(v) L}
16
Correctness C ={C 1, …,C α } are the chain partitions C ={C 1, …,C α } are the chain partitions v = the last element that opened a new chain, say C α v = the last element that opened a new chain, say C α U = {v’:l(v’)<l(v), l x (v)<u x (v’)}, U U = {v’:l(v’)<l(v), l x (v)<u x (v’)}, U ∪ {v} is an antichain, C 1 is the corresponding set of chains with U All chains of C 1 were closed after the L passed l(v) quarter-plane QP={(x,y): x≤l x (v), y≥u x (v)} X(v)={v’:l(v’) QP or u(v) QP} C α } C 2 =C\(C 1 ∪ { C α }) C 2 * ={sub-C from element in X(v):C C 2 }
17
Correctness Lemma – The chain partition C 2 * of the order induced by X(v) is exactly the chain partition generated by MINCHAINPARTITON, when the input consists of the boxes of elements in X(v) only Lemma – The chain partition C 2 * of the order induced by X(v) is exactly the chain partition generated by MINCHAINPARTITON, when the input consists of the boxes of elements in X(v) only L* is the sweep line for (X(v), l, u) L* is the sweep line for (X(v), l, u) The restriction of L to the half line above l y (v) and L* are identical, for all x≤l x (v) The restriction of L to the half line above l y (v) and L* are identical, for all x≤l x (v) Four cases : Four cases : p=l(v’), v’ p=l(v’), v’ X(v) p=l(v’), v’ p=l(v’), v’ X(v) p=u(v’), v’ p=u(v’), v’ X(v) p=u(v’), v’ p=u(v’), v’ X(v)
18
Conclusion antichain B={v ’ :unique v ’ } antichain B={v ’ :unique v ’ C *, C * C 2 * } A=B ∪ U A=B ∪ U ∪ {v},|A|=|C| Theorem – A minimum chain partition of a trapezoid order on n points, given its box representation can be computed in time O(nlogn) and linear space Theorem – A minimum chain partition of a trapezoid order on n points, given its box representation can be computed in time O(nlogn) and linear space
19
Maximum antichain for trapezoid orders shadow(p)={q:p<q} shadow(p)={q:p<q} shadow(P)= ∪ p P shadow(p) shadow(P)= ∪ p P shadow(p) staircase of a set of points S is the topological boudary of the shadow of the set staircase of a set of points S is the topological boudary of the shadow of the set A(S)={vV:box(v) ∩ S≠} A(S)={v V:box(v) ∩ S≠ }
20
Maximum antichain for trapezoid orders Lemma – Let P be an order given by a box representation. If S is a staircase then A(S) is an antichain. Moreover, if A is an antichain of P then there exists a staircase S such that A A(S) Lemma – Let P be an order given by a box representation. If S is a staircase then A(S) is an antichain. Moreover, if A is an antichain of P then there exists a staircase S such that A A(S) ∆ contains a list of open boxes ∆ contains a list of open boxes ∆(y 1,y 2 ), y 1 ≥y 2 ∆(y 1,y 2 ), y 1 ≥y 2
21
Algorithm MAXANTICHAIN for each p from left to right do for each p from left to right do m first marker above p on L m first marker above p on L if p=l(v) for some v if p=l(v) for some v V then add w(v) to all markers in interval [l y (v),u y (v)] add w(v) to all markers in interval [l y (v),u y (v)] insert a new item in ∆ at height u y (v) with weight w(v) insert a new item in ∆ at height u y (v) with weight w(v) m * next marker below p on L m * next marker below p on L while W(m)+ ∆(m,m*) > W(m*) do while W(m)+ ∆(m,m*) > W(m*) do remove m * from L remove m * from L m * next marker below p on L m * next marker below p on L if p=u(v) for some v if p=u(v) for some v V then insert a new marker m v at p y in L ∆(m,m v ) W(m v ) W(m)+∆(m,m v ) list(m v ) list(m) ∪ {p} ∆ remove item at u y (v) from ∆ T staircase of points in list(lowest(L)) for each v V do if v intersects T then A A ∪ {v} return A
22
Correctness Lemma – At the end of the main loop of MAXANTICHAIN we have the following invariant. If y is an arbitrary point on L and m the next marker above y, then a maximum weighted staircase that ends in y on L has weight W(m)+∆(m,y) Lemma – At the end of the main loop of MAXANTICHAIN we have the following invariant. If y is an arbitrary point on L and m the next marker above y, then a maximum weighted staircase that ends in y on L has weight W(m)+∆(m,y) Before halt:W’,∆’ After halt:W,∆ Before halt:W’,∆’ After halt:W,∆
23
l(v), y>u y (v) l(v), y>u y (v) l(v), y<u y (v)<m W(m)+∆(m,y)=W’(m)+(∆’(m,y)+w(v)) l(v), y<u y (v)<m W(m)+∆(m,y)=W’(m)+(∆’(m,y)+w(v)) l(v), l y (v)<m<u y (v) W(m)+∆(m,y)=(W’(m)+m(v))+∆’(m,y) l(v), l y (v)<m<u y (v) W(m)+∆(m,y)=(W’(m)+m(v))+∆’(m,y) l(v),m<l y (v) l(v),m<l y (v) W(m)+∆(m,y)=W’(m)+∆’(m,y) W(m)+∆(m,y)=W’(m)+∆’(m,y) W(m’)+∆(m’,y’)+∆(y’,m)+∆(m,y)=W(m’)+∆’(m’,m)+∆(m, y)<W(m)+∆(m,y) W(m’)+∆(m’,y’)+∆(y’,m)+∆(m,y)=W(m’)+∆’(m’,m)+∆(m, y)<W(m)+∆(m,y) Correctness y’y’ m’m’
24
Conclusion Theorem – A maximum weighted antichain of a trapezoid order on n points, given its box representation, can be computed in O(nlogn) and linear space Theorem – A maximum weighted antichain of a trapezoid order on n points, given its box representation, can be computed in O(nlogn) and linear space
25
Open problem Maximum antichain, … for k-trapezoid order Maximum antichain, … for k-trapezoid order
26
Transform k-trapzoid to 2-trapezoid
27
Transform k-permutation to 2- permutation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.