On Poset Merging. 1 Introduction. Peter Chen Guoli Ding Steve Seiden. Keywords: Merging, Partial Order, Lower Bounds. AMS Classification: 68W40

Similar documents
A Note on Scheduling Tall/Small Multiprocessor Tasks with Unit Processing Time to Minimize Maximum Tardiness

List Scheduling and LPT Oliver Braun (09/05/2017)

Polygonal Designs: Existence and Construction

A Better Algorithm For an Ancient Scheduling Problem. David R. Karger Steven J. Phillips Eric Torng. Department of Computer Science

Homework 3 Solutions CSE 101 Summer 2017

Poly-Bernoulli Numbers and Eulerian Numbers

Lecture 21. Interior Point Methods Setup and Algorithm

Curious Bounds for Floor Function Sums

Block designs and statistics

Algorithms for parallel processor scheduling with distinct due windows and unit-time jobs

A note on the multiplication of sparse matrices

Tight Bounds for Maximal Identifiability of Failure Nodes in Boolean Network Tomography

On the Communication Complexity of Lipschitzian Optimization for the Coordinated Model of Computation

A Simple Regression Problem

arxiv: v1 [cs.ds] 3 Feb 2014

Feature Extraction Techniques

The Weierstrass Approximation Theorem

On the Inapproximability of Vertex Cover on k-partite k-uniform Hypergraphs

Bipartite subgraphs and the smallest eigenvalue

13.2 Fully Polynomial Randomized Approximation Scheme for Permanent of Random 0-1 Matrices

1 Proof of learning bounds

Computable Shell Decomposition Bounds

e-companion ONLY AVAILABLE IN ELECTRONIC FORM

#A52 INTEGERS 10 (2010), COMBINATORIAL INTERPRETATIONS OF BINOMIAL COEFFICIENT ANALOGUES RELATED TO LUCAS SEQUENCES

Intelligent Systems: Reasoning and Recognition. Perceptrons and Support Vector Machines

Acyclic Colorings of Directed Graphs

Fast Montgomery-like Square Root Computation over GF(2 m ) for All Trinomials

Quantum algorithms (CO 781, Winter 2008) Prof. Andrew Childs, University of Waterloo LECTURE 15: Unstructured search and spatial search

A1. Find all ordered pairs (a, b) of positive integers for which 1 a + 1 b = 3

Lecture 9 November 23, 2015

E0 370 Statistical Learning Theory Lecture 6 (Aug 30, 2011) Margin Analysis

The concavity and convexity of the Boros Moll sequences

Introduction to Discrete Optimization

An EGZ generalization for 5 colors

Model Fitting. CURM Background Material, Fall 2014 Dr. Doreen De Leon

Chapter 6 1-D Continuous Groups

In this chapter, we consider several graph-theoretic and probabilistic models

A Note on Online Scheduling for Jobs with Arbitrary Release Times

Computable Shell Decomposition Bounds

On Process Complexity

Solutions of some selected problems of Homework 4

The Euler-Maclaurin Formula and Sums of Powers

The Simplex Method is Strongly Polynomial for the Markov Decision Problem with a Fixed Discount Rate

Estimating Entropy and Entropy Norm on Data Streams

arxiv: v1 [cs.ds] 29 Jan 2012

DSPACE(n)? = NSPACE(n): A Degree Theoretic Characterization

1 Identical Parallel Machines

Reed-Muller Codes. m r inductive definition. Later, we shall explain how to construct Reed-Muller codes using the Kronecker product.

time time δ jobs jobs

Non-Parametric Non-Line-of-Sight Identification 1

Kernel Methods and Support Vector Machines

Convex Programming for Scheduling Unrelated Parallel Machines

ORIGAMI CONSTRUCTIONS OF RINGS OF INTEGERS OF IMAGINARY QUADRATIC FIELDS

Support Vector Machine Classification of Uncertain and Imbalanced data using Robust Optimization

Probability Distributions

Stochastic Machine Scheduling with Precedence Constraints

arxiv: v1 [cs.ds] 17 Mar 2016

Tight Information-Theoretic Lower Bounds for Welfare Maximization in Combinatorial Auctions

Physics 215 Winter The Density Matrix

Vulnerability of MRD-Code-Based Universal Secure Error-Correcting Network Codes under Time-Varying Jamming Links

Energy-Efficient Threshold Circuits Computing Mod Functions

. The univariate situation. It is well-known for a long tie that denoinators of Pade approxiants can be considered as orthogonal polynoials with respe

This model assumes that the probability of a gap has size i is proportional to 1/i. i.e., i log m e. j=1. E[gap size] = i P r(i) = N f t.

Note on generating all subsets of a finite set with disjoint unions

Finite fields. and we ve used it in various examples and homework problems. In these notes I will introduce more finite fields

