The Weight in Enumeration

# The Weight in Enumeration

Johannes Schmidt Jönköping International Business School, Jönköping University, Sweden
johannes.schmidt@ju.se
###### Abstract

In our setting enumeration amounts to generate all solutions of a problem instance without duplicates. We address the problem of enumerating the models of -formulæ. A -formula is a propositional formula whose connectives are taken from a fixed set of Boolean connectives. Without imposing any specific order to output the solutions, this task is solved. We completely classify the complexity of this enumeration task for all possible sets of connectives imposing the orders of (1) non-decreasing weight, (2) non-increasing weight; the weight of a model being the number of variables assigned to 1. We consider also the weighted variants where a non-negative integer weight is assigned to each variable and show that this add-on leads to more sophisticated enumeration algorithms and even renders previously tractable cases intractable, contrarily to the constraint setting. As a by-product we obtain also complexity classifications for the optimization problems known as Min-Ones and Max-Ones which are in the -formula setting two different tasks.

###### Keywords:
Computational Complexity, Enumeration, non-decreasing weight, Polynomial delay, Post’s Lattice, MaxOnes

## 1 Introduction

We deal in this paper with algorithmic and complexity of enumeration, the task of generating all solutions of a problem instance. Over the last 15 years, in both practice and theory, one can observe a growing interest in studying enumeration problems which have previously been poorly studied compared to decision, optimization and counting problems. The main reason for this may lie in the huge increase of the size of the data computers are nowadays demanded and able to process in everyday applications.

It is in the meanwhile commonly agreed to consider an enumeration algorithm efficient if it has polynomial delay ([9, 16]), i.e., the time passing between outputs of two successive solutions is polynomial in the input size (while the total time of the output process is usually exponential, due to large solution sets). Variants and different degrees of efficiency in this context exist, see e.g. [9, 19]. Known reductions for enumeration are essentially one-to-one parsimonious reductions, as opposed to counting complexity where a greater variety of useful reductions exist, see e.g. [7, 3]. An interesting issue of enumeration is the order in which the solutions are output. Imposing different orders for an enumeration process may drastically change the complexity, see e.g. [9, 5, 2].

We focus in this paper on the task of enumerating the models of a propositional formula. This task has already been addressed in the context of Boolean constraint satisfaction problems (CSPs). One considers here formulæ in generalized conjunctive normal form , also called -formulæ where is the constraint language. In  this task, EnumSAT for short, has been studied without imposing any special order. There is a polynomial delay algorithm if and only if the underlying constraint language is either Horn, or dual Horn, or affine, or 2CNF, unless . It is worth mentioning that the algorithms underlying this result are all straight forward extensions of the corresponding decision procedures via the notion of self-reducibility  which naturally leads to lexicographic order. In the non-Boolean domain the self-reducible fragment does not deliver all tractable cases anymore  and things get much more involved.

Back to the Boolean domain, EnumSAT has also been considered imposing the order of non-decreasing weight ( for short), the weight of a model being the number of variables assigned to 1. The weight is a natural parameter in Boolean CSPs that can be assimilated to the cost of an assignment. Hence, the task can be seen as the task of enumerating the cheapest solutions first, then the more expensive ones in order of increasing cost. In  the task has been studied for -formulæ. There is a polynomial delay algorithm to enumerate the models of a propositional -formula by order of non-decreasing weight if and only if is width-2-affine or Horn, unless . By duality in that context, the task of enumerating by order of non-increasing weight, for short, is tractable if and only if is width-2-affine or dual Horn.

In this paper we reveal new tractable fragments of propositional logic for and by considering fragments of propositional logic by a different approach. A -formula is a propositional formula whose connectives are taken from , a fixed set of Boolean functions. This approach covers different fragments than the classical constraint approach, e.g. monotonic, self-dual, 0-separating of degree . It has first been taken by Lewis  who showed that the satisfiability problem for -formulæ, for short, is -complete if and only if the set is able to express negation of implication (), unless . Since then, a number of problems dealing with propositional formulæ have been parameterized by -formulæ in order to get a finer classification of their complexity, e.g. equivalence , implication , circumscription , abduction .

