Chapter 6

Horn Formulas and the Production Retrieval Problem

[14/100%]
Show
LaTeX
Problem 107

Prove that every set of Horn formulas has a model, that is, an interpretation in which all of them are true.

?
Problem 108

Prove that if a CNF, in each elementary conjunction, contains exactly one variable without negation, then it is equivalent to a conjunction of Horn formulas.

?
Problem 109

Let Ji,i=1,…,nJ_{i}, i=1, \ldots , n be interpretations. Call their intersection the interpretation K=J1…JnK=J_{1} \ldots J_{n} such that for any variable xx, K(x)=1K(x)=1 if and only if Ji(x)=1J_{i}(x)=1 for all i=1,…,ni=1, \ldots , n. Prove that if a Horn formula has models Ji,i=1,…,nJ_{i}, i=1, \ldots , n, then their intersection K=J1…JnK=J_{1} \ldots J_{n} is also a model of it.

?
Problem 110

Prove that a formula Φ\Phi is equivalent to a conjunction of Horn formulas if and only if its abridged CNF contains, in each elementary disjunction, exactly one variable without negation.

?
Problem 111

Prove that the sequence of processes τi\tau_{i} in the proof of theorem 37 on p. 121 is correctly defined, that is, all the input products of each process in this sequence are available before it is started.

Recall the construction from that proof. Suppose F⇒(φX→y)F \Rightarrow \left(\varphi_{X} \rightarrow y\right). The sequence τ\tau, together with sets of products XiX_{i} obtainable from XX using τi\tau_{i}, is built step by step:

  • Step 00: τ0=∅\tau_{0}=\varnothing, X0=XX_{0}=X.

  • Step 11: τ1={t∈F:Lt⊆X0}\tau_{1}=\left\{ t \in F : L_{t} \subseteq X_{0}\right\}, X1=X0∪{bt:t∈τ1}X_{1}=X_{0} \cup \left\{ b_{t} : t \in \tau_{1}\right\}.

  • Step i+1i+1: given τi\tau_{i} and XiX_{i}, let τi+1′={t∈(F\τi):Lt⊆Xi}\tau_{i+1}^{\prime }=\left\{ t \in \left(F \backslash \tau_{i}\right) : L_{t} \subseteq X_{i}\right\}, Xi+1=Xi∪{bt:t∈τi+1′}X_{i+1}=X_{i} \cup \left\{ b_{t} : t \in \tau_{i+1}^{\prime }\right\}, and τi+1=(τi,τi+1′)\tau_{i+1}=\left(\tau_{i}, \tau_{i+1}^{\prime }\right) (processes within τi+1′\tau_{i+1}^{\prime } taken in an arbitrary order). The procedure stops, setting τ=τi+1\tau =\tau_{i+1}, once y∈Xi+1y \in X_{i+1} or Xi=Xi+1X_{i}=X_{i+1}.

?
Problem 112

Prove theorem 38 on p. 124.

Theorem 38: The algorithm Closure(X,F)(X, F) returns the set cl⁡(X,F)\operatorname {cl}(X, F), and the algorithm ForwardWave(X,y,F)(X, y, F) returns "yes" if and only if F⇒(φX→y)F \Rightarrow \left(\varphi_{X} \rightarrow y\right).

Hint. Let NkN_{k} be the value of NN after kk iterations of the main loop of the algorithm Closure in lines 7−147-14. Show that for every product z∈cl⁡(X,F)z \in \operatorname {cl}(X, F) that can be obtained from XX by a chain of processes of length kk or less, zz belongs to NkN_{k}.

?
Problem 113

The algorithm ForwardWave (X,y,F)(X, y, F) allows answering the question of whether it is possible to produce yy from the input products XX using the processes FF, but it does not build a chain of processes leading to yy. Modify the algorithm Closure (X,F)(X, F) so that from its result, for any product a∈cl⁡(X,F)a \in \operatorname {cl}(X, F), a chain of processes leading to aa can be constructed.

