• No results found

Generating all maximal independent sets : NP-hardness and polynomial-time algorithms

N/A
N/A
Protected

Academic year: 2021

Share "Generating all maximal independent sets : NP-hardness and polynomial-time algorithms"

Copied!
9
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Generating all maximal independent sets : NP-hardness and

polynomial-time algorithms

Citation for published version (APA):

Lawler, E. L., Lenstra, J. K., & Rinnooy Kan, A. H. G. (1980). Generating all maximal independent sets : NP-hardness and polynomial-time algorithms. SIAM Journal on Computing, 9(3), 558-565.

https://doi.org/10.1137/0209042

DOI:

10.1137/0209042

Document status and date: Published: 01/01/1980 Document Version:

Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers) Please check the document version of this publication:

• A submitted manuscript is the version of the article upon submission and before peer-review. There can be important differences between the submitted version and the official published version of record. People interested in the research are advised to contact the author for the final version of the publication, or visit the DOI to the publisher's website.

• The final author version and the galley proof are versions of the publication after peer review.

• The final published version features the final layout of the paper including the volume, issue and page numbers.

Link to publication

General rights

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain

• You may freely distribute the URL identifying the publication in the public portal.

If the publication is distributed under the terms of Article 25fa of the Dutch Copyright Act, indicated by the “Taverne” license above, please follow below link for the End User Agreement:

www.tue.nl/taverne Take down policy

If you believe that this document breaches copyright please contact us at: openaccess@tue.nl

providing details and we will investigate your claim.

(2)

SIAM J. COMPUT. Vol.9,No.3,August1980

1980 Society for Industrial and Applied Mathematics 0097-5397/80/0903-0009 $01.00/0

GENERATING

ALL

MAXIMAL INDEPENDENT SETS:

NP-HARDNESS AND POLYNOMIAL-TIME

ALGORITHMS*

E. L. LAWLERS", J. K. LENSTRA$ AND A. H. G. RINNOOY KAN

Abstract. Supposethat an independence system(E, )is characterizedbya subroutine whichindicates in unit time whetherornot agiven subset ofEis independent.Itisshown that there is no algorithm for

generatingall theKmaximalindependentsets ofsuch anindependencesystem in timepolynomialin

IEI

and K,unless V. However,itis possible toapplyideasof Paull andUngerandofTsukiyamaetal.toobtain polynomial-timealgorithmsfor anumberofspecial cases,e.g. the efficientgenerationofall maximal feasible solutionstoaknapsack problem.Thealgorithmictechniques bear an interestingrelationshipwiththoseof Read for the enumeration ofgraphsand other combinatorialconfigurations.

Keywords, independencesystem,satisfiability, maximalitytest, lexicography test, setpacking, clique, completek-partite subgraph, knapsack problem,on-time set of jobs,inequalitysystem, facet generation, matroidintersection

1. Introduction. LetEbe a finite set ofelements and let5 be anonempty family

of subsets ofE satisfyingasingle axiom" if 165 and

I’

___

I, then

I’

5. Under these

conditions,(E,5)is said to be anindependencesystem and5is itsfamilyofindependent

sets.

An

independentset

I

is said to be maximal ifthereis no

I’

5suchthat

I’

=

I.The

subsetsof

E

that are not contained in5 aredependentsets. AdependentsetJiscalled

minimal if

J’

foreach

J’

cJ.

Suppose

that

IEI-

n and that (E, 5) is characterized by a computer subroutine which indicates in unit timewhetheror notagiven subsetofEis anindependentset.All independent sets can be generated in

O(nll)

time: given an independentset,

O(n)

applications of the subroutine suffice to determine the next independent set in a

lexicographic listing. But suppose that one is interested only in all the maximal

independent sets,of which there are

K,

K

=< I 1,

These can befoundin timepolynomial

in n andK onlyin theunlikelyeventthat

,

as weshow in 2.

Thereare,however,anumberof special typesofindependencesystemsforwhich it ispossibletogenerateall the maximalindependentsetsefficiently.In 3,ananalysisof a procedure due to Paull and Unger

[5]

reveals that there is a polynomial-time algorithm for this purpose, provided that a certain subproblem can be solved in

polynomial time.

Improvements

inrunningtimeand storage requirements suggested by Tsukiyama et al.

[8]