In  the model enumeration problem has been studied in the context of -circuits without imposing an order and imposing lexicographic order. Roughly speaking, a -formula can be represented by a -circuit without size-increase, but, in general, not vice versa. Therefore, tractability translates from -circuits to -formulæ, whereas this does not automatically hold for hardness results. We observe however that only slight modifications in the hardness proof from  suffice and one obtains the same classification for -formulæ.

Our main contribution lies in complete classifications for and . We show that the models of a -formula can efficiently be enumerated by order of non-decreasing weight if and only if the connectives are either 0-separating, or affine, or conjunctive, or disjunctive, unless . We further show that we can efficiently enumerate by order of non-increasing weight if and only if the connectives are either 0-separating of degree 2, or monotone, or affine, unless . We also consider the weighted variants of and (denoted and , respectively) where a weight function assigns a non-negative integer weight to each variable and the weight of an assignment is the sum of the weights of the variables assigned to . We show that for the previously tractable fragment of 0-separating connectives now compounds intractable cases.

We also shed new light on the optimization problems known as Min-Ones and Max-Ones where the task is to find a model of minimal / maximal weight. We use these tasks, together with their weighted and non-trivial variants, to obtain hardness of the enumeration problems. These two tasks are in our setting not ”the same”: contrary to the classical constraint setting , no duality notion allows to easily derive the classification for Max-Ones from the one for Min-Ones, or vice versa. This is because the duality notion in our setting transforms Min-Ones (find a satisfying assignment with minimal number of 1’s) into the task of finding a non-satisfying assignment with maximal number of 1’s. We show further that allowing weights on the variables renders previously tractable fragments intractable, contrarily to the classical constraint approach.

Among the algorithmic enumeration strategies we use, we apply a method we shall call priority queue method. It has first been used in  in order to enumerate all maximal independent sets of a graph in lexicographical order. This method turned out to be applicable in much more generality [11, 16, 5]. We use it to obtain various polynomial delay algorithms for and and their weighted variants.

We give another non-trivial enumeration algorithm for for the fragment of connectives that are 0-separating of degree 2 (Proposition 9) that may be intuitively best described by nested or incremental bruteforce: we use the Erdős-Ko-Rado Theorem  to obtain a combinatorial bound that allows us to buy time  from a relatively large number of models whose output process delivers then enough time to compute further, computationally more involving models that are stored and output afterwards.

The paper is organized as follows. In Section 2 we give the necessary preliminaries on complexity theory, propositional formulæ and clones of Boolean functions. In Section 3 we briefly look at model enumeration without order prescription. We treat the order of non-decreasing and non-increasing weight in Sections 4 and 5 respectively. We conclude in Section 6.

## 2 Preliminaries

### 2.1 Complexity Theory

For the decision problems the arising complexity degrees encompass the classes and . For our hardness results we employ logspace many-one reductions.

An enumeration problem can be formalized by a triple , where are the instances, is a function mapping each instance to its set of solutions and is a partial order (possibly empty) on the solution space. We say that an algorithm solves an enumeration problem if for a given input , generates one by one the elements of without repetition such that for all such that , outputs before .

An enumeration algorithm runs in polynomial delay if the delay until the first solution is output and thereafter the delay between any two consecutive solutions is bounded by a polynomial in the input size . We denote DelayP the class of enumeration problems that admit a polynomial delay algorithm and SpaceDelayP those problems in that are solvable within polynomial space.

### 2.2 Propositional Formulæ

We assume familiarity with propositional logic. For a propositional formula we denote by the set of variables occurring in . We represent an assignment usually as a tuple over or when convenient by the set of variables assigned to , i.e., the empty set corresponds to and to . A model for a formula is an assignment that satisfies . A non-trivial assignment is an assignment different from and . The complement of an assignment is defined as . We call a variable fictive, if the assignment can be extended to a model of if and only if so can the assignment . We denote by the formula obtained from by replacing all occurrences of with .

### 2.3 Clones of Boolean Functions

