• Aucun résultat trouvé

November20,2013 DanielDeutch PierreSenellart AntoineAmarilli M.LamineBa ComplexityofMergingOrderedDocuments .......

N/A
N/A
Protected

Academic year: 2022

Partager "November20,2013 DanielDeutch PierreSenellart AntoineAmarilli M.LamineBa ComplexityofMergingOrderedDocuments ......."

Copied!
78
0
0

Texte intégral

(1)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

.

...

Complexity of Merging Ordered Documents

Antoine Amarilli1 M. Lamine Ba1 Daniel Deutch2 Pierre Senellart1

1Télécom ParisTech, Paris, France

2Tel Aviv University, Tel Aviv, Israel

November 20, 2013

1/27

(2)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Version control

Version control software (VCS) for line-based textual data.

Also, tree-shaped documents:

Texts (sections, paragraphs)

XML

Code

...

Main problem: solvingconflicts.

2/27

(3)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

DAG of versions

..

V3a

.

V2b

.

V3b .

V1

.

V2a

.

V4 (merged)

.

Root

3/27

(4)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Conflict resolution

We mustmerge conflicting versions:

..

..

A.

....

..

. C ..

..

B

⇝ ..

..

A...

..

B...

..

D

and

..

..

A.

....

..

C...

..

F .

....

..

. B ..

..

E

and

..

..

A.

....

..I .

....

..

G...

..

H .

....

..

. C ..

..

B

How can such conflicts beresolved?

4/27

(5)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Importance of order

Use of probabilistic XML for versioning already investigated:

M. Lamine Ba, T. Abdessalem, P. Senellart.

Uncertain Version Control in Open Collaborative Editing of Tree-Structured Documents.

DocEng’13, Florence, Italy.

M. Lamine Ba, T. Abdessalem, P. Senellart.

Merging Uncertain Multi-Version XML Documents.

DChanges’13, Florence, Italy.

Does not take orderinto account on child nodes.

Important source of uncertainty!

....

Root...

..

New-1

....

Root...

..

New-2

....

Root. ....

..

New-2 .

..

..

New-1

or

....

Root. ....

..

New-1 .

..

..

New-2

5/27

(6)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Representing the merge

The actual merge is chosenby the user.

Computing all possible mergesis unreasonable.

Ideally, derive astrong representation systemto represent the possible merges, merges of merges, etc.

Here: study the complexity of a decision problem:

Input. Set of documentsDto merge.

Possible worldWof the merge.

Output. IsW really a possible mergeof D?

We restrict the study to an ordered listfor now.

(List of childrenfor a tree of height 1.)

6/27

(7)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Table of contents

1... Introduction

2... Merge model

3... Merge without IDs

4... Merge with move

5... Conclusion

7/27

(8)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Edition

Base version Bwith items and unique IDs.

Insert operation to insert a new node with a fresh ID.

# Section 1 Introduction 2 Problem 3 Conclusion

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

8/27

(9)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Edition

Base version Bwith items and unique IDs.

Insert operation to insert a new node with a fresh ID.

# Section 1 Introduction 2 Problem 3 Conclusion

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

8/27

(10)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Edition

Base version Bwith items and unique IDs.

Insert operation to insert a new node with a fresh ID.

# Section 1 Introduction 2 Problem 3 Conclusion

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

8/27

(11)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Edition

Base version Bwith items and unique IDs.

Insert operation to insert a new node with a fresh ID.

# Section 1 Introduction 2 Problem 3 Conclusion

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

8/27

(12)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Merge

Union of the nodes: D1∪D2.

Consistent order with the individual documents.

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 4 Extension 7 Extension 5 Related work 3 Conclusion

9/27

(13)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Merge

Union of the nodes: D1∪D2.

Consistent order with the individual documents.

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 4 Extension 7 Extension 5 Related work 3 Conclusion

9/27

(14)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Merge

Union of the nodes: D1∪D2.

