Solving Combinatorial Problems Using Boolean Equations

Similar documents
Complete Sets of Hamiltonian Circuits for Classification of Documents

Artificial Intelligence and Creativity Two Requirements to Solve an Extremely Complex Coloring Problem

Derivative Operations for Lattices of Boolean Functions

USING SAT FOR COMBINATIONAL IMPLEMENTATION CHECKING. Liudmila Cheremisinova, Dmitry Novikov

Classes of Bent Functions Identified by Specific Normal Forms and Generated Using Boolean Differential Equations

Compact XOR-Bi-Decomposition for Generalized Lattices of Boolean Functions

Computer organization

chapter 11 ALGEBRAIC SYSTEMS GOALS

Tribhuvan University Institute of Science and Technology Micro Syllabus

LOGIC FUNCTIONS AND EQUATIONS

Boolean Differential Equations

Splitting a Logic Program Revisited

A Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming

Chapter 0 Introduction. Fourth Academic Year/ Elective Course Electrical Engineering Department College of Engineering University of Salahaddin

1.1 P, NP, and NP-complete

The Complexity of Grid Coloring

Complete Bi-Decomposition of Multiple-Valued Functions Using MIN and MAX Gates

(Boolean Algebra, combinational circuits) (Binary Codes and -arithmetics)

Show that the following problems are NP-complete

Simpler Functions for Decompositions

Inference of A Minimum Size Boolean Function by Using A New Efficient Branch-and-Bound Approach From Examples

Introduction. Pvs.NPExample

Logic Design Combinational Circuits. Digital Computer Design

Formal Verification Methods 1: Propositional Logic

FINITE PREDICATES WITH APPLICATIONS IN PATTERN RECOGNITION PROBLEMS

The P versus NP Problem. Ker-I Ko. Stony Brook, New York

Combinational Logic. By : Ali Mustafa

Solving the N-Queens Puzzle with P Systems

AUTOMATED REASONING. Agostino Dovier. Udine, October 2, Università di Udine CLPLAB

Binary Decision Diagrams and Symbolic Model Checking

NP-completeness. Chapter 34. Sergey Bereg

211: Computer Architecture Summer 2016

BOOLEAN ALGEBRA INTRODUCTION SUBSETS

6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch

Optimal Metric Planning with State Sets in Automata Representation [3]

The Class NP. NP is the problems that can be solved in polynomial time by a nondeterministic machine.

Analytical Performance of One-Step Majority Logic Decoding of Regular LDPC Codes

Harvard CS 121 and CSCI E-121 Lecture 22: The P vs. NP Question and NP-completeness

CHAPTER 3 FUNDAMENTALS OF COMPUTATIONAL COMPLEXITY. E. Amaldi Foundations of Operations Research Politecnico di Milano 1

Phase transitions in Boolean satisfiability and graph coloring

NP-Complete problems

COMPUTATIONAL COMPLEXITY

Logical Design of Digital Systems

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013

Methods of Partial Logic for Knowledge Representation and Deductive Reasoning in Incompletely Specified Domains

CSCI3390-Lecture 14: The class NP

1 Introduction In [2] a method for computing the Walsh spectrum in R-encoding of a completely specified binary-valued function was presented based on

Introduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010

APPLICATION FOR LOGICAL EXPRESSION PROCESSING

Computational Tasks and Models

Elementary Loops Revisited

Polynomial-Time Reductions

COMBINATIONAL LOGIC FUNCTIONS

WEEK 3.1 MORE ON KARNAUGH MAPS

ITCS:CCT09 : Computational Complexity Theory Apr 8, Lecture 7

MathCheck2: Combining SAT and CAS Presentation at Applications of Computer Algebra 2016 Kassel, Germany

Boolean Algebra, Gates and Circuits

A Logically Complete Reasoning Maintenance System Based on a Logical Constraint Solver

Lecture 18: P & NP. Revised, May 1, CLRS, pp

COSC3330 Computer Architecture Lecture 2. Combinational Logic

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19