A Boolean function is an -ary function . For technical reasons we consider only Boolean functions of arity . It is not difficult but just technical to include also functions of arity into our considerations. We denote the -ary Boolean constants by and , respectively. When the arity is not relevant, we indicate them also by and , keeping in mind that they have at least one fictive coordinate. An -ary assignment such that will be called model of . A clone is a set of Boolean functions that is closed under superposition, i.e., it contains all projections (that is, the functions for all and ) and is closed under arbitrary composition. Let be a finite set of Boolean functions. We denote by the smallest clone containing and call a base for . In 1941 Post identified the set of all clones of Boolean functions . He gave a finite base for each of the clones and showed that they form a lattice under the usual -relation, hence the name Post’s lattice (see, e.g., Figure 1). To define the clones we introduce the following notions, where is an -ary Boolean function:

• is -reproducing if , .

• is monotonic if implies .

• is -separating of degree if for all of size there exists an such that implies , .

• is -separating if is -separating of degree .

• is self-dual if , where .

• is affine if with .

A list of some clones with definitions and finite bases is given in Table 1.

We will often add some function to a clone and consider the clone generated out of and . With Post’s lattice one can determine this quite easily: It is the lowest clone above that contains . We will use in particular the identities , , , , and .

A propositional formula using only connectives from is called a -formula.

###### Definition 1

Let be an -ary Boolean function and let be a set of Boolean functions. A -formula with is called -representation of if there is an index function such that it holds if and only if .

We note that such a -representation exists for every . We note further that, if does not contain fictive coordinates, then there is also a -representation for without fictive variables. We shall keep this in mind, since some problems we consider are not stable under introduction/elimination of fictive variables.

There is a canonical transformation of a -formula into a -formula, if : replace every connective in by its -representation. Though, this may lead to an explosion of the formula size. This can happen when a -representation for some uses some input variable more than once and is of linear nesting depth, see e.g. . We will nevertheless use this transformation idea in order to obtain reductions. This is possible since in the cases we encounter, we are always able to (re-)write as a formula of logarithmic nesting depth. We note that this is not possible in general. We call formulæ of logarithmic nesting depth compact.

## 3 Enumeration without Order Prescription

We begin by looking at the model enumeration problem without order prescription.

• a -formula

• generate all models of (without duplicates)

This problem has been studied in  considering -circuits instead of -formulæ. It is not difficult to observe that the algorithms from  also prove -membership for -formulæ for the clones , , and . But we have to slightly modify the hardness proof from  in order to deal with the issue of possible exponential blowup. Hardness of is inherited from , the non-trivial satisfiability problem for -formulæ (given a -formula, does it admit a non-trivial model , i.e., ?). A look at Post’s lattice shows us that if and only if either , or , or , or . The following proposition will therefore complete the classification.

###### Proposition 1

Let . Then is -complete.

###### Theorem 3.1

Let be a finite set of Boolean functions. Then is

1. -hard if ,

2. in otherwise (i.e., or or or ).

## 4 Enumeration by Order of Non-decreasing Weight

In this section we consider model enumeration by order of non-decreasing weight.

• a -formula

• generate all models of by order of non-decreasing weight

###### Proposition 2

Let or or or . Then .

###### Proof

The first three cases are easy. More interesting is the fourth case. Let be a -formula with variables. Since we are -separating, we know that there is a special variable, call it , such that any assignment with is a model. The number of assignments of weight with (which all are satisfying assignments, we call them therefore steady models) is , while the number of assignments of weight with is . Since the factor between and is polynomial, the output process of the steady models delivers enough time to determine in the meanwhile the set of unsteady models, that is, models of weight with . These can be stored and output afterwards. Note that this method uses exponential space. One can however obtain polynomial space (still maintaining polynomial delay) by not storing for each the whole set of unsteady models, but by starting outputting them while still outputting the steady ones.

Solving requires to efficiently solve Min-Ones, the task of computing a model of minimal weight. We will therefore inherit hardness from Min-Ones.

###### Proposition 3

Let or for an or . Then is -hard.

###### Proof