A New Model for Selfish Routing

Reduced Length Checking Sequences

arxiv: v1 [math.co] 19 Apr 2017

Experimental Design For Model Discrimination And Precise Parameter Estimation In WDS Analysis

On the Existence of Pure Nash Equilibria in Weighted Congestion Games

Randomized Recovery for Boolean Compressed Sensing

EMPIRICAL COMPLEXITY ANALYSIS OF A MILP-APPROACH FOR OPTIMIZATION OF HYBRID SYSTEMS

Constant-Space String-Matching. in Sublinear Average Time. (Extended Abstract) Wojciech Rytter z. Warsaw University. and. University of Liverpool

arxiv: v1 [math.na] 10 Oct 2016

M ath. Res. Lett. 15 (2008), no. 2, c International Press 2008 SUM-PRODUCT ESTIMATES VIA DIRECTED EXPANDERS. Van H. Vu. 1.

Handout 7. and Pr [M(x) = χ L (x) M(x) =? ] = 1.

New Slack-Monotonic Schedulability Analysis of Real-Time Tasks on Multiprocessors

Learnability and Stability in the General Learning Setting

MULTIPLAYER ROCK-PAPER-SCISSORS

3.8 Three Types of Convergence

Uniform Approximation and Bernstein Polynomials with Coefficients in the Unit Interval

A Bernstein-Markov Theorem for Normed Spaces

A Self-Organizing Model for Logical Regression Jerry Farlow 1 University of Maine. (1900 words)

Course Notes for EE227C (Spring 2018): Convex Optimization and Approximation

Interactive Markov Models of Evolutionary Algorithms

Department of Electronic and Optical Engineering, Ordnance Engineering College, Shijiazhuang, , China

Computational and Statistical Learning Theory

arxiv: v2 [math.nt] 5 Sep 2012

Lower Bounds for Quantized Matrix Completion

Math 262A Lecture Notes - Nechiporuk s Theorem

Characterization of the Line Complexity of Cellular Automata Generated by Polynomial Transition Rules. Bertrand Stone

Understanding Machine Learning Solution Manual

On Certain C-Test Words for Free Groups

lecture 36: Linear Multistep Mehods: Zero Stability

Soft Computing Techniques Help Assign Weights to Different Factors in Vulnerability Analysis

On the Use of A Priori Information for Sparse Signal Approximations

Hybrid System Identification: An SDP Approach

Convolutional Codes. Lecture Notes 8: Trellis Codes. Example: K=3,M=2, rate 1/2 code. Figure 95: Convolutional Encoder

The Transactional Nature of Quantum Information

Sharp Time Data Tradeoffs for Linear Inverse Problems

Transcription:

On Poset Merging Peter Chen Guoli Ding Steve Seiden Abstract We consider the follow poset erging proble: Let X and Y be two subsets of a partially ordered set S. Given coplete inforation about the ordering within both X and Y, how any coparisons are needed to deterine the order on X Y? This proble is a natural generalization of the list erging proble. While searching in partially ordered sets and sorting partially ordered sets have been considered before, it sees that the proble of poset erging is an unexplored one. We present efficient algoriths for this proble, and show the first lower bounds. In certain cases, our algoriths use the optial nuber of coparisons. Keywords: Merging, Partial Order, Lower Bounds. AMS Classification: 68W40 1 Introduction Role based access control is a syste of security which has generated a lot of recent interest within the database counity, since it is able to odel any sorts of security requireents [14]. In the role based odel of Nyanchaa and Osborn [13], security privileges are odeled using a directed acyclic graph called a role graph. Each user is a node in the graph. There is a directed path fro user s to user t if and only if the privileges of s are a superset of those of t. The role graph induces a partial order on the set of users. Database interoperability and federated databases [15] are two iportant current research topics in databases. A basic requireent for both interoperability and federation is that one should be able to integrate access control inforation [14]. The study of interoperability in role based access control was initiated by Osborn [14], who gave an algorith for erging two role graphs. Inspired by [14], we further study the proble of erging role graphs. Proble Description: Let S be a finite set. A subset R of S S is called a binary relation on S. In this paper, we write x y if (x, y) R. As usual, we call the binary relation a partial order on S if it has the following three properties, for all x, y, z S: (1) Reflexivity: x x; (2) Antisyetry: x y and y x iply x = y; (3) Transitivity: x y and y z iply x z. Supported in part by NSF grant ITR-0326387. Address: Departent of Coputer Science, 298 Coates Hall, Louisiana State University, Baton Rouge, LA 70803. Eail: chen@bit.csc.lsu.edu and sseiden@ac.org. Address: Departent of Matheatics, Louisiana State University, Baton Rouge, LA 70803-4918. Eail: ding@ath.lsu.edu. 1