Consistent order with the individual documents.

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 4 Extension 7 Extension 5 Related work 3 Conclusion

9/27

(15)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Merge

Union of the nodes: D1∪D2.

Consistent order with the individual documents.

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 4 Extension 7 Extension 5 Related work 3 Conclusion

9/27

(16)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Possible worlds

Exponentiallymany merges (|D1|+|D2|

|D1|

)

PTIME algorithm to check if a world is a possible merge.

Given possible worldW with IDs, do the following:

Verify thedomain.

For everypairx<y,

For everydocumentDcontaining bothxandy, Checkifx<yin D.

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 5 Related work 4 Extension 3 Conclusion

10/27

(17)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Possible worlds

Exponentiallymany merges (|D1|+|D2|

|D1|

)

PTIME algorithm to check if a world is a possible merge.

Given possible worldW with IDs, do the following:

Verify thedomain.

For everypairx<y,

For everydocumentDcontaining bothxandy, Checkifx<yin D.

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 5 Related work 4 Extension 3 Conclusion

10/27

(18)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Possible worlds

Exponentiallymany merges (|D1|+|D2|

|D1|

)

PTIME algorithm to check if a world is a possible merge.

Given possible worldW with IDs, do the following:

Verify thedomain.

For everypairx<y,

For everydocumentDcontaining bothxandy, Checkifx<yin D.

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 5 Related work 4 Extension 3 Conclusion

10/27

(19)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Possible worlds

Exponentiallymany merges (|D1|+|D2|

|D1|

)

PTIME algorithm to check if a world is a possible merge.

Given possible worldW with IDs, do the following:

Verify thedomain.

For everypairx<y,

For everydocumentDcontaining bothxandy, Checkifx<yin D.

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 5 Related work 4 Extension

3 Conclusion 10/27

(20)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Possible worlds

Exponentiallymany merges (|D1|+|D2|

|D1|

)

PTIME algorithm to check if a world is a possible merge.

Given possible worldW with IDs, do the following:

Verify thedomain.

For everypairx<y,

For everydocumentDcontaining bothxandy, Checkifx<yin D.

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 5 Related work 4 Extension 3 Conclusion 10/27

(21)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Table of contents

1... Introduction

2... Merge model

3... Merge without IDs

4... Merge with move

5... Conclusion

11/27

(22)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Possible worlds, without IDs

We may not have the IDsin W (e.g., user input).

Ambiguity about how to match elements!

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

Section Introduction Preliminaries Problem Extension Related work Extension Conclusion

12/27

(23)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Possible worlds, without IDs

We may not have the IDsin W (e.g., user input).

Ambiguity about how to match elements!

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

Section Introduction Preliminaries Problem Extension Related work Extension Conclusion

12/27

(24)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Possible worlds, without IDs

We may not have the IDsin W (e.g., user input).

Ambiguity about how to match elements!

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

Section Introduction Preliminaries Problem Extension Related work Extension Conclusion

12/27

(25)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Possible worlds, without IDs

We may not have the IDsin W (e.g., user input).

Ambiguity about how to match elements!

# Section 1 Introduction 2 Problem 4 Extension 5 Related work 3 Conclusion

# Section 1 Introduction 6 Preliminaries 2 Problem 7 Extension 3 Conclusion

Section Introduction Preliminaries Problem Extension Related work Extension Conclusion

12/27

(26)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm

Ambiguity makes it look like the problem is hard In fact a dynamic algorithmsolves it inO(n2).

Show it on anexample.

# Label

1 A

3 A

4 B

2 B

# Label

1 A

5 A

2 B

6 A

Label A A A B B A

13/27

(27)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm

Ambiguity makes it look like the problem is hard In fact a dynamic algorithmsolves it inO(n2).

Show it on anexample.

# Label

1 A

3 A

4 B

2 B

# Label

1 A

5 A

2 B

6 A

Label A A A B B A

13/27

(28)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm

Ambiguity makes it look like the problem is hard In fact a dynamic algorithmsolves it inO(n2).

