color 1 - PowerPoint PPT Presentation

1 / 44
About This Presentation
Title:

color 1

Description:

Elad Verbin. U.C. Berkeley. Tel Aviv University. partially ordered set (poset) ... transitive (x y, y z ) x z) (P, ) can be viewed as a DAG ... – PowerPoint PPT presentation

Number of Views:35
Avg rating:3.0/5.0
Slides: 45
Provided by: SamR6
Category:
Tags: color | elad

less

Transcript and Presenter's Notes

Title: color 1


1
  • color 1
  • color 2
  • color 3
  • color 4
  • color 5
  • color 6
  • color 7

2
Sorting and Ranking in Partially Ordered Sets
  • Costis Daskalakis
  • Richard Karp
  • Elchanan Mossel
  • Sam Riesenfeld
  • Elad Verbin

U.C. Berkeley
Tel Aviv University
3
partially ordered set (poset)
  • set P , binary dominance relation Â
  • irreflexive (x x)
  • transitive (x  y, y  z ) x  z)
  • (P, Â) can be viewed as a DAG
  • e.g. Z Z with natural partial order

x incomparable to y x y
4
examples of posets
  • Classical examples
  • subsets (contains)
  • elements of Rd (greater than, in all coordinates)
  • elements of a DAG (reachable from)
  • Rankings
  • college applications (better scores, grades, ...)
  • ice skaters (harder program, better executed)
  • strains of bacteria (higher evolutionary fitness)
  • router packet-dropping policies (more stringent)
  • conference submissions

5
problems on posets
  • Natural to ask questions with analogies in total
    orders
  • What is the complexity of sorting a poset,
  • i.e. determining the relation between every pair
    of elements?
  • How hard is it to find the minimal elements?
  • These questions do not seem to have been
    considered previously
  • Previous work assumes an underlying total order

6
poset preliminaries
  • chain set of mutually comparable elements
  • anti-chain set of mutually incomparable
    elements
  • width w(P ) size of maximum anti-chain

chain a  b  e
anti-chain b , c b
c
7
diagrams of posets
  • Not showing here many edges implied by
    transitivity
  • Traditional diagram no edges implied by
    transitivity

Hasse diagram transitive reduction of Â
8
chain decompositions
  • chain decomposition
  • set of disjoint chains
  • C1, C2, , Cq ?i Ci P
  • width of decomposition is q
  • example b  e , a  d , c  f
  • q 3
  • Dilworths Thm minimal-width decomposition has
    width w(P)
  • example a  b  e , c  d  f
  • q w(P ) 2

9
sorting posets
  • Sorting determine relations between all
    elements in P
  • Query complexity
  • Given an oracle such that query q(a, b ) gets
    relation of a, b, how many queries are needed
    to sort poset of width w on n elements?
  • trivial in extreme cases n log n if w(P )
    1 n2 if w(P ) n
  • in practice w ltlt n and w gt 1
  • Total complexity
  • What is the running time required to sort a poset
    of width w on n elements?
  • counts all computational operations ( query is a
    single operation )

10
chain-merge data structure
  • Need a data structure for O(1)-time look-up of
    the relation between any pair of elements
  • Naïve version n n table, O(n 2) time to build
  • Alternative chain-merge data structure
  • given a decomposition of P into q chains,
  • build a chain-merge data structure in O( nq )
    queries and time

11
chain merge data structure
  • Given a decomposition C1, , Cq of poset P
  • for all i, 1 i q, for all x 2 Ci store
    index of x in chain Ci
  • for all j, j ? i, store smallest element yi 2 Ci
    such that yi  x
  • and largest element zi 2 Ci such that x  zi

y3
y5
x
y2
x
C4
C1
z5
C3
z2
C2
C5
12
poset mergesort
  • Mergesort algorithm for recursively sorting P
  • if P w, return trivial decomposition into
    chains of length 1
  • else
  • partition P into equal parts P 1, P 2
  • Mergesort (P 1 ) and Mergesort (P 2 )
  • results give decomposition of P into at most 2w
    chains
  • reduce decomposition of P to have w chains
  • return result
  • At each level, number of chains reduced to w

13
poset mergesort example
w 2
14
poset mergesort example
15
poset mergesort example
16
poset mergesort example
a
c
b
d
f
e
17
poset mergesort example
18
example of peeling algorithm
  • chains b  e , a  d , c  f
  • S b, a, c