S will be called a partially ordered set, or siply, a poset, if is a partial order on S. We will write (S; ) if we need to specify. We also write s t if s t but s t. We use the notation s t to indicate that s and t are incoparable, i.e. (s, t) R and (t, s) R. A poset where all pairs of eleents are coparable is called a total order. A subset T of S where all eleents are coparable is called a chain. A poset can be represented by a directed acyclic graph G(S; ), where there is a directed path fro s to t in G(S; ) if and only if s t. We also define G(T ; ) analogously for any subset T of S. A coparison between two eleents s, t S returns one of three distinct values, naely s t, s t or s t. Suppose we have a partially ordered set S, which is partitioned into X and Y. In this paper, we exaine the question How any coparisons are required to construct G(S; ) given G(X; ) and G(Y ; )? We call this the poset erging proble. If S is totally ordered, then this is exactly the ordinary list erging proble. Two closely related probles are as follows: In the poset sorting proble, one is given no initial inforation and asked to deterine G(S; ). In the poset searching proble, we have a partially ordered set S and a subset T of S. We are given G(T ; ). We wish to answer queries of the for Does a given eleent s S belong to T? As with poset erging, in both of these probles the goal is to use the iniu nuber of coparisons. Three natural ways to categorize posets are width, diension and nuber of ideals, all easure how close a poset is to being totally ordered. We explain these easures briefly. An antichain of poset (S; ) is a subset T of S where all eleents are pairwise incoparable. The width of (S; ) is the cardinality of the largest antichain. A well known result of Dilworth [2] tells us that any poset of width w can be partitioned into w chains. A poset has diension d if it is the intersection of d total orders. An ideal in (S; ) is a subset T of S closed under. Algoriths that operate on posets often have running ties bounded as soe function of their size and one or ore of three paraeters just described. Previous Results: To the best of our knowledge, the poset erging proble have not been previously investigated. The role-graph erging algorith of Osborn [14] is a naïve poset erging algorith. It requires n+ 1 i=n i coparisons to erge two role-graphs (acyclic digraphs) on and n vertices. Next, we explore briefly what is known about the list erging proble. For a ore coplete treatent, we refer the reader to Section 5.3.2 of Knuth [10]. We denote the iniu nuber of coparisons to erge two sorted lists of lengths n and by M(, n). As is standard in the erging literature, we always assue that n. The Linear erge algorith [10] iplies that M(, n) n + 1. Knuth [10] credits Graha and Karp with independently showing that M(, ) 2 1 and M(, + 1) 2. Stockeyer and Yao [16] show that M(, + d) 2 + d 1 for all 2d 2. Therefore, Linear is optial for these cases. Knuth [10] generalizes the arguent of Graha and Karp to obtain lower bounds for sall values of n and. The inforation theoretic bound [10] states that for all n and ( ) + n M(, n) log 2. When = 1, the inforation theoretic bound is tight, since binary search can be used to find the position for a single eleent using log 2 (n + 1) coparisons. Graha [6] and independently Hwang and Lin [8] show that 7 M(2, n) = log 2 12 (n + 1) 14 + log 2 17 (n + 1). 2

The first general erging procedure to outperfor Linear was proposed by Hwang and Lin [9]. Their algorith is a cobination of Linear and binary search. They show that the nuber of coparisons it uses is at ost ( ) + n log 2 + 1. A series of increasingly coplicated and specialized algoriths have been developed by Hwang and Deutsch [7], Manacher [12], and Christen [1]. These algoriths provide iproved bounds for sall. Poset searching was first investigated by Linial and Saks [11]. They generalize binary search by defining the concept of a central eleent in a poset. By coparing the candidate eleent with the central eleent, we can eliinate a constant fraction of the ideals in the poset. They show that such eleents always exist, and that therefore searching can be accoplished using O(log N) coparisons, where N is the nuber of ideals in the poset. Unfortunately, there is no known polynoial tie algorith for finding central eleents [3]. The proble of poset sorting has also received soe attention. The case where there is a total order is, of course, the standard sorting proble, which has been studied extensively [10]. Poset sorting was first studied by Faigle and Turán [4]. Let w be the width of a poset and N be the nuber of ideals. Faigle and Turán show a nuber of upper and lower bounds, the ain upper bound being O (in{n log N, wn log n}) on the nuber of coparisons required for sorting. The situation with lower bounds is not very good. If the poset is an antichain, then ( n 2) coparisons are required. However, if the width is w, the best lower bound on the nuber of coparisons is n log 3 n n log 3 w 5n. Further, the O(n log N) upper bound relies on the recognition of central eleents [11]. Felsner, Kant, Rangan and Wagner [5] iprove the lower order ters in the O (wn log n) upper bound on poset sorting. Our Results: In this paper, we will give the first set of lower bounds and the first two non-trivial algoriths for poset erging. Our lower bounds generalize the adversary arguent of Graha and Karp [10], and the inforation theoretic bound [10]. Our first algorith is a generalization of the Linear algorith. We will prove that this algorith is optial when erging partial orders consisting of two equal sized chains. Our second algorith uses any list erging algorith A as a subroutine. When A is the Hwang-Lin algorith, we show that the nuber of coparisons used is at ost 4 3 (recall that n) ore than optial when two total orders are erged. Most of our results bound the nuber of coparisons using soe function of the widths of the posets being erged. 2 Preliinaries For a binary relation R on S, for any two eleents x and y of S, adding (x, y) to R or deleting (x, y) fro R siply results in a new binary relation R {(x, y)} or R {(x, y)}, respectively. 3

