0-89791-993-9/97 $10.00 1997 IEEE A Fast and Robust Exact Algorithm for Face Embedding Evguenii I. Goldberg Tiziano Villa Robert K. Brayton Alberto L. Sangiovanni-V incentelli Department of EECS Academy of Sciences of PARADES, University of California at Belarus, Minsk Via di S.Pantaleo, Berkeley,Berkeley, CA 94720 66, 00186 Roma Abstract We present a new matrix formulation of the face hypercube embedding problem that motivates the design of an efficient search strategy to find an encoding that satisfies all faces of minimum length. Increasing dimensions of the Boolean space are explored; for a given dimension constraints are satisfied one at a time. The following features help to reduce the nodes of the solution spacethat must be explored: candidate cubes instead of candidate codes are generated, cubes yielding symmetric solutions are not generated, a smaller sufficient set of solutions (producing basic sections) is explored, necessary conditions help discard unsuitable candidate cubes, early detection that a partial solution cannot be extended to be a global solution prunes infeasible portions of the search tree. We have implemented a prototype package MINSK based on the previous ideas and run experiments to evaluate it. The experiments show that MINSK is faster and solves more problems than any avail- able algorithm. Moreover, MINSK is a robust algorithm, while most of the proposed alternatives are not. Besides most problems of the complete MCNC benchmark suite, other solved examples in- clude an important set of decoder PLAs coming from the design of microprocessor instruction sets. 1 Introduction Consider a set of symbols and an encoding function : , for a given , that assigns to each symbol a code , i.e., a binary vector of length . Usually the only requirement is that is injective, i.e., that different symbols are mapped to different binary vectors. In various applications it is important to satisfy other encoding constraints, in order to obtain a code that is correct or desirable to meet a certain objective. Either the encoding length is part of the problem instance or it is an unknown to be found (usually minimized) by the procedure that satisfies the given encoding constraints [15]. Given a set of symbols ,a face constraint is a subset specifying that the symbols in are to be assigned to one face (or subcube) of a binary -dimensional cube, without any other symbol sharing the same face. Face constraints are gener- ated by multiple-valued (input) literals in two-level and multi-level multi-valued minimization [15]. As an example, given symbols , an input constraint involving symbols is denoted by . An encoding satisfying is given by 111, 011, 001, 000 and 100 and the face spanned by is 1. Notice that the vertex 101 is not and should not be assigned to any other symbol. Given a set of face constraints , it is always possible to find an encoding that satisfies it, as long as one is free to choose a suitable code length. It is a well-known fact that for any set is satisfied by choosing as the 1-hot encoding function (which assigns to a state the binary vector that is always 0 except for a position to 1, the latter denoting state ). It is an important combinatorial optimization problem, sometimes called [16] face hypercube embedding, to find the minimum and a related : such that is satisfied. The decision version of this problem is NP-complete [11]. An exact solution based on a branch-and-bound strategy to search the partially ordered set of faces of hypercubes was de- scribed first in [16], but it is not computationally practical. An exact solution by reduction to the problem of satisfaction of encod- ing dichotomies 1 was proposed in [17]. It uses a reduction by J. Tracey [14] of the exact satisfaction of encoding dichotomies to a unate covering problem. This approach was made more efficient in [11], by improving the step of generating maximal compati- bles of encoding dichotomies. Recently the problem of satisfac- tion of encoding dichotomies has been revisited in [3], adapting techniques to find primes and solving unate covering with binary decision diagrams that have been so successful in two level logic minimization [2]. From the experimental point-of-view none of the previous algorithms has performed up to expectations, being unable to solve exactly various instances of moderate size and prac- tical interest. Moreover, algorithms reducing encoding dichotomies to unate covering have a dismal behavior when the problem instance consists mostly of uniqueness encoding dichotomies (i.e., encod- ing dichotomies with only one state in each block), because they generate most of the encoding columns, which are 2 for . Heuristic solutions to the face embedding problem have been reported in many papers [10, 4, 12, 5, 17, 13]. A heuristic solution satisfies all face constraints, but does not guarantee that the code- length is minimum. A related problem, that is not of interest in this paper, is the one of fixing the code-length and maximizing a gain function of the constraints that can be satisfied in the given code- length. We refer to [15] for background material on satisfaction of encoding constraints and their sources in logic synthesis. In this paper we present a new matrix formulation of the face hypercube embedding problem that inspires the design of an effi- cient exact search strategy. This algorithm satisfies the constraints one by one by assigning to them intersecting cubes in the encod- ing Boolean space. The problem of finding a set of cubes with a minimum number of coordinates satisfying a given intersection matrix was first formulated in [18] without any relation to encoding problems. No algorithm to solve the problem was described. The relation between the face embedding problem and the construction of intersecting cubes was employed in an heuristic algorithm de- scribed in [12, 5]. The first formulation of a simple criterion of when a set of cubes satisfies a set of constraints was given in [6]. We use some theoretical notions, e.g., basic sections, introduced 1 An encoding dichotomy on is a bipartition 1 2 such that 1 2 .