Show it on anexample.

# Label

1 A

3 A

4 B

2 B

# Label

1 A

5 A

2 B

6 A

Label A A A B B A

13/27

(29)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm

Ambiguity makes it look like the problem is hard In fact a dynamic algorithmsolves it inO(n2).

Show it on anexample.

# Label

1 A

3 A

4 B

2 B

# Label

1 A

5 A

2 B

6 A

Label A A A B B A

13/27

(30)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm (example)

Set of documents D:

A1 A3B4 B2. A1 A5B2 A6.

Possible world W: A A A B B A.

A1 A3 B4 B2 ·

A1 A5 B2 A6

·

14/27

(31)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm (example)

Set of documents D:

A1 A3B4 B2. A1 A5B2 A6.

Possible world W: A A A B B A.

A1 A3 B4 B2 ·

A1 A5 B2 A6

·

14/27

(32)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm (example)

Set of documents D:

A1 A3B4 B2. A1 A5B2 A6.

Possible world W: A A A B B A.

A1 A3 B4 B2 ·

A1 A

A5 A A B

B2 A B B

A6 A

· ·

14/27

(33)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm (example)

Set of documents D:

A1 A3B4 B2. A1 A5B2 A6.

Possible world W: A A A B B A.

A1 A3 B4 B2 ·

A1 A

A5 A A B

B2 A B B

A6 A

· ··

14/27

(34)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm (example)

Set of documents D:

A1 A3B4 B2. A1 A5B2 A6.

Possible world W: A A A B B A.

A1 A3 B4 B2 ·

A1 A

A5 A A B

B2 A B B

A6 A

· ··

14/27

(35)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm (example)

Set of documents D:

A1 A3B4 B2. A1 A5B2 A6.

Possible world W: A A A B B A.

A1 A3 B4 B2 ·

A1 A

A5 A A B

B2 A B B

A6 A

· ··

14/27

(36)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm (example)

Set of documents D:

A1 A3B4 B2. A1 A5B2 A6.

Possible world W: A A A B B A.

A1 A3 B4 B2 ·

A1 A

A5 A A B

B2 A B B

A6 A

· ··

14/27

(37)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm (example)

Set of documents D:

A1 A3B4 B2. A1 A5B2 A6.

Possible world W: A A A B B A.

A1 A3 B4 B2 ·

A1 A

A5 A A B

B2 A B B

A6 A

· ··

14/27

(38)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm (example)

Set of documents D:

A1 A3B4 B2. A1 A5B2 A6.

Possible world W: A A A B B A.

A1 A3 B4 B2 ·

A1 A

A5 A A B

B2 A B B

A6 A

· ··

14/27

(39)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm (example)

Set of documents D:

A1 A3B4 B2. A1 A5B2 A6.

Possible world W: A A A B B A.

A1 A3 B4 B2 ·

A1 A

A5 A A B

B2 A B B

A6 A

· ··

14/27

(40)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm (example)

Set of documents D:

A1 A3B4 B2. A1 A5B2 A6.

Possible world W: A A A B B A.

A1 A3 B4 B2 ·

A1 A

A5 A→↓ A B

B2 A B B

A6 A

· ··

14/27

(41)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Dynamic algorithm (example)

Set of documents D:

A1 A3B4 B2. A1 A5B2 A6.

Possible world W: A A A B B A.

A1 A3 B4 B2 ·

A1 A

A5 A→↓ A B

B2 A B B

A6 A

· ··

14/27

(42)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

More documents

If we havemultiple documents to merge (sayk).

Generalized dynamic algorithmis inO(nk).

Hence, PTIME for fixedk.

What if kis not fixed?

Certainly it is still in NP.

In fact, it is NP-hard (reduction from MinSAT).

Thanks: http://cstheory.stackexchange.com/a/19081/

15/27

(43)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Table of contents

1... Introduction

2... Merge model

3... Merge without IDs

4... Merge with move