In this paper, the posets to be erged are always denoted by X and Y. We define = X, n = Y and assue that 0 < n. We define v and w n to be the widths of X and Y, respectively. In this case, we always assue that X and Y are given decoposed as chains X 1,..., X v and Y 1,..., Y w. If X and Y are not in this forat, they can be decoposed in polynoial tie without using any coparisons (all relations within X and Y are already known). Clearly, the width of X Y is at ost v + w. In general, if (S; ) is a poset of width w then G(S; ) can be represented using O(w S ) space. If C S is a chain in (S; ) and s S, then the greatest lower bound of s in C is an eleent c such that c s and c s for all c C such that c c. If such a c exists, then it is unique. If c does not exist, we define the greatest lower bound to be. The least upper bound of s in C is the unique eleent c such that s c and s c for all c C such that c c. Analogously, if c does not exist, we define the least upper bound to be. Suppose S 1,..., S w is a decoposition of S. Each eleent s S is copletely defined by its w least upper bounds and w greatest lower bounds with respect to the chains S 1... S w. We use 2w pointers for each eleent, and w global pointers to indicate the head of each chain. We call these pointers glb(s, S i ) and lub(s, S i ) for s S and 1 i w. So we can think of the proble of erging X and Y as that of correctly assigning glb(x, Y i ) and lub(x, Y i ) for all x X and 1 i w and glb(y, X i ) and lub(y, X i ) for all y Y and 1 i v. 3 Generalizing the Linear Algorith We start by presenting an algorith PLinear for erging two chains of a poset. PLinear is a natural generalization of the Linear erging algorith and, as shown later, the nuber of coparisons used by PLinear is optial when the two chains have equal size. At the end of this section, we will show how PLinear can be adapted to erge two general posets. Suppose we are given a poset (X Y ; ), where X = {x 1, x 2,..., x } and Y = {y 1, y 2,..., y n }. Let us also assue that x i x j and y i y j for all i j. Algorith PLinear, which is given in Figure 1 below, operates in two phases. In the first phase, we recognize all relations of the for x i y j, while in the second phase we recognize all relations of the for y i x j. Other than bookkeeping, the second phase works in the sae way as the first one does. Proposition 3.1 PLinear is correct. Proof. Since X and Y are syetric, we only need to consider Phase 1. We will show, for each i, that x i y j if and only if the algorith declares so. First, suppose i is the kind of index for which the algorith detects x i y j, for soe j, and also declares x i y k, for all k j. Since is transitive, the algorith is obviously correct for all k j. For each k < j, notice that when the subscript of y turns fro k to k + 1 in the algorith, there exists i i such that x i y k. By transitivity, we ust have x i y k, as we wanted. Next, let i be an index such that x i y j is never detected, for any j. There are two possible situations here, either x i is not copared with any y j, or x i is copared with soe y j but x i y j never occurred. In both cases, it is clear that the algorith terinates because the subscript of y turns fro n to n + 1. Consequently, there exists i with x i y n. Notice that i > i in the first situation and i = i in the second situation. Now by transitivity, it is easy to see that x i y j for all j. 4