Representations of All Solutions of Boolean Programming Problems

NP-complete problems. CSE 101: Design and Analysis of Algorithms Lecture 20

STUDY OF PERMUTATION MATRICES BASED LDPC CODE CONSTRUCTION

I: INTRODUCTION. 1.1 Using the Text in a Lecture Course

The P = NP Problem Bristol Teachers Circle, June P.D.Welch, University of Bristol

Final Exam (Version B) December 16, 2014 Name: NetID: Section: 1 2 3

Philadelphia University Student Name: Student Number:

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

An Application of Autocorrelation Functions to Find Linear Decompositions for Incompletely Specified Index Generation Functions

CHAPTER 12 Boolean Algebra

NP-Completeness. NP-Completeness 1

Artificial Intelligence. 3 Problem Complexity. Prof. Dr. Jana Koehler Fall 2016 HSLU - JK

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

CS/EE 181a 2008/09 Lecture 4

Friday Four Square! Today at 4:15PM, Outside Gates

CS137: Electronic Design Automation. Today. Input Encoding. Output Encoding. State Encoding. Finite-State Machine. Encoding

Introduction to Solving Combinatorial Problems with SAT

1 Primals and Duals: Zero Sum Games

CM10196 Topic 2: Sets, Predicates, Boolean algebras

Lecture 4. 1 Circuit Complexity. Notes on Complexity Theory: Fall 2005 Last updated: September, Jonathan Katz

Boolean algebra. Values

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

Decision Procedures for Satisfiability and Validity in Propositional Logic

MAT2345 Discrete Math

Undergraduate work. Symbolic Model Checking Using Additive Decomposition by. Himanshu Jain. Joint work with Supratik Chakraborty

Algorithms and Theory of Computation. Lecture 22: NP-Completeness (2)

Geometric Steiner Trees

Computability and Complexity Theory: An Introduction

From Abstract Models to Executable Models for Multi-Agent Path Finding on Real Robots

Fundamentals of Digital Design

Theory of Rule 6 and it s Application to Round Robin Tournament

Determine the size of an instance of the minimum spanning tree problem.

Alternative Approach to Mining Association Rules

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

Automata Theory CS Complexity Theory I: Polynomial Time

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

Quantum Annealing and the Satisfiability Problem

Transcription:

Solving Combinatorial Problems Using Boolean Equations Christian Posthoff The University of The West Indies St. Augustine Campus Trinidad & Tobago email: christian@posthoff.de Bernd Steinbach Freiberg University of Mining and Technology Institute of Computer Science D-09596 Freiberg, Germany email: steinb@informatik.tu-freiberg.de This paper honors the excellent scientist Arkadij D. Zakrevskij who significantly extended the knowledge in the Boolean Domain. Abstract The recent developments indicate that Boolean equations get a very general and powerful instrument for the solution of discrete problems. Several classical areas (very often related to search) are now replaced by solution methods for Boolean equations, and also other areas of Discrete Mathematics (graph problems, coloring, planning etc.) can be solved by using Boolean equations. The problem only needs a correct Boolean model, the rest will be done by very efficient algorithms and programs which will be available. We show several problem classes and the way how they can be solved. 1 Introduction This paper has been planned as a common paper with Arkadij, he suggested the title, and now we try to continue this work and to implement the discussed ideas. In the long period of common work published together the results of many special problems [14 17, 20]. Fully aware of the importance of Boolean equations, Arkadij Zakrevskij commonly published with Dieter Bochmann and Christian Posthoff a book to this topic [2]. It was our pleasure to contribute to this book with two chapters [6, 18]. The wide field of applications of Boolean (logic) equations impress our text-book [7] and the associated book about examples and exercises of logic functions and equations [5]. In this paper, we take ideas and problems from several fields and want to show how far-reaching this methodology can be applied. 2 Ternary Vectors - the Main Data Structure Sometime in the seventies when we started our research in this area we saw the book of Arkadij Zakrevskij [19] where he used ternary vectors as a data structure. We found this structure useful and used it as well in a rather intuitive way. Later on we explored it more in detail, utilized it as data structure for calculations, and found many very useful properties. Definition 1 Let x = (x 1, x 2,..., x n ), x i {0, 1, }, then x is a ternary vector.

