• No results found

A Complexity Consideration

Example

With the specification of the transformation of model M2 into model M1, we are now able to reformulate the configuration problem of section 3.2 as a problem that is solely based on functionalities and their computation. Figure 3.6 describes the configuration problem as an and-or-graph.

S B A C A1 A2 B1 B2 C3 D C1 C2 C1 C2 (1..2) (1..2) o o o o o o And node Or node

Figure 3.6:The configuration problem of section 3.2

Here, we will not perform this transformation explicitly; the necessary transformation steps were specified above. Note that in the reformulated problem the structural dependencies between the objects must be derived from their properties.

Figure 3.7 shows the reformulation of the configuration problem and illustrates in which way the transformation of M1 into M2 comes into ef- fect. The transformation of the above rules yields eight new functionalities

g1, . . . , g8. In the figure, both functionalities and configuration objects are

vertices; an edge(oi, gj)indicates that the objectoihas the functionalitygj

in its property set.

3.5

A Complexity Consideration

Although we did not specify an algorithm for any of the above problems CONF, FINDCONF, etc., we present in this section a result regarding the computational complexity of CONFunder model M1 and M2 respectively. Note that (i) all other problems under one of the above models are at least as hard as CONF, and (ii) all problems under model M3 are at least as hard as their equivalents under model M1 and M2 respectively.

Object Functionality S B D C A height A1 C3 B1 A2 B2 C2 C1 g5 g8 g7 g6 g4 g2 g3 g1

Figure 3.7:The new dependency graph

Theorem 3.16 (NP-Completeness ofCONF). Problem CONFunder model

M1 or M2 is NP-complete.

Lemma 3.17 (NP-Completeness ofCONFR). Problem CONFwith restriction

rules (CONFR) under model M1 or M2 is NP-complete.

We first prove the lemma, then the theorem.

Proof of Lemma. LetΠM2 be any instance of CONFR. Clearly, CONFR

NPsince a nondeterministic algorithm need only to guess a configuration

C =I, Qand check in polynomial time whether this configuration is a solution ofΠM2.

We transform 3SAT (which is NP-complete, Cook, [12]) to CONFR. Let X ={x1, . . . , xn}andZ ={c1, . . . , cm} be any instance of 3SAT where X is the set of variables andZ is the set of clauses. We must construct a configuration problemΠM2=O, F, V, P, A, T , D, N, Rsuch thatΠM2

has a solutionC=I, Qif and only ifZis satisfiable.

The key idea is to transform every clause into a logically equivalent restriction rule. This is established as follows.

1. With every variablexiwe associate an object of the same name and a

3.5. A COMPLEXITY CONSIDERATION 71 2. The value set of a functionality fi is the set vfi = {1,2}, for each

1≤i≤n. LetV ={vfi|1≤i≤n}.

3. The property set of an object oi is the setpoi = {(fi,1)}. LetP = {poi|1≤i≤n}.

4. For everyfi∈F the addition operatorafi is defined asafi(x, y) = 2,

ifx=y= 1; in all other casesafiis undefined.

5. With each functionalityfiwe associate a testtfi(x, y)≡x≤yfor all x, y∈vfi. LetT ={tfi |1≤i≤n}.

6. The demand set is defined asD={(f1,1), . . . ,(fn,1)}.

Note that ifC=I, Qis a solution ofΠM2, then the definition ofA,D,

andTimply that every objectximust occur either once or twice inI.

The set of restriction rules is constructed as follows. Letci=li1∨li2∨li3

be a clause ofZwherelij is a literal overX, for1≤j 3and1≤i≤m.

Define

τ(lij) =

[1, xij], iflij is a positive literal; [2, xij], iflij is a negative literal.

Note thatciis logically equivalent to¬li1 →li2∨li3. Therefore we associate

withcithe ruleri=τ(¬li1)→τ(li2)∨τ(li3). For example, ifci=x2∨¬x4 x5, thenri= [2, x2][2, x4][1, x5]. It is obvious that this transformation

can be made in polynomial time.

First, suppose thatα: X → {True,False}is a satisfying truth assign- ment forZ. It is easy to see that the following configurationC = I, Q

fulfills all demands and satisfies all “restriction rules”:

I={b(xi)|1≤i≤n} with b(xi) = (1, xi), ifα(xi) =True; (2, xi), ifα(xi) =False. and Q={(f, c(xi))} |1≤i≤n}, with c(xi) = 1, ifα(xi) =True; 2, ifα(xi) =False.

Since every ci is logically equivalent to its transformed rule ri it is

rulesr∈Rare satisfied, which can be seen from the definition ofb(xi). To

see that the demands are also fulfilled, one should note that every object

xioccurs inIwith either property(fi,1)or(fi,2)and that, therefore, the

demanddi= (fi,1)is fulfilled.

Conversely, suppose that C = I, Qis a configuration which fulfills all demands and which is satisfying for the rule setR. Since it fulfills all demands, it follows that each objectxi occurs exactly once or twice inI.

Therefore, every ruler ∈Rcan be applied in some manner. Since every ruleri is satisfied by the assignmentαI it follows that its corresponding

clausecimust also be satisfied.

Proof of Theorem. LetΠM1be any instance of CONF. Clearly, CONFNP

since a nondeterministic algorithm need only to guess a configurationC=

I, Qand check in polynomial time whetherCis a solution ofΠM1.

We transform CONFRto CONF. Here we make use ofTheorem 3.14, which

states that everyΠM2CONFR is equivalent to aΠM1CONF. The only

point that remains to be shown is that the transformation used in the proof ofTheorem 3.14can be made in polynomial time.

Here we can restrict ourselves to 3CONFRwhose instances contain only

rules of the formr = [k1, oi1] [k2, oi2][k3, oi3]. Clearly, 3CONFR is

NP-complete since every instance of 3SAT is transformed to an instance of 3CONFR(withki∈ {1,2},1≤i≤3) in the previous proof.

LetRbe a rule set with 3-element rules. It is obvious that CNF(r) ={r}

for every ruler∈ R. That means, no rule transformation must be made. One can also easily check that all other transformations from 3CONFR to

Part II

Operationalizing Configuration Tasks

Chapter 4

On Property-based Configuration

The main theme of this chapter can be summarized with the following quotation:

“Models of design processes provide guidance in the development of knowledge-based systems for design. The basis for such models comes from research in design theory and methodology as well as problem solving in AI.”

Maher, [48], p.49

—chapter 2 and 3 presented a classification and a formalization of different component models. Now we shall concentrate on a particular function- based component model: the property-based component model. We will show how this component model can be used to develop efficient configu- ration systems.

The chapter is organized as follows.

Section 4.1 discusses the philosophy and general characteristics of the property-based configuration approach. Section 4.2 presents a basic algo- rithm that realizes different configuration tasks. Section 4.3 shows how the basic configuration algorithm can be improved by the use of metaknowl- edge. The last section gives a short description of MOKON, a configuration system that realizes the concepts and algorithms outlined.

4.1

The Rationale of Property-based