All articles published by MDPI are made immediately available worldwide under an open access license. No special
permission is required to reuse all or part of the article published by MDPI, including figures and tables. For
articles published under an open access Creative Common CC BY license, any part of the article may be reused without
permission provided that the original article is clearly cited. For more information, please refer to
https://www.mdpi.com/openaccess.
Feature papers represent the most advanced research with significant potential for high impact in the field. A Feature
Paper should be a substantial original Article that involves several techniques or approaches, provides an outlook for
future research directions and describes possible research applications.
Feature papers are submitted upon individual invitation or recommendation by the scientific editors and must receive
positive feedback from the reviewers.
Editor’s Choice articles are based on recommendations by the scientific editors of MDPI journals from around the world.
Editors select a small number of articles recently published in the journal that they believe will be particularly
interesting to readers, or important in the respective research area. The aim is to provide a snapshot of some of the
most exciting work published in the various research areas of the journal.
In a previous paper we defined the black and white SAT problem which has exactly two solutions, where each variable is either true or false. We showed that black and white 2-SAT problems represent strongly connected directed graphs. We presented also the strong model of communication graphs. In this work we introduce two new models, the weak model, and the Balatonboglár model of communication graphs. A communication graph is a directed graph, where no self loops are allowed. In this work we show that the weak model of a strongly connected communication graph is a black and white SAT problem. We prove a powerful theorem, the so called transitions theorem. This theorem states that for any model which is between the strong and the weak model, we have that this model represents strongly connected communication graphs as black and white SAT problems. We show that the Balatonboglár model is between the strong and the weak model, and it generates 3-SAT problems, so the Balatonboglár model represents strongly connected communication graphs as black and white 3-SAT problems. Our motivation to study these models is the following: The strong model generates a 2-SAT problem from the input directed graph, so it does not give us a deep insight how to convert a general SAT problem into a directed graph. The weak model generates huge models, because it represents all cycles, even non-simple cycles, of the input directed graph. We need something between them to gain more experience. From the Balatonboglár model we learned that it is enough to have a subset of a clause, which represents a cycle in the weak model, to make the Balatonboglár model more compact. We still do not know how to represent a SAT problem as a directed graph, but this work gives a strong link between two prominent fields of formal methods: the SAT problem and directed graphs.
In logic the most natural representation of an edge of a directed graph, say , is to use implication—i.e., ; i.e., the edge can be represented by the binary clause: . We used that representation in a previous paper [1] and we were able to prove that the SAT representation of a strongly connected directed graph is a black and white 2-SAT problem. It is not a surprise that the SAT representation is a 2-SAT problem, since each edge can be represented by a binary clause.
The other property, black and white, means that the resulting SAT problem is "nearly" unsatisfiable; that means it has only two solutions, the white assignment and the black one. The white assignment assigns true to each variable; the black one assigns false to each variable.
This representation helps to translate a graph into a 2-SAT problem. We can also translate a black and white 2-SAT problem into a directed graph. We can also translate any other 2-SAT problem into a directed graph, if it does not subsume either the black or the white clause—i.e., it does not contain a clause which contains only positive or negative literals, for instance, or
There are some natural questions. Why should we translate a 2-SAT problem into a direct graph? What can one do with clauses which contain only positive or negative literals?
Actually, there is no point to translating a 2-SAT problem into a directed graph, because the 2-SAT problem is solvable in linear time [2]. Preferably, we should translate 3-SAT problems into directed graphs, because then we could use graphical tools to study them, or we can translate them into 2-SAT problems. To be able to do so, the first step is to create a 3-SAT representation for directed graphs. The second step should answer the second question—what can one do with clauses which contain only positive or negative literals?
This paper aims to help to answer the first question. We present several models which can translate a directed graph into a SAT problem such that the SAT problem is black and white if and only if the directed graph is strongly connected.
The second question is answered partially in another study from our research group (http://fmv.ektf.hu/team.html); see [3].
2. Introduction
In recent years one of the most promising directions in mathematics has been the idea that one can unify various mathematical theories. One excellent example of this is the Langlands [4] program, which relates algebraic number theory to automorphic forms and representation theory. Another very interesting example is the modularity theorem [5]. This theory states that elliptic curves over the field of rational numbers are related to modular forms. Without this modularity theorem, Andrew Wiles could not have proven Fermat’s last theorem [6]. In this paper, we show some connection points between directed graphs and propositional logic formulas. We prove a theorem which allows one to use an algorithm from the field of propositional logic to check a graph property. Namely, we transform a directed graph into a SAT problem to check whether the graph is strongly connected or not.
The most well-known graphical representations are: the implication graph [2], the and-inverter graph [7], the reduced ordered binary decision diagram [8] and the zero-suppressed binary decision diagram [9]. Graphical representations of logical games stand as a well-known connection between graphs and logical formulas; see, for example, [10,11]. A more detailed list can be found in [12].
As we can see, great effort has been made in the direction of formulas to graphs. In this paper, we study the other way, the direction of graphs to formulas.
In a previous paper [1] we showed how to convert a directed graph into a 2-SAT problem. In this paper, we aim to translate directed graphs into 3-SAT problems.
3. Definitions
Negation of a set H is denoted by , which means that all elements in H are negated. Note that .
A literal is normally a Boolean variable—a positive literal; the negation of a Boolean variable is called a negative literal. Examples for literals are: .
A clause is a set of literals. A clause set is a set of clauses. A SAT problem is a clause set. An assignment is a set of literals.
Clauses are interpreted as disjunctions of their literals. Assignments are interpreted as conjunctions of their literals. Clause sets are interpreted as conjunctions of their clauses.
If a clause or an assignment contains exactly k literals, then we say it is a k-clause or a k-assignment, respectively. A k-SAT problem is a clause set where its clauses have at most k literals. A clause from a clause set is a full-length clause if and only if (iff) it contains all variables from the clause set.
If a is a literal in clause set S, and is not a literal in S, then we say that a is a pure literal in S.
Let V be the set of variables of a clause set. We say that is the white clause or the white assignment iff . We say that is the black clause or the black assignment iff . For example, if , then , and .
We say that clause C subsumes clause D iff C is a subset of D.
We say that clause set S subsumes clause C iff there is a clause in S which subsumes C. Formally: .
We say that assignment M is a solution for clause set S iff for all we have .
We say that the clause set S is a black and white SAT problem iff it has only two solutions, the white assignment () and the black one ().
We say that clause sets A and B are equivalent iff they have the same set of solutions. We say that clause set A entails clause set B iff the set of solutions of A is a subset of the set of solutions of B; i.e., A may have no other solutions than B. This notion is denoted by . Note that if A subsumes all clauses of B, then .
We say that A is stronger than B iff and A and B are not equivalent. This notion is denoted by .
The construction is a directed graph, where is the set of vertices, and is the set of edges. An edge is an ordered pair of vertices. The edge is depicted by , and we can say that a has a child b. If is an element of , then we may say that is an edge of .
We say that is a communication graph iff for all a in have that is not in , and if x is an element of then must not be an element of . We need this constraint because we generate a logical formula out of . If we speak about a communication graph then we may use the word node as a synonym of vertex.
A path from to in directed graph is a sequence of vertices such that for each we have that is an edge of . A path from to in directed graph is a cycle iff is an edge of . The cycle is represented by the following tuple: . This tuple can be used as a set of its elements. Note that in the representation of a cycle the first and the last element must not be the same vertex. Figure 1 shows an example for a path and a cycle.
If we have a cycle then b is an exit point of it iff for some we have that is an edge and .
A directed graph is complete iff every pair of distinct vertices is connected by a pair of unique edges (one in each direction). A directed graph is strongly connected iff there is a path from each vertex to each other vertex. Note that a complete graph is also strongly connected. Note that a strongly connected graph contains a cycle which contains all vertices.
4. The Strong Model of Communication Graphs
In our previous model [1], which we call in this paper the strong model of communication graphs, edges are represented by logical implication: Let us assume that the graph is ; i.e., is a graph with three vertices, a, b and c, and with two edges, from a to b and from a to c. Thus, the strong model of is .
The interpretation of this formula is the following in the field of wireless sensors networks: If node a is able to send a message to nodes b and c, then node a sends the message to both nodes b and c. However, this might result in an error, because both nodes have to send an acknowledgment that the message has arrived, but using the same frequency at the same time results in interference. A more natural way of communication is that we use some protocol, which decides where to send the message, either to node b or to node c; see the next section.
The strong model was defined formally in our previous work [1]. We recall its definition.
Let be a communication graph; then the strong model of is denoted by , and defined as follows:
Note that is a 2-SAT problem and has a nice property: each clause in it has exactly one positive and one negative literal; therefore, is satisfiable for any communication graph .
Furthermore, is a black and white SAT problem iff is strongly connected; see Theorem 1 in [1]. Since we use this theorem several times herein, we recall it:
Theorem1
(Theorem 1 from [1]). Let be a communication graph. Let be the strong model of . Then is a black and white 2-SAT problem if and only if is strongly connected.
As an example we show the strong model of the communication graph of Figure 2:
Note that since the communication graph from Figure 2 is not strongly connected, its strong model (1) is not a black and white SAT problem. For example, is a solution of it.
As a second example we show the strong model of the communication graph from Figure 3. This graph is almost the same as the previous one (Figure 2), but here we have an edge from d to a, which makes this graph strongly connected. Its strong model is:
Note that since the communication graph from Figure 3 is strongly connected, its strong model is a black and white SAT problem; i.e., the SAT problem in (2) has only these two solutions: and .
It is not easy to check that this SAT problem is indeed a black and white SAT problem. Therefore, first we show the set of all full-length clauses on the variables with an index number (index number: full-length clause):
As a second step, we give which clause from (2) subsumes which full-length clauses (clause: indices of subsumed full-length clauses):
From this one can check that (2) subsumes all full-length clauses, except the black and the white clause; hence, it has only two solutions, the white and the black assignment.
5. The Weak Model of Communication Graphs
We define the weak model of communication graphs. Let us assume that , as in the previous section. The weak model of contains the clause , which means that if a node can send a message to more than one nodes, then it can send the message only to one of them. Note that is equivalent to .
The only problem with this representation is that the message can be trapped if a graph contains a cycle. Let us assume that we have a cycle with two nodes, and . Then may send the message to , and to , and so on, which means that other nodes could never get the message. This is not good, since our goal is to send a message to each node, if it is possible.
Let us add a new edge to the graph . The new edge should go from b to a. Now we have a cycle with the nodes a and b. Now we have to add a clause to our model which ensures that if b sends a message to a, and a can send a message to b or c, then a should not send back the message to b, but it has to send it to c: . Note that this is equivalent to the clause: .
In a more general way, node a which has outgoing edges to nodes is represented by the clause: ; and the cycle with exit points is represented by the clause: . We call this model as the weak model of communication graphs.
We also define it formally: Let be a communication graph. Let be the set of vertices of and the set of edges of . Since is a communication graph, we know that elements of can be used as positive literals. Then we define the following notion:
and for any two elements of they cannot be equal as a set.
is the weak model of .
Note that is a subset of , because we take each node itself as a cycle; see the constraint in the definition of . Thus, alternatively we can define as follows: We do not use this observation in this work, although some proofs would be shorter.
Please note that each clause in contains at least one positive and one negative literal, because a node is only represented if it has an outgoing edge, and a cycle is only represented if it has an exit point; therefore, is satisfiable for any communication graph .
Figure 4 shows two simple communication graphs. Their values are: , and , respectively.
Figure 2 shows a communication graph with three cycles:
Thus, its weak model is (after each clause we list the indices of subsumed full-length clauses from (3)):
Note that since d has no child node, it does not occur as a negative literal in the model.
Note that since the communication graph from Figure 2 is not strongly connected, its weak model (5) is not a black and white SAT problem. For example, is a solution of the SAT problem in (5).
As a second example we show the weak model of the communication graph from Figure 3. In this graph we have six cycles:
The last cycle contains all vertices, so it has no exit point; therefore, no clause is generated for it. Note that in this graph we have an edge from d to a. The corresponding clauses are the last three clauses in this example; the last two clauses correspond to the new cycles. The remaining clause is the same as in the previous model. Thus, the weak model is (after each clause we list the indices of subsumed full-length clauses from (3)):
Note that since the communication graph from Figure 3 is strongly connected, its weak model is a black and white SAT problem; i.e., the SAT problem in (6) has only these two solutions: and .
Each cycle was a simple cycle in the above two examples. A cycle is simple iff only the first and last vertices are repeated. Thus, we might think that it is enough to consider simple cycles. The next example shows a case when we need to consider a non-simple cycle as well.
In Figure 5 we can see a strongly connected communication graph which contains three simple cycles, and , and one non-simple cycle, . As a third example we give the weak model of this communication graph (after each clause we list the indices of subsumed full-length clauses from (3)):
Note that the last clause is generated from the non-simple cycle, and that full-length clause is not subsumed by any other clause.
6. The Balatonboglár Model of Communication Graphs
Since the weak model does not result in a 3-SAT problem, we introduce also the Balatonboglár model, which is a simplified version of the weak model, which uses the trick that instead of detecting each cycle in the graph, it generates from each path the following 3-clause: even if there is no cycle which contains the vertices a and b. This simplification allows very fast 3-SAT model generation from a directed graph, and the model will be black and white 3-SAT if and only if the input directed graph is strongly connected.
We define the Balatonboglár model of communication graphs as follows. Let be a communication graph. Let be the set of vertices of and the set of edges of . Since is a communication graph, we know that elements of can be used as positive literals. Then we define the following notion:
is a Balatonboglár model of .
Note that is not a deterministic function, it is just any 3 length subset of .
The name comes from the children’s game tag: There is one child who has to catch someone else by touching he or she. This action is called tagging. There is a rule: the tagged one cannot tag back; he or she must tag someone else, so must tag forward.
As a first example, we give the Balatonboglár model of the graph from Figure 2 (after each clause we list the indices of subsumed full-length clauses from (3)):
Note that b has three child nodes, so instead of , we could use either or . Note also that Figure 2 is not strongly connected, so its Balatonboglár model is not a black and white SAT problem. For example, is a solution of the SAT problem in (8).
As a second example, we show the Balatonboglár model of the communication graph from Figure 3. Note that in this graph we have an edge from d to a. The corresponding clauses are the last three clauses in this Balatonboglár model: (after each clause we list the indices of subsumed full-length clauses from (3)):
Note that since the communication graph from Figure 3 is strongly connected, its Balatonboglár model is a black and white SAT problem; i.e., the SAT problem in (9) has only these two solutions: , and .
As a third example, we show the Balatonboglár model of the communication graph from Figure 5 (after each clause we list the indices of subsumed full-length clauses from (3)):
Since there is no node which has more than two child nodes, there is no other possible Balatonboglár model for this graph.
Note that since the communication graph from Figure 5 is strongly connected, its Balatonboglár model (10) is a black and white SAT problem.
Our long term goal is to find out how to represent a 3-SAT problem as a directed graph. This model does not tell us how to do that; it gives only a link from the field of directed graphs to the field of 3-SAT problems, which might help us to find out in the future how to represent a 3-SAT problem as a directed graph. Thus, this remains an open question, which seems to be a very difficult one, because if we are able to translate a 3-SAT problem into a directed graph, then we could translate it to a 2-SAT problem using the result of our previous work, which means that we would have a 3-SAT to 2-SAT converter.
7. Theoretical Results
This section is the main contribution of this work. We prove that the new models, the weak one and the Balatonboglár one, have the same property as the strong one; i.e., the model of a communication graph is a black and white SAT problem iff the graph is strongly connected. To be able to prove this, we need some auxiliary lemmas. The first one states that the weak model has at least two solutions, the white one and the black one.
Lemma1.
Let be a communication graph. Let be the weak model of . Then has at least two solutions, namely, the white assignment () and the black assignment ().
Proof.
Let be a communication graph. Let be the weak model of . Since there is a positive and also a negative literal in each clause of , the white assignment () and also the black assignment () are solutions for . □
The second lemma states that if the weak model has only two solutions, then each cycle in the communication graph has at least one exit point, except the cycle which contains all vertices of the graph.
Lemma2.
Let be a communication graph. Let be the weak model of . Assume that has only two solutions. Then for each cycle we have that is not empty or C contains all vertices of .
Proof.
Let be a communication graph. Let be the weak model of . Assume that has only two solutions. Lemma 1 makes sure that the solutions are and . Assume that our goal is not true; i.e., there is a cycle , which has no exit point and does not contain all vertices of . We show that this assumption leads to a contradiction. Let us construct the following assignment: , where , where is the set vertices of . Since C has no exit point, there is no corresponding clause generated by . Since there is no clause which would falsify the constructed assignment, this is a solution of . However, this contradicts the assumption that has only two solutions—namely, and . Thus, our original statement is true. □
The next lemma states that a black and white SAT problem may not contain pure literals.
Lemma3.
If is a black and white SAT problem, then it contains no pure literal.
Proof.
Assume is a black and white SAT problem. Then, by definition of a black and white SAT problem, we know that has only two solutions, and . Since there is no other solution of and , we obtain that may not contain a pure literal. □
The next lemma states that if we have a complete graph, then its weak model is a black and white SAT problem. This result is somehow natural, since the weak model of a complete graph is the biggest possible that we can generate and the weak model always has at least two solutions.
Lemma4.
If is a complete communication graph, and is the weak model of , then is a black and white SAT problem.
Proof.
Assume is a complete communication graph. Assume is the weak model of . Since is complete, for any vertex a we have that contains all other vertices, so contains all full-length clauses with one negative literal. Since any two vertices create a cycle where the exit points are the rest of the vertices, contains all full-length clauses with two negative literals. The same is true for any vertices, so contains all full-length clauses with negative literals. However, does not subsume the full-length clause with no negative literals, i.e., the white clause (), nor the full-length clause with n negative literals, i.e., the black clause (). This means that has only two solutions, the white and the black assignment; i.e., is a black and white SAT problem. □
Now comes one of our main contributions, the theorem which states that the weak model of a strongly connected graph is a black and white SAT problem, which means that if the graph is strongly connected, then the weak model has the same power as the strong model. Since the proof is rather technical, we give also a high-level proof of it.
From left to right we prove the theorem in a constructive way: Let us have a sequence of vertices which can be built by Lemma 3 and by the construction of . Eventually we will find a cycle at the end of this sequence. Lemma 2 ensures that there is an exit point from this cycle, which either results in a bigger cycle, or in a longer sequence. Using these two steps, eventually we construct a strongly connected component. From Lemma 2 it follows that it is also maximal (otherwise there would be an exit point from it which would allow one to do the above steps); i.e., the graph is strongly connected.
From right to left we use induction: We start the proof from a complete graph. We know that complete graphs are also strongly connected. As the induction step, we drop an edge from this graph such that it remains strongly connected. We assume that before the drop the weak model was black and white, which is true by Lemma 4. We show that it remains black and white also after the drop. To show this, we show that each clause in the model after the drop is a subset of some clause from the mode before the drop. Thus, the new model may not have more solutions then the old one. However, the new model has to have at least two solutions by Lemma 1. Thus, the new model is black and white. Since our graph can be constructed by dropping edges from a complete graph, which has the same set of vertices, its weak model is also black and white.
Theorem2.
Let be a communication graph. Let be the weak model of . Then is a black and white SAT problem if and only if is strongly connected.
Proof.
Let be a communication graph. Let be the weak model of . We show that is a black and white SAT problem if and only if is strongly connected.
(From left to right:) We assume is a black and white SAT problem; we show by construction that is strongly connected.
(R0) Let be a vertex from . Let .
(R1) Now we have a sequence of vertices: . We work with its last vertex: . From Lemma 3 we know that literal is not pure in , so is present in . Thus, there must be a clause in generated be for vertex . Since is a subset of , by Lemma 2, there is a clause in . Let be a vertex from such that is not in . If this is possible, then let and go to (R1). Note that this is not always possible because is a final graph, so eventually each vertex from must be in the set . In this case let be a vertex from such that , where and i is the smallest possible. This means that we have i such that and ; i.e., is a cycle. Go to (R2).
(R2) Now we have a sequence of vertices , and the end of this sequence from to is a cycle. If and the cycle contains all the vertices from , then go to (R3). Otherwise, by creation of and by Lemma 2 we know that contains a clause , where are exit points of the cycle . Let be a vertex from such that is not present in . If this is possible, then let , and go to (R1). Note that this is not always possible because is a final graph. so eventually each vertex from must be in the set . In this case let be a vertex from , such that and is the smallest possible. Since are exit points of the cycle , we know that is smaller than i because each vertex from is different from . This means that we have such that , and and ; i.e., is a cycle. Let , and go to (R2).
(R3) Eventually (R2) exists to (R3) because, by Lemma 2, each cycle has at least one exit point, which results in a bigger cycle, or in a longer sequence of vertices. Thus, eventually the sequence will contain all vertices, and eventually i will be 1, so eventually we will find a cycle which contains all vertices. Hence, is strongly connected.
(From right to left:) We assume is strongly connected; we show by induction that is a black and white SAT problem. Let H be the complete communication graph which has the same set of vertices as . We know from Lemma 4 that the weak model of H is a black and white SAT problem. This is our induction base. It is well known that complete graphs are also strongly connected. We create G from H by deleting edges from H such that G remains strongly connected. Let Z be the weak model of G. Our induction hypothesis is that Z is a black and white SAT problem. Our induction step is that we delete an edge from G such that it remains strongly connected. Let be this graph. Let be the weak model of . We show that is a black and white SAT problem. To show this, we show that ; i.e., subsumes all clauses from Z. Without loss of generality let us assume that we deleted the edge from vertex a to vertex b. All clauses from Z are the same as the clauses of , except the ones generated by for those cycles which contain a. From those clauses let be an arbitrary but fixed one, where is a cycle in Z and are its exit points. We know that and for some , and b is one of the other vertices from this clause. There are the following cases:
If b is one of the exit points and some other vertex from the cycle has an edge to b, then contains the same clause: D.
If b is one of the exit points, say , where , and no other vertex from the cycle has an edge to b, then contains the clause , which is a subset of D. Note that the vertex sequence contains some vertices, because is a strongly connected graph; i.e., each cycle has an exit point, unless it contains all vertices.
If b is one of the other vertices of the cycle, but b is not the next vertex after a in this cycle, then contains the same clause, D.
If b is one of the other vertices of the cycle, and b is the next vertex after a in this cycle, then is not a cycle in . If there is no other child vertex of a in , then the clause generated by for a in is a subset of D. If there are other child vertices of a in , then there must be a subset of which contains all other child vertices of a except b, and which is a cycle in . The clause generated by for this cycle in is a subset of D.
We showed that subsumes all clauses from Z. This means that ; i.e., may have no other solutions than Z. By our induction, hypothesis Z has only two solutions, and . We know from Lemma 1 that and are solutions for , because is a weak model. In addition, since may have no other solution, is a black and white SAT problem. This means that the weak model of any strongly connected communication graph is a black and white SAT problem. Hence, is a blacked-and-white SAT problem, because is strongly connected and is its weak model. □
The following lemma states that entails for any communication graph. This means that any solution of is also a solution of . To show this, it is enough to show that subsumes all clauses from .
Lemma5.
Let be a communication graph. Let be the strong model of . Let be the weak model of . Then .
Proof.
Assume is a communication graph, is the strong model of and is the weak model of . We show that . To show this, it is enough to show that subsumes all clauses from . Let C is an arbitrary but fixed element of . If C is an element of , then, without loss of generality, we may assume that , where . From the construction of we know that in there are the following edges: . Since is generated from the same graph, by its definition we know that contains the clauses and all of these ones subsume C.
If C is an element of , then, without loss of generality, we may assume that , where , and . From the construction of we know that in there is an edge: such that d is one of the vertices from , and e is one of the vertices from . Since is generated from the same graph, by its definition we know that contains the clauses , which subsumes C.
Hence, . □
The following lemma states that and are equivalent if the represented communication graph is strongly connected or there are no branches in the graph. If the communication graph is strongly connected, then both and are black and white SAT problems, so they are equivalent.
Lemma6.
Let be a communication graph. Let be the strong model of . Let be the weak model of . If
(I)
is strongly connected, or
(II)
Each vertex in has only one child,
then and are equivalent.
Proof.
In the case of (I) we know that is strongly connected, so by Theorem 1, and by Theorem 2 we know that and are black and white SAT problems, so by the definition of clause set equivalent-ness they are equivalent. In case of (II) we have that and . From this we obtain that . From Lemma 5 we know that . Hence, and are equivalent. □
The following lemma gives a criterion for the communication graph which makes the strong model stronger than the weak model. This lemma is not needed to prove the following theorems but it is still interesting.
Lemma7.
Let be a communication graph. Let be the strong model of . Let be the weak model of . Then iff is not strongly connected, and there is at least one vertex in it which has more than one child vertex.
Proof.
(From left to right:) We assume , so and are not equivalent. Since the right side of Lemma 6 is negated, the negation of the left side of Lemma 6 is implied. Hence, is not strongly connected, and there is at least one vertex in it which has more than one child vertex.
(From right to left:) Assume is not strongly connected, and there is at least one vertex in it, say a, which has more than one child vertex, say , where . In this case and are solutions for but they are not solutions of , since they do not satisfy the clause from . Thus, and are not equivalent. From this and from Lemma 5 we obtain that Then . □
The following theorem, the so called transitions theorem states that any “transition” between and is a black and white SAT problem iff the communication graph is strongly connected. This is one of the main results of this work.
Theorem3
(Transitions Theorem). If for all communication graphs we have , where is the strong model of , is the weak model of and is an arbitrary but fixed model of , then is a black and white SAT problem iff is strongly connected.
Proof.
Assume that is a communication graph. Assume that is the strong model of , is the weak model of and is an arbitrary but fixed model of . We show that is a black and white SAT problem iff is strongly connected.
(From left to right:) Assume is a black and white SAT problem. From this and from the assumption that , we have that is a black and white SAT problem, since any strong model has always at least two solutions, the white assignment and the black one; see [1]. From this and from Theorem 1 we have that is strongly connected.
(From right to left:) Assume is strongly connected. Then by Lemma 6 we know that and are equivalent. From this and from the assumption that it follows that and and are equivalent. Since is strongly connected by Theorem 2 we know that is a black and white SAT problem. We know that and are equivalent; hence, is a black and white SAT problem. □
The following theorem shows that the Balatonboglár model of a communication graph is a transition between the strong and the weak model. Actually, Balatonboglár is a small city in Hungary next to lake Balaton. We spent quite a lot of time next to the lake thinking about a model which is 3-SAT and black and white if the directed graph is strongly connected. As the next theorem shows, we were successful. As a sign of appreciation for that great time, we gave the name Balatonboglár to that model.
Theorem4.
Let be a communication graph. Let be a Balatonboglár model of . Then is a black and white 3-SAT problem if and only if is strongly connected.
Proof.
Assume is a communication graph. Assume is a Balatonboglár model of . We show is a black and white 3-SAT problem if and only if is strongly connected. Due to the construction of , it is a 3-SAT problem for any communication graph. Let be the weak model of . Let be the strong model of . Now we show that is a black and white 3-SAT problem if and only if is strongly connected. From the transitions theorem (Theorem 3), we know that to show this, it is enough to show that .
(I) As a first step, we show that . To show this it is enough to show that subsumes all clauses from . Let C be an arbitrary but fixed element of . This means that C is either an element of , or , or . If C is an element of , then C is also element of , so this case is trivial. If C is an element of , then, without loss of generality, we may assume that , where a is a vertex in and and and . From the construction of we know that in there are the following edges: . Since is generated from the same graph, by its definition we know that contains the clauses and both of them subsume C. If C is an element of , then, without loss of generality, we may assume that , where d is a vertex in , and and . From the construction of we know that in there are the following edges: . Since is generated from the same graph, by its definition we know that contains the clause which subsumes C.
(II) As a second step, we show . To show this it is enough to show that subsumes all clauses from . Let C be an arbitrary but fixed element of . This means that C is an element of either or . If C is an element of , then, without loss of generality, we may assume that , where . From the construction of we know that in there are the following edges: . Since is generated from the same graph, by its definition we know that contains the clause , if , or , where b and c are different vertices from , and that said clause subsumes C. If C is an element of , then, without loss of generality, we may assume that , where and . If then C is an element of , whose case was already considered, so we may assume that . From the construction of and from we know that in there are these edges: and such that and are some of the vertices from , and e is one of the vertices from . Since is generated from the same graph, by its definition we know that contains the clause which subsumes C.
Hence, is a black and white 3-SAT problem if and only if is strongly connected. □
8. Future Work
This work is purely theoretical; there is no usage described here. That does not mean that it is not possible. In this section we list some possible usage.
The BaW 1.0 SAT solver solves the SAT problems generated by our strong model in linear time [13]. The proof of Theorem 2 suggests that we might find a similar algorithm for SAT problems generated by our weak model.
Most probably, this is not possible in the case of the Balatonboglár model, since in that model there is not enough information to reconstruct the input directed graph. It is an interesting question: in which cases is the reconstruction still possible? Most probably not in all cases, because then we could translate a 3-SAT problem into a directed graph, and then that directed graph into a 2-SAT problem. Although this direction seems to be unrealistic, it is still interesting and very challenging for us.
One of the problems is to do with those clauses in a 3-SAT problem, which subsumes the white clause or the black clause. To solve this problem we need a technique which creates a black and white SAT, if the input SAT problem is unsatisfiable.
Our latest results suggest that our weak model is the weakest possible model for communication graphs, because if we generate a weak model from a strongly connected graph and we add the black and the white clause to the model, then we get a minimal unsatisfiable SAT instance; i.e., there is no redundant clause in the weak model [12]. Our other models are quite redundant; see [14]. We plan to combine the good features of the weak and the Balatonboglár models. The first one is non-redundant; the second one can be constructed in a fast way.
Author Contributions
Writing—original draft, G.K.; Writing—review and editing, C.B. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the Hungarian Government, grant number: GINOP-2.1.2-8-1-4-16-2017-00176. The APC was funded by InnovITech Ltd.
Conflicts of Interest
The authors declare no conflict of interest.
References
Biró, C.; Kusper, G. Equivalence of Strongly Connected Graphs and Black-and-White 2-SAT Problems. Miskolc Math. Notes2018, 19, 755–768. [Google Scholar] [CrossRef]
Aspvall, B.; Plass, M.F.; Tarjan, R.E. A Linear-Time Algorithm for Testing the Truth of Certain Quantified Boolean Formulas. Inf. Process. Lett.1979, 8, 121–123. [Google Scholar] [CrossRef]
Balla, T.; Biró, C.; Kusper, G. The BWConverter Toolchain: An Incomplete Way to Convert SAT Problems into Directed Graphs. In Proceedings of the ICAI 2020, Yokohama, Japan, 11–17 July 2020; pp. 24–29. [Google Scholar]
Langlands, R.P. Problems in the theory of automorphic forms to Salomon Bochner in gratitude. In Lectures in Modern Analysis and Applications III; Springer: Berlin/Heidelberg, Germany, 1970; pp. 18–61. [Google Scholar]
Weil, A. Uber die Bestimmung Dirichletscher Reihen durch Funktionalgleichungen. Math. Ann.1967, 168, 149–156. [Google Scholar] [CrossRef]
Hellerman, L. A Catalog of Three-Variable Or-Invert and And-Invert Logical Circuits. IEEE Trans. Electron. Comput.1963, 198–223. [Google Scholar] [CrossRef]
Bryant, R.E. Graph-Based Algorithms for Boolean Function Manipulation. IEEE Trans. Comput.1986, 100, 677–691. [Google Scholar] [CrossRef] [Green Version]
Minato, S. Zero-suppressed BDDs for Set Manipulation in Combinatorial Problems. In Proceedings of the 30th International Design Automation Conference, Dallas, TX, USA, 14–18 June 1993; pp. 272–277. [Google Scholar]
Hearn, R.A. Games, Puzzles, and Computation. Ph.D. Thesis, Massachusetts Institute of Technology, Cambridge, MA, USA, June 2006. [Google Scholar]
Nagy, B. Truth-teller-liar puzzles and their graphs. Cent. Eur. J. Oper. Res.2003, 11, 57–72. [Google Scholar]
Kusper, G.; Balla, T.; Biró, C.; Tajti, T.; Yang, Z.G.; Baják, I. Generating Minimal Unsatisfiable SAT Instances from Strong Digraphs. In Proceedings of the 2020 22nd International Symposium on Symbolic and Numeric Algorithms for Scientific Computing, Timisoara, Romania, 1–4 September 2020. [Google Scholar]
Biró, C.; Kusper, G. BaW 1.0-A Problem Specific SAT Solver for Effective Strong Connectivity Testing in Sparse Directed Graphs. In Proceedings of the IEEE 18th International Symposium on Computational Intelligence and Informatics (CINTI 2018), Budapest, Hungary, 21–22 November 2018; pp. 160–165. [Google Scholar]
Kusper, G.; Biró, C.; Balla, T. Investigation of the Efficiency of Conversion of Directed Graphs to 3-SAT Problems. In Proceedings of the 2020 IEEE 14th International Symposium on Applied Computational Intelligence and Informatics (SACI), Timisoara, Romania, 21–23 May 2020; pp. 000227–000234. [Google Scholar] [CrossRef]
Figure 1.
A path and a cycle.
Figure 1.
A path and a cycle.
Figure 2.
A communication graph with 4 vertices, 3 cycles.
Figure 2.
A communication graph with 4 vertices, 3 cycles.
Figure 3.
A strongly connected communication graph with 4 vertices, 6 cycles.
Figure 3.
A strongly connected communication graph with 4 vertices, 6 cycles.
Figure 4.
Two simple communication graphs.
Figure 4.
Two simple communication graphs.
Figure 5.
A strongly connected communication graph with 4 vertices, 3 simple cycles, 1 non-simple cycle.
Figure 5.
A strongly connected communication graph with 4 vertices, 3 simple cycles, 1 non-simple cycle.
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Kusper, G.; Biró, C.
Convert a Strongly Connected Directed Graph to a Black-and-White 3-SAT Problem by the Balatonboglár Model. Algorithms2020, 13, 321.
https://doi.org/10.3390/a13120321
AMA Style
Kusper G, Biró C.
Convert a Strongly Connected Directed Graph to a Black-and-White 3-SAT Problem by the Balatonboglár Model. Algorithms. 2020; 13(12):321.
https://doi.org/10.3390/a13120321
Chicago/Turabian Style
Kusper, Gábor, and Csaba Biró.
2020. "Convert a Strongly Connected Directed Graph to a Black-and-White 3-SAT Problem by the Balatonboglár Model" Algorithms 13, no. 12: 321.
https://doi.org/10.3390/a13120321
APA Style
Kusper, G., & Biró, C.
(2020). Convert a Strongly Connected Directed Graph to a Black-and-White 3-SAT Problem by the Balatonboglár Model. Algorithms, 13(12), 321.
https://doi.org/10.3390/a13120321
Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.
Article Metrics
No
No
Article Access Statistics
For more information on the journal statistics, click here.
Multiple requests from the same IP address are counted as one view.
Kusper, G.; Biró, C.
Convert a Strongly Connected Directed Graph to a Black-and-White 3-SAT Problem by the Balatonboglár Model. Algorithms2020, 13, 321.
https://doi.org/10.3390/a13120321
AMA Style
Kusper G, Biró C.
Convert a Strongly Connected Directed Graph to a Black-and-White 3-SAT Problem by the Balatonboglár Model. Algorithms. 2020; 13(12):321.
https://doi.org/10.3390/a13120321
Chicago/Turabian Style
Kusper, Gábor, and Csaba Biró.
2020. "Convert a Strongly Connected Directed Graph to a Black-and-White 3-SAT Problem by the Balatonboglár Model" Algorithms 13, no. 12: 321.
https://doi.org/10.3390/a13120321
APA Style
Kusper, G., & Biró, C.
(2020). Convert a Strongly Connected Directed Graph to a Black-and-White 3-SAT Problem by the Balatonboglár Model. Algorithms, 13(12), 321.
https://doi.org/10.3390/a13120321
Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.