##### Citation preview

G.P. Gavrilov, A.A Sapozhenko

Selected Problems in

DISCRETE MATHEMATICS

MIR PUBLISHERS MOSCOW

selected Problems In

r n

raapUJJOB, A A. Canod\eHKO

C6opHIIJt aa~a'l MaTe)t3TitRe

no AJlChpeTIIOii

G.P. Gavrilov, A.A. sapozhenko

Mir Publishers Moscow

Translated from Rus.siaJl by Ram S Wadhwa and NatalJa V Wadhv.a FJrse pub1l5bed J 989 Rev1.sed froru the t 977 Ru.ssian e

ISISN 5 ·03·000522-6

~

r Jtallaast peAa11U.V.R tJluan«o- va te¥&Tn.qe~KOi. nu Tepa IY p~ ua.u;a ren ~cTJJa • Hay ;Kat , i 977

@ EngiJsh

trBllslat1on~ M1r Puhl~sbers,

1989

Contents

7

Preface Chapter 1. Boolean Functions: Methods of Defining and Basic Properties Ll. Boolean Vectors and a Unit n-Dimensi onal Cube i 2. Methods of Defining Boolean Functions . Elementar y Functions. Formulas. Superposi tion Operation i 3 Special Forms of Formulas. Disjunctiv e and Conjunctive Normal Forms. Polynomia ls i.4. Minimizat ion of Boolean Functions 1.5 Essential and Apparent Variables Chapter 2. i. 2.2. 2.3. 2.4. 2.5. 2.6.

2. Closed Classes and Completeness Closure Operation . Closed Classes Duality and the Class of Self-Dual Functions Linearity and the Class of Linear Functions Classes of Functions Preserving the Constants 1\lonotonicity and the Class of Monotonic Functions Completeness and Closed Classes

10 10

22 33 42 49 55 55

59 63 67

70 76

Chapter 3. k· Valued Logics 3.1. Represent ation of Functions of k-Valued Logics Through Formulas 3.2. Closed Classes and Completeness in k-Valued Logics

82

Chapter 4. Graphs and Networks 4.1. Basic Concepts in the Graph Theory 4.2. Planarity, Conn~>ctivity, and Numerical Characteristics Qt Graphs 4.3. Directed Graphs 4.4. Trees and Bipolar Networks 4.5. Estimates in the Theory of Graphs and Networks 4.6. Represent ations of Boolean Functions by Contact Schemes and Formulas

101

82 88

101 H{}

117 123 1.37 143

CONTE'lTS

t5S

Chapter 5 Fundamentals of Codlng Theoey 5 \ Codes w1tb Co-rretllon~ 5 2 Linear Codes

1.55 160

5 a A1phabe\tc Cod1ng

1'03

Chapter 6 Fi.o I te .Automatons 6 t Determinate and Boundedly D:eterm1nate Functions 6 2 Representation ol Determinate Funct1ons b_y Afoore D1agrams Canontcal Equat1ons Tatdes.and Schemes Operations In volvtng Detetm1na te Funetlons 6 3 Closed Cla~ses and Completeness In the Sets of Determanatt!

174 174

i87

and BlJundedly Determtnale Fune

206

llODS

Chapter 7 Fundamr;ntRls of the Algorithm Theory 1 I Tur1Dg s },faehln~s and Opera. t1ons "all th Them Funt1lons Cnmputahl~ an Turlng ! l\.1 ath1n~s 1 2 Classe~ ol Computable and Recurs1'e Functions 7 3 ComputabJltty and Comple1:~ty of ComputatJons

212

Chapler 8 Elements ol Combioat 2) and Boolean algebra The fourth chapter conta1ns problems on the theory of dlrected and undtrected graphs and the network and ctrcutt theory The chapter descr1bes the baste concepts methods and terms of graph theory v..h1ch are w1d~ly 1.1sed to de scr1he and 111Vest1gate the structural propert1es of obJects In various branches of sctence and technology TJ1e prob le-ms a.re intended t.o eonsolldate the bas1c concepts of graph theory to Illustrate the application of network and graph theory to the construction of cJrcuJts 1 epresent1ng Boolean functtons to count the number of obJects w1th a gtven geometrJcal structure etc The authors hope that the lecturer wtll also find problems 1n thts chapter to help h1m demonstrate the mathemattcal r1gor dur1ng the proof of geometrtcally ob-v1ous statements 'rhe fi(tb chapter des~tlbeS the baste concepts o[ c.od1ng tlteory The problems concern the properties of error cor rect1ng codes, alphabetJcal codes and m1n1mum redun dancy codes

