Algorithm Search⌘K

Definitionadvanced

Universal solution

Also called universal solution of data exchange.

A solution to a data exchange problem that maps homomorphically into every other solution; the chase computes one when it ends.

A universal solution of a data exchange problem is a solution that has a homomorphism into every solution, so it holds what the mapping forces and nothing more. When the chase with the mapping stops without failure, its result is a universal solution. This page defines the notion and shows which solutions have it. The data exchange problem page states the tasks that use it, and core computation picks the smallest universal solution.

Definition

Fix a schema mapping M=(S,T,Σst∪Σt)\mathcal M = (\mathbf S, \mathbf T, \Sigma_{st} \cup \Sigma_t) and a source instance II. Target instances hold constants and labeled nulls ⊥1,⊥2,…\bot_1, \bot_2, \ldots, and set semantics holds.

  • A solution for II is a target instance JJ such that (I,J)(I, J) satisfies Σst∪Σt\Sigma_{st} \cup \Sigma_t.
  • A homomorphism h:J→J′h : J \to J' maps the values of JJ to values of J′J', is the identity on constants, and maps each fact R(v1,…,vk)R(v_1, \ldots, v_k) of JJ to a fact R(h(v1),…,h(vk))R(h(v_1), \ldots, h(v_k)) of J′J'.
  • A universal solution for II is a solution JJ such that, for every solution J′J' for II, there is a homomorphism J→J′J \to J'.

Facts that follow from the definition and from the theory of the chase:

  • Two universal solutions have homomorphisms each way. So they are homomorphically equivalent, and they give the same null-free answers to each conjunctive query.
  • If JJ is universal and J′J' is a solution with homomorphisms each way with JJ, then J′J' is universal too.
  • If a chase of II with Σst∪Σt\Sigma_{st} \cup \Sigma_t stops without failure, the result is a universal solution (theorem, Fagin, Kolaitis, Miller and Popa). If it fails, II has no solution.
  • All universal solutions have the same core up to a renaming of nulls, and this core is the smallest universal solution (theorem, Fagin, Kolaitis and Popa).
  • For a union of conjunctive queries qq, the certain answers are the null-free tuples of q(J)q(J) for any universal solution JJ (theorem, Fagin, Kolaitis, Miller and Popa).

Examples and non-examples

The mapping has d1:∀x,y (Flight(x,y)→∃z (Leg(x,z)∧Leg(z,y)))d_1 : \forall x, y\, (\text{Flight}(x, y) \to \exists z\, (\text{Leg}(x, z) \wedge \text{Leg}(z, y))) and d2:∀x,y (Flight(x,y)→∃u Leg(x,u))d_2 : \forall x, y\, (\text{Flight}(x, y) \to \exists u\, \text{Leg}(x, u)), with no target dependencies, and I={Flight(a,b),Flight(b,c)}I = \{\text{Flight}(a, b), \text{Flight}(b, c)\}.

Universal: the canonical solution. The chase gives

J={Leg(a,⊥1),Leg(⊥1,b),Leg(b,⊥2),Leg(⊥2,c),Leg(a,⊥3),Leg(b,⊥4)}.J = \{\text{Leg}(a, \bot_1), \text{Leg}(\bot_1, b), \text{Leg}(b, \bot_2), \text{Leg}(\bot_2, c), \text{Leg}(a, \bot_3), \text{Leg}(b, \bot_4)\}.

For any solution J′J', d1d_1 gives values s1,s2s_1, s_2 with Leg(a,s1),Leg(s1,b),Leg(b,s2),Leg(s2,c)\text{Leg}(a, s_1), \text{Leg}(s_1, b), \text{Leg}(b, s_2), \text{Leg}(s_2, c) in J′J', and d2d_2 gives t1,t2t_1, t_2 with Leg(a,t1),Leg(b,t2)\text{Leg}(a, t_1), \text{Leg}(b, t_2). The map ⊥1↦s1\bot_1 \mapsto s_1, ⊥2↦s2\bot_2 \mapsto s_2, ⊥3↦t1\bot_3 \mapsto t_1, ⊥4↦t2\bot_4 \mapsto t_2 is a homomorphism J→J′J \to J'.