Algorith PLinear: Phase 1. We start with i = j = 1 and terinate when i > or j > n. In a general step, we copare x i with y j and record the result. If x i y j, declare x i y k for all k j, set i = i + 1, and then repeat. If x i y j, set j = j + 1 and repeat. Phase 2. We start with i = j = 1 and terinate when i > n or j >. In a general step, we copare y i with x j, in case these two were not copared in Phase 1 (if they have been copared in Phase 1, we use our record and this saves one coparison). If y i x j, declare y i x k for all k j, set i = i + 1, and then repeat. If y i x j, set j = j + 1 and repeat. Figure 1: The PLinear algorith. In order to analyze the coplexity of PLinear, we need to distinguish between coparisons that are ade or requested by the algorith. They are the sae in Phase 1. But in Phase 2, when a coparison is requested, the result ight be given by the record. Proposition 3.2 When the coparison of x i and y j is requested, within that phase, PLinear has requested, including this pair, i + j 1 coparisons. Proof. This is clear when i = j = 1. Notice that, after each coparison, one of i and j is increased by one and the other reains the sae. This behaves exactly the sae as the forula i + j 1. Thus the proposition is proved. Theore 3.1 If + n > 2, then PLinear akes at ost 2 + 2n 4 coparisons when it terinates. Proof. Let C 1 and C 2 be the nuber of coparisons requested in Phases 1 and 2, respectively. Let C be the nuber of coparisons ade in both phases and let δ be the nuber of coparisons requested but not ade in Phase 2. Then it is clear that C = C 1 + C 2 δ. Notice that both phases start with the request of coparing x 1 with y 1. It follows that δ 1. By the last proposition, it is clear that C 1 + n 1 and C 2 + n 1. If at least one of the holds with strict inequality, then C 2 + 2n 4 and we are done. Thus we ay assue C 1 = C 2 = + n 1. But, by Proposition 3.2, each phase terinates only after the request of coparing x with y n. Since + n > 2, we have (1, 1) (, n). Therefore, δ 2 and so C 2 + 2n 4, as we wanted. Clearly, when + n 2, that is, when = n = 1 (as 0 < n), PLinear uses only one coparison, which is obviously the best possible. In fact, it will follow fro Theore 5.2 that, in the coparison odel, PLinear is also optial when = n 2. 5

Finally, we explain how to use PLinear to erge two general posets X and Y. As discussed earlier in Section 2, we assue that both X and Y are decoposed into chains X 1,..., X v and Y 1,..., Y w, where v and w are the widths of X and Y, respectively. Now PLinear adapts easily to the general situation: We siply apply the algorith to (X i, Y j ) for all 1 i v and 1 j w. To count the nuber of coparisons used by the algorith, we need a couple of ore definitions. Let S be a poset of width k and let S 1,..., S k be a partition of S into chains. The partition is balanced if the cardinality of {S i : S i = 1} is iniized, over all partitions of S into k chains. We denote this iniu value by λ(s). Theore 3.2 If PLinear is used to erge X and Y, as suggested above, than it akes at ost 2w + 2vn 4vw + λ(x)λ(y ) coparisons. Proof. To erge X and Y using PLinear, we need to first decopose the into chains. For the purpose of counting the nuber of coparisons used by the algorith, we assue that the partitions are balanced. Since we know the coplete inforation on both X and Y, finding such a decoposition does not cost any coparisons. Let i = X i for 1 i v and n i = Y i for 1 i w. Let λ(x i, Y j ) = 1 if i = n j = 1, and λ(x i, Y j ) = 0 if otherwise. Then, by Theore 3.1, we need at ost 2 i + 2n j 4 + λ(x i, Y j ) coparisons to erge X i and Y j. Thus, the total nuber of coparisons used is at ost as we wanted. v w {2 i + 2n j 4 + λ(x i, Y j )} = 2w + 2vn 4vw + λ(x)λ(y ), i=1 j=1 4 Upper Bounds for Sall The poset erging algorith given in the previous section is based on Linear. As we will see in the next section (Theore 5.2) that Linear is optial for erging partial orders consisting of two equal sized chains. In this section, we develop algoriths, which perfor better than Linear when erging a large chain with a sall one. To facilitate this, we present a general ethod for applying a list erging algorith to poset erging. Again, we exaine first the case of erging two total orders. Given any algorith A for list erging, we define an algorith PMerge(A, X, Y ) for erging two total orders: We assue A uses a total order coparison operation in the process of erging X and Y. The algorith appears in Figure 2 below. As before, this algorith can be easily generalized to erge general posets, just apply the algorith to all pairs (X i, Y j ) of chains. Let a(, n) be the axiu nuber of coparisons used by A in erging a list of size with one of size n. We say a erging algorith A is consistent if for all and n there exist i and j such that for all X = {x 1,..., x } and Y = {y 1,..., y n } the first coparison ade by A is x i y j. Note that all erging algoriths in the literature are consistent. Theore 4.1 PMerge is correct. Further, if A is consistent it uses at ost 2a(, n) 1 coparisons. 6