a
b
c
d
f
e
19
example of peeling algorithm
  • chains b  e , a  d , c  f
  • S b, a, c
  • a  b ) peel a and record (b, a)

a

b
c
d
f
e
20
example of peeling algorithm
  • chains b  e , a  d , c  f
  • S b, a, c
  • a  b ) peel a and record (b, a)
  • S b, d, c

a

b
c
d
f
e
21
example of peeling algorithm
  • chains b  e , a  d , c  f
  • S b, a, c
  • a  b ) peel a and record (b, a)
  • S b, d, c
  • c  d ) peel c and record (d, c)

a

b
c

d
f
e
22
example of peeling algorithm
  • chains b  e , a  d , c  f
  • S b, a, c
  • a  b ) peel a and record (b, a)
  • S b, d, c
  • c  d ) peel c and record (d, c)
  • S b, d, f

a

b
c

d
f
e
23
example of peeling algorithm
  • chains b  e , a  d , c  f
  • S b, a, c
  • a  b ) peel a and record (b, a)
  • S b, d, c
  • c  d ) peel c and record (d, c)
  • S b, d, f
  • d  f ) peel d and record (f, d)

a

b
c


d
f
e
24
example of peeling algorithm
  • chains b  e , a  d , c  f
  • S b, a, c
  • a  b ) peel a and record (b, a)
  • S b, d, c
  • c  d ) peel c and record (d, c)
  • S b, d, f
  • d  f ) peel d and record (f, d)
  • reached bottom of chain a  d

a

b
c


d
f
e
25
example of peeling algorithm
  • 3 chains originally
  • b  e , a  d , c  f
  • sequence of peeling records
  • (b, a), (d, c), (f, d)
  • rearrange chains
  • delete a ! d, add a ! b
  • delete c ! f, add c ! d
  • add d ! f
  • 2 resulting chains
  • a  b  e , c  d  f

a

b
c


d
f
e
26
example of peeling algorithm
  • 3 chains originally
  • b  e , a  d , c  f
  • sequence of peeling records
  • (b, a), (d, c), (f, d)
  • rearrange chains
  • delete a ! d, add a ! b
  • delete c ! f, add c ! d
  • add d ! f
  • 2 resulting chains
  • a  b  e , c  d  f

a
b
c


d
f
e
27
example of peeling algorithm
  • 3 chains originally
  • b  e , a  d , c  f
  • sequence of peeling records
  • (b, a), (d, c), (f, d)
  • rearrange chains
  • delete a ! d, add a ! b
  • delete c ! f, add c ! d
  • add d ! f
  • 2 resulting chains
  • a  b  e , c  d  f

a
b
c

d
f
e
28
example of peeling algorithm
  • 3 chains originally
  • b  e , a  d , c  f
  • sequence of peeling records
  • (b, a), (d, c), (f, d)
  • rearrange chains
  • delete a ! d, add a ! b
  • delete c ! f, add c ! d
  • add d ! f
  • 2 resulting chains
  • a  b  e , c  d  f

29
complexity of peeling and mergesort
  • Given 2w chains on m elements, peeling requires
  • O(wm) queries and time to reduce by 1 chain
  • O(wm) queries, O(w2m) time overall
  • Mergesort query complexity O( wn log (n/w) )
  • Mergesort total complexity O( w2n log (n/w) )
  • Question is this optimal?

30
lower bound for sorting
  • Theorem Brightwell and Goodall
  • The number of posets of width w on n elements is
    within a polynomial (in n) factor of n! 4n(w-1)
    .
  • This implies that the query complexity of sorting
    is
  • ? ( n log n wn ).
  • How can we do better?

31
total order optimal insertion sort
  • Consider the following sorting algorithm for a
    total order
  • Given an element x and a sorted set T,
  • binary search T to find the smallest element y
    such that y gt x
  • insert x immediately after y
  • Insertion requires O( log n) queries
  • Overall query complexity is O( n log n )
  • What happens if we try this on posets?