are discussed as well. In 4, we investigate some of these

independence systems. Typical of these specialcases istheproblem of generatingall the maximal feasible solutions to aknapsack problem.

In

5,we examinetherelationship between our approach and a technique for the enumeration of graphs and other combinatorial configurations, recentlyproposed by Read

[6].

2. Complexity. Weshallshowthattheproblemofgeneratingallthe

K

maximal

independentsets of an arbitrary independence system isNP-hard, i.e., ifthereis an

algorithmfor theproblem whichrunsin timepolynomial in n and K,then there is a

polynomial-time algorithmforsolving the satisfiabilityproblem

[2].

*Receivedbythe editorsMay16,1978. This research waspartially supported bythe National Science FoundationunderGrant MC.S76-17605,andby NATO under SpecialResearchGrant 9.2.02 (SRG. 7).

"tComputerScience Division,UniversityofCalifornia,Berkeley,California94720.

MathematischCentrum,Amsterdam,The Netherlands.

ErasmusUniversity,Rotterdam, The Netherlands.

(3)

GENERATING ALL MAXIMAL INDEPENDENT SETS 559

Let F(X1,... ,XN) be a Boolean expression in conjunctive normal form. Let

E

{

T1,

F,.

,

TN, F},

and for any/"

{

1,

,

N}

and any

J

___

E,

define

true if

T/e J,

F.

J, xj(J)

false

if

F.

e

J,

T/

J,

undefined

otherwise. LetI if either

(i) thereexists a j

{1,.

,

N}

such that both Tjg

I,

F.

I,

or

(ii) each clause of

F

contains a letter

X.

or

X.

whose defined value is true, i.e.,

F(x(i),

Xl(I))=

true.

Itiseasilyseenthat(E,

)

is anindependence system.Moreover,

F

is not satisfiable if and onlyif the onlymaximalindependentsetsare

E-

{T., F.}

forj 1,...,N.

Assume

there exists ageneral procedure for generating all themaximal indepen-dentsetsof anarbitrary independencesystem withrunningtime

b

(n, K),where

b

is a

polynomial function of n and K. Apply this procedure to the independence system

definedabove and allow it to run for time

b

(2N,

N).ThenFis satisfiable if andonlyif either

(i) F(Xl(I),"’,

Xlv(I))=

true for somegenerated

I,

or

(ii) theprocedurefails to halt within theallotted time, establishingthatthereare more thanNmaximalindependentsets.

Forany givenJ

_

E,

the conjunctivenormalform

Can

beevaluatedin timeproportional

to itslength. Appropriatemodificationofthe unit-time assumption for independence testing thus establishes that the procedure solves the satisfiability problem in

poly-nomial time. Sincethe latter problem isNP-complete,it can besolvedinpolynomial

time if andonlyif

[2]. Hence,

wehavethe following theorem.

THEOREM1.

If

thereexists analgorithm

for

generatingallthemaximalindependent

sets

of

an arbitrary independencesystem in timepolynomialin n and

K,

then Aft.

To obtain a reduction to, rather than from, the satisfiability problem, we now consider the problem of generating all maximal independent sets and all minimal

dependentsetsof anindependencesystem. LettherebeLsuch sets.Weshallshow that

if there is apolynomial-time algorithm forthe satisfiability problem, then there isan

algorithm for generatingallthesesets in timepolynomialin n andL. Each stepof the latteralgorithm yieldsa new set onthe list.

Suppose

then, that at a certain point sets

Ia,...,

i

have been generated. Let

___

{1,...,

l}

indicate the generated sets which are maximal independent and

{1,.

,

l}-

thosewhich are minimaldependent.

Any

new setImustsatisfy

I:

Ii

for

all and

Ii

!forall

.

Formthe Boolean expression

(Ai.zV.,,rxl)

^

(Ai.V.,x.).

Thelengthof thisexpressionis O(nl)andbyourassumptionone candetermine if it is satisfiable in

6(nl)

time, for some polynomial function

6.

If the expression is not satisfiable, then =L and the algorithm terminates. Otherwise, construct a truth assignment inpolynomial time, by successively fixing thevalue ofeach variable and

determining if the reduced expression issatisfiable. Next define !

{/’IX.

true}

and test1 forindependence in unit time. If! isindependent, augment it until a maximal