In the all three cases we reduce from Min-Ones(positive-2CNF) (-hard according to ). The second and third case are technically involving, where we deal with the -ary -threshold function.

###### Theorem 4.1

Let be a finite set of Boolean functions. Then

1. is -hard if for some or or ,

2. is in otherwise (i.e., or or or ).

We turn to the weighted variant.

The following method will deliver us several tractability results.

###### Theorem 4.2 (Priority queue method [9, 16])

Let be an enumeration problem. If it holds

1. for each , restricted to is total and computable in polynomial time in ,

2. it can be determined in polynomial time in whether is non-empty and if so, then is computable in polynomial time in ,

3. there is a binary function such that for all and for all holds:

1. is computable in polynomial time in

2. if then there is a such that and ,

then .

###### Proof

Correctness of the following algorithm is not difficult to observe.

1:  if  then return ’no’
2:  Q = newPriorityQueue()
3:  compute
4:  Q.enqueue()
5:  while Q is not empty do
6:      := Q.dequeue
7:     output
8:     compute
9:     for all  do
10:        if  then Q.enqueue()
11:     end for
12:  end while

The priority queue is supposed to eliminate duplicates. Note that this method may run in exponential space.

In order to apply the method to the partial order induced by the weight of assignments, it suffices to extend it to a total order, for instance by the lexicographical order on assignments.

Let or . Then .

###### Proof

In the first case a -formula can be seen as disjunction of variables and constants. All assignments are models, with the possible exception of . Thus, we reduce our problem to

• SubSetSum

• A sequence of non-negative integers

• generate all subsets by non-decreasing weight , where

This task can be solved in polynomial delay and polynomial space by a dynamic programming method if the weights on the variables are polynomially bounded . Otherwise, the priority queue method from Theorem 4.2 is applicable with .

In the second case a -formula can be seen as conjunction of variables and constants. If this disjunction contains a constant , then there are no models. Otherwise is the only model, up to fictive variables occurring in constants . Again, we reduce our problem to SubSetSum as in the previous case.

Let . Then .

###### Proof

Apply Theorem 4.2 with .

The following previously tractable fragment becomes intractable.

###### Proposition 6

Let . Then is -hard.

###### Proof

Via a reduction from , replacing by a fresh variable of big weight.

###### Theorem 4.3

Let be a finite set of Boolean functions. Then

1. is -hard if or or ,

2. is in otherwise (i.e., or or ).

## 5 Enumeration by Order of Non-increasing Weight

In this section we consider model enumeration by order of non-increasing weight.

• a -formula

• generate all models of by order of non-increasing weight

Analogously to Proposition 2 we obtain -membership for disjunctive, conjunctive, affine, or 0-separating formulæ.

###### Proposition 7

Let or or or . Then .

For monotone formulæ in general we apply once more the priority queue method.

Let . Then .

###### Proof

Apply Theorem 4.2 with .

We now address one of the rare cases where the priority queue method is not applicable and still we obtain tractability. We use for this the following classical result from combinatorics.

###### Theorem 5.1 (Erdős-Ko-Rado Theorem )

Let and be a family of distinct subsets of such that each subset is of size and each pair of subsets intersects. Then it holds

 |A|≤(n−1r−1).
###### Lemma 1

Let be an -ary Boolean function and let be an integer such that . Then the number of models of weight is at least .

Let . Then .

###### Proof

In a first step we give a description of the enumeration scheme for the weight range down to .

We start with weight : there is one such assignment which is also a model (all functions in are 1-reproducing). We continue with an inductive argument (for ): assume that we know for weight exactly the set of models . By Lemma 1, we have . The total time needed to output these models is something polynomial in . This delivers enough time to bruteforce all assignments of the next weight level : There are such assignments to be tested, and the factor between and is obviously polynomially bounded in . Summed up, while outputting (with polynomial delay) the models of weight , we can compute the set of models of weight . Repeated application of this allows to enumerate with polynomial delay all models in the weight range down to by order of non-increasing weight.

The models in the weight range down to can be computed and stored during the first step: When during the first step an assignment is tested, also test its complement, , which lies then in the weight range down to . If is a model, put it on a stack. After step 1 has finished, output all the assignments from the stack.

