Selected Problems in Discrete Mathematics [Rev. from 1977 Russian ed] 5030005226, 9785030005225

Text: English (translation) Original Language: Russian

194 90 20MB

English Pages 414 [424] Year 1989

Report DMCA / Copyright

DOWNLOAD FILE

Polecaj historie

Selected Problems in Discrete Mathematics [Rev. from 1977 Russian ed]
 5030005226, 9785030005225

Table of contents :
Front Cover
About the Book
Title Page
Contents
Preface
1. Boolean Functions: Methods of Defining and Basic Properties
2. Closed Classes and Completeness
3. k-Valued Logics
4. Graphs and Networks
5. Fundamentals of Coding Theory
6. Finite Automatons
7. Fundamentals of the Algorithm Theory
8. Elements of Combinatorial’ Analysis
Solutions, Answers, and Hints
Bibliography
Notations
Subject Index
About the Authors
Back Cover

Citation preview

C.R Gavrilov, AASapozhenko

Selected Problems

fn Discrete Mathematics Mir Publishers Moscow

ABOUT THE BOOK

This collection of problems was compiled for students and teach­ ers at university level education­ al institutions. It contains prob­ lems on Boolean algebra, ^-val­ ued logics, the theory of graphs and combinatorics, coding theo­ ry, automata theory, and the theory of algorithms. The prob­ lems include simple ones for those beginning with discrete mathematics, and more difficult ones that stimulate a better grasp of a subject. The theory of dis­ crete mathematics is presented in Introduction to Discrete Math­ ematics by S. Yablonsky.

Selected Problems In Discrete Mathematics

T. II.

FaBpHJiOB,

A. A.

Cano?KeHKo

CSopHHK aa a ay no AHCKpeTHoii MaTeiwaTHKe

H3AaTejibC^BO «HayKa» MocKBa

C.R Gavrilov, AASapozhenko

Selected Problems in Discrete Mathematics

Mir Publishers Moscow

Translated from Russian by Ram S. Wadhwa and Natalia V. Wadhwa

First published 1989 Revised from the 1977 Russian edition

Ha anzAuucKOM nsune

Printed in the Union of Soviet Socialist Republics

ISBN 5-03-000522-6 © rjiaBHan peAanijHH 4>H3HK0-MaTeMaTHuecK0H jiHTepaTypu naftaTejibCTBa «HayKa», 1977 © English translation, Mir Publishers, 1989

Contents

Preface

7

Chapter 1. Boolean Functions: Methods of Basic Properties

Defining and 10

1.1. Boolean Vectors and a Unitn-DimensionalCube 10 1.2. Methods of Defining Boolean Functions. Elementary Functions. Formulas. Superposition Operation 22 1.3. Special Forms of Formulas. Disjunctive and Con­ junctive Normal Forms. Polynomials 33 1.4. Minimization of Boolean Functions 42 1.5. Essential and Apparent Variables 49 Chapter 2. Closed Classes and Completeness

2.1. 2.2. 2.3. 2.4. 2.5. 2.6.

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 Monotonicity and the Class of Monotonic Functions Completeness and Closed Classes

Chapter 3. A>Valued Logics

3.1. Representation of Functions of ^-Valued Logics Through Formulas 3.2. Closed Classes and Completeness in fc-Valued Logics Chapter 4. Graphs and Networks

4.1. Basic Concepts in the Graph Theory 4.2. Planarity, Connectivity, and Numerical Charac­ teristics of Graphs 4.3. Directed Graphs 4.4. Trees and Bipolar Networks 4.5. Estimates in the Theory of Graphs and Networks 4.6. Representations of Boolean Functions by Contact Schemes and Formulas

55

55 59 63 67 70 76 82

82 88 101

101 110 117 123 137 143

CONTENTS

6

Chapter 5.1. 5.2. 5.3.

5. Fundamentals of Coding Theory Codes with Corrections Linear Codes Alphabetic Coding

*

155 155 160 163

Chapter 6. Finite Automatons 6.1. Determinate and Boundedly Determinate Functions 6.2. Representation of Determinate Functions by Moore Diagrams, Canonical Equations, Tables and Schemes. Operations Involving Determinate Functions 6.3. Closed Classes and Completeness in the Sets of Determinate and Boundedly Determinate Func­ tions

174 174

Chapter 7. Fundamentals of the Algorithm Theory 7.1. Turing’s Machines and Operations with Them. Functions Computable on Turing’s Machines 7.2. Classes of Computable and Recursive Functions 7.3. Computability and Complexity of Computations

212

187 206

212 233 241