5... Conclusion

16/27

(44)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Conflicts

Move operation to move arbitrary nodes.

Documents can disagree.

# Section 1 Problem A 2 Problem B

# Section 1 Problem A 2 Problem B 3 Conclusion

# Section 4 Intro 2 Problem B 1 Problem A

17/27

(45)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Conflicts

Move operation to move arbitrary nodes.

Documents can disagree.

# Section 1 Problem A 2 Problem B

# Section 1 Problem A 2 Problem B 3 Conclusion

# Section 4 Intro 2 Problem B 1 Problem A

17/27

(46)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Conflicts

Move operation to move arbitrary nodes.

Documents can disagree.

# Section 1 Problem A 2 Problem B

# Section 1 Problem A 2 Problem B 3 Conclusion

# Section 4 Intro 2 Problem B 1 Problem A

17/27

(47)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Conflicts

Move operation to move arbitrary nodes.

Documents can disagree.

# Section 1 Problem A 2 Problem B

# Section 1 Problem A 2 Problem B 3 Conclusion

# Section 4 Intro 2 Problem B 1 Problem A

17/27

(48)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Merge

Order isarbitrary if documents disagree.

However, try to maintain order withindocuments.

# Section 1 Problem A 2 Problem B 3 Conclusion

# Section 4 Intro 2 Problem B 1 Problem A

# Section 4 Intro 1 Problem A 2 Problem B 3 Conclusion

Only onething to decide here.

18/27

(49)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Merge

Order isarbitrary if documents disagree.

However, try to maintain order withindocuments.

# Section 1 Problem A 2 Problem B 3 Conclusion

# Section 4 Intro 2 Problem B 1 Problem A

# Section 4 Intro 1 Problem A 2 Problem B 3 Conclusion

Only onething to decide here.

18/27

(50)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Merge

Order isarbitrary if documents disagree.

However, try to maintain order withindocuments.

# Section 1 Problem A 2 Problem B 3 Conclusion

# Section 4 Intro 2 Problem B 1 Problem A

# Section 4 Intro 1 Problem A 2 Problem B 3 Conclusion

Only onething to decide here.

18/27

(51)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Merge

Order isarbitrary if documents disagree.

However, try to maintain order withindocuments.

# Section 1 Problem A 2 Problem B 3 Conclusion

# Section 4 Intro 2 Problem B 1 Problem A

# Section 4 Intro 1 Problem A 2 Problem B 3 Conclusion

Only onething to decide here.

18/27

(52)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Merge

Order isarbitrary if documents disagree.

However, try to maintain order withindocuments.

# Section 1 Problem A 2 Problem B 3 Conclusion

# Section 4 Intro 2 Problem B 1 Problem A

# Section 4 Intro 1 Problem A 2 Problem B 3 Conclusion

Only onething to decide here.

18/27

(53)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Weird cases

Sometimes weird!

# Section 1 Problem A 3 Transition A-B 2 Problem B

# Section 2 Problem B 4 Transition B-A 1 Problem A

# Section 2 Problem B 4 Transition B-A 1 Problem A 3 Transition A-B

Satisfy a maximal subsetof the original constraints.

It is still in NPto decide if something is a possible world.

It is NP-hard even for 2 documents (from Unary 3-partition).

Thanks: http://cstheory.stackexchange.com/a/19415/

19/27

(54)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Weird cases

Sometimes weird!

# Section 1 Problem A 3 Transition A-B 2 Problem B

# Section 2 Problem B 4 Transition B-A 1 Problem A

# Section 2 Problem B 4 Transition B-A 1 Problem A 3 Transition A-B

Satisfy a maximal subsetof the original constraints.

It is still in NPto decide if something is a possible world.

It is NP-hard even for 2 documents (from Unary 3-partition).

Thanks: http://cstheory.stackexchange.com/a/19415/

19/27

(55)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Weird cases

Sometimes weird!

# Section 1 Problem A 3 Transition A-B 2 Problem B