32
poset binary insertion sort
  • Consider the following insertion sort for a
    poset
  • Given an element x and a decomposition for a
    sorted poset P,
  • for each chain Ci in the decomposition
  • binary search Ci to find the smallest yi 2 Ci
    such that yi  x
  • binary search Ci to find the largest zi 2 Ci
    such that x  zi
  • Insertion requires O( w log n ) queries
  • Overall query complexity is O( wn log n )
  • No better but we gain intuition for what is
    missing

33
poset binary insertion sort
y1
x
C1
C2
34
query-optimal poset sorting algorithm
  • Must pay attention to relations between current
    chains
  • this is actually not enough
  • also need to take into account future insertions
  • We give a sorting algorithm of query complexity
  • O( n log n wn ).
  • However, we do not know if it can be made
    efficient

35
beyond sorting finding minimal elements
  • Problem Given a poset P, find its minimal
    elements.

36
minimal elements upper bound
  • Deterministic algorithm to find minimal elements
    of P
  • maintain a set S of candidates ( initially S
    )
  • elements of S are mutually incomparable ) S w
  • for each x 2 P
  • compare x to all elments of S
  • if there is y 2 S such that y  x, remove y
    from S
  • if for all remaining y 2 S, x y, add x to S
  • Takes at most wn queries and time O( wn )
  • Randomization expected number of queries at
    most

37
minimal elements lower bound
  • Theorem Any deterministic algorithm must make
    at least n( w1)/2 - w queries to find the
    minimal elments.
  • Proof is an algorithm for an adversary
  • Factor of 2 off from the upper bound
  • Randomized lower bound also off by about a factor
    of 2
  • Can generalize these bounds to the problem of
    finding the k th layer of elements

38
open problems
  • What is the total complexity of sorting?
  • Match the bounds for finding the minimal elements
    and finding the k th layer
  • Other natural problems on partially ordered sets?

39
thank you
40
EXTRA SLIDES FOLLOW
41
minimal elements lower bound
  • Theorem In an adversarial model, at least n(
    w1)/2 - w queries are needed to find the minimal
    elments.
  • Proof is an algorithm for the adversary
  • Adversarys responses correspond to a union of
    disjoint chains
  • For each element x, keep a count t(x) queries
    involving x so far
  • Given query q(a, b)
  • if t(a) w-1, increment t(a) and output a b
  • if t(a) w-1, choose chain for a different
    from its neighbors
  • (do analogous steps for t(b) w-1)
  • if t(a) gt w-1 and t(b) gt w-1
  • if chains for a and b are different, return a
    b
  • else respond according to some fixed indexing
    of P

42
minimal elements lower bound
  • The count t for every element must be at least
    w-1
  • To get proof that an element is not minimal,
  • it must be queried against at least w-1 other
    elements
  • To get proof that an element is minimal,
  • it must be queried against the other minimal
    elements
  • Total number of queries required is at least
    n(w-1)/2
  • factor of 2 is artifact of the proof?

43
note on transitive relations
  • Reachability relation in a general di-graph
  • may be reflexive
  • example protein network
  • vertices are proteins
  • edge (u, v) , change in concentration of u
    directly influences change in concentration of v
  • v reachable from u , change in concentration of u
    indirectly influences concentration of v
  • For certain questions, our results can be
    generalized to transitive relations

44
poset mergesort example
45
poset mergesort example
46
poset mergesort example
47
sorted poset
48
peeling algorithm
  • Given decomposition C1,, Cq with q gt w on m
    elements
  • let S ?i x x is largest elt of Ci
  • repeat if there exist x, y 2 S such that y  x
  • peel y ( remove it from S ), add child of y in
    its chain to S
  • record (x, y), i.e. that x dislodged y
  • if y is last element in its chain, break
  • find a subsequence (x1, y1) (xt, yt) of records
  • that shows how to rearrange chains
  • chains decremented by 1
  • O(qm) time required for 1 iteration
  • O(q 2m) time required to reduce from 2w to w
    chains

49
total order data structure
  • Given element x and sorted set T
  • relations of x to all elements in T can be
    determined by finding
  • the smallest element y 2 T such that y gt x

y
x
T
50
total order data structure
  • Given element x and sorted set T
  • relations of x to all elements in T can be
    determined by finding
  • the smallest element y 2 T such that y gt x

y
x
T x
51
figs
a
c
b
d
f
e
52
poset mergesort
53
poset mergesort
54
figs
2
1
0
2
1
Write a Comment
User Comments (0)
About PowerShow.com