independentsetresults; ifIisdependent,removeelementsuntil a minimaldependent setisfound.Eitherprocedurerequires

O(n)

time. SinceclearlyI#

Ii

for 1,

,

l,

I

(4)

560 E. L. LAWLER, J. K. LENSTRA AND A. H. G. RINNOOY KAN

THEOREM 2.

/f

N,

thenthereexists analgorithm

]:or

generatingallthemaximal

independentsetsand alltheminimaldependentsets

of

anarbitrary independencesystem in timepolynomialin nandL.

3. Analgorithm.

3.1. AgeneralizedPauil-Ungerprocedure. WenowassumethatE

{1,

,

n}

and thatindependence testing requirestime c.Letjbe thefamilyof allindependent

sets that are maximal within{1,

,/’}.

Bydefinition,

o

{}.

Weseek to construct from

-1

inordertoobtain

n,

thefamilyof allK independentsets that are maximal withinE.

Suppose

that I

i-1.

If I

U

{/}

,

then clearly I

U

{/}

i.

If I

U

{j}g

,

then I

i.

Itfollows that

Observingthattheelements ofEcanbe numberedarbitrarily,we obtainthefollowing result.

THEOREM 3. ForanyJ

_

E,

the number

of

independentsetsmaximalwithinJdoes

notexceedK.

.Suppose

that

I’.

and

/’el’.

Since I’-{j} is independent and included in {1,...,j-l}, there must be some

IN._I

such that I’-{j}c_L

Moreover, I’

is an

independentset that ismaximal withinI

LI

{/’}.

This observationsuggeststhefollowing proceduretoobtain

.

fromi_1,which is ageneralizationof analgorithm duetoPaull

and

Unger [5].

Step

1. For each I

._a,

find all independent sets

I’

that are maximal within

{/}.

Step

2. Foreach such

I’,

test

I’

formaximalitywithin

{1,

,

j}.Eachset

I’

that is maximal within

{1,

,

f}

isamemberof

.,

andwehaveseenthat eachmember of

.

canbe found in thisway.However,agiven

I’

maybe obtained from morethanone I

-1.

In

orderto eliminateduplications, weneedone further step.

Step

3. Rejecteach

I’

that passesthemaximalitytest if itappearsamong thesets

already foundtobein

.

Suppose

that in

Step

1, for eachI

-1,

atmost

K’

sets

I’

are found in time

c’;

by Theorem 3,wehave

K’

=<

K. Foreach

I’,

the maximalitytestinStep

2 requires

O(nc)

time, and the duplication test in

Step

3 canbe accomplished with

O(K)

pairwisesetcomparisons,eachofwhichrequires

O(n)

time.Itfollowsthat,for

fixed j,

O(c’K)

time suffices forthe firststep,

O(ncKK’)

timeforthe second step, and

O(nK2K

’) time for the third step. Thus, the overall running time to obtain

n

is

O(nc’K

+

n2cKK’+ n:KK’).

Thisyieldsthefollowingtheorem.

THEOREM 4. All themaximalindependentsets

of

an independencesystem canbe generatedin timepolynomialin n, cand

K,

if