We turn to the intractable cases. Solving requires to efficiently solve , the task of computing a model of maximal weight different from . The hardness of this task will therefore deliver us hardness of . The hardness of is obtained from and the following problem.

• Inverse-Root-Weight-Sat

• a 3CNF-formula of variables

• does admit a model of weight ?

###### Lemma 2

Inverse-Root-Weight-Sat is -complete. It remains -complete if the number of variables is assumed to be a power of .

###### Proposition 10

Let or . Then is -hard.

###### Proof

In the first case we reduce from via and conclude with Proposition 1. In the second case we have a technically involving reduction from Inverse-Root-Weight-Sat.

###### Theorem 5.2

Let be a finite set of Boolean functions. Then

1. is -hard if or ,

2. is in otherwise (i.e., or or ), where for

Lastly, a look at the weighted variant, where we obtain only partial results.

Let or . Then .

###### Proof

Apply Theorem 4.2 with .

Let . Then .

###### Proof

Analogously to Proposition 5.

The following tractability indicates that also might be tractable. However, none of the above algorithmic strategies seems to work out.

Let . Then .

## 6 Conclusion

In this paper we provided complete complexity classifications of the problem of enumerating all satisfying assignments of a propositional -formula for every set of allowed connectives, imposing the orders of non-decreasing weight and non-increasing weight. We also considered the weighted variant, where the variables are assigned a non-negative integer weight. We obtained a complete classification for the weighted variant when imposing the order of non-decreasing weight and remained with one open case for the order of non-increasing weight when the connectives are -separating of degree . Interesting are the polynomial delay algorithms we obtained. They either relay on combinatorial bounds allowing a brute force approach, or on the use of a priority queue which necessarily leads to an exponential space usage. Future research could affront the open case, but should also investigate the question of exponential space: can it be avoided, or is it inherent to these problems, in particular to SubSetSum without polynomial bounds on the weights?

Acknowledgements. The author would like to thank Johan Thapper for combinatorial support.

## References

•  O. Beyersdorff, A. Meier, M. Thomas, and H. Vollmer. The complexity of propositional implication. Inf. Process. Lett., 109(18):1071–1077, 2009.
•  E. Böhler, N. Creignou, M. Galota, S. Reith, H. Schnoor, and H. Vollmer. Complexity classifications for different equivalence and audit problems for boolean circuits. Logical Methods in Computer Science, 8(3), 2012.
•  A. A. Bulatov, M. E. Dyer, L. A. Goldberg, M. Jalsenius, M. Jerrum, and D. Richerby. The complexity of weighted and unweighted #csp. J. Comput. Syst. Sci., 78(2):681–688, 2012.
•  N. Creignou and J.-J. Hébrard. On Generating All Solutions of Generalized Satisfiability Problems. ITA, 31(6):499–511, 1997.
•  N. Creignou, F. Olive, and J. Schmidt. Enumerating all solutions of a Boolean CSP by non-decreasing weight. In Proc. of 14th International Conference on Theory and Applications of Satisfiability Testing (SAT’2011), Lecture notes in computer science, pages 120–133, 2011.
•  N. Creignou, J. Schmidt, and M. Thomas. Complexity classifications for propositional abduction in post’s framework. J. Log. Comput., 22(5):1145–1170, 2012.
•  A. Durand, M. Hermann, and P. G. Kolaitis. Subtractive reductions and complete problems for counting complexity classes. Theor. Comput. Sci., 340(3):496–513, 2005.
•  P. Erdős, Chao Ko, and R. Rado. Intersection theorem for system of finite sets. Quart. J. Math. Oxford Ser., 12:313–318, 1961.
•  D. S. Johnson, C. H. Papadimitriou, and M. Yannakakis. On generating all maximal independent sets. Inf. Process. Lett., 27(3):119–123, 1988.
•  S. Khanna, M. Sudan, and D. P. Williamson. A complete classification of the approximability of maximization problems derived from Boolean constraint satisfaction. In STOC, pages 11–20, 1997.
•  B. Kimelfeld and Y. Sagiv. Incrementally computing ordered answers of acyclic conjunctive queries. In NGITS, pages 141–152, 2006.
•  H. Lewis. Satisfiability problems for propositional calculi. Mathematical Systems Theory, 13:45–53, 1979.
•  E. Post. The two-valued iterative systems of mathematical logic. Ann. Math. Stud., 5:1–122, 1941.
•  S. Reith. On the complexity of some equivalence problems for propositional calculi. In Proc. 28th MFCS, volume 2747 of LNCS, pages 632–641, 2003.
•  T. J. Schaefer. The complexity of satisfiability problems. In Proceedings 10th Symposium on Theory of Computing, pages 216–226. ACM Press, 1978.
•  J. Schmidt. Enumeration: Algorithms and complexity. Preprint (2009), available at http://www.thi.uni-hannover.de/fileadmin/forschung/arbeiten/schmidt-da.pdf.
•  H. Schnoor and I. Schnoor. Enumerating all solutions for constraint satisfaction problems. In STACS, pages 694–705, 2007.
•  C. Schnorr. Optimal algorithms for self-reducible problems. In ICALP, pages 322–337, 1976.
•  Y. Strozecki. Enumeration complexity and matroid decomposition. Phd thesis, 2010.
•  M. Thomas. The complexity of circumscriptive inference in Post’s lattice. In Proc. 10th LPNMR, volume 5753 of Lecture Notes in Computer Science, pages 290–302. Springer Verlag, 2009.