Table 1: Coding of ternary values character bit combinations 0 10 1 11 00 At the beginning we processed the three symbols as characters, thereafter we represented the characters by two bits using the coding of Table 1. The combination (01) is not used, the first bit equal to 1 indicates that a value has been set. In this case the second bit indicates the value itself. The empty memory (00) indicates that it is filled with. This coding enabled the parallel processing of 32, 64 or even more components of the vectors. Definition 2 Let be given two ternary vectors x = (x 1, x 2,..., x n ) and y = (y 1, y 2,..., y n ) two ternary vectors of the same length. Then x is orthogonal to y if there is for at least one component i the combination x i = 0, y i = 1 or vice versa. 3 Set-related Problems Many problems in Discrete Mathematics deal with finite sets. Let M = (m 1,..., m n ) a finite set of n elements, P (M) the set of all subsets, the power set of M. Then each subset S M can be defined by a binary vector (x 1, x 2,..., x n 1, x n ), x i {0, 1}. If x i = 0 then m i / S, if x i = 1 then m i S. On one side we have P (M) with the set operations (S,, ), on the other side the set of all binary vectors B n. It is not very difficult to transfer the set operations: The complement of a set S with regard to M is given by transforming single bits using not: 0 1, 1 0. The intersection S 1 S 2 uses the logical and ( ) component by component. The union S 1 S 2 uses the logical or ( ) component by component. So we can state that (P (M), S,, ) and (B n, x,, ) are isomorphic structures. If necessary, the symmetric difference also can be transformed by using the antivalence ( ), the complement of the symmetric difference can be transformed by means of the equivalence ( ). This use of binary vectors is related to the concept of characteristic functions; each binary vector is the characteristic function of the respective subset. Now we extend the possibilities by the following extended interpretation: the third value indicates that the value of this component is not yet known or not yet defined, and can be replaced (possibly later) by the values 0 and 1. One vector with one can be replaced by two vectors with a 0 and a 1 in this position. In this way one ternary vector defines 2, 4, 8,... binary vectors depending on the number of components with a, i.e., a set of binary vectors. We mention the programming system XBOOLE [5, 7, 11] which implements all the set operations for sets given by ternary vectors efficiently and comfortably. Additionally this understanding is already a powerful mechanism for the creation of very complex and correct models. Together with correct algorithms and correct programs extremely complex problems can be solved. Example 1 The first steps to solve a problem is there specification by an adequate model. We take as example the modeling of a well-known combinatorial problem, the placement of 8 queens on a chessboard, which is traditionally solved by searching. We transform it into the area of logic equations in the following way. As shown in Table 2, we use vectors of 64 components corresponding to the 64 fields of the board.

Table 2: Ternary vectors to describe the assignment of a queen to one field and all consequent restrictions for other fields of the board a1 a2 a3... b1 c1... b2 c3... b4 b5... 1 0 0... 0 0... 0 0...... 0 1 0... 0... 0...... Table 3: Intersection of two ternary components first component second component result 0 0 0 0 1 no result 0 0 1 0 no result 1 1 1 1 1 0 0 1 1 The setting of a queen on the field a1 can be seen by the value 1 for this field, but the additional effect of this setting is also included into this vector: it is not allowed to set a queen on other fields of the same column and the first row and the respective diagonal, but by it is also indicated that there is no knowledge with regard to this field. So the eight vectors for the column (a) are considered as an of these possibilities. Now we do the same for the second column (b), and the two columns are combined by, i.e., by. We must use possible settings for the first as well as for the second column. The intersection of the sets of two ternary vectors is implemented using Table 3. The most interesting situations are the combinations (0 1) or (1 0). In this case the combination of these two vectors makes no contribution to the final result. The search procedures are no longer necessary to find the final result, the solution of a Boolean equation delivers all solutions. Figure 1 shows one of the 92 solutions of the board 8 8. So we have a very general procedure for problems such as: sets of fault combinations, representation of state sets and verification of sequential machines, computation of prime implicants, the design of encoders, decoders, multiplexers, adders, comparators etc. 8 0Z0Z0Z0L 7 Z0Z0ZQZ0 6 0Z0L0Z0Z 5 ZQZ0Z0Z0 4 0Z0Z0ZQZ 3 Z0Z0L0Z0 2 0ZQZ0Z0Z 1 L0Z0Z0Z0 a b c d e f g h Figure 1: Eight queens on a chess board which does not threaten each other.