?
Problem 114

Call a process tt a compound technological process if, from a set of input products LtL_{t}, it simultaneously produces some set of products BtB_{t} (rather than a single product btb_{t}). Prove that a compound technological process corresponds to a conjunction of Horn formulas.

?
Problem 115

Generalize the algorithm Closure (X,F)(X, F) so that it constructs the closure of XX with respect to a system of compound technological processes FF.

?
Problem 116

Determine which chain of processes in example 25 on the preceding page leads to obtaining aa.

Example 25: A={a,b,c,d,e,f,g,h}A=\left\{ a, b, c, d, e, f, g, h\right\}, X={b,f}X=\left\{ b, f\right\}, and the set of processes FF consists of the following six processes:

a,b,c,h→d(1);g,b→e(3);f,e→d(5);b,c,d→a(2);e,f→c(4);b,f→g(6). \begin{array}{rrrrrr} a, b, c, h \rightarrow d & (1) ; & g, b \rightarrow e & (3) ; & f, e \rightarrow d & (5) ; \\ b, c, d \rightarrow a & (2) ; & e, f \rightarrow c & (4) ; & b, f \rightarrow g & (6). \end{array}
?
Problem 117

Using the algorithm Closure, compute the closure for the set of input products X={c,d}X=\left\{ c, d\right\} and the system of technological processes FF:

a,b,d→h;e,f→c;h,d,c→g;a,c,d,g→f;b,k→a;d,g,a→e;d,g→b;d,c→k;c,d,k→h. \begin{array}{rll} a, b, d \rightarrow h ; & e, f \rightarrow c ; & h, d, c \rightarrow g ; \\ a, c, d, g \rightarrow f ; & b, k \rightarrow a ; & d, g, a \rightarrow e ; \\ d, g \rightarrow b ; & d, c \rightarrow k ; & c, d, k \rightarrow h. \end{array}

Determine which chain of processes leads to obtaining ee.

?
Problem 118

Prove theorem 39 on p. 127.

Theorem 39: The algorithm OptClosure(X,F)(X, F) constructs the closure cl⁡(X,F)\operatorname {cl}(X, F).

Hint. Let NkN_{k} be the value of N,AkN, A_{k} the value of AA, and CkC_{k} the value of CC after kk iterations of the main loop of the algorithm OptClosure in lines 17−2917-29. Show that

?
(a)

Ck[t]=∣Lt\(Nk\Ak)∣;C_{k}[t]=\left|L_{t} \backslash \left(N_{k} \backslash A_{k}\right)\right| ;

(b)

for every product z∈cl⁡(X,F)z \in \operatorname {cl}(X, F) that can be obtained from XX by a chain of processes of length at most kk, z∈Nkz \in N_{k} holds;

(c)

the exit condition A=∅A=\varnothing of the main loop holds after the (k+1)(k+1)-th iteration if and only if Nk=Nk+1N_{k}=N_{k+1}.

Problem 119

Modify the algorithm OptClosure so that from its result, for any product a∈cl⁡(X,F)a \in \operatorname {cl}(X, F), a chain of processes leading to aa can be constructed.

?
Problem 120

Using the algorithm OptClosure, compute the closure for the set of input attributes X={a,f}X=\left\{ a, f\right\} and the following system of dependencies FF:

a,b,c→h(1);e,f→c(3);g,d→e(5);a,c,d,g→h(2);f,a→d(4);d,f,a→g(6). \begin{array}{rrrrr} a, b, c \rightarrow h & (1) ; & e, f \rightarrow c & (3) ; & g, d \rightarrow e & (5) ; \\ a, c, d, g \rightarrow h & (2) ; & f, a \rightarrow d & (4) ; & d, f, a \rightarrow g & (6). \end{array}

Determine which chain of processes leads to obtaining hh.

?