## Appendix A Appendix

 Proof of Proposition 1 Proof of Proposition 2 Proof of Proposition 3 Proof of Proposition 6 Proof of Lemma 1 Proof of Lemma 2 Proof of Proposition 10 Proof of Proposition 13

Proof of Proposition 1 ( is -complete if )

###### Proof

-membership is obvious. For the hardness, we give a reduction from the satisfiability problem for -formulæ. We know from  that is -complete if . Since , we conclude that is -complete. Let be a -formula with variable set . We construct . It is not difficult to verify that is satisfiable if and only if admits a non-trivial model. Note that and are in and have therefore a -representation. We transform into the final -formula by replacing the connectives and with their -representations. We avoid exponential blowup by a compact : write the -ary conjunction as a balanced tree of the binary conjunction .

Proof of Proposition 2 ( for , , , })

###### Proof

In the first case a -formula can be seen as disjunction of variables and constants. All assignments are models, with the possible exception of . We obviously can enumerate those assignments by order of non-decreasing weight by standard combinatorial methods.

In the second case a -formula can be seen as conjunction of variables and constants. If this disjunction contains a constant , then there are no models. Otherwise is the only model, up to fictive variables occurring in constants . Again we can enumerate those assignments by order of non-decreasing weight by standard combinatorial methods.

In the third case a -formula can be seen as linear equation over GF(2). Therefore, the set of models is either the set of assignments with an even number of non-fictive variables set to , or the set with an odd number of non-fictive variables set to . Again, all these models can be enumerated by non-decreasing weight by standard combinatorial methods.

The fourth case is treated in the paper.

Proof of Lemma 1 (Let be an -ary Boolean function and let be an integer such that . Then the number of models of weight is at least .)

###### Proof

Since the functions of are 0-separating of degree 2, the statement of this lemma is nothing else than a disguised form of the Erdős-Ko-Rado Theorem : Set and represent an assignment as subset of by the set of indexes of the coordinates which are set to . Then corresponds to the set of non-models.

Preparations for Proof of Proposition 3 ( is -hard if or for an or )

Let . Then .

###### Proof

We map to and to . The formula can be written as a -formula by replacing the connective by its -representation ().

###### Definition 2

We denote by the -ary -threshold function, . Define to be a complete -tree of depth .

###### Lemma 4

The formula

1. has arity ,

2. evaluates to whenever less than inputs are set to , and

3. evaluates to whenever more than inputs are set to .

###### Proof

Obviously has arity .