The

chapter conta1ns problems demonstrating d1fierent ways of descr1btng d1screte transformers (automatons) Problems a1med at revealtng deternltntst•c and boundedly determinl.SlJc automatons are also gtven Other problems conc.~l"n the d1fierent ways of representing automatons (diagrams canonical equations and schemes (ctr CUlts)) the 1nvestJgat1on ol the funct1onal completeness and closure of sets of autontaton mapptngs and also the properties of operations Involving such mappJngs The seventh chapter deals Witll the elements oi algorithm theory and 1s Intended to provide an 1dea about effect1ve computabtl1ty and complexity of computations lt 18 also about eertaln ways fot spec1fy1ng algortthms SI>..tii

suclt as Tur1ng s maeh1oes and recursive functions !he e1ghtb chapter descr1bes the elements of co.mbtna

tor1al ~nalys1s \Vhtle studytng dtscrete mathemattcs one frequently comes across questtons concerning the ex1stence eount1ng and est•mat1on of v arJous combtna tor1al obJects Hence comblnator,al problems are 10 eluded In the book For the sake a[ c.onven1ence th~ authors have started each 5ecl1on uttb a theoretical background H1nts and answers are prov1ded far most (but not c;J.ll)

PREFACE

9

problems. Solutions are given in a concise form in the form of notes, and trivial conclusions are omitted. In some cases, only the outlines of solutions are presented. The exercises in the book have various origins. Most of the material is traditional and specialists on discrete mathematics are all too familiar with such problems. However, it is practically impossible to trace the origin of the problems of this kind. l\Iost of the problems were conceived by the authors during seminars and practical classes, during examinations, and also while preparing this hook. Some of the problems resulted from studying publications in journals, and a few have been borrowed from other sources. Sevel·al problems were passed on to us by staff at the Faculty and by other colleagues. The authors express their sincere gratitude to them all. The authors are deeply indebted to S. V. Yablonsky for his persistent interest during the preparation of this book. His comments and suggestions played a significant role in determining the structure and scope of this book. We are also grateful to our reviewers V .V. Glagolev and A.A. Markov for their critica.l comments and suggestions for improving the collection. G.P. Gavrilov A.A. Sapozhenko

Chapier One

Boo\ean Functions: Meihods of Defining and Baslc Properties

t.t. Boolean Vectors 1 and a Unit 1l-Dimensional Cube A vector (a1 a 2 an) whose coordtnates assume values from tJJe set ( 041 1} IS caJ led a blnary or Boo lean, veetor (tuple) We shaJI denote such a vector by ,.,; a• or t:L The number n 15 ~ailed the length aj the vettor The set of all Boolean vectors of length n 1s called a unlt n d1rnenslonal cube and IS denoted by nn The vectors a.n are called the verttces of the cube nn ~ """' The wnght or norm. ntzn H of the vector a,n. lS the nnm her of -coord1nates of thts vector that are equal to \'ln1ty. "t

,

~

/"'ftJ

n

U~,.,. U~ ~

1 t

at The set of all verttces of the cube

... ~,

B"

having a we1ght k ts eall~d k th stratum of tile cube 11" and IS denoted by B~ To each Boolean vector a" . ~

.,..,

,...,

there corresponds a number v (a.n) ~ ~ -~-J

ct. 12n- 1 1

cal ted

~

ltW

the number of the vector etn. The tuple et,. IS obviously ...... a blnary expans1on of tne number v (~n} The (Hamming) dt.stance between the verlltes a and P of the tube ;i"'V

,..)

s•

is the nurnhet p (a ..

,..,;

Pl ~

t\

~

[:;:;;.; I

,._

1a., ...... P1 (,

equal to tne

number of coord1.r1ates Jn wh1c.h they dJHer The Ham.. minR d1stance IS a....,metnc,,._ an 6 the cube B~ 1s a rnetr1c space The tuples o: and P from B" are called adJacent ~

II'V

ll p (cr., ~)

=

I"'V

1, and oppostte 1f p (at

1'-¥

p) =

n

An unor

T b.ls set.t~r.an 1s auxlliuy \V-e s.ha\1 h~ Ui>\.UI t\-n.\y pt~'h\~m!. I t i ·1 1 6 1 1 1f f ~ 14 • 1 1 f 5 t t 31 1 t 34 I t 35 and 1 i -" i t • I

t

11

1.1. BOOLEAN VECTORS

dered pair of adjace nt vertic es is called an edge of the cube. The set B~ (a) ..-= {~: ,....,p (a, ~) = k} is called a sphere, raof ball a is k} while the set S~ (a) = ,..., {~: p (a, ~) ~ ,..., dius k with a centre at a. The tuple an is said to precede "" ""71 "" the tuple ~n (notat ion: a ~ ~n) if a 1 ~ ~~ for all "' "" ""11 i = 1, n. If in this case a =1= ~n, the tuple all is said "' "' ""11 to precede ~ strictly (notat ion: a" < W'). If at least one of the relatio ns a 11 ~ ~n or ~ll ~ an is satisfied, a" and "" "" "' W' are called comparable. Otherwise, all and are said "" "" to be incomparable. The tuple a'' directly precedes W' if an < ~n and p (an, W') = 1. The precedence relatio n 11 • 8 in order l partia between the tuples is the relatio n of I" f"ooJ

v (y E9 a),

v (y)

II ~ EB y II , II ~ II > II y E9 a II, II y II > II~ EB ~ II , II ~ n l. 1.1.24 *. Let A s; B" be a set of all tuples such that ~ = 0 ~' y in A for which a a, there,..., are .....,no tuples ....., B~ I . Show that and aU ~ = y. Let ak = I A

m:.

n m:

n

I'V

l"o..

,...,

,....,

n

,...,

""

n

for all natura l numbe rs k and m that do not exceed n . ....., ....., "' 1.1.25. The set r (A)= {a: a EB"'-. ..A,p( a, A)= 1} 11 < • Let 1 ~ i B c A is called the boundary of the subset 1 i,, i,, . . . , ik tl A b t d . - n. UT < lk"'=:::: .2 < 1e cr,cr •.•. crk eno e y ne l

• • •

set of all tuples in A for which the coordi nate with numbe r ii is equal to u1 (j = 1, k). The centre of set A is define d as a tuple whose i-th coordinate is equal to zero for 1A~ I~ 1/2 I A I , and equal 1 1 1 k the tuple ob•• • • " ' ' ya noteb Wede ise. otherw unity to ....., tained from a by revers ing the values of coordi nates with numbe rs i 1, i 2, ... , ik. (1) Show that for any A s B" there exists an A' s; B" and I r(A) =I )I such that lA' I= lA I, lr(A' ....., the centre of A' is the vertex 0 = (0, 0, ... , 0). (2) We shall say that the set A s B" has the prope rty I if for all i = 1, n it follow s from;_ E A! that ~;EA. Show that for all A s; B 11 there exists a set A' with cenI"J •

2-osas

CH t BOOLEAN I"UNCT10'S

18

treat o. sueh that 1A"' 1 == I A I , A possesses the propc1ty l, and J r (A) l~ l f (A) l (3} \Ve s1tall say that tlte set A ~ possesses the property II if for all I, j (1 ~ l < J~ n) It follows from a EA!4i that a~,J EA Show that for any A havtng 1ts eentre at 0 and possesstng tho property I, there extsts an A' with tentrs at 0 pos.scssing tl10 properlles I, 1I, and such that ~ A J ~ f A J , and ' r (A') I ~ I r (A) J (4)• Show that the mlnimum of I r (A) I for all A ~ Bn Jllll-.l

nn

#IW

.....,.

~

l'ltl

~-1

the inequality

saUsfylDg

iJ ( 7)
~2~);

71 (2) 1p (n):::;; 2 (t ~ .1. . . . . .n) . . . Show that the number of sums n

iJ (- 1)~ 1 a,

e11 E{0

1), J = fn

1:~1 ')1

sattsfJ. Jng

the

con dJ lJOD

,

L: ( i r:J i-l

I

a, I~ l does

not exceed {(li;Zl) 1 I 44 Let A s;; nn I A J > 2n-1 Show that at least n edges of the cube are completely contained 1n A

1.2. Methods of Defining Boolean Func11ons. Elementary Funct1ons~ Formulas. Superpos1tao11 Operation f't-1

f"'IIJ

We shall aSSign tbe symbol :r:n (or x) to lhe tuple of Xn} and denote the set of the variables (.r, .:r2 var1ables by X 11 The funct1on j (ztt) whJch 1s defined on the set Ir and wh1ch assumes values from the set {0 1 J ts termed a Boolean (unt:t.wn We .shall denote the set of all Boolean functtons of vartables z- 1 Zn by Pt. {X") ,..,.. The Boolean functton I (.t") can be presented 1n tabular form T (/) (seo Table 1) Here the tuples a ar~ arranged ~

x.,

~

Table t ~

s

"'•

rn 1

0

0

0

0

(}

0 fl

0

0

t

i

1

l

2:,.,.

I(:.:, z,.

1 zJII}

0

OJ

{l

"J

\)

1

1

l)

0

0

f (0 1 \0 I (O

1

J {1

\.

"=n

Q

0)

1n a.scendtng order oJ the1r numbers Assum1ng such an arrangement to be the standard procedure .\Q the lol.,.

23

1.2. l\tETHODS OF DEFINING BOOLEAN FUNCTIONS

'""11

lowing, we shall defmo tho function I (x ) through the vee~ ~211 • , • tor (J../ = (rl 0 , (J.. 1 , ••• , (J.. 2n_ 1 ) m wh1ch the coordmat e

a

o ((x&y) Vz)) in the form x ) (xy V z). "il!ixe if' form of notati on is also used , for examp1e, X ffi f (y, z) or X1f (x 2 , 0, X3) V xtf (1, ~~ X3).

Cl:1 f

26

BOOLE.AN FUNCTJO'\S (ll.l)

Suppose that each funettonal symbol f, tn the set (nt) ¢1 has a corresponding funct1on F 1 B -.. ,. B !he concept of the junctlon fPw~ represented by j&rmula '}I gep.erated by the set ¢Jt IS defined by Induction

h 1 (1) rf ~ ==- h (X"Jti x 1•• , zJ.,.. ), t en /or each tup e 1 ((tl ~ ., a.n ) of values of the v.artables x, 1, 1 x; 1 x; the value of the funet1cn (fm lS equal "' u to F1 (aI a2 , ctn 1)' (2) Jf W::.;: I (l!! 1 \!z \! mJ, where fEd>, lllA = ~A (YA 1 y, 2 t YA•tc.) IS a formula generated by .P or a variable Jn X"' and on each tuple (etJ4lt a~~.. 2 , , ct.\,k) of the \Olues of var1abJes Y~tt-t Ykl-~~ , Ytt 1 ~ the function 1pw~ 1s equal tc ~4 (k ~ 1~ m}t then {n i)

cr 0' ((X tIt a 12

t

t

a 1I 1'

Ct At (%A 2'

'

' Clk 'l

, elm I '

am,,_)= F (~t; , ~tt~ ~ O.:m) (het"e F ts the functiOn correspond1ng to tho iunct1onal symbol f) If 'i'l = f~n~ 1 (x11 , XJ1 , . , ZJn ), '+'0' 1s usua.Uy denoted by 1 , ZJn. ) F, (x; 1 , Z 32 , If, llO\\ever, am21

,

I

'21 then rpg-

JS

=1(\1l

~2f

' ~m),

denoted by

F (~W 1 {y llt Y12.~ t Y 11 1 ) , Yrll• 11,)) ' ~it,... (Yml" Ym2' The co nee p t of the junctlon fJlw represented by formula 21 generated by the set of connect r1.-es 6 ts 1n trod uced a.s foJ lo\\ s (l) lbe formula 9l = x v.here :c EX 1.s JU'tl.aposed to tl1e tdenlllY funet1on f9.t (x) ~ z, (2) If W :;=; llfB) (or 21 = (lliOU) \\here 0 E {& V \$ ~, . . I t J), then cp 91 =: ~ (resp (j) J == 'Pa Offer~ \\ltere the .symbol 0 should now be consldered as the notatton for the correspond1ng elementary Boolean Cunctton see Tables 3 4) Let (.r1 z 2 ~ , z n} be a set of varJab]es ul11cli aro ellcountered Ill at least 008 Of the fonnu}as f! Or f8 F Ol(llu}as 1[ and ~ are called eguz"'alen.t fnota tton 21 :;::;

-

t

1.2. METHODS OF DEFINING BOOLEAN FUNCTION S

27

\:8 or 121 = ll:!) if on each tuple (a 1 , a:!l ... , an) of the values of variables x 1 , x 2 , • • • , Xn the values of functions !p~ and IP!8 represent ed by formulas ~ and 18 respectiv ely coincide. Let be a set of functiona l symbols (or sententia l connectives) , and P be the set of functions correspon ding to them. The superposition generated by the set P can be defmed as any function F that can be obtained through a formula of the set . 1.2.1. What is the number of functions in P 2 (X") that assume the same values on opposite tuples? 11 1.2.2. Find the number of functions in P 2 (X ) which assume opposite values on any pail· of adjacent tuples. 11 ) that (X P in functions of 1.2.3. Find the number 2 11 assume the value 1 on less than k tuples in 8 • 1.2.4. Using the functions f (x1 , x~) and g (x 3 , x4 ) specified in the vector form, write the function h in the vector form: ~

~

1) a 1 =(1011),

ag=(100 1), h (x 2 , x 3 , x~) = ,..., ag= (1001), ,....,

~

3) a 1 = (1000),

,...,

h (x 4) =

f (g (x 3 ,

x 4), x 2 );

f (x 1, x 2) V g (x 3 , x4);

ag = (0111), ,...,

h (x ) = f (x 1 , x2) & g (x3, x~). 1.2.5. Let v 1 be a number having its binary expansio n in the form of the tuple (x1 , x 2 ), and let v 2 be a number ,..., with its binary expansio n in the form (x 3 , x 4 ). Let fi (x4 ) be the i-th order of the binary represent ation of the numa rectangu lar table bet· I v 1 - v2 I , i = 1, 2.,..., Construc t ,..., (x4). /2 nl,2 of the functions /1 (x4) and ,...., 1.2.6. (1) The function f (x 3 } is defined as follows: it is equal to unity either for x 1 = 1, or when the variables X2 and x 3 assume different values while the value of the variable x 1 is less than that of the variable x 3 • Otherwise, the function is equal to zero. Compile the tables T (f) and nl,2 (f) of the function I (xa) and write down the tuples of the set N 1. 4

CH I

BOOLEAN FtJNCT J0"\l S ""-

(2) The funt\lon j (xt} 1s d~fiJ'~d as follo-V¥s 1t 1s ,.., equal to t.ero only on sucll tuples o:. == (a1 rx 1 ~ a.,""' a..,) that sattsfy the 1nequal1ty aJ + a 2 > aJ + 2cx, Com p1le the table T U) and wr1 te d ov, n the tuples of the set N 1 of thts function 1412.7. The funet1on f (zll) JS c.alled symmetrlc tf f (x1 , x!, ~ x~} == f (x. 11 x.h:' , .t1n) upon any sl)bstl~ l 2 ~

tUtJon (

IJ

n} ln

i•

r-.1

( t) Show that

1f

rw

tr a" U=

equaiJt:t ,..,

f (xn)

a syrometr1c func tton, the

IS

,..,..

~

U~,. J1 leads to the equal1 ty

f (ex") ===

I(~"}

(2) Ftnd the number of symmelr1t funct1ons tn P'J (Xn) ~

(n

Let I (xn) be an atbttrary Boolean funGlton

1~2~8 ~ f)

7

a symmetr1c functton m = 2 1 S(a.'") ~

'\ e associate w1th 1t

........,:

Ym)~

S(yi, !12 ,..,

11

/

(~ )

S

lxh

where .!lw

~

1f

Uam Jl = ' :J:,,

-

v (~n) Prove that , x2, , zl

Zt, .. _

11

I

F

'II'

2

Z times

1. 2.9. 'Vh1ch of the followJng expressions are form u )as genera ted by the set of sen tent 1al connect 1\ es

At/

f J.i(xntBI t!{~11.} ,...,

t1on q' obtained from f (x ) by tdenttfytng the var1ables z, and ZJ depends essentially on n- 1 variables {n~ 3) 1.51135 • Let the funct1on f (.tn) depend essen ttally on n var1ables Let v1 (a:) be the number of vert1ces ~ .for wb1ch f {a.)+ I (~} and p (a, Jl) = 1 Let v U} = max Vf (a) 11

.f"'t,

~

"""-J

~

"""-6

"'

t""'W

......

......

a(Btl

F1nd v (n for the fo]J oy, 1ng funct1ons f (1) j (xll) =:; z 1 \$ X 2 (13 ffi X 11 , (2) I (.xJI Cnt-"1) :::= (x1 V V xJt) & (zJl+l V V X2.k) & & (r.~~; C[n/~1 -I )+i V V Zl (n/Al), 1 ~ k~n, ~

'lv

_,

A

(3) j (z'l+Z ) = Ct4+ i+v (a:, Q.._) If ~ a~" a fl.~~~ ~ a~+ 1 ~t )\ where v («~ 1 her of the tuple (et1, • ,. a ~c)

N

lc.

.:z:~+'2i = (aJt t%2" ~a.") 1s the num

Chapter Two

Closed Classes and Completeness

-

2.1. Closure Operation. Closed Classes Let J}f be a certain set of Boolean functions. The closure [MI of the set M is defined as the set of all functions from P 2 that are superpositions of functions in the set JY!. The operation of obtaining the set [MI from M is called the closure operation. The set Miscalled a functionally closed class (in short, closed class) if [MI = M. Let M be a closed class in P 2 • The subset A in lvf is called a functionally complete system (in short, complete system) in M if [A I = ill. The set A of Boolean functions is called an irreducible system if the closure of any proper subset A 1 in A is different from the closure of 1 the entire set A, i.e. [A c [A] and [A I =I= [A]. An irreducible complete system in the closed class !vi is called the basis ,of the class M. The set 1W contained in the closed class M (among other things, in the entire set P 2 ) is called aprecomplete class in M if it is not a complete set in M, but the equality [ill' U {!}1 = M is satisfied for any function I E M"-M Functions f 1 and I 2 will be called congruent if one of them can he obtained from the other by a change of variables (without identification). For example, the functions .r and y :; are congruent while the functions .r ·y and z ·z are not. While considering questions concerning closed classes, it is convenient to indicate one representative each from the set of pairwise congruent functions. For example, the class {x, y, z, ... , x 1 , x 2 , • • • } formed by all identity functions will be denoted by 1

]

1

·y

lx).

11 If M is a certain set of functions, then M (X ) (or 11 M ) will denote a subset of all functions in JI;J depending only on the variables .r1 , :~: 2 , • • • , X 11 •

tH 2 CLOSED CLASSES A.Nn, c, 2, s=, = , ~ is satisfied for the sets 2 K 1 and K 2 (the relation ~means that none of the relations:::l, c, 2, s;, = is satisfied)? K2 = [Mtl n lM2l; (1) Kt = [Mt n lvl2l, K2 = (Mtl'-JM21; (2) K 1 = [Mt '-.,1vl2], M:~}l, K2 = [Mt U M2l (3) K1 = [Mt U (M2

n

n

(4} K1 = [Mt

n(M2

U M3)],

[Mt U M3l; M2l U K2 = lMt

n

n n

M3]; [Mt M2)), K2 = [.Mt)'-.,[Mt Mzl. (5) K1 = [Mt '-.,(Jvft 2.1.10. Let M 1 and 1vf 2 be closed classes in P 2 , such that M 1'-.,M 2 =I= 0. Give examples of concrete classes lv/1 and M 2 that also satisfy the following conditions:

n

(1) .MtnM2=0,

U\tlt UM2l= Mt U M2;

M2'-.....Mt=F0,

[Jv!l

UV!t '-.....M2] =/= lv/ 1 '-.....M 2 ; (3) Mt";:) M 2 , (4} M1 n M2 =1= 0. M2 "MI =1= 0. (5) M1

n M2 =I=

0.

M2 '- Mt =/=

uM2J =

M1 U M2;

[M1 '-.,M 2 1= Mt '-.,M2; 0, [Mt \$ M2l=

M 1 \$ M 2• 2.1.11. Isolate the basis from the set A that is complete for the closed class Jvl = [A I. (1) A = {0, 1, x, x}; (2) A = {1, X EB y EB z \$ 1 }; (3) A= {xVy, x·y·z, xVy·z, (xVy)·z}; (4*)A = {xED 1, x \$ y EB z, m (x, y, z)}; (5)A={xVyV z, x·y·z, (x )y) )z, (xVy) )oz}; (6) A = {(x ) y) )- (y ) z}, x V y V (y \$ z} }; (7} A = {x ·y, x V y, x , y, x \$ y ED z \$ u }. 2.1.12. Show that any precomplete class in P 2 is a closed class. 1

X%

By m (x, y, z) (or h2 (x, y, z)) we denote the function xy V majority junction). (or median the called yz 2 The sets 11re taken in P ~·

V

CU .2 CLOSED CLASS£5 ,Al"r.~ COl\JPLETE"'lESS

.58

2. t. 13~ Let AI1 ~nd AI2 be d1 fferent preeromplete classes 1n the same closed class J.lP Show that 1f At: -=# Jfl, then A:f! Jf! (1 e classes ft.f 1 and A! 2 tJ d 1fi Pr" even on a set of funct1ons that depend on only one var1ahle) 2.f41f4:. Enumerate all pretomplete classe.s 10 the clO!ed class Af y]f (t) ~f = (Ot il, (4) ~~ :: (0, l: (5) Af = CO, x y ·zJ (2) Af = [0, 11~ (3) A-/ == (z y), 2,. 1.1 S ~ Ve11fy 1( the r()l\ ow1 ng sets form. elose d el asses

+

v

P, (t) the set of all symmetric functions, (2) the set of all funct1ons f (x n ~ Ot sa t1sfy1ng the cond1 t1on f (0"') = f (1-n) = 0-', ,..,. (3) the set of all functions f (x11), n ~ t for wh1ch In

f"'aa

71

),

A.J

,..,.

IN,'~ zn-t

2. t. t 6. Show that If AI 1s a elosed class In P '" then IAI U {x}l= Af U {z) 2 .. 1. (7 Pt0Ve that the set P'" of all Boolean funttlons I

cannot be presented as a un1on

U

J.~f,

(s ~ 2) on patr

t,.-1

w1se non 1ntersecttng closed classes 1n P 1 2 .. 1.. tB~ Prove that any closed class tn P 2 contatntng a funct1on other than a constant also contains the funetton :z 2.t.t9~ Prove that If a closed class 1n P 2 has a fi.nlle bas1s~ then each basis of this cla.ss 1S finJte 2,. t ~20. 1-rlaJOri:te the power of the .set of all closed classes 1n P 2 eon taln1ng fi.n1te complete sets 2.1 .. 21. Prove that 1f a non~mpty closed class 1n P 1 d1ffers from the sets {OJt {1} and {0 1), 1t cannot be extended to a bas.ls 1n P 2 2~ ( 22 Let Jf be a closed class ln P 1 con tatn 1ng a fi n1te number of precomplete classes (1n ~tf) It 1s assumed t1la.t any elosr:d tlass 1n Jlf ean be extended to a precom plete class 1n Jll Prove that the number of functtons tn any bas1s of class 1/ does not exceed the number of pretomplete classes (1n '!) a

\Ve assume that

• 11 n

= {}

\ben

f

AI~ Pt lS a f"onstant

fun ct1 on of ::zero arguments

equal to zero consJdered as a

59

2.2. DUALITY

2.1.23. Prove that a closed class [x ~ y] contains only such functions in P n which can be presented (barring the notation of the variables) in the form x 1 VI (xx, x2, · · · • ,...,

x 11 ), where f (x ) E P 2 • ,..., 2.1.24. Let the function I (x11) belong to the closed class [x ~ y], and depend essentially on at least two variables. Prove that l N 1 l > zn-t. 2.1.25. Prove (without the help of Problem 2.1.18) that each precomplete class in P 2 contains an identity function. 11

2.2. Duality and the Class of Self-Dual Functions The function g (x 1 • x 2 ,

function I (x1 , x 2 , ~ •... ,

••• , X

x 11 ) is called dual to the if g (x 1, x 2 , ••• , X 11 ) = f (x 1 ,

--

••• , 11 )

X,,). By definition, the dual function for con-

stant 0 is constant 1 and, conversely, constant 0 is a function dual to constant 1. The function dual to I (x1 , x 2 , • • • , X 11 ) is denoted by/* (xi, x 2 , • • • , X 11 ). The following statement, called the duality principle, is true: if - x3) ) x,) )o • • • >ED( ••• ((Xn ) X1) (4}

J(; = 1 ED 11 )

E

>- X 11 );

• ••

>- X 11 )

X11 )

>-

)

xz)

x 1)

\$

~....

...

r

Xn-1);

i

Xi,Xi,Xi,?

i~i,r. ! (xn) IS called non·monotonlc The set of all monotonic: Boolean funct1ons \S d~noted by M, whlle th-e. set of all monoton1c functtons depend1ng on variables .t'1 't x 1 , ., Zn 1s denoted by The set AI 1s a closed and precom p]ete class 111 P 2 The following statement (lemma on a non monotonic junct1on) IS valid 1f f f1 M, substl\U\tons of the ft.tnc.trons 0 t, x for 1ts var1ables can lead to the funetton X The vertex a. of the cube B"' 1s ealled the lower urnty (upper uro) of the monotontc funet1on 1 (% 11 } 1f I (a} ~ t """ ,. (resp 1 (a) = 0) For any vertex ~' 1t follows from J} < a. that I (~) ~ 0 (resp f {~) = 1 follows from the eond1 tton a II a II, I '"""'

I'V

(a) = 1,

leads to the equality f (~) = 1? ~)* Suppose that for all k (0 ~ k < n} the conditions 2h f (ctn) = 1, v(~n) ~ 2n-1 _ 2h, V (~n) = v (~n} lead to the relation 1 (jfn) = 1. Prove that I (~n) E M. 2.5.9. Enumerate all functions 1 (;4) EM satisf.ying the following conditions;

+

72

CH 2 CLOSED CLASSES .AND COltfPLETENESS

i {1 r 0, 0,

0) ~ 1, I {Ot t. 1, 1) ~ 0, ,.... (2) I (11 0, 0, 0) :::=: 1, I (x4) E L~ {3) J (Ot 1, 0, 0) ::P j (1 t 0 t, 1)t I (x4) iS syrometr1c, (4) J (t, 0, 0, l) ~ 0, I E S 2.5 .. tO. Show that lf f {~) ts nQn monotontc~ there ex 1st tWO VeCtors C% 1 P 10 9n that d1ffer exactly IR ODe COOT...

(1)

~

~

,..,

lfll¥

~

#9tJ

,...,

"""'

d1nate, and for wh1eh a.< ~ but I (a) > f (~} .2.5.1 f. Show that the lunct1on /, whJcb depends essentially on a't least two variables" Js monotoniC tl and only If any (proper) subfunct1on of the funct1on I ts

monotonic 2.. 5.t2~ G1ve an example of a non monotonic functton i. = ,_ J (zn) whose each subfunclton of the type J,(xn)t r = 1, n. a € {0, 1 }., is monotontc How many of such functions depend (not always) essentially on the vartables of the set {x1, z 1 ') ... l zb }? 2415 .. 13. Shew that the funct1on J {.t'\;) 1s nl.on