The invention relates to the field of
computer science, in particular to a method for converting a
Boolean satisfiability problem (SAT) into a 3-
coloring problem. According to the method, variables and clauses in an SAT formula are mapped into vertexes of a graph through a specific graph structure and coloring constraints, and logic constraints are represented through edges, so that solution of a Boolean formula is converted into a
graph coloring problem. The method comprises the following steps: S1, reading an SAT problem, and initializing an adjacent matrix of a
topological graph; s2, setting fixed coloring points, and performing necessary connection on the fixed coloring points and vertexes of the correlation graph; s3, sequentially selecting two SAT variables each time, newly adding intermediate graph vertexes in the graph, and connecting the intermediate graph vertexes in the graph according to a
logical relationship in the SAT and a rule set by the invention; s4, circularly performing the step S3 until the logic relationship of all the variables has a complete description in the graph; and S5, finally forming a 3-
graph coloring graph. According to the
conversion method provided by the invention, the structure of the SAT problem is simplified, so that the SAT problem can be applied to an existing
graph theory algorithm, the possibility of solving parallelization capability of a large-scale problem is provided, and the visual analysis of the solution is more intuitive. The method has the advantages of improving the
visualization degree of the solution and being simple and rapid in conversion.