Chapter 8. Elements of Combinatorial Analysis 8.1. Permutations and Combinations. Properties of Bino­ mial Coefficients 8.2. Inclusion and Exclusion Formulas 8.3. Recurrent Sequences, Generating Functions, and Recurrence Relations 8.4. Polya’s Theory 8.5. Asymptotic Expressions and Inequalities

248

265 275 280

Solutions, Answers, and Hints

289

Bibliography

403

Notations

405

Subject Index

409

248 259

Preface

This collection of problems is intended as an accompani­ ment to a course on discrete mathematics at the universi­ ties. Senior students and graduates specializing in mathe­ matical cybernetics may also find the book useful. Lectur­ ers can use the material for exercises during seminars. The material in this book is based on a course of lec­ tures on discrete mathematics delivered by the authors over a number of years at the Faculty of Mechanics and Mathe­ matics, and later at the Faculty of Computational Mathe­ matics and Cybernetics at Moscow State University. The reader can use Introduction to Discrete Mathema­ tics by S. Yablonsky as the main text when solving the problems in this collection. The book consists of eight chapters. The first two chap­ ters are devoted to Boolean algebra which forms the ba­ sis of discrete mathematics. About a quarter of the total teaching time during lectures and practicals at the Com­ putational Mathematics and Cybernetics Faculty at Mos­ cow University is devoted to Boolean algebra. The ma­ terial in this part introduces the student to the concepts of discrete functions, superposition, and functionally complete sets. It also acquaints the student with various methods for specifying a discrete function (tables, poly­ nomial representation, normal forms, geometrical repre­ sentation using an ^-dimensional unit cube, etc.). Me­ thods for testing the completeness and closure of sets of functions are also considered. The third chapter is devoted to /c-valued logics. The problems presented are intended to acquaint the reader with the canonical expansions of /c-valued functions, equiv­ alent transformations of formulas, closed classes of the /c-valued functions, and methods for testing the complete­ ness and closure of functions. Several problems in the

8

PREFACE

chapter illustrate the difference between* /c-valued logics (k > 2) and Boolean algebra. The fourth chapter contains problems on the theory of directed and undirected graphs, and the network and circuit theory.The chapter describes the basic concepts, methods and terms of graph theory, which are widely used to de­ scribe and investigate the structural properties of objects in various branches of science and technology. The prob­ lems are intended to consolidate the basic concepts of graph theory, to illustrate the application of network and graph theory to the construction of circuits representing Boolean functions, to count the number of objects with a given geometrical structure, etc. The authors hope that the lecturer will also find problems in this chapter to help him demonstrate the mathematical rigor during the proof of geometrically “obvious” statements. The fifth chapter describes the basic concepts of coding theory. The problems concern the properties of error cor­ recting codes, alphabetical codes, and minimum redun­ dancy codes. The sixth chapter contains problems demonstrating different ways of describing discrete transformers (auto­ matons). Problems aimed at revealing deterministic and boundedly deterministic automatons are also given. Other problems concern the different ways of representing auto­ matons (diagrams, canonical equations, and schemes (cir­ cuits)), the investigation of the functional completeness and closure of sets of automaton mappings, and also the properties of operations involving such mappings. The seventh chapter deals with the elements of algo­ rithm theory and is intended to provide an idea about effective computability and complexity of computations. It is also about certain ways for specifying algorithms, such as Turing’s machines and recursive functions. The eighth chapter describes the elements of combina­ torial analysis. While studying discrete mathematics, one frequently comes across questions concerning the existence, counting, and estimation of various combina­ torial objects. Hence, combinatorial problems are in­ cluded in the book. For the sake of convenience, the authors have started each section with a theoretical background. Hints and answers are provided for most (but not all)

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. Most of the problems were conceived by the authors during seminars and practical classes, during examinations, and also while preparing this book. Some of the problems resulted from studying publications in journals, and a few have been borrowed from other sources. Several 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 critical comments and sugges­ tions for improving the collection. G.P. Gavrilov A.A. Sapozhenko

Chapter One

Boolean Functions: Methods of Defining and Basic Properties

1.1. Boolean Vectors and a Unit n-Dimensional Cube1 A vector (a1? a 2, . . . , a n) whose coordinates assume values from the set (0, 1} is called a binary, or Boo­ lean, vector {tuple). We shall denote such a vector by an or a. The number n is called the length of the vector. The set of all Boolean vectors of length n is called a unit n-dimensional cube and is denoted by Bn, The vectors an are called the vertices of the cube B n, The weight or norm ||a n || of the vector an is the num­ ber of coordinates of this vector that are equal to unity, ^ n i.e. ||a n ||= 2 a i- The set of all vertices of the cube Bn i= i

having a weight k is called k-th stratum of the cube Bn and is denoted by Z?£. To each Boolean vector a n, ~