Algorith PMerge(A, X, Y ): 1. Phase(A, X, Y ). 2. Phase(A, Y, X). Phase(A, U, V ): 1. Define as follows: If a b then a b if and only if (a, b) U V. If a and b are coparable then a b if and only if a b. 2. Use A to erge U and V to get list Z = z 1,..., z n+. 3. z 0 and l 0. 4. For i 1,..., n + : If z i V then l i else glb(z i, V ) z l. 5. z n++1 and l n + + 1. 6. For i n +,..., 1: If z i U then l i else lub(z i, U) z l. Figure 2: The PMerge algorith. Proof. During a call to Phase, the variables glb(u, V ), u U are assigned in Steps 3 and 4. A erges U and V to get Z using the definition of in Step 1 of Phase. Note that is a total order on U V. If z i U then z j z i for all j i and z j z i for all j > i. Define V = V { }. It is easy to prove by induction that at each iteration of Step 4, l is the axiu index j i such that z j V. Clearly, z l is axial in V {z 1,..., z i }. Therefore z l is the greatest lower bound of z i in V. Also during Phase, the variables lub(v, U), v V are assigned in Steps 5 and 6. Define U = U { }. It is easy to prove by induction that at each iteration of Step 6, l is the iniu index j i such that z j U. If z i V then z i z j for all j < i and z i z j for all j i. Therefore z l is inial aong U {z i,..., z n+ } and it is the least upper bound of z i in U. During the two calls to Phase, all the variables glb(y, X), y Y ; lub(x, Y ), x X; glb(x, Y ), x X and lub(y, X), y Y are assigned. Obviously, PMerge uses at ost 2a(, n) coparisons, since it uses A to erge X and Y twice. If A is consistent, the first tie we erge X and Y, we record the outcoe of the first coparison and then recall it the second tie we erge the. To understand how well the algorith PMerge perfors, let us define T (, n) to be the nuber of coparisons required to erge two total orders of sizes and n. We point out in the following that the nuber of coparisons used by PMerge is not too far away fro T (, n). In order to do so, we have to use not only Theore 4.1, but also a result fro the next section which tells us a lower bound on T (, n). We choose to present this result here, instead of waiting till 7

the lower bounds have been established, because we do not like to put it too far away fro the algorith. Corollary 4.1 PMerge uses at ost T (, n) + 4 3 coparisons. Proof. Let A be the Hwang-Lin algorith [9], which is a generalization of both binary search and Linear. Then, by [9], we have a(, n) log 2 ( + n ) + 1. Now it follows fro Theore 4.1 that the nuber of coparisons used by PMerge is at ost ( ) + n 2a(, n) 1 2 log 2 + 2 3 = 2 2 = 2 ( + n)( 1 + n) (1 + n) log 2! + 2 3 2 ( + n/2 )( 1 + n/2 ) (1 + n/2 ) log 2! ( ) + n/2 log 2 + 4 3 T (, n) + 4 3, where the last step is by Theore 5.3 fro the next section. + 2 3 It should be pointed out that Corollary 4.1 can be further iproved by using ore sophisticated algoriths for A, for instance the algorith of Christen [1]. It should also be ephasized again that, as with PLinear, PMerge can be easily adapted to general poset erging. 5 Lower Bounds In this section, we show the first lower bounds for poset erging. We begin by showing that if v and w are arbitrary, then n coparisons are required. We then show lower bounds for the erging of two total orders. As we shall see, this special case turns out to be quite iportant. We are able to generalize these lower bounds for erging two total orders to get lower bounds which are functions of v and w. Theore 5.1 If both X and Y are antichains then poset erging requires n coparisons. Proof. We prove the theore by using the following siple adversary arguent: Each tie the algorith copares two eleents, answer incoparable. Suppose the algorith outputs a candidate for G(X Y ; ) but does not copare soe eleent x X with soe eleent y Y. Then x y and x y are both consistent with all coparisons ade, so the adversary can assign the relation between x and y in such a way that the algorith s answer is wrong. 8