# Section 2 Problem B 4 Transition B-A 1 Problem A

# Section 2 Problem B 4 Transition B-A 1 Problem A 3 Transition A-B

Satisfy a maximal subsetof the original constraints.

It is still in NPto decide if something is a possible world.

It is NP-hard even for 2 documents (from Unary 3-partition).

Thanks: http://cstheory.stackexchange.com/a/19415/

19/27

(56)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Weird cases

Sometimes weird!

# Section 1 Problem A 3 Transition A-B 2 Problem B

# Section 2 Problem B 4 Transition B-A 1 Problem A

# Section 2 Problem B 4 Transition B-A 1 Problem A 3 Transition A-B

Satisfy a maximal subsetof the original constraints.

It is still in NPto decide if something is a possible world.

It is NP-hard even for 2 documents (from Unary 3-partition).

Thanks: http://cstheory.stackexchange.com/a/19415/

19/27

(57)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Weird cases

Sometimes weird!

# Section 1 Problem A 3 Transition A-B 2 Problem B

# Section 2 Problem B 4 Transition B-A 1 Problem A

# Section 2 Problem B 4 Transition B-A 1 Problem A 3 Transition A-B

Satisfy a maximal subsetof the original constraints.

It is still in NPto decide if something is a possible world.

It is NP-hard even for 2 documents (from Unary 3-partition).

Thanks: http://cstheory.stackexchange.com/a/19415/

19/27

(58)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Weird cases

Sometimes weird!

# Section 1 Problem A 3 Transition A-B 2 Problem B

# Section 2 Problem B 4 Transition B-A 1 Problem A

# Section 2 Problem B 4 Transition B-A 1 Problem A 3 Transition A-B

Satisfy a maximal subsetof the original constraints.

It is still in NPto decide if something is a possible world.

It is NP-hard even for 2 documents (from Unary 3-partition).

Thanks: http://cstheory.stackexchange.com/a/19415/

19/27

(59)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Table of contents

1... Introduction

2... Merge model

3... Merge without IDs

4... Merge with move

5... Conclusion

20/27

(60)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Nested hierarchies

Necessary for XML.

Hardness results still holds.

Dynamic algorithm can be extended:

When solving the problem for twoforests:

Solve foreach pairof children.

Use the dynamic algorithm to solve the childsequence.

When solving the problem for twotrees:

Check equality of theroot labels.

Solve theforestsof children.

21/27

(61)

. . . . . Introduction

. . . Merge model

. . . .

Merge without IDs

. . .

Merge with move

. . Conclusion

Relational algebra

Add orderto relational databases.

Allow arbitraryrelational operations.

Trackprovenance of the data.

Use provenance for order uncertainty.

Connected with provenance foraggregates.

22/27

(62)

. . . .

Supplementary material

Thanks!

Thanks for your attention!

(Work in progress, questions and feedback welcome.)

23/27

(63)

. . . .

Supplementary material

Hardness of multiple documents

Reduction fromMinSAT:

Input. n clauses ±xi∨ ±xj,kvariables, integerd Output. can we avoid satisfying >d clauses?

IDs:

e+i for+xi,ei forxi

cifor clausei Labels:

Clause, for clauses, Vari for variablei Document setD:

e±i cj if±xioccurs incj

Possible world W:

Vari from 1 tok Clausendtimes Vari from 1 tok Clausedtimes

24/27

(64)

. . . .

Supplementary material

Hardness of multiple documents (example)

MinSAT instance:

C1:xy C2:¬x∨ ¬y d= 0

Encoding (D, andW):

# Label e+x Varx c1 Clause

# Label e+y Vary c1 Clause

# Label ex Varx c2 Clause

# Label ey Vary c2 Clause

Label Varx Vary Clause Clause Varx Vary

Thanks: http://cstheory.stackexchange.com/a/19081/

25/27

(65)

. . . .

Supplementary material

Hardness of multiple documents (example)

MinSAT instance:

C1:xy C2:¬x∨ ¬y d= 0

Encoding (D, andW):

# Label e+x Varx c1 Clause

# Label e+y Vary c1 Clause

# Label ex Varx c2 Clause

# Label ey Vary c2 Clause

Label Varx Vary Clause Clause Varx Vary

Thanks: http://cstheory.stackexchange.com/a/19081/

25/27

(66)

. . . .

Supplementary material

Hardness of multiple documents (example)

MinSAT instance:

C1:xy C2:¬x∨ ¬y d= 0

Encoding (D, andW):

# Label e+x Varx c1 Clause

# Label e+y Vary c1 Clause

# Label ex Varx c2 Clause

# Label ey Vary c2 Clause

Label Varx Vary Clause Clause Varx Vary

Thanks: http://cstheory.stackexchange.com/a/19081/

25/27

(67)

. . . .

Supplementary material

Hardness of multiple documents (example)

MinSAT instance:

C1:xy C2:¬x∨ ¬y d= 0

Encoding (D, andW):

# Label e+x Varx c1 Clause

# Label e+y Vary c1 Clause

# Label ex Varx c2 Clause

# Label ey Vary c2 Clause

Label Varx Vary Clause Clause Varx Vary

Thanks: http://cstheory.stackexchange.com/a/19081/

25/27

(68)

. . . .

Supplementary material

Hardness of multiple documents (example)

MinSAT instance:

C1:xy C2:¬x∨ ¬y d= 0

Encoding (D, andW):

# Label e+x Varx c1 Clause

# Label e+y Vary c1 Clause

# Label ex Varx c2 Clause

# Label ey Vary c2 Clause

Label Varx Vary Clause Clause Varx Vary

Thanks: http://cstheory.stackexchange.com/a/19081/

25/27

(69)

. . . .

Supplementary material

Hardness of multiple documents (example)

MinSAT instance:

C1:xy C2:¬x∨ ¬y d= 0

Encoding (D, andW):

# Label e+x Varx c1 Clause

# Label e+y Vary c1 Clause

# Label ex Varx c2 Clause

# Label ey Vary c2 Clause

Label Varx Vary Clause Clause Varx Vary Thanks: http://cstheory.stackexchange.com/a/19081/

25/27

(70)

. . . .

Supplementary material

Hardness

Merging two versions is already NP-complete.

Reduction fromUnary 3-partition:

Input. 3mintegersni in unary, and integerB.

Output. can we partition in triples with sumalwaysB?

Create two blocksper integerni:

Bothstartwith an element labeledOpen.

Bothcontainnielements labeledItem:

First block in one order.

Second block in reverse order.

Bothendwith an element labeledClose.

Document setD:

D1: concatenate all blocks in one order.

D2: concatenate all blocks in the reverse order.

Possible world W:

Open3,ItemB,Close3. Repeatmtimes.

26/27

Références

Documents relatifs

Pour toute union de requêtes conjonctives q fixée et k ∈ N , pour toute instance d’entrée I de largeur d’arbre ≤ k, on peut construire en temps linéaire.. un circuit de

→ (Non ordonné : largeur non bornée) Tous les opérateurs sauf × minimal préservent la

→ Linear time provenance circuit computation on trees and treelike instances:.. for

but not finitely controllable (see above; [Rosati, 2006]) (Finite) open-world query answering is decidable for IDs and FDs with relations of arity ≤ 2.. [Pratt-Hartmann,

Consider the taxonomy: partial order Consider all possible total orders. (Ties can be made negligible) Solve each total order

Creative provenance representations (arithmetic circuits) Intrinsic definitions of provenance (rather than operational) Extending provenance to MSO (PosBool[X] only for

Creative provenance representations (arithmetic circuits) Intrinsic definitions of provenance (rather than operational) Extending provenance to MSO (PosBool[X] only for

Introduction Existing approaches Result Proof ideas Conclusion.. Open-World Finite Query Answering Under