2 2 2 1 3 5 1 3 5 1 3 5 4 4 4 (a) (b) (c) Figure 2: Analysis regarding Hamiltonian Circuits: (a) graph without a Hamiltonian Circuit; (b) graph that contain a Hamiltonian Circuit; (c) Hamiltonian Circuit of the graph given in (b). Example 2 Very often there is a binary description just from the beginning, but sometimes a careful modeling is required. Sudoku [8, 12], for instance, is a purely combinatorial problem and needs the binary modeling. Here we use another interpretation of a ternary vector. If the component x i = 0 then we include the variable x i into a conjunction, if the component x i = 1, then we include x i, and for x i =, the variable x i is omitted. In this way a ternary vector can be transformed into a conjunction, and a set of ternary vectors corresponds to a disjunctive form. { 1 if the value on the field (i, j) = k x ijk = 0 if the value on the field (i, j) k The requirements and constraints can be stated by one single conjunction C ijk for each number on each field: C 111 = x 111 x 112 x 113 x 114 x 115 x 116 x 117 x 118 x 119 x 121 x 131 x 141 x 151 x 161 x 171 x 181 x 191 x 211 x 311 x 411 x 511 x 611 x 711 x 811 x 911 x 221 x 231 x 321 x 331. This conjunction describes completely the setting of 1 on the field (1, 1) and all the consequences. Hence, for each field we need 9 conjunctions for the 9 different possibilities. These conjunctions have the advantage that they are orthogonal to each other, for one field one and only one can be equal to 1. The Boolean equation C 111 C 112 C 113 C 114 C 115 C 116 C 117 C 118 C 119 = 1 describes the 9 possibilities which exist for one field ((111) is only an example) and all the consequences resulting from a given setting. In principle, 729 of such conjunctions are possible, however, each given setting (such as x 1,9 = 5) selects one out of 9 conjunctions. Now it is only necessary to write a tiny program for the input of some given values and the transformation into a conjunctive form of a Boolean equation. 4 The Description of Graphs Many problems can be expressed by graphs - planning problems, accessibility, path problems, coloring of edges and nodes in a graph and many more. We only mention the Birkhoff Diamond and the passing of bridges in Koenigsberg (solved by L. Euler), and explain the basic model for the problem of Hamiltonian Circuits. Figure 2 shows examples of graphs without and with an Hamiltonian Circuit. The edges can be expressed by Boolean variables: { 1 if the edge is used from node i to node j, x ij = 0 otherwise. Using this encoding the rules of the graph problem can be expressed by Boolean equations. Table 4 describes all rules which must be hold by a Hamiltonian Circuit and gives the concrete Boolean equation for a selected edge in the graph of Figure 2 (b). Again without any searching

Table 4: Rules of Hamiltonian Circuits applied to the edge from node 3 to node 5 in the graph of Figure 2 (c) rule example An edge from node i to node j, i.e., x ij = 1, prohibits (x 35 = x 53 ) = 1 that the reverse edge is used, i.e., x ji = 0. An edge from node i to node j, i.e., x ij = 1, prohibits (x 35 = x 32 ) all edges to other destination nodes d l, i.e., x idl = 0. (x 35 = x 34 ) = 1 An edge from node i to node j, i.e., x ij = 1, prohibits (x 35 = x 45 ) = 1 all edges from other source nodes s m, i.e., x smj = 0. procedure all solutions of the problem will be found as solution of created system of Boolean equations. Alternatively the nodes of the graph can be encoded by Boolean variables and additional bits can express the colors of a coloring problem. An edge is expressed in this model by a conjunction of variables that encode both the source node and the destination node. 5 Rule-based Problems Rule-based problems are very important, at a given point of time they were a crucial point of Artificial Intelligence. A lot of efforts have been spent to build efficient SAT-solvers [1, 9]. Again search procedures were a central point, such as breadth-first search, depth-first search, heuristic search etc. Again we transform the rules into a Boolean equation, only a set of correct rules is necessary, afterwards the system takes over. Any rule has the format or in a logical way of speaking if condition then conclusion, x y. Each rule x y can now be transformed into a disjunction: x y = x y. The validity of several rules can be ensured by using the conjunction. By means of ternary vectors as the basic data structure, we are able to solve SAT-problems directly. We will use the following small example: (x 1 x 2 x 3 )(x 2 x 4 x 5 )(x 1 x 4 x 5 )(x 2 x 3 x 5 ) = 1. (1) This equation is equivalent to four single equations: x 1 x 2 x 3 = 1, x 2 x 4 x 5 = 1, x 1 x 4 x 5 = 1, x 2 x 3 x 5 = 1. As suggested by Arkadij Zakrevskij, the first equation now will be transformed into a ternary matrix (a set or list of ternary vectors): 1 0 0 This matrix shows all the vectors that satisfy the first equation. If x 1 = 1, then the values of the other variables are not important. If x 1 = 0, then x 2 must be equal to 1, i.e., x 2 = 0. Finally, if x 1 = 0 and x 2 = 1, then x 3 must be equal to 0. Double solutions cannot exist. It is very characteristic that each vector of the matrix includes more information than the previous

vectors. The number of vectors in the resulting matrix is equal to the number of variables in the disjunction. In the example each disjunction has three variables (an example of a 3-SATproblem). If we repeat this procedure for the other three equations, then we get the following four matrices: M 1 = 1 0 0, M 2 = 1 0 0 0 1 0, M 3 = 0 1 1 1 0 1, M 4 = 1 0 1 0 0 0 In order to get the final solution, these four matrices have to be combined by intersection (see above). Each line of one matrix has to be combined with each line of the next matrix, empty intersections can be omitted. For the first and second matrix, we get M 1 M 2 as follows:. 1 0 0 1 0 0 0 1 0 = 1 1 1 0 0 1 0 1 0 0 0 0 0 0 1 0. Now we calculate (M 1 M 2 ) M 3 : 0 1 1 1 0 1 1 1 1 0 0 1 0 1 0 0 0 0 0 0 1 0 = 0 0 0 0 0 1 0 1 1 1 1 0 1 0 1 1 0 1 1 0 0 1, and (M 1 M 2 ) M 3 ) M 4 will return the final result: 1 0 1 0 0 0 0 0 0 0 0 1 0 1 1 1 1 0 1 0 1 1 0 1 1 0 0 1 = 0 0 0 0 1 0 1 1 1 1 1 1 0. This matrix of ternary vectors represents all solutions of the original SAT-problem (1). Since the value represents 0 as well as 1, the equation has 18 solutions. 6 Combinatorial Design In this area the binary description of problems is well-known. It is necessary to transform the requirements of a special problem into the area of binary equations. We use as tiny example the circuit of Figure 3. x 1, x 2, x 3, x 4 are input variables, g 1, g 2, g 3 are intermediate variables, finally f 1, f 2 are the output variables.

x 1 g 1 f 1 x 2 g 2 f 2 x 3 g 3 x 4 Figure 3: Combinational circuit. The global task to be solved is the analysis the circuit. That requires the calculation of the behavior that may be expressed by a target list of ternary vectors. The local behavior of each gate can be expressed by a simple Boolean equation: g 1 = x 1, g 2 = x 1 x 2, g 3 = x 3 x 4, f 1 = g 1 g 2, f 2 = f 1 g 3. Using the orthogonal solutions of each single equation: M 1 = x 1 g 1 0 1 1 0, M 2 = x 1 x 2 g 2 0 0 1 0 0 1 1 1, M 3 = x 3 x 4 g 3 0 0 0 1 1 0 1 1, M 4 = g 1 g 2 f 1 0 0 0 0 1 1 1 0 1 1 1 0, M 5 = f 1 g 3 f 2 0 0 1 0 0 1 1 1, the needed global behavior results form the intersections of these five ternary vector lists (TVLs): 5 M i = i=1 x 1 x 2 x 3 x 4 g 1 g 2 g 3 f 1 f 2 0 0 0 1 0 0 1 0 0 1 0 1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 1 0 1 1 1 1. This approach applies to all digital circuits. Because of the importance of this field there are many design systems and design languages on the market or the property of different companies. It might be the responsibility or the desire of these places to improve their algorithms and their systems. 7 Rectangle-free Four-colorable Grids The solution of this problem was one of the highlights of our research [10, 13]. The definition of the problem is rather short: A two-dimensional grid is a set G m,n = [m] [n]. A grid G m,n is c-colorable if there is a function χ m,n : G m,n [c] such that there are no rectangles with all four corners of the same color. It is known by some theorems [3] that rectangle-free 4-colorable grids exist up to certain sizes of the grid. As an example we can state that the grids G 22,4, G 22,5,..., G 22,10 are rectangle-free 4-colorable, but the grids G 22,11, G 22,12,... does not have this property. It follows from this theory that there must be a rectangle-free 4-colorable grid G 16,20, however, an example for such a grid was not shown before. To our best knowledge only one grid G 17,17 was known that is almost 4-colorable (with only one incorrect position). This grid was constructed by the student Rohan Puttagunta. It can be restricted to a rectangle-free 4-colorable grid G 16,16.

Table 5: Mapping of 4-valued color x to two Boolean variables a and b x a b 1 0 0 2 1 0 3 0 1 4 1 1 It was unknown whether there are rectangle-free 4-colorable grids of the sizes 17 17, 17 18, 18 17, and 18 18. At the first glance this problem seems to be easy. It is only necessary to fix a color for the 18 18 = 324 grid points and to check whether all possible rectangles do not have the same color at their corners. However, when the first check fails, we have to take into account the next color pattern and so on, until the test is successful or all patterns have been tested. The grid G 18,18 has 18 18 = 324 positions, and one of four colors must be selected for each of them. Hence, there are 4 324 = 1.16798 10 195 different patterns altogether in which one of four colors has been assigned to each of the 18 18 positions of the grid. When we assume that we are able to evaluate one pattern in one nano-second (10 9 ) and to spend 100 years (3 10 9 ) then we must repeat the job 3.8 10 176 times in order to know whether there is an valid color pattern and if YES which is the valid color pattern. So we see that we are going to solve an extremely complex problem. The condition that the four corners of the rectangle selected by the rows r i and r j and by the columns c k and c l do not show only one of the colors 1, 2, 3, 4 can be expressed as For the whole grid G m,n, we get: m 1 m f ec (x ri,c k, x ri,c l, x rj,c k, x rj,c l ) = 0. (2) n 1 n i=1 j=i+1 k=1 l=k+1 f ec (x ri,c k, x ri,c l, x rj,c k, x rj,c l ) = 0. (3) This model uses 324 variables, and each variable can take 4 values. Because of the intention to apply our previous research in the area of Boolean equations, we transformed the 4-valued model into a Boolean (binary) model. This can be done by coding the four color values by two Boolean values. Table 5 shows the mapping which has been used. Function (4) depends on eight Boolean variables and has a Boolean result equal to 1 if the colors in the corners of the rectangle selected by the rows r i and r j and by the columns c k and c l are identical: f ecb (a ri,c k, b ri,c k, a ri,c l, b ri,c l, a rj,c k, b rj,c k, a rj,c l, b rj,c l ) = (a ri,c k b ri,c k a ri,c l b ri,c l a rj,c k b rj,c k a rj,c l b rj,c l ) (a ri,c k b ri,c k a ri,c l b ri,c l a rj,c k b rj,c k a rj,c l b rj,c l ) (a ri,c k b ri,c k a ri,c l b ri,c l a rj,c k b rj,c k a rj,c l b rj,c l ) (a ri,c k b ri,c k a ri,c l b ri,c l a rj,c k b rj,c k a rj,c l b rj,c l ) (4) The conditions of the rectangle-free 4-color problem on a grid G m,n are met when the function f ecb (4) is equal to 0 for all rectangles which can be expressed by m 1 m n 1 n i=1 j=i+1 k=1 l=k+1 f ecb (a ri,c k, b ri,c k, a ri,c l, b ri,c l, a rj,c k, b rj,c k, a rj,c l, b rj,c l ) = 0. (5) It is not possible to represent here all the steps we tried and all the difficulties that we met. Finally we restricted our investigations to one color and checked whether this single color uses 25 % of the grid positions in a correct way. We could find one solution for a single color, and this solution could be used three more times after the configuration has been rotated by 90 degrees. Figure 4 shows one of these extremely rare cyclically reusable, rectangle-free coloring of grid G 18,18.

8 Conclusions 1 0 0 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 Figure 4: Cyclically reusable, rectangle-free coloring of grid G 18,18. A matrix containing the ternary elements (0,1,-) was suggested and called by Arkadij Zakrevskij as troiqna matrica. It is a very helpful data structure in the Boolean domain. Boolean equations are a powerful instrument for many problems of Discrete Mathematics, not only for digital systems, but for many other problems as well. It is sufficient to create correct models, the appropriate software is available. Both the domain specific software XBOOLE [5, 7, 11] and the more specialized SAT-solvers [4] can be used. The complexity of the problems to be solved is extremely high. The simple hint that the problem has exponential complexity is no longer sufficient to leave the problem back, without intention to solve it. There is a strong relation between Mathematics and Engineering to solve these problems in a cooperative way. Most likely a course of one semester is not sufficient, two semesters would be better and obviously necessary. Very often it is understandable that traditional research areas or available instruments are no longer useful. Very good programming skills are required in each engineering field. References [1] A. Biere et al., eds. Handbook of Satisfiability. Vol. 185. Frontiers in Artificial Intelligence and Applications. IOS Press, Feb. 2009, p. 980. isbn: 978-1-58603-929-5. [2] D. Bochmann, A. Zakrevskij, and C. Posthoff. Boolesche Gleichungen: Theorie, Anwendungen, Algorithmen (in German - Boolean Equations: Theory, Applications, Algorithms). Wien, New York: Springer, Feb. 1985. isbn: 978-3211958155. [3] S. Fenner et al. Rectangle Free Coloring of Grids. 2009. url: http://www.cs.umd.edu/ ~gasarch/papers/grid.pdf. [4] M. Gebser et al. clasp: A Conflict-Driven Answer Set Solver. In: 9th International Conference on Logic Programming and Nonmonotonic Reasoning. Vol. LNAI 4483. LPNMR. Tempe, AZ, USA: Springer, 2007, pp. 260 265.

[5] B. S. andchristian Posthoff. Logic Functions and Equations - Examples and Exercises. Springer Sciense + Bussiness Media B.V., 2009. isbn: 978-1-4020-9594-8. [6] C. Posthoff and B. Steinbach. Boolesche Differentialgleichungen (in German - Boolean Differential Equations. In: Boolesche Gleichungen: Theorie, Anwendungen, Algorithmen (in German - Boolean Equations: Theory, Applications, Algorithms). Wien, New York: Springer, Feb. 1985, pp. 19 31. isbn: 978-3211958155. [7] C. Posthoff and B. Steinbach. Logic Functions and Equations - Binary Models for Computer Science. Dordrecht, The Netherlands: Springer, 2004. isbn: 978-1-4020-2937-0. [8] C. Posthoff and B. Steinbach. Sudoku Solutions Using Logic Equations. In: Boolean Problems, Proceedings of the 8th International Workshops on Boolean Problems. Ed. by B. Steinbach. IWSBP. Freiberg, Germany, 2008, pp. 49 57. isbn: 978-3-86012-346. [9] C. Posthoff and B. Steinbach. The Solution of SAT Problems Using Ternary Vectors and Parallel Processing. In: International Journal of Electronics and Telecommunications (JET) 57.3 (2011), pp. 233 249. issn: 0867-6747. [10] B. Steinbach, ed. Recent Progress in the Boolean Domain. Newcastle upon Tyne, UK: Cambridge Scholars Publishing, Apr. 2014. isbn: 978-3-937219-77-5. [11] B. Steinbach. XBOOLE - A Toolbox for Modelling, Simulation, and Analysis of Large Digital Systems. In: System Analysis and Modeling Simulation 9.4 (1992), pp. 297 312. [12] B. Steinbach and C. Posthoff. Multiple-Valued Problem Solvers - Comparison of Several Approaches. In: Proceedings of the IEEE 44th International Symposium on Multiple- Valued Logic (ISMVL 2014). Bremen, Germany, May 2014, pp. 25 31. doi: 10.1109/ ISMVL.2014.13. [13] B. Steinbach and C. Posthoff. Solution of the Last Open Four-Colored Rectangle-free Grid - an Extremely Complex Multiple-Valued Problem. In: Proceedings of the IEEE 43nd International Symposium on Multiple-Valued Logic. ISMVL. Toyama, Japan, 2013, pp. 302 309. isbn: 978-0-7695-4976-7. doi: 10.1109/ISMVL.2013.51. [14] B. Steinbach and A. Zakrevskij. Fast heuristic algorithm for three-block decomposition of a system of weakly specified Boolean functions. In: Proceedings of the IEEE Design and Diagnostics of Electronic Circuits and Systems International Workshop (4th IEEE DDECS 2001). Györ, Hungary, Apr. 2001, pp. 283 289. [15] B. Steinbach and A. Zakrevskij. New Approaches for Minimization of ESOPs. In: Proceedings of the IEEE Design and Diagnostics of Electronic Circuits and Systems (5th International Workshop IEEE DDECS 2002). Brno, Czech Republic, Apr. 2002, pp. 336 339. [16] B. Steinbach and A. Zakrevskij. Parallel Automaton and its Hardware Implementation. In: Proceedings of Design and Diagnostics of Electronic Circuits and Systems (3rd DDECS Workshop 2000 Smolenice Castle). Slovak Academy of Sciences, Bratislava, Slovakia, Apr. 2000, pp. 250 257. [17] B. Steinbach and A. Zakrevskij. Parallel Automaton Basic Model, Properties and Diagnostics. In: Boolean Problems, Proceedings of the 4th International Workshops on Boolean Problems. Freiberg University of Mining and Technology, Freiberg, Germany, Sept. 2000, pp. 151 158. [18] B. Steinbach et al. Rechentechnische Erfahrungen mit Booleschen Gleichungen (in German - Computer Experience with Boolean Equations. In: Boolesche Gleichungen: Theorie, Anwendungen, Algorithmen (in German - Boolean Equations: Theory, Applications, Algorithms). Wien, New York: Springer, Feb. 1985, pp. 80 102. isbn: 978-3211958155. [19] A. Zakrevskij. Logic Equations, in Russian ( Logiqeskie Uravneni). Minsk: Nauka i Tehnika, 1975. [20] A. Zakrevskij and B. Steinbach. Sequent Automaton - a Model for Logical Control. In: Proceedings of the International Workshop on Discrete Optimization Methods in Scheduling and Computer-Aided Design. Minsk, Belarus, Sept. 2000, pp. 211 215.