We prove the second statement by induction over . For we have and the statement holds by definition of . Consider then ). Assuming that none of the can be triggered with less than inputs set to 1, we observe that cannot be triggered with less than inputs set to 1.

The third statement follows from the second by the self-duality of .

###### Lemma 5

If for some with , then .

###### Proof

Let be an instance of , the number of variables in . Choose such that (i.e., ) and we obtain with Lemma 4 that has arity and size polynomial in and evaluates to whenever less than inputs are set to ().

Denote by the -formula obtained from by replacing each by its -representation. Exponential blowup does not occur since is compact. We finally map to , where and and the are fresh variables. One easily verifies that admits a model of weight if and only if admits a model of weight .

Proof of Proposition 3 ( is -hard if or for an or )

###### Proof

In the first case we have , so we obtain by Lemma 3 that . Since , we can reduce from Min-Ones(positive-2CNF) (-hard according to ) to by replacing every connective () by its ()-representation, avoiding exponential blowup by a compact representation of the multi-ary conjunction in the 2CNF-formula.

In the second case we have that , in the third case we have that . In both cases we obtain by Lemma 5 that . Since further in both cases it holds , we can reduce from Min-Ones(positive-2CNF) to by replacing every connective () by its ()-representation (avoiding exponential blowup by a compact formula).

Proof of Proposition 6 ( is -hard)

###### Proof

We give a reduction from , an -hard problem according to Theorem 4.1, since . Let be an instance of , the number of variables in . We map to , where , a fresh variable and . We set the weight of all variables from to and the weight of to . One easily verifies that admits a model of weight if and only if admits a model of weight .

Proof of Lemma 2 (Inverse-Root-Weight-Sat is -complete)

###### Proof

The -membership is obvious: guess an assignment of weight and verify whether it is a satisfying one.

By flipping all literals in an instance of Inverse-Root-Weight-Sat, we obtain equivalence to

• Root-Weight-Sat

• a 3CNF-formula of variables

• does admit a model of weight ?

We give a reduction from Min-Ones(3CNF) (-hard according to ) to Root-Weight-Sat. Let be an instance of Min-Ones(3CNF), let be the number of variables of .

• If we have , we set and and map the instance to .

Let . By definition of this implies that . That is, there is a model of weight . has variables. The model can be extended to a model of by setting additionally the variables to . This has then weight

 w(σ′)=w(σ)≤ℓ=√n′.

That is, .

Conversely, let . That is, there is a model with

 w(σ′)≤√n′=ℓ

Construct from by removing the assignments for the and we get that satisfies and . That is, and, since , .

• Else if , we set . One easily verifies that

 k+t=√n+t (1)

and that consequently

 √n+⌊t⌋≤√n+t=k+t

From the property that for we have one obtains that

 k+⌊t⌋=⌊k+t⌋=⌊√n+t⌋≤√⌊n+t⌋=√n+⌊t⌋ (3)

Set now and map the instance to .

Let . That is, there is a model of weight . has variables. The model can be extended to a model of by setting additionally the variables to . This has then weight

 w(σ′)=w(σ)+r≤k+r(???)≤√n+r=√n′.

That is, .

Conversely, let . That is, there is a model with . That is, . By construction of , we know that has to set all to . Thus, by reducing by the values for the , we obtain an assignment with . By construction of , we conclude that is indeed a model of . That is, .

To prove the second statement, add enough dummy variables to fill up to the next power of , be such that . Force the right amount of them to and the rest to in order to map models of weight to models of weight and models of weight to models of weight .

Proof of Proposition 10 ( is -hard if or )

###### Proof

In the first case we reduce from via and conclude with Proposition 1.

In the second case we give a reduction from Inverse-Root-Weight-Sat with the assumption that the number of variables is a power of . Let be an instance of Inverse-Root-Weight-Sat with variable set , where . We transform in several steps. We assume to be a compact -formula.

1. Since and , we can transform into a compact -formula by replacing the connectives with their -representations.

2. Set , where is a fresh variable and the -ary conjunction be represented in a compact way by the binary conjunction. Note that is now a compact -formula.

3. Since and , we can transform into a compact -formula by replacing the connectives with their