Universal: the core. C={Leg(a,⊥1),Leg(⊥1,b),Leg(b,⊥2),Leg(⊥2,c)}C = \{\text{Leg}(a, \bot_1), \text{Leg}(\bot_1, b), \text{Leg}(b, \bot_2), \text{Leg}(\bot_2, c)\} is a solution, because Leg(a,⊥1)\text{Leg}(a, \bot_1) and Leg(b,⊥2)\text{Leg}(b, \bot_2) also satisfy d2d_2. It is a subset of JJ, so it maps into each solution, and it is universal. It is the smallest universal solution.

A solution that is not universal: a guess made concrete. J1={Leg(a,b),Leg(b,b),Leg(b,c),Leg(c,c)}J_1 = \{\text{Leg}(a, b), \text{Leg}(b, b), \text{Leg}(b, c), \text{Leg}(c, c)\} sets the stops to bb and cc. It is a solution. The map ⊥1,⊥3,⊥4↦b\bot_1, \bot_3, \bot_4 \mapsto b, ⊥2↦c\bot_2 \mapsto c is a homomorphism J→J1J \to J_1. But J1J_1 has no homomorphism into JJ, because a homomorphism fixes constants and Leg(b,b)\text{Leg}(b, b) is not in JJ. So J1J_1 claims more than the mapping says. The query "is there a loop Leg(x,x)\text{Leg}(x, x)" is true on J1J_1 and false on JJ.

A solution that is not universal: a new constant. J2={Leg(a,d),Leg(d,b),Leg(b,d),Leg(d,c)}J_2 = \{\text{Leg}(a, d), \text{Leg}(d, b), \text{Leg}(b, d), \text{Leg}(d, c)\}, where dd is a constant, is a solution. It does not map into JJ, since Leg(a,d)\text{Leg}(a, d) would have to stay as it is. On J2J_2, the query Q(x,y) :- Leg(x,z),Leg(z,y)Q(x, y) \text{ :- } \text{Leg}(x, z), \text{Leg}(z, y) returns (a,c)(a, c), which is not a certain answer.

Solutions exist but no universal solution. Take the source-to-target tgd ∀x,y (S(x,y)→E(x,y))\forall x, y\, (S(x, y) \to E(x, y)), the target tgd ∀x,y (E(x,y)→∃z E(y,z))\forall x, y\, (E(x, y) \to \exists z\, E(y, z)), and I={S(a,b)}I = \{S(a, b)\}. The instance {E(a,b),E(b,b)}\{E(a, b), E(b, b)\} is a solution. A finite solution UU must contain a walk of EE edges from bb that never ends, so it has a cycle reached from bb by a path of some length LL. For m>Lm > L, the instance Jm={E(a,b),E(b,⊥1),E(⊥1,⊥2),…,E(⊥m−1,⊥m),E(⊥m,⊥m)}J_m = \{E(a, b), E(b, \bot_1), E(\bot_1, \bot_2), \ldots, E(\bot_{m-1}, \bot_m), E(\bot_m, \bot_m)\} is a solution whose only cycle is the loop at ⊥m\bot_m, at distance mm from bb. A homomorphism U→JmU \to J_m maps bb to bb, so it maps the end of the path to the node at distance LL from bb, which is not ⊥m\bot_m, and it maps the cycle to a closed walk that starts there. No closed walk of JmJ_m starts there. So no finite solution is universal. Here the chase runs forever, and the target tgd is not weakly acyclic.

  • Solution. Any target instance that satisfies the mapping; see data exchange problem.
  • Canonical universal solution. The result of the oblivious chase with source-to-target tgds, where each trigger fires one time with fresh nulls.
  • Core. The smallest universal solution, unique up to a renaming of nulls; see core computation for data exchange. It is the analogue for instances of the minimal query of the Chandra-Merlin theorem.
  • Certain answers. The answers true in all solutions; universal solutions compute them for unions of conjunctive queries; see certain answers.
  • Closed world solutions. Universal solutions that also hold only what the mapping justifies. They give a different, stricter semantics for queries with negation.

References

  1. Ronald Fagin, Phokion G. Kolaitis, Renée J. Miller and Lucian Popa, Data exchange: semantics and query answering, Theoretical Computer Science 336(1), 2005, universal solutions, the chase and certain answers
  2. Marcelo Arenas, Pablo Barceló, Leonid Libkin and Filip Murlak, Foundations of Data Exchange, Cambridge University Press, 2014, Chapter 6, Good solutions
  3. Ronald Fagin, Phokion G. Kolaitis and Lucian Popa, Data exchange: getting to the core, ACM TODS 30(1), 2005, pages 174-210, the core of the universal solutions

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/D6WF2Z/text.yaml