it ispossibleto list inpolynomialtimeall independentsetsthatare maximal withinI(_J

{/’},

for

arbitraryI

_,

j 1,.

,

n.

In 4,weinvestigateseveral cases in whichthesubproblem referredtoinTheorem 4 (the "I

U

{j}problem")canbe solved inpolynomialtime.

3.2.

Improvements

of Tsukiyama et al.

A

techniquesuggested by Tsukiyamaet al.

[8]

enables one to eliminate duplications more efficiently. It yields significant improvements in both running time and storage requirements of the Paull-Unger

procedure.

Insteadofcomparinga set

I’

withallmembers of

5.

found previously,one retains

I’

onlyif it is obtainedfrom the lexicographically smallestI

_

from which it canbe

(5)

GENERATING ALL MAXIMAL INDEPENDENT SETS 561

Step 3’. Foreach

I’

obtained fromI

o,_1

thatis maximalwithin

{1,

,/’},

test

for each </’,

i’ I,

theset

(I’-

{/’})

(I

f3

{1,.

,

1})

t.J

{i}for independence. Reject

I’

ifanyof these testsyieldsanaffirmative answer.

If, indeed, any affirmative answer is obtained, then

I’-{}

is included in an

independentset that islexicographically smaller than

I,

and hencein alexicographically smallermaximalindependentsetfrom

5.-1.

Foreach

I’,

the lexicographytestin

Step

3’ requires

O(nc)

time,which isthesame as required by the maximalitytest in

Step

2.

Hence,

the overall runningtime of the

revisedprocedure is

O(nc’K

+

n2cKK’).

Possibly of even greater interest for some applications is the fact that storage requirements can be greatly reduced by organizing the computation as a depth-first

searchof a tree.Nodesat

level/"

correspondtomembers of5i,withthetreerootedat

,

theuniquememberof

5o.

Since foreach 16

5._,

eitherI

{/’}

5.

orI 5i,eachnode hasatleastoneandatmost

K’

children.Wheneverinthe depth-first searchamember of

5, isencountered,itisoutputted.The maximumnumberofsubproblemsthat must be maintained in stack to

allow

backtracking is

O(nK’).

A further decrease in storage requirements can beobtained atthe expenseof an increase inrunningtime.

4. Applications. Inthis section we investigatevariousindependence systemsfor which all maximalindependentsets canbe generatedinpolynomialtime.

4.1. Setpacking. Let Sbe a finite set with

[Sl

m andlet 5

{SI,"

Sn}

be a

familyof

(not

necessarilydistinct) subsetsofS.AsubfamilyI

_

5gis apackinginSifthe

sets inI arepairwise disjoint. Thepackingscorrespondto theindependentsets of an

independence systemwithE 5.Allmaximalpackingscanbegeneratedinpolynomial time, as shown below.

First considerthe "I kJ {j}problem". Let

A.

__

6consists of the sets

S

forwhich

Sgfq

S.

#

5.

GivenI

-1,

theonlysetswhich canpossibly bemaximalwithinI

tA {S;}

areIitselfand

(I

A.)

LI

{Si}.

Thus

K’

_-<2.Itfollowsthat,givenAi,the

ILI

{]}

problem

canbesolvedin

O(n)

time.

Assuming the sets

S

arespecifiedby orderedlistsofindices,one canfindthesets

A1, ’,

A,

in

O(mn

2)

time. Itfollows that

Step

1 requires

O(mn

2

+

n2K)

time.

The maximality test for

I’

is equivalent to verifying that I’fqAi# for all <j,Sd.gL Since each such test can be carried out in

O(n

2)

time,

Step

2 requires

O(n3K)

time.

The lexicography test is easily seen to be equivalent to verifying that

[I-(Aj f3 {Si+I,

Sj-1})]

["

Ai

# forall </’,

Si

L

Thus,

Step

3’ requires

O(n3K)

time aswell.

Itfollows that theoverallrunningtimeof theprocedureis

O(mn

2

+

n3K).

Since it ispossibletoimplement the searchtreein

O(n)

space,

O(mn)

spaceis sufficientoverall.

Suppose Y’

isinducedbyanundirectedm-edgen-vertexgraphGwithedgeset$.

Si

denotes the set of edges incident to vertex/" and

A.

denotes the set of vertices

adjacenttovertex].Theneach packingI

_

is anindependentorstablesetof vertices

ofG,or, equivalently,acliqueof thecomplementary graphG. Itwasin this contextthat thePaull-Ungerprocedure andthe improvements of Tsukiyamaetal. wereoriginally

proposed.

For

the graph problem,itisnatural forthe sets

Ai

tobe givenasinputinthe formof

orderedlists.Underthisassumption, andnotingthat

i=1

IA I-

2m,one canreducethe timeboundto

O(mnK)

andthe space boundto

O(m

+

n),asshownin

[8].

4.2. Completek-partitesubgraphs. Let Gbean undirectedgraphwith vertex set V

{vl,...,

vn}

and edge set S with

IS[

m. A complete k-partite subgraph of G is

(6)

562 E. L. LAWLER, J. K. LENSTRA AND A. H. G. RINNOOY KAN

defined by a collection

{V1,’’’, Vk}

of pairwise disjoint subsets of

V

such that {vi,

v.}e

$ for vie

Vg,

vie Vh, if and only if g h.

Note

that an independent set of

vertices defines acomplete 1-partite subgraph and thatacomplete k’-partite subgraph

is alsoacomplete k-partite subgraph for k k’+1,.

,

n.

The complete k-partite subgraphsofGcorrespondtotheindependentsetsof the

following independence system. Let

E

V

and let Ie if there exists a partition

P(I)

{V1,"

,

Vk}

ofI (i.e.,

U=I

Vh

I and

Vg f’l Vh

for 1<-- g

<

h _-<k) that defines a complete k-partite graphon L

We

will show how to generate all maximal

complete k-partite subgraphsof Ginpolynomialtime.

Again consider the

"/t.J{/’}

problem". Let

P(I)={VI,..., Vk,}

with

Vh

#

(h

1,...,k’)and k’<-k.,

First,suppose that{vi,

vi}

e

S

forall

v

e

L

Ifk’

<

k,thenthe single independentset

I’

that is maximal withinI

U {vi}

is!

LI

{vj}itself,with

P(!

t_J

{vi})

P(I)

t_J

{vi}.

Ifk’ k,

then there are k

+

1 sets

I’,

for which

P(I’)

is obtained by deleting any one of the members of

P(I)

t_J{vj}.

Suppose

now that

{v,

v}e

S only for all

v

e

V’h

_

Vh

(h 1,’",k’), where

V=

for

h=l,’’’,a,CV’hCVh

for h=a+l,...,b and

V=Vh

for h=

b +1,

,

k’, with 0=<a=<b<-k’ and b>0. In this case, b+l independent sets

I’

that are maximal within I

t_J{vi}

are defined by P(I’)=P(I) and P(I’)=

{

V’I,"’,

V’h-I,(

Vh--V’h)

U

{Vi}, V’h/,’’’, V’b,

Vb/l,’’’,

Vk,}

for h=l,...,b. In the special case that a=0, even more sets

I’

may exist. If k’< k, then the single additional set

I’

is definedby

P(I’)=

{

V’,...,

V’Vb/,’’

", Vk’,

{Vi}}.

Ifk’ k,then

there arek- b additionalset

I’,

forwhichP(I’)isobtainedby deleting anyoneof the sets Vb/l,’’’,

Vk’

from

{V’I,’",

V’,

Vb/,’’’, Vk,,

{vi}}. (Note

that these sets are notmaximal in thecasethat a

> 0.)

Since

K’= O(k)

and independence testing requires

O(m)

time, the overall running

time ofthe procedureis

O(n2mkK).

4.3. Knapsack problems. Next consider the knapsack inequality

--1

ajxi

<=

b,xi e

{0,

1}

(j 1,.

.,

n), where al=>a2=>"

->an

>0. Thefeasible solutions to this inequality correspond in a natural way to the independent sets of an independence systemwith

E

{1,

,

n

}

andIe5if

ix

ai

<=

b.

We

areinterestedingenerating all

maximal feasiblesolutions.

Consider the!

LI

{j}problem andassumethatI

LI

{j}

g i.

Feasibilityisrestored by removing any element h from I t.J{j}. Thus

K’

=<j, and the !U{j} problem can be

solvedin

O(n)

time.

For

a given!e

5_,

define

re(h)=

max

{i[i <

h,

i I};

let

amax

00.

A

set

I’

(I-{h})U{j}

(h

el)passes the maximalitytestifand onlyif

Y’.gx,

ai-b a,(i>b, andit

passes the lexicographytestifand onlyif

1ag-

ah

+

a,(h

>

b.

Moreover,

forall

I’

arisingfromI

LI

{/’},

thesetests canbecarried out in

O(n)

timealtogether.Itfollows that theoverall runningtime ofthe procedureis

O(n2K).

The unbounded knapsack inequality, in whichthe

x.

are allowed to takeon any

nonnegative integer value,isreducibletothe 0-1caseby introducing

2a.,

4ai,

,

2kai

intotheproblemin addition toai,where kisthesmallest integer such that

2k+lai

>

b.

Then

E

contains

O(n

logb)elements, and the algorithmis stillstrictly polynomial. 4.4. On-time sets of jobs.

Suppose

there are njobstobeprocessed,one at atime, byasingle machine startingat time 0.

Job/"

requiresanuninterruptedprocessing time of

punitsand hasadeadline

dr.

Let

E

{1,

,

n

}

and let

I

e ifall the jobsinIcanbe scheduledforcompletion bytheir deadlines.Itiswellknownthatsuchascheduleexists if and only if the jobs in I are all completed on time when sequenced in order of

(7)

GENERATING ALL MAXIMAL INDEPENDENT SETS 563 Again consider the I

U

{j}problem and assume that I

U

{/’}g5j. In thiscase, we have

,ixPi

+Pj>

di.

Independence is restored by removing job j from

I

(.J{j} orby removingsomejobsfromIsuch thatjobj, which can beassumedtoremain in the last

position,iscompletedontime. Itfollows thatsolving theI

LI

{j}problemisequivalent

to finding all maximal subsets

H

_

I such that

iHPi <=

di-pi, which can be

accom-plished by applying the knapsackprocedure of 4.3. ByTheorem 3, the number of maximalsubsetsHdoes not exceedK-1.HencetheI(A{j}problemcanbe solved in

O(neK)

time.

Since maximality and lexicography tests require

O(n)

time, it follows that the overall runningtimeoftheprocedureis

O(n3K2).

4.5. Inequality systems. Theproblemsconsidered in 4.1, 4.3and4.4canallbe viewed a special instances of the general problem of finding all maximal feasible solutions to aninequalitysystem of theform

Ax

<=

b,xi

{0,

1}(j 1,

,

n),wherethe m n-matrixA (aij) and the m-vector b (bg) have nonnegative components.

Forexample, givena et$

{1,

,

m}

andafamily 6e {$1,

,

Sn}

of subsets of $, define aii-- 1 if $i,a0 0 otherwise.

In

the case that bg 1 (i 1,...,m), the maximal feasible solutions correspond to the maximal packings in

S;

they can be generated in polynomial time, as has been shown in 4.1. In the case that

bi-i-_la0-I

(i=l,...,m), the maximal feasible solutions correspond to the

complements of the minimal coverings of S.

We

have not been able to devise a

polynomial-time algorithm for this problem. Nor have we been able to obtain an

NP-hardnessresult similar to Theorem 1 for this case or even forageneral inequality system, although we conjecture that no polynomial-time algorithm exists unless Forthe scheduling problemdiscussed in 4.4,wehavem n, aii Pif >-- j, ai 0

otherwise,and bg dg (cf.

[4]).

Thesametechnique asabove can beappliedto aslightly

wider class of inequality systems, where b is an m-vector with nondecreasing componentsandAis a nonnegativern n-matrixsuchthat

(i) aii

>

0implies aij,>0forall j’<j, and

(ii) the strictly positiveentries in eachcolumnarenonincreasing.

Inthiscase, theI

U

{/’}

problemwithI

U

{/’}

5i

canbesolvedby applying the knapsack procedure of 4.3tothe constraint ofsmallestindexh such that ahi

>

O.

Any

maximal

subset ofI

ID

{j}that satisfies constrainth willthen satisfytheremaining constraintsas

well.

Thereadermaybeableto constructotherexamplesin which a certainpropertyof Apermitsone to restrict attention to asingleconstraintwhenindependence hastobe restored. Ineachsuchcase, theknapsack procedurecanbe appliedtosolvetheIt_J{j}

probleminpolynomialtime.

4.6. Facetgeneration. Consider theconvexhullP of all 0-1 vectors x satisfying

the general inequality system

Ax

<-b, where A->_0. Balas and Zemel

[1]

have established acorrespondence between the

facets

ofPandthe minimal covers of

A,

i.e.

theminimal feasible solutions to

Ax

;

b. Such coversarein one-onecorrespondenceto the maximal feasible solutions to

Ax’

;

b

’,

where b

==1

ai-b-I

(i= 1,...,m),

under the assumption that all dataareintegers.

Thus, in order to generate the facetsof

P,

it suffices togenerate the K maximal feasible solutions to

Ax’;

b’.Thisinequality systemcanbeconsidered asthe

disjunc-tion

of

m knapsack inequalities

--1

axi (i 1," ",m),theithsuch inequality

having

Ki

maximal feasible solutions.

In

the casethatm 1, the procedure of 4.3can

(8)

564 E. L. LAWLER, J. K. LENSTRA AND A. H. G. RINNOOY KAN

followingprocedure mayhave somepracticalvalue,eventhoughitis notpolynomialin K.

A

maximal feasible solution to the entiresystem hastobefeasibleand maximal withrespectto atleast oneof the separate inequalities.Theprocedureof 4.3 isnow

applied to each ofthese inequalitiesin turn.

However,

amaximal feasible solution to

inequality isacceptedas amaximal feasible solution to Ax’;b’ onlyif it is (i) infeasible for eachofthe inequalities 1,..., i-1,and

(ii) infeasible or maximalfeasibleforeach of the inequalities

+

1,..., m.

It is not hard to see that thisprocedure generates all minimal covers without

dupli-cation.

Forinequalityi,applicationoftheknapsackprocedurerequires

O(n2Ki)

time,and conditions (i)and (ii)canbecheckedin

O(mn)

time foranycandidatesolution, or in O(mnKi) time altogether. Itfollows that the overall runningtime of theprocedure is

O((rnn +n

2)

.Ki). Unfortunately, there exist inequality systems for which

Ki

is

exponentially relatedtoK. Forexample,inthe simplecasethatm n 1,aij 1,

b

(i 1,..

,

m, j 1,.

,

n),wehave

Ki

(i)

(i 1,.

,

m),

.

Ki

2 1,and

K

n. Forsomespecialcases,truly polynomial-time algorithmscanstillbe obtained.For

example,suppose

A

issuch thatthe entries ineachrow are monotonenonincreasing. If

ILI

{j}

,

then removal ofanyelement fromI

U

{j}restoresfeasibility,sothat

K’

<=

n.

In

analogy to the above approach, one might view a general inequality system

Ax

<=

bastheconjunction of m knapsack inequalities.Inthiscase,however,amaximal feasible solution tothe entiresystem can be feasible but nonmaximal with respectto

eachof theseparate inequalities.Itseemshardtomakeany significantprogressbeyond the special casesdiscussed in 4..5.

4.7. Matroid intersections.

A

matroidM (E,

)

is anindependence system such

thatforallJ

___

E,

allindependentsets maximal withinJhavethe samecardinality

[3].

Given rn matroids

Mi

(E,

)

(i 1,

,

m) withE

{1,

,

n},

their intersection (E,

)

is anindependence systemdefinedby f’l

%

i.

Weareinterested in generat-ing allmaximal independentsets in(E, ), assuming that independence testingin

M

requires

timeci

(i=l,...,m).

Considerthe!

U

{j}problem. If!

U

{j}

.,

then addition of j must havedestroyed independencein someof themmatroids, say,inM1,

,

Ml.

Each of these matroidsM,.

contains a unique minimal dependent set or circuit Ci, and independence in

Mi

is

restored by removing anyoneelement from

C.

It follows that, in order to solve the

ILI

{j} problem, it is necessary to find all minimalsubsets of

LI

i--1Ci

that contain at least oneelement fromeachcircuit, i.e., all minimalcoverings of(C1,

,

C).

In

viewofour remark in 4.5,wesettlefor a brute

forceapproach:consideralln possiblesolutions. Thisyieldsanoverallrunningtime of

O(nm+2K

ci),whichis,atleast, polynomial forfixed m.

Forcertain special cases, e.g. the generation of all spanningtrees

[7],

thespecial

structure ofthesystem can beexploited and significant improvements made.

5. An enumeration procedure of Read.

We

conclude by noting a relationship betweenourtechniques and thoseproposedby Read

[6]

fortheenumeration ofgraphs, digraphs, andother combinatorialconfigurations.

We

restate theessential features of Read’sprocedurein our terms, asfollows.

The family

5.

is to be obtainedfromthefamily j-1 by applyingan augmentation operation to eachsetin

3_1.

Thesesets areprocessedin a canonical linearorder

"<"

(9)

GENERATING ALL MAXIMAL INDEPENDENT SETS 565

each

I’

6i,let

f(I’)

denotethe first set in

-1

whichproduces

I’

whensubjectedtothe augmentation operation.

Suppose

that thecanonicalorderis weaklymonotonic inthe

sense that for all

I’, I"

j,

I’<I"

implies

f(I’)<=f(I").

Then it is simple to avoid

duplications:whenapplyingtheaugmentation operation, retainthe next setproduced onlyif itfollows the member of5j that has been obtainedlastly.

Consider, forexample,how thisprocedureis applied by Readto generateallthe nonisomorphic digraphs onfive vertices. The nondiagonal elements of the adjacency

matrix are written as astringof20bits, which can beinterpretedas abinary integer. A canonical digraph is one which has the largest such integer of all digraphs in its

isomorphism class, and thisinteger is itscode. Let

5.-1

be the familyof all canonical

digraphswith j- 1arcs;theircodes specify thecanonicallinearorder.Foreach!

._

1,

theaugmentation operation produces digraphs

I’

with/"arcsby systematically changing

a0 to a 1 in the 20-bitrepresentationof

L

Each such 1’istested for canonicity. Each

I’

that passes the canonicity test is added to thelist

.

if and only if itscode is strictly greaterthanthatofthemostrecentlyobtainedmember of

i.

Itcanbe shown that the

property ofweakmonotonicityis satisfied.Thus, allcanonicaldigraphswith j arcs are

generatedin thisway,withoutduplication.

We have been unable to devise a weakly monotonic ordering for the problems

considered in this paper. The lexicography test of Tsukiyama et al. is, in effect, an alternative toRead’s technique for eliminating duplications andamounts toan analysis of the inverse of the augmentation operation. That is, when

I’

is obtained from I

,-/-1, I’

isretainedonlyif

f(I’)

L

where

f(I’)

denotesthelexicographically smallest

setin

5.-1

whichproduces

I’

whensubjectedto the augmentation operation.

REFERENCES

[1 E. BALASANDE.ZEMEL,All thefacets ofzero-one programmingpolytopeswith positivecoefficients, ManagementSciencesResearchReport374, Carnegie-MellonUniversity,Pittsburgh, 1975.

[2] S. A. COOK, The complexity oftheorem-proving procedures, Proc. 3rd AnnualACM Symp.Theory Comput.,(1971),pp. 151-158.

[3] E.L.LAWLER,CombinatorialOptimization: NetworksandMatroids, Holt, Rinehart andWinston,New York,1976.

[4] E.L. LAWLERANDJ.M. MOORE, Afunctionalequationanditsapplicationtoresourceallocationand

sequencingproblems,ManagementSci., 16(1969),pp. 77-84.

[5] M.C. PAULLANDS.H. UNGER,Minimizingthe numberofstatesinincompletely specified sequential

switchingfunctions,IRE Trans.Electron.Comput.,EC-8(1959),356-367.

[6] R.C.READ,Everyone a winner,orhowtoavoidisomorphism searchwhen cataloguingcombinatorial

configurations,Ann.DiscreteMath, 2(1978),pp. 107-120.

[7] R.C.READANDR. E.TARJAN,Bounds onbacktrack algorithmsforlistingcycles, paths, andspanning trees,Networks, 5(1975),pp. 237-252.

[8] S. TSUKIYAMA, M. IDE, M. ARIYOSHIANDI.SHIRAWAKA,A newalgorithmforgenerating allthe

Referenties

GERELATEERDE DOCUMENTEN

wichuraiana het meest resistent (Ohkawa en Saigusa, 1981). Recentere inoculatieproeven zijn uitgevoerd in Duitsland met twee weken oude zaailingen van R. tomentosa en vijf weken oude

Op basis van een recente scherf in spoor 11, één van de sporen die doorsneden wordt door de greppel, kunnen ook de greppels worden gedateerd in de nieuwe tijd.. Naast

The proposed combination of linear precoding and OSTBC applied to several transmit antennas leads to an efficient ex- ploitation of space, time and frequency diversities in

In this paper, our goal is to establish the well-posedness (in the sense of existence and uniqueness of solutions) for systems that arise as interconnections of passive

Given the failure of using the sGoldstino square mass in the N = 8 theory, the fact that N x u P x is an eigenvector for certain scalar geometries and the fact that the scalar

D = 26 for bosonic string theories. This constraint follows from demanding the cancellation of an anomaly term in the commutator of two of the Lorentz generators, namely J i− and J

Furthermore, as a consequence of the characterization obtained in Chap- ter 3, we describe in Chapter 4 when a semigroup algebra of a submonoid of a polycyclic-by-finite group is

For observing that the induced action of the abstract Weyl group on the set of all Weyl chambers is free, one just needs to note that according to 2.4.4 the action of the abstract