n

there corresponds a number v(an) = 2 a*2n-i, called 1 i=i the number of the vector a71. The tuple an is obviously a binary expansion of the number v (an). The (Ham­ ming) distance between the vertices a and (J of the cube Bn is the number p (a, |J) = 2 l a i —PiU equal to the i=1 number of coordinates in which they differ. The Ham­ ming distance is a metric, and the cube Bn is a metric space. The tuples a and |3 from Bn are called adjacent if p (a, {$) = 1, and opposite if p (a, (i) = n . An unor1 This section is auxiliary. We shall be using only problems 1.1.1.-1.1.6., 1.1.11., 1.1.14., 1.1.15., 1.1.31., 1.1.34., 1.1.35., and 1.1.44.

1.1. BOOLEAN VECTORS

11

dered pair of adjacent vertices is called an edge of the cube. The set (a) = {P: p (a, P) = fc} is called a sphere, while the set (a) = {(}: p (a, P ) ^ k} is a ball of ra­ dius k with a centre at a. The tuple a n is said to precede the tuple pn (notation: a n ^ pn) if a p * for all i = 1, n. If in this case a71 =^= (T\ the tuple an is said to precede pn strictly (notation: a n < pn). If at least one of the relations a n^ pn or pn ^ a n is satisfied, a n and P?l are called comparable. Otherwise, a n and p'1 are said to be incomparable. The tuple a n directly precedes pn if a n < pn and p (an, pn) = 1. The precedence relation between the tuples is the relation of partial order in Bn. mi

Fig. 1

Figure 1 shows the diagrams of partially ordered sets /?2, /?3 and fi4. The sequence of vertices of the cube (a 0, a l7 . . ., a&} is called a chain connecting a 0 and /v/ /^/ ^ ... a h (notation: (a0, a h\) if p ( a ^ , a*) = 1 (i = 1, k). The number k is called the length of the chain [a0, a,J. The chain {a0, a 1? . . a fe} is called an ascending chain if OLi_x < a* (i = 1, k). A chain z of the type{a0, a t , . .., a k } is called a cycle of length k if a 0 = a h. Let a = (aA, a2, . . .,a „ )a n d p = (Pn P2,. . ., pn)be vectors from Bn. We denote by a © fi the vector (o^ © pi? a 2 © p2, . . .,

12

CH. 1. BOOLEAN FUNCTIONS

a n © Pn) obtained by exclusive sum of vectors a and p. By a[J p we denote a vector whose i-th coordinate is equal to zero if and only if a t = Pi = 0, and by a f| P a vector whose i-th coordinate is equal to 1 if and only if a i = Pi = 1. By a we denote a vector (opposite to a) whose i-th coordinate assumes the value 0 if a t = 1, and the value 1 if a* = 0. If a 6 {0, 1), we put aa = (aa1? a a 2, . . cran). The symbols 0 and 1 are used to denote vectors (0, 0, . . ., 0) and (1, 1, . . 1) respec­ tively. Theset B*\ t!’ ' %h of all tuples (ax, . . a n) from Bn for which = Oj (/ = 1, k) is called a face of the cube Bn. The set I = {ix, . . i^} is called the direction of the face, the number k the rank of the face, and n — k the dimension of the face.

1.1.1. (1) Find the number | B% | of tuples an having a weights. (2) What is the total number of vertices in the cube Bn? 1.1.2. (1) Find the numbers of tuples (1001), (01101), and (110010). (2) Find a vector of length 6 which is a binary expansion of the number 19. 1.1.3. Find the number of tuples a £ B\ satisfying the condition 2n_1 ^ v (a) < 2n. 1.1.4. Show that the following relations hold for any a, P, y in B”: (!) P (a, y) < p (a^ P) + p (p, y)\ (2) p (a, v) = p (a ® p, v © p); (3) p (£ ,p ) - II a | | + ||p | | - 2 || a (IP II; (4) p (a, P) = || a © P || . 1.1.5. (1) Find the number of unordered pairs of adja­ cent vertices of Bn. (2) Find the number of unordered pairs of tup­ les (an, pn), such that p (an, pn) = k.

l .i .

BOOLEAN VECTORS

13

1.1.6. Let a and (i be the vertices of a cube Bn, p (a, P) = m. Find the number of vertices y satisfying the condition (1) (2) (3) (4)

p p p p

(a, v) + P (Y- P) = P (a, P); (a, y) = k, p (p, y) = r; (a, y X P (P, V) = n (a, y ) < k, p (p, y) > r.

1.1.7. Prove that the following systems of relations are incompatible for a, p and y in Bn, 2: (1) p (a, P) > 2n/3, 2«/3; (2) v (a) < v (P © y)’ v (a © P);

p (P, y) > 2w/3, v (P) < v

(y

p (y, a) >

© a),

v (y)
||p © v II, II P II > llY 0 a II, II Y II > II a © p II , II a n (P n v) II - 0; _ (4) || a © p © Y II = 0 , || a © p 0 y || = n - 1. 1.1.8. Let a, p and y be the vertices of a cube Bn. Show that: (1) a ^ P is equivalent to a f| P = 0; rss

r*/

n*

(2) a (J p = 1 is equivalent to P ^ a; (3) a fl (a U P) = a; (4) a (J (a D P) = a; (5) (a U P) fl (P U Y) = (« n Y) U P; (6) « a QY)U P) flY = (a H y )u J P £1 y); (7) a Y leads to the relation a U (P f| Y) = (a U P) D Y> (8) y is equivalent to a U (P fl Y )^ (a U P) fl Y* (9) (a (P y) u (y «) = & P) (p y) fl (Y U a)-

n p) u

n

n

u

n

u

14

Ctt. 1. BOOLEAN FUNCTIONS

1.1.9. How many vectors (o^, a 2, . .., a 12) in B\2 satisfy the relation 2 a,-^m /2 for all m = 1, 12? 1.1.10. Find the number of vectors a in fi*, 1 ^ A^ n/2y 1 ^ (n — k)l(k — 1), which have at least r zero coordinates between two unit coordinates. 1.1.11. (1) Show that Bn contains a set consisting of

( [/?/2] ) Pa*rw*se incomparable vectors. (2) Show that any subset containing not les than n -f 2 vectors includes a pair of incomparable vectors. 1.1.12. Let 0 ^ I -< k ^ n and let A (a) be a set of all vectors in Bn comparable with a. Find the power of the set C\ (1) C = A (a) f)B%, a £ B?; (2) C = A (a) f| a 6 Bnh; (3) V = A (a), a 6 B%. 1.1.13. Let A ^ B 1}, and B be a set of all tuples in Bh that are comparable with at least one set in A. \A \ ^ | B Prove that (?) C) 1.1.14. (1) Show that Bn contains n! pairwise different ascending chains of length n. (2) Show that the number of pairwise differen ascending chains of length n containing a fixed vertex a in is equal to k\(n — A;)!. 1.1.15*. (1) Show that the power of any subset of pairwise incomparable tuples of cube Bn does not exceed

(2) Show that if the subset A 2. Indicate a number n > 2 for which B[l is not a base set. (3) For what n and k is the set B% not complete in B n? (4) Prove that any base set A in Bn satisfies the con­ n I. 1.1.24*. Let A ^ Bn be a set of all tuples such that there are no tuples a, p, y in A for which a f) P — 0 and a (J p = y. Let ah = \ A fl Bk I • Show that flA+m/ ( k + m )

/ ( I ) + “ »*/ ( " ) < 2

for all natural numbers k and m that do not exceed n. 1.1.25. The set P 0 © , ~ , etc. are used in the notations of elementary functions and are called senten­ tial connectives. Let us fix a certain (finite or countably infinite) alpha­ bet of variables X . Let O = {/{ni\ f {^ 2\ . . . } be a set

.2. METHODS OF DEFINING BOOLEAN FUNCTIONS

25

of functional symbols, where the superscripts indicate the number of sites where the symbols can be placed. Some­ times the superscripts are omitted if the arity of the functional symbols is assumed to be known. Definition 1.1. A formula generated by the set © is such (and only such) expression as (1) f k and fj (x#l, z i2, . . x ii}), where f k and /,• are functional symbols of zero and n arguments respectively, and X;* l’, X; , . . ’ X; are variables in the set X ; (2) fm (211, 9121 • • -1 91s), where f m is a functional sym­ bol of s arguments and 511 is either a formula generated by O or a variable in X, i = 1, s. In order to accentuate the fact that formula 51 con­ tains only variables in X (or only functional symbols in ), we shall write 51 (X) (resp. 51 [O]). Sometimes, formulas of the type / (x, y) are written in the form (xfy) or xfy, and formula f (xq in the form (fx) or /x. The symbol / is called a connective. Usually, connectives are denoted by symbols from the set @ V* I * I }■ Definition 1.2. A formula generated by the © is such (and only such) expression as (1) x , i.e. any variable from the set X; (2) (151),. (51&93), (51 V®), (51 © 95), (51-93), (51 95), (51 | 93), (51 J 93), where 51 and 93 are for­ mulas generated by ©. The following convention is usually adopted for ab­ breviating the notation of formulas generated by the set © of connectives: (a) the outer brackets in the formulas are omitted; (b) formula ( 1 51) is written in the form 51; (c) formula (51 & 93) is written in the form (51-93) or (5193); (d) it is assumed that the connective 1 is stronger than any connective of two variables in ©; (e) the connective & is assumed to be stronger than any of the connectives \J, ©, —, |, With the help of this convention, we can write, for example, the formula ( d # ) - * ((,x&y) \Jz)) in the form x~+ (x y \J *)• “Mixed' form of notation is also used, for example, x © f (y, z) or x j {x2, 0, x 3) V x\ f (1, x z, x3). l 2

2n

26

CH. 1. BOOLEAN FUNCTIONS

Suppose that each functional symbol /* 1 in the set (n.) O has a corresponding function F t: B 1 ->■ B. The con­ cept of the function represented by formula 91 genera­ ted by the set is defined by induction: (1) if 21 —f i l) (#jp ), then for each tuple " ni (a,, a 2, • • • ia n.) °f values of the variables Xjl, Xj2, . . . , X j n , the value of the function ,, ... , *jn.), x 2) © x2x3; (3) / (x3) =(Xl -+ x2x 3) 0 x2. 1.3.10. Find out which of the functions depending on variables xx and x2 have largest number of pairwise differ­ ent subfunctions.

1.3.

SPECIAL FORMS OF FORMULAS

37

1.3.11. Find the number of Boolean functions f (xn) which are transformed into themselves upon a commuta­ tion of xx and x 2. 1.3.12. Two functions f (xn) and g (xn) are commuta­ tively equivalent if there exists a permutation ji of numbers 1, . . . n such that / (xx, . . x n) = g (xn(1) , . . Find the number of classes of commutatively equivalent functions in P 2 (X2). 1.3.13*. The function f n (xn) is defined by the fol­ lowing recurrence relations: /4 (*£ )

3'\3'2 (*^3 \ / *^4) \ / *^2 (^l»^3 \ / ^1*^4) \ / ^^pC^X^X^

/n+1 fa^ **) ~ fn

^21 • • •» ^n) ^n+l V ^1^21 . . . x na:n+1 (n > 4). For each function in the sequence {/n} find the number of different subfunctions of the type / - 7 ( ? ) M p . e g gn, i !dxi B df (xn) dg (x11) . dXj

dx.i



(5) - (/< « 2 » - / (x») H £ ± ® t (Z-) 4 g 2 . ©

(6) dfixn) ■y^ - = 0 if and only if itly in the Zhegalkin (7) if / (X ) =

d / (xn) dg (j" ) .

dx*

dxi

*

does not appear explic­

polynomial of the function / (xn)\

(*^2’ ^3> • • ♦» *^n) © ^

• • • >^n)»

th©!! ^7 = &(*^2» ^3’ • • • » ^n)* 1.3.35. If • • •* ^m) ^od h (xm+1, . . »i %n) n- r ( l ~ 2- 2n- y . For small values of n, the contracted d.n.f. of the func­ tion / (x11) can be found with the help of the rectangular table (iminimizing chart or a Karnaugh map). For exam­ ple, suppose that the function / (x4) is defined with the help of Table 5. Combining the cells corresponding to Table 5

X3 0 X1

\ x 4 X \

0

0

0)

0

1

0

1

1

1

1

0

>

1 1

0

0

0

rT

0 1

1

1

r + 2. 1.4.17. Construct all terminal d.n.f.s of the following functions: (1) / ('x3) = (01111110); (2) / (x4) = (1110011000010101); (3) / (2 4) = (0110101111011110).

1.4.18. Find the number of terminal and minimal d.n.f.s for the functions appearing in Problem 1.4.5. 1.4.19. Show that the number of terminal d.n.f.s for an arbitrary Boolean function / (xn) does not exceed 1.4.20*. How many terminal d.n.f.s exist for a func­ tion having 2n-1 core implicants? 1.4.21. Find out if the following d.n.f.s are terminal or shortest, or minimal: __ (1) 2D = Xj Xj V x 2j (2) 2D — x zx A V xxx 2x A V x1x 2x 3\ (3 ) 3) =5 xxx 2 V XlX 9 V X2 X9 XA V X2 X3 * 1.4.22. Let L (/) be the complexity of the minimal, and I (/) the length of the shortest d.n.f. of the function /. Show that L (/ (xn) ) ^ n l (/ (x11)) for an arbitrary function / £ w).

1.4.23. Show that I (/ (x71) ) ^ 27W, L (f (xn)) ^ n2n~l for any function / (xn). 1.4.24. For how many functions f (xn) are the fol­ lowing relations valid: (1) L (/(x n)) = »2n-1; (2) L{f (?')) = n2n~l - n ? 1.4.25. Give an example of a number k (0 < /c ^ n2n) such that there is no / (x??) having a minimal d.n.f. of complexity k. 1.4.26. For the functions of Problem 1.4.5. find the

1.5.

ESSENTIAL AND APPARENT VARIABLES

49

complexity of the minimal and length of the shortest d.n.f. 1.4.27. Let us consider a family of belt functions, i.e. the functions f (xn) for which there exist numbers k and m such that N f = {a: || a | | ^ fc + m). (1) Find the number of core implicants of the belt func­ tion / (xn) for different values of k and m. (2) How many belt functions / (xn) have the maximum number of core implicants? 1.4.28. The function / (.xn) is called a chain (cyclic) function if the set N f can be arranged in a sequence that is a 2-chain (2-cycle). (1) Find the number of terminal and minimal d.n.f.s of a chain function f (xn) if | N f | = I. (2) Find the same for a cyclic function / (xn) such that | Nf | = 2m (m > 2). 1.5. Essential and Apparent Variables The variable x t of the function f (xly x 2, . . ., x n) is called essential if there exist tuples a and p such that a = (alf . . ., 0Ci_i, 1, a i+1, . . a n), p = (ax, . . 0, a £+1, . . a n) and / (a) =£ f (P). Otherwise, the variable x t is called an apparent variable of the function / (xn). Two functions f (xn) and g (xn) are called equal if the sets of their essential variables coincide and on any two tuples, differing perhaps only in the values of appar­ ent variables, the values of the functions are identical. Let 1 ^ ii x2) (Xn Xj) (Xj — ►xn),

(3) /(x") = ( . . . ((X ilx ^ lx j)! . . . |x „) -v (x t | (x2 I (x3 I . . . I x„) ...)); (4) / (x") = (x,

x2) (x2

( 5 ) / (xn) — /

x3l . . . (xn_i x n) (xn -+ x x) — (Xj © x2 © . . . © x„ © 1);

V

Xi,Zi, • • • *ri[n/2 ]

••• < i [ n / 2] « "

&

I

\J

V

X}tXi

Ci(n/2] )

1' 0

(*< © *2 ©

i [ n / 2 ] ^ n

...

© Xn).

1.5.11. Let the functions / (xn) and g (ym) depend es­ sentially on all their variables and let the variables x x, . . x n, y1? . . ., y m be pairwise different. Show that the function / (xx, . . ., xn_1, g (yx, . . ., ym)) de­ pends essentially on all its variables. 1.5.12. Let Pc(Xn) be a set of all Boolean functions depending, and that too essentially, on the variables 3'2'> * * (1) Enumerate all functions in Pc (X 2). (2) Find the number | PC(XS) \ . 4*

52

CH. 1. BOOLEAN FUNCTIONS

n

t

(3) Show that | P‘ (X n) | = 2 ( - ! ) * ( J ) h=0 (4) Show that lim 2"2" | Pc (Xn) | = 1. n —oo

1.5.13. Let a, p and 7 be such tuples in that P^S Y- Let the function / (xn) be such that / (a) = f (y) f (p). Show that / (x11) depends essentially on at least two variables. 1.5.14*. Show that x t is an essential variable of the function / if and only if this variable appears explicitly in the contracted d.n.f. of the function /. 1.5.15. Show that x t is an essential variable of the function / if and only if x t appears explicitly in the Zhegalkin polynomial of the function /. 1.5.16. Let —— ------O Xj) = 0 for any non-empty set {xit, . .., Xih} of variables defferent from Xj. Does f {xn} have an apparent dependent on zft 1.5.17. Show that any symmetric function / (a;71) other than a constant depends essentially on all its variables. 1.5.18. Suppose that the function / (xn) changes its value m times at the vertices of the chain a, p*,. . Pfc-11 V connecting these vertices a, y of the cube B n, for which p (a, 7) = &• Show that / (xn) depends es­ sentially on at least m variables. 1.5.19. Let / (xn) depend essentially on at least two variables. Show that there are three vertices a, p, 7 of the cube B n satisfying the condition P («, P) = P (P, Y) = 1,

a ¥= 7.

/ (a) = / (Y) # / (P).

1.5.20. Let / (xn) depend essentially on all its varia­ bles. Prove that for any i (1 ^ i ^ n) there exists a j such that a certain substitution of constants in place of variables other than x t and xj leads to a function de­ pending essentially on x t and xj.

1.5.

ESSENTIAL AND APPARENT VARIABLES

53

1.5.21. Show that for any function / (xn) that depends essentially on n variables there exists a variable x t and a constant a such that the function fa (xn) — f (xl7 . . ., Xi-n a, x i+1, . . x n) depends essentially on n — 1 variables. 1.5.22. Let / (xn) depend essentially on all its varia­ bles. Check the validity of the following statements: (1) there exists an i such that for any j there exist con­ stants whose substitution into / (xn) for variables other than x t and Xj leads to a function depending essential­ ly on Xi and xj\ (2) for any two variables x t and xj there exist constants whose substitution into f (xn) for variables other than x t and Xj leads to a function depending essentially on X( and Xj. 1.5.23. Enumerate the functions in P 2 (X2) that can be obtained by identifying the variables of the following functions: (1) / (>) = (10010110); (2) / (>) = (11111101); (3) f (x3) == x^x2 \ / x 2x 3 \y X3X1, (4) / (z3) = x xx 2x 3 © x 2x 3 © x3xx © x 2 © 1. 1.5.24. Show that the identity operation on the func­ tion / (xn) can lead to a constant if and only if / (0) = / (1). 1.5.25. Find the number of functions / (x2) for which the identification of variables cannot lead to a function depending essentially on one variable. 1.5.26. Can the identity operation on the symmetric function / (xn) lead to a function that depends essentially on all its variables and that is not symmetric? 1.5.27. Let a, |3, y be three vertices in B n such that a< y, and let / (xn) be such that / (a) = / (y) =£ f (P). Show that it is possible to identify certain varia­ bles of the function / in such a way that the function depends essentially on at least two and at the most three variables. 1.5.28*. Show that for the function / (xn), 4, reresented by Zhegalkin’s polynomial of power not less

54

CH. 1. BOOLEAN FUNCTIONS

than 2, there exist two variables whose Identification de­ creases the number of essential variables by one. 1.5.29. Enumerate all the functions / (x3) that depend essentially on three variables and in which the identifica­ tion of any two variables leads to a function depending essentially on exactly one variable. 1.5.30. Let the function / (.xn) be such that | N f | > 2ri~1. Show that the identification of any two variables of the function leads to a function that is not identically equal to zero. 1.5.31. Show that the number of functions / (xx, x 2, . . ., x n+1) which lead to a certain function g (xx, x 2, . . ., x n) as a result of identification, is asymptotically equal to 22n as n-+oo. 1.5.32. Show that if / (xn) depends apparently on the identification of this variable to any other variable leads to a function that depends essentially on the same variables as the function / (xn). 1.5.33. Let 1 and let the functions / (xn) and g (xn) be such that | N f$g \ = 1. Show that for any i = 1, n, at least one of the functions / or g depends es­ sentially on x (. 1.5.34. Show that if | N . ~ | is odd, the func/oV(*n)0 /ii(*n) tion (p obtained from / (xn) by identifying the variables x t and xj depends essentially on n — 1 variables (n ^ 3). 1.5.35*. Let the function / (xn) depend essentially on n variables. Let vf (a) be the number of vertices (5 for which / (a) =?£ / (P) and p (a, P) = 1. Let v (/) = max vf (a). a t Bn

Find v(f) for the following functions/: (1) f {x ) = (B #2 ® ® (2) / & [H/*]) = (zt \J . . . y xk)& (xh+i V . . . V *20 & . . . & (xk ([n/ft] - 1)+ 1 V . . . V [n/fc])i 1 ^ k^. Tty (3) / (xft+2ft) = a fc+1+v(ai, if xft+2'l = (a1, a 2, - . . , a ft, a k+1, . . . , ah+2 h), where v (a lt . . . , ah) is the num­ ber of the tuple (a,, ah).

Chapter Two

Closed Classes and Completeness

2.1. Closure Operation. Closed Classes Let M be a certain set of Boolean functions. The closure [M ] of the set M is defined as the set of all func­ tions from P 2 that are superpositions of functions in the set M. The operation of obtaining the set [M] from M is called the closure operation. The set M iscalled a func­ tionally closed class (in short, closed class) if [M] = M. Let M be a closed class in P 2. The subset A in M is called a functionally complete system (in short, complete system) in M if [A] = M. The set A of Boolean func­ tions is called an irreducible system if the closure of any proper subset A' in ^4 is different from the closure of the entire set A , i.e. [A'] *2 ) =

*1

»> *

© x t
y = \ ( k - l ) - x + y if 0 < y < * < k — \; joint denial: max (x, y) + 1 (mod /c), denoted by vh (x, y); mod k difference:

(

x —y if 0 y ^ x ^ h — 1, k — (y-^x) if 0 < x < y ^ i - l .

The functions (operations) min, max, + and • are com­ mutative and associative. Moreover, the following rela­ tions are valid: (x + y)*z = (x •z) + (y •z) called distributivity of multiplication with respect to addition; max (min (x, y), z) = min (max (x, z), max (y, z)) called the distributivity of the operation max with respect to the operation min; min (max (,x, y), z) = max (min (x , z), min (y, z)) called the distributivity of the operation min with respect to the operation max; max (x, x) = x ,

min (x, x) = x

called idempotency of the operations min and max; and min (~x, ~ y) = ~m ax (x, y), max (~ x ,~ y) = ~ m in (x, y) called the analogs of De Morgan’s rules (laws) in P2. 1 Unless otherwise stated, the symbols + and • in this chapter will denote mod k sum and product. 6*

84

CH. 3. A-VALUED LOGICS

The following equalities are introduced by definition: max (xl1 x 2, . . ., x n^ , x n) = max (max (xx, x 2, . . ^n)» 3, min . . .) Xji- ij x n) min (min (xj? ^2, . . •* ^n)y 3; if x = 0, —x = \ ° 1k - x if x =£ 0. In view of the associative nature of mod k product, the product x*X'X'. . . •£ (I cofactors, 1) is often written in the power form z l. 3.1.1. Prove the validity of the following equalities: (1) — (x) = ~x ; (2) I D y = ~ (x y); (3) a; — (x — y) = min (x, y); (4) (xD3 y)zD y_ = max (x, y); (5) (x=> y) + x = min (x, y); (6) x — y = x — min (x, y); (7) x — y = max (x, y) — y; (8) (~x) — (y — x) = ~m ax (x, y); (9) (~x) — (~y) = y — x; . (10) ~ ( x + y) = (~x) + (~y); (U) ~(x*y) = (^x)-y; (12) max ((x + 2) — 1, / ft_2 (x)) = xj_ (13) min ( ~ J t,_j (x), (/e — 2) id x) = x; (14) x — y = (x -j- y) + * •;*-_! (y) + y */*_x (x);_ (15) vh (x, y) + X'7h-i (y) + y-jh-1 (*) = max (x,_y); (16) max (x, y) + ; 0 (y — x) + )h-i (*) -y = max (x, y); (17) min (x, y) + J 0 (y — x ) — h -1 (*) -y = min (x, y); (18) J 0 (max (/» (x), (x), . . (*))) = J k-i (*); (19) / i(max (x, 1, J t (x), J 2 (x), . . / ft_s (x))) = Jo (*); ____ (20) x (/! (x)) + j 0 (x) -/j (x) = x + y0 (x) — ^ (x); (21) / 0 (x — t) — / 0 (x — (t — 1)) = / , (x), i = 1 2 A;__ 1* ’ (22) ( - ( ( - x ) 1)) - * - ( ... (((^j~ 1) “ (~ x)) — (~ j )) — • . . — (~x)) = x; A - l times

(23) (. . . (((,k - 1) (x)) ^ / 0 (x ^ 1)) ^ /« ( * - ( * - 3))) - ((fc - l)/o (~ x)) = x.

-

3.1.

REPRESENTATION

85

3.1.2. Prove that the function / in P k is generated by the set of functions A (A c= Pk) as a result of superposition operation. (1) / = / j (x), A = {J0 (X), J 2 (x), max (x, y)}, k — 3; (2) / = ~ x , A = {J0 (x), J ! (x), min (x, y), max (x,y)}, k = 3; A = {1, x4, J x (x), max (x, $/)}, (3) / = x, k = 3; (4) / = ;'o (x),=4 {x — 1, x*}, k — 3, 5; (5) / = ;i (x),=A {x-y +_x — y2 + 1}, k = 3, 5; (6) / = ~ x , A= {1, x-y}, k = 3, 5; (7) / = x,^ = {3, j 0 (x), x — y}, k = 4; (8) / = ~ x , 4 {x + 2, /„ (x), J x (x), max (x, y), x-y), k = 4; (9) / = 74 (x), 4 = {x —1, J2 (x)},k = 6; (10) / = ; 5 (x),^4= {x + 2, x2, / 3 (x)}, /c = 6; (11) / = /i (x), 4 = (x, — x, (x)}; (12) f = J k . x (x), ,4= {~x, x— y}; (13) / — /* _ 2(x),,4 — {k— i, x + 2, x — y}; (14) / = To (x),^ = {1,~ x , x — 2y}; (15) / = x, ^4 = {1, —x, x — y}. 3.1.3. Prove that if a belongs to E k and is coprime to /c, each function J t (x), 0 ^ k — 2 can be presented as a superposition generated by the set {x + a , J h_1 (x)}. 3.1.4. Show that the function q> from P h can be repre­ sented by a formula generated by the set {0, 1, . . ., k — 1, x — 2y] if (1)