We now consider the erging of two total orders. Recall that T (, n) is the nuber of coparisons required to erge two total orders of sizes and n. We start by considering n =, and then ove to the general case. When the total orders are the sae size, we show { n if n = 0 or 1 T (n, n) β(n) = 4n 4 if n 2. Let X = {x 1, x 2,..., x } and Y = {y 1, y 2,..., y n } be disjoint sets. Suppose a binary relation on X Y satisfies the following: (i) x i x j if and only if i j; (i ) y i y j if and only if i j; (ii) x ( ) i y j iplies x i y j for all j j, and x i y j for all i i; (ii ) y i x j iplies y i x j for all j j, and y i x j for all i i; (iii) x i y j x k iplies i < k; (iii ) y i x j y k iplies i < k. Then we prove a few propositions on. Proposition 5.1 The binary relation is a partial order. Proof. First, since X and Y are disjoint, (i) and (i ) directly iply reflexivity. If a, b X then (i) iplies antisyetry, while if a, b Y then (i ) iplies it. If a X and b Y, then a b since X and Y are disjoint. Suppose both a b and b a. Condition (iii) gives us a contradiction. If a Y and b X, the arguent is analogous. Therefore, antisyetry holds in all cases. Now consider transitivity. Suppose a, b, c X Y with a b c. We need to show that a c. Since X and Y are syetric, we ay assue, without loss of generality, that a = x i, for soe i. We first consider the case b = y j, for soe j. If c = y k, for soe k, then, by (i ), j k and thus, by (ii), a c holds. If c = x k, for soe k, then, by (iii), i k and thus, by (i), a c holds. The case b = x j, for soe j, is siilar to the last case. It follows fro (i) that i j. If c = x k, for soe k, then we deduce a c fro (i). If c = y k, for soe k, then we deduce a c fro (ii). Proposition 5.2 Suppose there are indices p and q such that x p y q and neither x p y q 1 nor x p+1 y q holds. Then the binary relation obtained by deleting (x p, y q ) fro also satisfies (*). Proof. It is clear that we only need to verify (ii), since all other conditions are obviously satisfied. Suppose, on the contrary, that, for soe i and j, we have x i y j while either x i y j for soe j j or x i y j for soe i i. By the definition of it is easy to see that (i, j ) = (p, q) in the first case, and (i, j) = (p, q) in the second case. It follows that, in the first case, q 1 j and thus x p y q 1 (as satisfies (ii)), while in the second case, p + 1 i and thus x p+1 y q (also because satisfies (ii)), both contradict our assuption. Reark 5.1 By the syetry between X and Y, if there are indices p and q such that y p x q and neither y p x q 1 nor y p+1 x q holds, then the binary relation obtained by deleting (y p, x q ) fro also satisfies (*). 9

Proposition 5.3 Suppose x p y q and y q x p. If both x p y q+1 and x p 1 y q hold, then the binary relation obtained by adding (x p, y q ) to also satisfies (*). Proof. It is clear that we only need to verify (ii), (iii), and (iii ), since all other conditions are obviously satisfied. If (iii) or (iii ) is violated, then there exists either k < p with y q x k or i > q with y i x p. In both cases, we deduce fro (ii ) that y q x p, a contradiction. Now it reains to prove (ii). Clearly, if (ii) does not hold, then we ust have (i, j) = (p, q). In addition, we ust also have either x i y j for soe j > j or x i y j for soe i < i. It follows that, in the first case, q + 1 j and thus x p y q+1, while in the second case, p 1 i and thus x p 1 y q. This contradiction copletes our proof of the proposition. Reark 5.2 By the syetry between X and Y, if y p x q, x q y p, y p x q+1, and y p 1 x q hold, then the binary relation obtained by adding (y p, x q ) to also satisfies (*). In the following, we consider a special poset. Let X = {x 1, x 2,..., x n } and Y = {y 1, y 2,..., y n }, where n 2. Let us define a binary relation on X Y as follows: (a) x i x j and y i y j for all i j; (b) x i y j if and only if j i 2; (c) y i x j if and only if j i 1. It is not difficult to see that satisfies (*) and thus, by Proposition 5.1, X Y is partially ordered by. Let R 1 = {(x i, y i+2 ) : i = 1, 2,..., n 2}, R 2 = {(y i, x i+1 ) : i = 1, 2,..., n 1}, R 3 = {(x i, y i+1 ) : i = 1, 2,..., n 1}, and R 4 = {(y i, x i ) : i = 1, 2,..., n}. Proposition 5.4 If (a, b) R 1 R 2, then deleting (a, b) fro the partial order results in a new partial order. Proof. It is straightforward to verify that the assuption here satisfies the assuptions of Proposition 5.2 or Reark 5.1. Then the result follows iediately fro Proposition 5.1. Proposition 5.5 If (a, b) R 3 R 4, then adding (a, b) to the partial order results in a new partial order. Proof. This is very siilar to the last proof. It is straightforward to verify that the assuption here satisfies the assuptions of Proposition 5.3 or Reark 5.2. Then the result follows iediately fro Proposition 5.1. Theore 5.2 The nuber of coparisons needed to recognize (X Y ; ) is at least β(n). Proof. If an algorith has ade less than β(n) coparisons, then for soe (a, b) R 1 R 2 R 3 R 4, a and b are not copared by the algorith, as R 1 R 2 R 3 R 4 = β(n). However, by Propositions 5.4 and 5.5, there is another partial order that agrees with everywhere else, except for (a, b). Thus the algorith cannot deterine if the partial order is or. 10

As entioned earlier in Section 3, by cobining Theore 3.1 and Theore 5.2 we conclude that PLinear is optial when erging two total orders of the sae size. Theore 5.2 also generalizes easily as follows: Suppose n/w = /v = k is integral. Then a lower bound for erging X and Y is vwβ(k). To see this, consider the case where n i = k for all 1 i w and j = k for all 1 j v. For all x, x X, x x if and only x X i, x X j with i j. In other words, only eleents within a chain are coparable in X. The sae condition holds for Y. Then, for all pairs (i, j) and (k, l), it is not difficult to see that X i erges with Y j independently of how X k erges with Y l, since G(X i Y j ; ) and G(X k Y l ; ) are independent. We now give a general lower bound for erging two total orders: Theore 5.3 For all positive integers and n, ( ) ( ) n/2 + n/2 + T (, n) log 2 + log 2. Proof. The proof is a variation on the inforation-theoretic lower bound for erging. Let X and Y be total orders with X = n and Y =. Let k = n/2. We consider only instances X, Y where glb(y, X) x k and x k+1 lub(y, X) for all y Y. We further require that for all y, y Y such that y y, glb(y, X) glb(y, X) and lub(y, X) lub(y, X). It is easy to verify that the conditions (*) hold in this case, so we have a partial order. For instances of this type, erging X and Y involves solving two totally independent sub-probles. The first is to deterine glb(y, X) for all y Y. The nuber of possible solutions to this sub-proble is s = ( n/2 +). Note that in solving this sub-proble, the three outcoes of a coparison really only give us one bit of inforation. That is, when coparing an eleent y Y with x i for i k, we never get the answer y x i. Therefore, the nuber of coparisons needed is at least log 2 s. A siilar arguent holds for the sub-proble of deterining lub(y, X) for all y Y. 6 Suary and Future Research Directions Poset erging is an iportant but understudied research area. In this paper, we have presented the first non-trivial upper bounds, and the first lower bounds for this proble. We proved that our upper bounds are not too far away fro our lower bounds, and in soe cases, these two bounds are actually equal. In our odel, we do not ipose any condition on the union of the two posets to be erged. It will be very interesting to see whether tighter bounds exist if we do know soe extra inforation on the union. In particular, the following proble is still open: Suppose we are erging X and Y and we are given that the width of X Y is k < v + w. How can we use this inforation to reduce the nuber of coparisons? For instance, for n = and v = w = 1 if k = 2 we require at least 2 + 2 4 coparisons, while if k = 1 we need at ost n + 1. Acknowledgent. We are grateful to the two anonyous referees for carefully reading our paper and for helping us iproving the paper. 11

References [1] Christen, C. Iproving the bounds on optial erging. In Proceedings of the 19th Annual Syposiu on Foundations of Coputer Science (Oct. 1978), pp. 259 266. [2] Dilworth, R. P. A decoposition theore for partially ordered sets. Annals of Matheatics 51 (1950), 161 166. [3] Dubhashi, D. P., Mehlhorn, K., Ranjan, D., and Thiel, C. Searching, sorting and randoised algoriths for central eleents and ideal counting in posets. In Proceedings of the 13th Conference on Foundations of Software Technology and Theoretical Coputer Science (Dec. 1993), pp. 436 443. [4] Faigle, U., and Turán, G. Sorting and recognition probles for ordered sets. SIAM Journal on Coputing 17, 1 (Feb. 1988), 100 113. [5] Felsner, S., Kant, R., Rangan, C., and Wagner, D. On the coplexity of partial order properties. ORDER: A Journal on the Theory of Ordered Sets and Its Applications 17, 2 (2000), 179 193. [6] Graha, R. L. On sorting by coparisons. In Coputers in Nuber Theory: Proceedings of the Science Research Council Atlas Syposiu no. 2 (Aug. 1969), pp. 263 269. [7] Hwang, F. K., and Deutsch, D. N. A class of erging algoriths. Journal of the ACM 20, 1 (Jan. 1973), 148 159. [8] Hwang, F. K., and Lin, S. Optial erging of 2 eleents with n eleents. Acta Inforatica 1, 2 (1971), 145 158. [9] Hwang, F. K., and Lin, S. A siple algorith for erging two disjoint linearly ordered sets. SIAM Journal on Coputing 1, 1 (Mar. 1972), 31 39. [10] Knuth, D. E. Sorting and Searching, second ed., vol. 3 of The Art of Coputer Prograing. Addison-Wesley, Reading, MA, USA, 1998. [11] Linial, N., and Saks, M. Every poset has a central eleent. Journal of Cobinatorial Theory, Series A 40 (1985), 195 210. [12] Manacher, G. K. Significant iproveents to the Hwang-Lin erging algoriths. Journal of the ACM 26, 3 (July 1979), 434 440. [13] Nyanchaa, M., and Osborn, S. The role graph odel and conflict of interest. ACM Transactions on Inforation and Systes Security 2, 1 (1999), 3 33. [14] Osborn, S. Database security integration using role-based access control. In Proceedings of the IFIP WG11.3 Working Conference on Database Security (Aug. 2000), pp. 423 437. [15] Sheth, A. P., and Larson, J. A. Federated database systes for anaging distributed, heterogeneous, and autonoous databases. ACM Coputing Surveys 22, 3 (1990), 183 236. [16] Stockeyer, P. K., and Yao, F. F. On the optiality of linear erge. SIAM Journal on Coputing 9, 1 (1980), 85 90. 12