Abstract
Resolution is a proof-search method on proving satisfiability problems. Various refinements have been proposed to improve the efficiency of this method. However, when we try to prove some graph properties, none of the refinements have an efficiency comparable with traditional graph traversal algorithms. In this paper we propose a way of solving some graph traversal problems with resolution. And we design some simplification rules to make the proof-search algorithm work more efficiently on such problems.
K. Ji—This work is supported by the ANR-NSFC project LOCALI(NSFC 61161130530 and ANR 11 IS02 002 01).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
We denote the derivation as \(\pi _1\).
- 2.
We denote the derivation as \(\pi _2\).
References
Burel, G.: Embedding deduction modulo into a prover. In: Dawar, A., Veith, H. (eds.) CSL 2010. LNCS, vol. 6247, pp. 155–169. Springer, Heidelberg (2010). doi:10.1007/978-3-642-15205-4_15
Burel, G.: Experimenting with deduction modulo. In: Bjørner, N., Sofronie-Stokkermans, V. (eds.) CADE 2011. LNCS (LNAI), vol. 6803, pp. 162–176. Springer, Heidelberg (2011). doi:10.1007/978-3-642-22438-6_14
Clarke Jr., E.M., Grumberg, O., Peled, D.A.: Model Checking. MIT Press, Cambridge (1999)
Courcelle, B.: The monadic second-order logic of graphs. I. Recognizable sets of finite graphs. Inf. Comput. 85(1), 12–75 (1990)
Dowek, G.: Polarized resolution modulo. In: Calude, C.S., Sassone, V. (eds.) TCS 2010. IAICT, vol. 323, pp. 182–196. Springer, Heidelberg (2010). doi:10.1007/978-3-642-15240-5_14
Dowek, G., Hardin, T., Kirchner, C.: Theorem proving modulo. J. Autom. Reasoning 31, 33–72 (2003)
Dowek, G., Jiang, Y.: Axiomatizing Truth in a Finite Model (2013). https://hal.inria.fr/hal-00919469/document
Navarro-Pérez, J.A.: Encoding and solving problems in effectively propositional logic. Ph.D. thesis, The University of Manchester (2007)
Reiter, R.: Two results on ordering for resolution with merging and linear format. J. ACM (JACM) 18(4), 630–646 (1971)
Robinson, J.A.: Automatic deduction with hyper-resolution. J. Symbolic Logic 39(1), 189–190 (1974)
Robinson, J.A.: A machine-oriented logic based on the resolution principle. J. ACM (JACM) 12(1), 23–41 (1965)
Slagle, J.R., Norton, L.M.: Experiment with an automatic theorem-prover having partial ordering inference rules. Commun. ACM 16(11), 682–688 (1973)
Acknowledgments
I am grateful to Gilles Dowek, for his careful reading and comments.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
A Appendix
A Appendix
1.1 A.1 Correctness of the Encoding of Closed-Walk Detection Problem
To prove that this kind of encoding suit for all closed walk detection problems, a proof of the theorem below is given.
Theorem 4
Let G be a graph and s be a vertex in G. Starting from s, there exists a closed walk if and only if starting from \(\{\mathsf {OC}(s, G)\}\cup \mathsf {EC}(G)\), a success clause can be derived.
Before proving this theorem, several notations and lemmas are needed, which will also be used in the following sections.
Notations. Let \(C_1, C_2, C_3\) be clauses, \(\varGamma \) be a set of clauses:
-
if \(C_3\) is generated by applying resolution between \(C_1\) and \(C_2\), then write the resolution step as \(C_1\overset{C_2}{\longrightarrow }C_3\); if the resolution is based on a selection function \(\delta \), then the resolution step is written as \(C_1\overset{C_2}{\longrightarrow }_{\delta } C_3\).
-
if \(C_2\) is generated by applying resolution between \(C_1\) and a clause in \(\varGamma \), then write the resolution step as \(C_1\overset{\varGamma }{\longrightarrow }C_2\); if the resolution is based on a selection function \(\delta \), then the resolution step is written as \(C_1\overset{\varGamma }{\longrightarrow }_{\delta } C_2\).
-
if \(C_1\) is generated by one step of resolution on some clauses in \(\varGamma \), then write the resolution step as \(\varGamma \longrightarrow \varGamma ,C_1\); if the resolution is based on a selection function \(\delta \), then the resolution step is written as \(\varGamma \longrightarrow _{\delta } \varGamma , C_1\).
Lemma 1
For any two traversal clauses, we cannot apply resolution rules between them.
Proof
All the literals in traversal clauses are positive. \(\square \)
Lemma 2
If resolution rules can be applied between a traversal clause and a coloring clause, then one and only one traversal clause can be derived.
Proof
As all the literals in the traversal clause are positive and there is only one negative literal in the coloring clause, straightforwardly, only one traversal clause can be derived. \(\square \)
Proposition 1
Let M be a set of coloring clauses, \(C_1,\ldots , C_n\) be traversal clauses and S be a success clause. If \(M, C_1,\ldots , C_n\rightarrow S\), then there exists \(1\le i\le n\), such that \(M, C_i\rightarrow S\), and the length of the later derivation is at most equal to the former one.
Proof
By induction on the size of the derivation \(M, C_1,\ldots , C_n\rightarrow S\).
-
If S is a member of \(C_1, \ldots , C_n\), then there exists the derivation \(M, S \rightarrow S\) without applying any resolution rules.
-
If S is not a member of \(C_1,\ldots , C_n\), then in each step of the derivation, by Lemma 1, the resolution rules can only be applied between a traversal clause and a coloring clause. Assume the derivation is \(M, C_1, \ldots , C_n \longrightarrow M,C_1, \ldots , C_n, C'\rightarrow S\), in which, by Lemma 2, \(C'\) is a traversal clause. Then for the derivation \(M,C_1,\ldots ,C_n,C'\rightarrow S\), by induction hypothesis, \(M,C'\rightarrow S\) or there exists \(1\le i\le n\) such that \(M,C_i\rightarrow S\), with the steps of the derivation at most equal to \(M,C_1,\ldots ,C_n,C'\rightarrow S\). If \(M,C_i\rightarrow S\), then the steps of the derivation are less than \(M, C_1,\ldots , C_n\rightarrow S\), thus this derivation is as needed. If \(M, C'\rightarrow S\), then by Lemma 1, there exists \(C_j\) in \(C_1,\ldots , C_n\), such that \(C_j\overset{M}{\longrightarrow }C'\), thus the derivation \(M, C_j\rightarrow S\), with the derivation steps at most equal to \(M, C_1,\ldots , C_n\rightarrow S\), is as needed.
\(\square \)
Proposition 2
Let M be a set of coloring clauses, C be a traversal clause, and S be a success clause. If \(M,C\rightarrow S (\pi _1)\) Footnote 1, then there exists a derivation path \(C(C_0)\overset{M}{\longrightarrow }C_1\overset{M}{\longrightarrow }C_2\cdots \overset{M}{\longrightarrow }C_n(S)\).
Proof
By induction on the size of the derivation \(\pi _1\).
-
If C is a success clause, then the derivation path can be built directly.
-
Otherwise, by Lemma 1, in each step of the derivation, the resolution rules can only be applied between a traversal clause and a coloring clause. Assume the derivation is \(M,C\longrightarrow M,C,C'\rightarrow S\), then for the derivation \(M,C,C'\rightarrow S\), by Proposition 1, there exists a derivation \(M,C\rightarrow S (\pi _2)\) Footnote 2 or \(M,C'\rightarrow S\), with the length less than \(\pi _1\). For \(\pi _2\), by induction hypothesis, there exists a derivation path \(C(C_0)\overset{M}{\longrightarrow }C_1 \cdots \overset{M}{\longrightarrow }C_n(S)\), and this is just the derivation as needed. For \(M,C'\rightarrow S\), by induction hypothesis, there exists a derivation path \(C'\overset{M}{\longrightarrow }C'_1 \cdots \overset{M}{\longrightarrow }C'_m(S)\). As \(C\overset{M}{\longrightarrow }C'\), the derivation path \(C\overset{M}{\longrightarrow }C' \overset{M}{\longrightarrow }C'_1 \cdots \overset{M}{\longrightarrow }C'_m(S)\) is as needed. \(\square \)
Now it is ready to prove Theorem 4. The proof is as follows.
Proof of Theorem 4
-
For the right direction, we assume that the path is
By the method of generating E-coloring clauses of a graph, there exist E-coloring clauses:
$${\small {\underline{W^\bot _{k_1}}}\vee B_{k_2},~~{\underline{W^\bot _{k_2}}}\vee B_{k_3},~\ldots ,~ {\underline{W^\bot _{k_{i-1}}}}\vee B_{k_i},~~{\underline{W^\bot _{k_i}}}\vee B_{k_{i+1}},~\ldots ,~ {\underline{W^\bot _{k_j}}}\vee B_{k_i}.}$$Then starting from the original clause \(C_1=B_1\vee W_1\vee \cdots \vee W_n\), the derivation
$$C_1\overset{D_1}{\longrightarrow }C_2\overset{D_2}{\longrightarrow }\cdots C_{i-1}\overset{D_{i-1}}{\longrightarrow }C_i\overset{D_i}{\longrightarrow }\cdots C_{j}\overset{D_j}{\longrightarrow }C_{j+1}$$can be built, in which \(C_{j+1}\) is a success clause and for each \(1\le m\le j\), \(D_m\) is the E-coloring clause \({\underline{W^\bot _{k_m}}}\vee B_{k_{m+1}}\).
-
For the left direction, by Proposition 2, starting from the original clause \(C_1=B_1\vee W_{1}\vee \cdots \vee W_{n}\), there exists a derivation path
$$C_1\overset{D_1}{\longrightarrow }C_2\overset{D_2}{\longrightarrow }\cdots C_{i-1}\overset{D_{i-1}}{\longrightarrow }C_i\overset{D_i}{\longrightarrow }\cdots C_{j}\overset{D_j}{\longrightarrow }C_{j+1},$$in which \(C_{j+1}\) is a success clause and for each \(1\le m\le j\), \(D_m\) is an E-coloring clause. As \(C_{j+1}\) is a success clause, for each black literal \(B_i\) in the clause \(C_{j+1}\), there exists an E-coloring clause \({\underline{W^\bot _i}}\vee B_{k_i}\) in \(D_1,\ldots ,D_j\). Thus for each black literal \(B_i\) in the clause \(C_{j+1}\), there exists a vertex \(s_{k_i}\) such that there is an edge from \(s_i\) to \(s_{k_i}\). As the number of black literals in \(C_{j+1}\) is finite, for each vertex \(s_i\), if \(B_i\) is a member of \(C_{j+1}\), then starting from \(s_i\), there exists a path which contains a cycle. As the literal \(B_1\) is in \(C_{j+1}\), starting from \(s_1\), there exists a path to a cycle. \(\square \)
1.2 A.2 Correctness of the Encoding of Block-Walk Detection Problem
Theorem 5
Let G be a graph and \(s_1\) be a vertex of G. Starting from \(s_1\), there is no blocked walk if and only if, starting from \(\{\mathsf {OC}(s_1, G)\} \cup \mathsf {AC}(G)\), a success clause can be derived.
Before proving this theorem, a lemma is needed.
Lemma 3
Let G be a graph and \(s_1\) be a vertex of G. Starting from \(s_1\), if all the reachable vertices are traversed in the order \(s_1, s_2, \ldots , s_k\) and each reachable vertex has at least one successor, then starting from \(\{\mathsf {OC}(s_1, G)\}\cup \mathsf {AC}(G)\), there exists a derivation path \(C_1(\mathsf {OC}(s_1,G))\overset{D_1}{\longrightarrow }C_2\overset{D_2}{\longrightarrow }\cdots C_k\overset{D_k}{\longrightarrow }C_{k+1}\), in which \(C_{k+1}\) is a success clause and \(\forall 1\le i\le k\), \(D_i\) is an A-coloring clause of the form \({\underline{W^\bot _i}}\vee B_{i_1}\vee \cdots \vee B_{i_j}\).
Proof
As \(s_1, s_2\ldots ,s_k\) are all the reachable vertices starting from \(s_1\), for a vertex s, if there exists an edge from one of the vertices in \(s_1, s_2,\ldots ,s_k\) to s, then s is a member of \(s_1, s_2,\ldots ,s_k\). Thus, after the derivation \(C_1\overset{D_1}{\longrightarrow }C_2\overset{D_2}{\longrightarrow }\cdots C_j\overset{D_j}{\longrightarrow }C_{j+1}\), for each black literal \(B_i\), the white literal \(W_i\) is not in \(C_{j+1}\), thus \(C_{j+1}\) is a success clause. \(\square \)
Now it is ready to prove Theorem 5. The proof is as follows.
Proof of Theorem 5
-
For the right direction, assume that all the reachable vertices starting from \(s_1\) are traversed in the order \(s_1, s_2, \ldots , s_k\). For the resolution part, by Lemma 3, starting from the original clause, a success clause can be derived.
-
For the left direction, by Proposition 2, starting from the original clause \(C_1=\mathsf {OC}(s_1,G)\), there exists a derivation path
$$C_1\overset{D_1}{\longrightarrow }C_2\overset{D_2}{\longrightarrow }\cdots C_j\overset{D_j}{\longrightarrow }C_{j+1},$$in which \(C_{j+1}\) is a success clause and \(\forall 1\le i\le j\), \(D_i\) is an A-coloring clause with \(W^\bot _{k_i}\) underlined. As there is no i such that both \(B_i\) and \(W_i\) are in \(C_{j+1}\), for the vertices in \(s_{k_1}, s_{k_2}, \ldots , s_{k_j}\), the successors of each vertex is a subset of \(s_{k_1}, s_{k_2}, \ldots , s_{k_j}\). As the black literal \(B_1\) is in the clause \(C_{j+1}\), by the definition of success clause, the white literal \(W_1\) is not in \(C_{j+1}\), thus \(s_1\) is a member of \(s_{k_1}, s_{k_2}, \ldots , s_{k_j}\). Then recursively, for each vertex s, if s is reachable from \(s_1\), then s is in \(s_{k_1}, s_{k_2}, \ldots , s_{k_j}\). Thus starting from \(s_1\), all the vertices reachable have successors. \(\square \)
1.3 A.3 Completeness of PRM\(_{\delta }\)+PSR
For the completeness of our method, we first prove that textupPRM\(_{\delta }\) is complete, then we prove that PRM\(_{\delta }\) remains complete when we apply PSR eagerly.
Proposition 3
(Completeness of PRM\(_{\delta }\) ) . Let M be a set of coloring clauses and \(C_1,\ldots ,C_n\) be traversal clauses. If \(M, C_1,\ldots ,C_n\rightarrow S\), in which the clause S is a success clause, then starting from \(M,C_1,\ldots , C_n\), we can build a derivation by selecting the resolved literals with selection function \(\delta \) in Definition 4 and get a success clause.
Proof
By Propositions 1 and 2, there exists \(1\le i \le n\), such that \(C_i(C_{i_0})\overset{D_1}{\longrightarrow }C_{i_1}\cdots \overset{D_n}{\longrightarrow }C_{i_n}(S)\). As there are no white literals in any clauses of \(D_1,\ldots ,D_n\) and in each step of the resolution, the resolved literal in the traversal clause is a white literal, the order of white literals to be resolved in the derivation by applying Resolution rule with coloring clauses in \(D_1,\ldots ,D_n\) will not affect the result. Thus use selection function \(\delta \) to select white literals to be resolved, until we get a traversal clause \(S'\) such that there are no grey literals in it. By the definition of success clause, \(S'\) is a success clause. \(\square \)
Lemma 4
Let M be a set of coloring clauses and C be a traversal clause. Assume \(C(H_0)\overset{D_1}{\longrightarrow }_{\delta } H_1 \overset{D_2}{\longrightarrow }_{\delta }\cdots H(H_i)\overset{D_i}{\longrightarrow }_{\delta }\cdots \overset{D_n}{\longrightarrow }_{\delta } H_n\) in which \(H_n\) is a success clause and for each \(1\le j\le n\), the coloring clause \(D_j\) is in M, and \(M,C\rightarrow ^{\delta } K\) such that \(\mathsf {grey}(H) = \mathsf {grey}(K)\). If \(K, D_1,\ldots ,D_n\rightarrow ^{\delta } K'\), and \(K'\) is not a success clause, then there exists a coloring clause \(D_k\) in \(D_1,\ldots ,D_n\), such that \(K'\overset{D_k}{\longrightarrow }_{\delta } K''\).
Proof
As \(K'\) is not a success clause, assume that the literals \(B_i\) and \(W_i\) are in \(K'\). As \(W_i\) cannot be introduced in each step of resolution between a traversal clause and a coloring clause, \(W_i\) is in C and K. As the literal \(B_i\) is in clause \(K'\), during the derivation of \(K'\), there must be some clauses which contains \(B_i\):
-
if the literal \(B_i\) is in K, as \(W_i\) is also in K, \(W_i\) is a grey literal of K. As \(\mathsf {grey}(H)=\mathsf {grey}(K)\), the literal \(B_i\) is also in H, and as \(B_i\) cannot be selected during the derivation, it remains in the traversal clauses \(H_{i+1},\ldots , H_n\).
-
if the literal \(B_i\) is introduced by applying Resolution rule with coloring clause \(D_j\) in \(D_1,\ldots ,D_n\), which is used in the derivation of \(H_n\) as well, so the literal \(B_i\) is also a member of \(H_n\).
In both cases, the literal \(B_i\) is in \(H_n\). As \(H_n\) is a success clause, the literal \(W_i\) is not a member of \(H_n\). As \(W_i\) is in C, there exists a coloring clause \(D_k\) in \(D_1,\ldots ,D_n\) with the literal \(W^\bot _i\) selected. Thus, \(K'\overset{D_k}{\longrightarrow }_{\delta } K''\). \(\square \)
Lemma 5
Let M be a set of A(E)-coloring clauses and C be a traversal clause. If we have \(M,C\rightarrow ^{\delta } H\) and \(M,C\rightarrow ^{\delta } K\), such that \(\mathsf {grey}(H)=\mathsf {grey}(K)\), then starting from M, H a success clause can be derived if and only if starting from M, K a success clause can be derived.
Proof
Without loss of generality, prove that if starting from M, H we can get to a success clause, then starting from M, K, we can also get to a success clause. By Proposition 2, starting from C, there exists \(H_0(C) \overset{M}{\longrightarrow }_{\delta } H_1 \overset{M}{\longrightarrow }_{\delta } \cdots H_i(H) \overset{M}{\longrightarrow }_{\delta } \cdots \overset{M}{\longrightarrow }_{\delta } H_n\), in which \(H_n\) is a success clause. More precisely, \(H_0(C) \overset{D_1}{\longrightarrow }_{\delta } H_1 \overset{D_2}{\longrightarrow }_{\delta }\cdots H_i(H) \overset{D_{i+1}}{\longrightarrow }_{\delta } \cdots \overset{D_n}{\longrightarrow }_{\delta } H_n\), where for each \(1 \le j \le n\), the coloring clause \(D_j\) is in M. Then by Lemma 4, starting from M, K, we can always find a coloring clause in \(D_1,\ldots ,D_n\) to apply resolution with the new generated traversal clause, until we get a success clause. As the white literals in the generated traversal clauses decrease by each step of resolution, we will get a success clause at last. \(\square \)
Theorem 6
(Completeness). \(PRM_{\delta }\) with PSR is complete.
Proof
By Lemma 5, each time after we apply PSR, the satisfiability is preserved.
\(\square \)
Rights and permissions
Copyright information
© 2016 Springer International Publishing AG
About this paper
Cite this paper
Ji, K. (2016). Resolution in Solving Graph Problems. In: Blazy, S., Chechik, M. (eds) Verified Software. Theories, Tools, and Experiments. VSTTE 2016. Lecture Notes in Computer Science(), vol 9971. Springer, Cham. https://doi.org/10.1007/978-3-319-48869-1_13
Download citation
DOI: https://doi.org/10.1007/978-3-319-48869-1_13
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-48868-4
Online ISBN: 978-3-319-48869-1
eBook Packages: Computer ScienceComputer Science (R0)