Numerical Decks of Trees

Numerical Decks of Trees

Quo Vadis, Graph Theory? J. Gimbel, J.W. Kennedy & L.V. Quintas (eds.) Annals of Discrete Mathematics, 55, 59-70 (1993) 0 1993 Elsevier Science Publis...

756KB Sizes 5 Downloads 84 Views

Quo Vadis, Graph Theory? J. Gimbel, J.W. Kennedy & L.V. Quintas (eds.) Annals of Discrete Mathematics, 55, 59-70 (1993) 0 1993 Elsevier Science Publishers B.V. All rights reserved.

NUMERICAL DECKS OF TREES Fanica GAVRIL Center for Military Analysis Haifa, ISRAEL

Ilia KRASIKOV and Johanan SCHONHEIM School of Mathematical Sciences, SacMer Faculty of Exact Sciences Tel Aviv University, Ramat-Aviv, Tel Aviv, ISRAEL

Abstract

r;-

Let the vertices respectively the edges of a tree T be {vI,vz, ...,}.v and {e,,e,, .... en.j}.The Deck respectively the Edgedeck are then the collections D(T)= { T- v ~ } ,!and ED(7) = { T - e,} ,!. Each of these decks is redundantly sufficient for reconstructing T. In a numerical approach define the number deck of the tree T the collection ND(7') = {p,,&, ...,pJ, where p, = (al,q,. ..,as}is the collection of integers correspondingto the cardinalities of the connected components of T- v, Similarly define the edge number deck END(7') and other numerical decks. First the recognition problem is considered, and conditions established for collections of multisets of numbers to be the ND(T) of a tree, the END(T) of a tree, or some other numerical decks considered. It tums out that except for N Q T ) the problems are NP-complete.Then, the ND(7) reconstruction problem is considered and a characterization is given.

:z

1. Introduction 1.1 Decks of Trees and the Reconstruction Problem

We shall use the term multiset for an unordered collection of not necessarily distinct elements of a set. Let G be a graph with vertex set V = { v j }=:

multiset of the unlabeled subgraphs {G - v i } =:

1.

Following Harary, we shall call D(G) the

the Deck of G .

A conjecture standing since 1942 is that for n > 2 the Deck Q G ) determines G uniquely up to isomorphism. This is expressed by saying that G is QG)-reconsfructibZe. One of the cases for which the conjecture has been confirmed, a long time ago, is the case when G is a tree T [l].More recently [2] it turned out that a tree T is reconstructible even from many submultisets of D( T). Similarly when the edge set of T is E = { e j } ?r =- 'l , then the multiset of the unlabeled subgraphs { T - e , } ? - is called the Edgedeck of T and denoted ED(n.It is also known that a 1= 1 tree is ED(n-reconstructible. Notice that while a member of D(T) can have many connected components, each member of m(T)has exactly two connected components. 1.2 Numerical Decks of a Tree

A first impression upon considering the tree reconstruction topic could be that it is closed. But asking the '$Quo vadis" question leads us to assert that a wider approach can open new ways. Such a possibility is to consider partial information contained in the Deck rather than a submultiset of its members. Of particular interest is the use of numerical information leading

F. Gavril, I. Krasikov and J. Schhheim

60

to various algorithms. First steps in this direction arose in 1980 [3], when the concept of a Number Deck of a tree was introduced. We shall now give the exact definitions of the above and further related concepts. Definition 1:

Let pi be the multiset of positive integers determined by the cardinalities of the connected components of T - vi. The multiset { p I,p2,...,pfl}is called the Numberdeck of the tree T and is denoted ND(T).The largest element of pi will be denoted w(pi).The set of distinct elements in ND(T),will be called Reduced Number Deck of T and denoted RND(T). Observation 1:

The sum of the members in each pi is n - 1. Definition 2:

Let p i be the unordered pair of not necessarily distinct positive integers determined by the cardinalities of the two connected components of T- e,. The multiset @1,p2,...,pn - 1) is called the Edge Number Deck of the tree T and is denoted END (T). Observation 2:

The sum of the numbers in each pi is n and this implies that pi ={ai,n - a,}. It is a matter of notation to have ai 5 n - ai. Definition 3: Let pi be as in definition 1. The multiset of integers defined by p1 u p2 u ...U p, is called the Total Numberdeck of T and denoted nVo(T). It is understood that the union takes into account the multiplicities in each multiset.

Observation 3:

It iseasy toseethat pl u p 2 ~ . . . u p , = p u1 p 2 ... ~upn-1,wherepiisasindefinition2. Definition 4:

z.

In a rooted tree Twith root v,, each v i determines a tree rooted at vi. Namely for i < n, let e be the edge adjacent to vi in the path v i - v,, subgraph of T, then is the connected component of T- e not containing v,. If the cardinality of Ti is a, then the multiset {al,a2, ...,a, 1, a, = n} is called the Endtree number deck of T, denoted EnvD(ij. Recall that a centroid of a tree is a vertex such that the maximal connected component of T - v is minimal. Observation 4:

If the root of T i s a centroid then ai 5 n - a, for 1 I i 5 n - 1. The purpose of the present paper is to discuss the relationship between these five types of numerical decks of a tree, to give characterizations of them, and to analyse the complexity of the related recognition problems, i.e. of recognizing whether a given multiset of multisets is one of the numerical decks of a tree. We shall consider also the ND(T)-reconstruction problem, the only one as (shown below) for which the recognition problem is not NP-complete. If a tree is not ND(T)-reconstructible, the problem of constructing all trees having the same ND is considered.

Numerical decks of trees

2.

61

Characterization and Recognization of Numerical Decks

The following characterization of a total number deck of a tree leads to characterizations of number decks and edge number decks: Theorem 1: A multiset S of 2(n - 1) positive integers is the total number deck of a tree if and only if there exists a (n - 1)X n matrix whose nonzero entries are the members of S, each row having exactly two nonzero entries summing up to n while the sum in each column is n - 1. Proof: Let S be the total number deck of a tree T. A matrix M as required can be obtained by replacing the nonzero entries ag of the edge versus vertex incidence matrix of T by the cardinality ni of the component of T - e, not containing vj. Clearly niis a member of S. Notice that if the second nonzero entry of row i is ajk and is replaced as described by n2 then nl + n2 = n.The column sum condition is also satisfied. Conversely, assume that a matrix N, as required, exists. Replacing all nonzero entries by ones the obtained matrix N* is an incidence matrix of a graph T. First, let us prove that T is a tree. T having n - 1 edges and n vertices, it is enough to show that T is acyclic. Assuming the contrary, let C be a cycle of length k contained in T. Let N’ be the k x k submatrix of N defined by C. Every row of N’ sums up to n, while the sum in every column of N’ is at most n - 1. Thus the sum of all the entries is kn if counted by rows and at most k(n - 1) if counted by columns, a contradiction. It remains to show that ZND(T) is S,the multiset of the nonzero entries of N.

In fact, we will show that matrix Mobtained from T by the method of the “only if‘ part of the proof is the given matrix N. Let e j be one of the edges of T. Let pibe the pair {nl,n2} appearing in the row of e of Mthen nl + ‘12 = n. On the other hand, let {al,a2) be the pair of nonzero entries occurring in the row of ei in N . Now T - e consists in two trees T I ,T2, to each corresponding a submatrix of N, N1 respectively N2, Then al E N1, and a2 E N2. Summing up the columns of N1 one has nl(n - 1) - a1 while the sum of the rows of N1 is (nl - 1)n. It follows that n = nl + al, therefore a1 = n2 similarly a2 = nl. The above theorem leads to the following characterization of the vertex and edge number decks of trees. Corollary 1: [4]

A collection N = {p1,p2,...,pn}of n multisets of positive integers summing up in each multiset to n - 1 is the number deck of a tree if and only if the union U/,I pi can be partitioned into pairs, each pair summing up to n. We shall refer below to such a partition as pairing. Corollary 2

/

A collection P = ( ~ 1 9 2 , ...,pn- 1) of n - 1 pairs of positive integers, each pair summing up to N , is the edge number deck of a tree if and only if the union u : :pi can be partitioned into N multisets, each summing up to n - 1. We have already mentioned that the complexities of the recognition problems based on Corollary 1 and Corollary 2 are very different, namely very easy for 1 and NP-complete for 2. See section 4.

F. Gavril, I. Krasikov and J. Schonheim

62

Corollary 3: a) All trees having the same TND can be obtained by the construction in the proof of Theorem 1, using a matrix M. b) All trees having the same ND can be obtained from the different possible pairings in Corollary 1. c) All trees having the same EWD can be obtained from the different possible partitions in Corollary 2. A relationship between various numerical decks is formulated in the following theorem, an immediate consequence of the definitions and observations 2 , 3 , 4 .

Theorem 2: Consider a multiset R = {al,a2, ...,a,. 1,a, = n} of positive integers. The following three statements are equivalent: (i) R is the endtree number deck of tree Trooted at a centroid. (ii) ai In - 4 for i E { 1,2,...,n - 1) and the collection of pairs P = { {a1,n - al},{a2,n - a ~ } , ...,{a,. 1 ,n- a, - 1)) is the edge number deck of tree T. (iii) ai In -ai for i E {1,2,...,n - 1) and S ={a1,a2,...,a, - 1, n - al, n - a2 ,... ,n- a, - 1) is the total number deck of the tree T. The following characterization of an endtree number deck involves subsums. By virtue of Theorem 2, similar characterizations can be given for END and TND.

Theorem 3: ThemultisetofpositiveintegersR= {al,a2, ...,a,},withal < a 2 < ... 1 a n d i c {1,2, ...,n}

c

a1 = 1+ a a E S,

Proof:

For the only if part let Si be the multiset of elements of R corresponding to the endtrees determined by the sons of v,, when ai > 1. Then ai = 1 + Xu si a. Therefore S1 v S2 u ... u s, is a partition of R - { n} as requested.

For the if part construct a graph T whose vertices are the elements of R two vertices at, aj being connected by an edge directed from ai to aj if and only if aj is in Si.One can see that T i s a rooted tree having the desired ETND. Alternatively, in the matricial approach of corollary 2, consider

p = { ( U l J - a1),...,(a,- 1,n - a, - 1 ) ) . The condition of the corollary is satisfied if and only if there is a partition of R - { n } as in Theorem 3. Indeed each term n - ai must be completed in its column to n - 1 and this is done by Xu sia for ai > 1 and by 0 for ai = 1. An additional such column is determined by i = n. By Theorem 2 this also proves Theorem 3.

Numerical decks of bees

3.

63

Reconstruction of a Tree from its ND

We shall see in section 4 that all numerical recognition problems except the ND-problem are NP-complete. Therefore we restrict ourselves to the reconstruction problem in this case only. We shall see further that essentially the problem reduces to the RND case. For ETNDreconstruction see [5]. 3.1 Necessary and Sufficient Conditions for a Tree to be Nonreconstructible from Its ND

Such conditions have been established in [6]. We reproduce them here in Theorem 4. Theorem 4: A tree T with ETND(T) = {al,a2,..., a,-], n} and ND(T) = {pl,p2,...,p,) is not ND-recon-

structible if and only if there exists a pair of indices i, j such that the following three conditions hold: (i) ai= aj (ii) The endtrees

- -

Ti, Tj are not isomorphic as rooted trees with roots vi, vj respectively

(iii)vi,vj are dissimilar in Tij= T - T, - Tj V vi V vj

Observe that (i) can be replaced by w(pi) = c~(pj. Moreover, (ii) can be replaced by (ii) '

Pi Pj f

Proof: Indeed clearly (ii)'implies (ii). The proof of the converse implication is more involved. We have to show that if there is a pair i, j satisfying (i), (ii), (iii) then there is also a pair satisfying (i), (ii)', (iii). Actually choose i, j satisfying (i), (ii), (iii) for which ai is minimal. We shall show that such a pair satisfies also (ii)'. Assume the contrary that pi = pj Then there are two nonisomorphic branches Bj, Bj of the same size at vi and vj respectively. Let wi, wj the neighbours of vi, vj in Birespectively Bj. Now clearly (i), (ii), (iii) holds for wi, w j Namely (i) by the choice of wi,wj, (ii) by the choice of Bi, Bj and (iii) since any isomorphism mapping wi onto wj must also map vi onto vj, contradicting the nonsimilarity of vi, vj Finally the minimality of ai is contradicted by the order of the endtree defined by wi. The use of (ii)' instead of (ii) is more suitable for producing algorithms, deciding whether a tree is nonreconstructible from its ND since checking the isomorphism of trees is replaced by checlung the equality of multisets. In order to decide whether a tree is ND-reconstructible by the above conditions we need the knowledge of ND(T). That knowledge is equivalent to the knowledge of RiVD(7) in addition to knowing the multiplicity of every member of RND(T)in ND(T). We shall show in the next paragraph that deciding whether a tree is ND-reconstructible it is enough to know RND(T)and the subset of its members having multiplicity exactly one in ND(I).

F. Gavril, I. Krasikov and J. Schijnheim

64

3.2 The Role of RND in ND Reconstructibility

Let T a tree having N vertices with RND(T) = {pl,p2,...,ps}.An important tool in the above topic will be a certain digraph c(T) defined as follows: Definition 5:

The vertex set of c(7) is defined to be RND(7). Denote by v1 the vertex determined by p1. -.. Two vertices vi, vj are joined by an edge vi. v, if and only if there is an element x of pi and an element y of p j such that x+y=n

(1)

and and n > y. Observe that x = w(pi), the maximal element in pi,while y = o(pj) is possible only when vj is a centroid of T. Notice also that the set of sinks of is just the set of centroids of T.

c(Z‘)

Definition 6:

c(7)

A vertex vi of is called homogeneous if and only if there is no j # i such that o(&)= o(pj), i.e., when the maximal element of its defining multiset is not maximal in any other multiset in RND( T). Definition 7:

The number of members of ND(T)having the same multiset p is called the multiplicity p of p. Theorem 5: A tree is not ND-reconstructible if there is a nonhomogeneous vertex pi in there are two distinct paths from pi to the set of sinks of

c(7).

E(T)such that

Proof:

Let vi and vj be two nonhomogeneous vertices in T such that o(pi) = o ( p j ) but pi # pj The vertices vi and vj in T satisfy the conditions (i) and (ii) of Theorem 4.To see that they also satisfy condition (iii), observe that if P is a path from vi to a sink v then P ’ = ( P - pi)u vj is also a path from vj to v. Let P I ,P2 be two distinct paths from vj to v and Pi,P i the corresponding paths, as above, from vj to v. The edges of c(7) which are members of P1 v P; satisfy relations (1) and they can be extended to a pairing in ND(7). This determines a tree T’ with ND(Z) = AD(T).Moreover the vertices vi and vj are dissimilar in TV = T - Ti - Tj v vi v vP since any automorphism of qj mapping vi intovj must map P I onto But this is impossible, corresponding multisets along P1and p‘2 being different. Thus by Theorem 4 the tree T ’ , and consequently T , is not reconstructible.

6.

The conditions in Theorem 5 are not complete since there is no “only if’ part. The following Theorem remedies this situation. Theorem 6:

Suppose that for any inhomogeneous p of c(T) the path p - v is unique. Then T is not NDreconstructible if and only if there are two pairs of nonhomogeneous vertices vi, vj and vh, Vk in T ) such that the following two conditions hold:

c(

(i) o(v i)= o(vj) and o(vh) = Nvk)

Numerical decks of trees

(11) all paths from vi, vi. vu, least two.

Vk

65

to the sink v meet in a common vertex z # v of multiplicity at

Proof: Suppose that two such pairs do exist. Fix one required pair v., V J and consider the sets u h and u k consisting of all E u h and c u k such that any dcan i x taken as the second pair. Fixing the second pair V h E Uh and Vk E uk, consider the paths (vi - v), (vj - v), (Vh - v), (vk v) in G(T).Notice that each of them is the unique path from the corresponding vertex to the sink. Extend the union of the four paths to a pairing in ND. In the obtained tree the vertices vi and vj satisfy the conditions of Theorem 4; the first two by the assumptions. For the third, let z1, z2 two vertices of T' corresponding to Z in c(T) and choose the pairing in ND in such a way that the paths (vi - zl), (vh - zl), (vj - z2) and (vk - zi)occur in TI. But then vi and vj are dissimilar in Tq = T - Ti - v vi v vj since any automorphism of Tq mapping vi onto vj also maps uh onto Ub This is impossible. This proves the sufficiency.

4

i,

5

Suppose now that there are two nonisomorphic trees having the same ND. Let vi, vj be two vertices satisfying the assumptions of Theorem 4. By assumption the paths (vi - v) and (vj - v) are unique. Let (Vi

- v) = (vl,vil,va2 ,...)v)

Extend their union to a pairing of 21'D and consider the corresponding tree T'.

For each p E (vi - v) u(vj - v) define a rooted tree T'(p) consisting of all branches of p except those belonging to the above union. Since there is no automorphism of Tq mapping vi onto vj there is a minimal L such that T(vic) is not isomorphic to qvj[) as rooted trees. Hence by the argument used in proving equivalence of (ii) and (ii)' in Theorem 4,thereexists a second pair vh, vk, vh E T(vic), vk E T(vjc), as required and viecoinciding with vjcin G(T) is the required common vertex z. 4. Complexity of Numerical Deck Recognition Problems We now consider the computational complexity of the recognition problems of numerical decks of trees. 4.1 The ND-Recognition Problem Reference [7l contains a polynomial time algorithm for the recognition problem of a number deck of a tree. Clearly Corollary 1can be directly used to devise a very simple and efficient algorithm for this problem. 4.2 N p Completeness of some Numerical Deck Recognition Problems Theorem 2 states that the recognition problems of an edge number deck of a tree, a total number deck of a tree and an endtree number deck of a tree are reducible to each other in polynomial time. An attempt to give a polynomial time algorithm for recognizing whether a multiset R is an endtree number deck of a tree based on Theorem 3 is as follows: Letjbethefirstindexin Rsuchthataj> l . T h e n f o r e v e r y i = j , j + 1, ..., nwetrytofind among the unused elements of {al, ...,ai- 1) a subset which sums up to ai - 1. Unfortunately

F. Gavril, I. Krasikov and J. Schonheim

66

this does not give a polynomial time algorithm since there may be many such subsets summing up to a i - 1 . Yet this gives a non-polynomial branch and bound algorithm. Indeed it turns out (see Theorem 7 below) that the problem is NP-complete. The known NP-complete problem which will be shown to be reducible to our problem is the so-called 3partition problem. It is formulated as follows: Consider a multiset A of 3n positive integers and an integer bound b such that Z, A a = b nb and for every element a of A one has Tb < a< T. The question is whether there is a partition S1 U S ~ U ... u S,of Asuch that C,, sia= bfor 1 si I n. Restricted to n > 2, the problem is NP-complete in the strong sense. To define NP-completeness in the strong sense [S] let I be an instance of a numerical problem 41) its length and m(1) the maximal number appearing in I. A problem is said to be NPcomplete in the strong sense if there exists a polynomial F such that the restriction of the problem to instances I having m(l) sf(C(1)) is also NP-complete. Theorem 7:

The 3-partition problem restricted to instances I having m(1) 5 fiC(1)) is reducible in polynomial time to the ETND-recognition problem, T rooted at the centroid.

Proof: Consider an instance A = { U ~ , . . . , Q ~ b~ }to, the 3-partition problem. Let R be the multiset obtained from A by adding to it nb - 3n Occurrences of one, n-Occurrences of b + 1 and one Occurrence of n(b + 1); the multiset R has (nb - 3n) + 3n + n + 1 = n(b + 1) + 1 elements. Let R be an instance to the recognition problem of an endtree number deck of a tree rooted at a centroid. This reduction can be done in polynomial time since b I m(l) sffC(Z)). By Theorem 3 , R is a solution to the second problem if and only if b + 1 < n(b + 1) - ( b + l), which is true for n > 2, and there is a partition sl, ...,s d + + 1 of R = {n(b + 1)) fulfilling

,

sl=O for 1 1 i < n b - 3 n ,

C a + l = a i for n b - 3 n + 1 1 i s n b , a E s,

x a + l = b + l for n b + l < i I n b + n , a E s,

C a + l = n ( b + l ) + l for i = n b + n + l . a E s,

...,s d + is a solution to the instance of the 3-partition problem. Conversely, consider a solution snb 1, ..., Snb ,to the instance of the 3-partition problem.

Therefore s d + 1,

+

+

Define si as 0 for 1 I i I nb - 3n, si as a multiset of aiones for nb - 3 n + 1 5 i 5 nb, and Snb + + as a multiset of n Occurrences of b + 1. Then sl, ..., snb + + 1 is a solution to the instance of the recognition problem of an endtree number deck of a tree rooted at a centroid.

,

Corollary 4 The recognition problems for a total number deck of a tree, an edge number deck of a tree and an endtree number deck of a tree rooted at a centroid are NP-complete.

Numerical decks of trees

67

4.3 Reduced Versions

Since the recognition problem of an endtree number deck of a tree rooted at a centroid is NP-complete, it is natural to look for reduced versions of this problem which might be less difficult. The depth of the trees used in the proof of Theorem 7 is at most four, therefore, the above problem remains NP-complete when restricted to rooted trees of depth at most four. Similarly, the recognition problems for edge number deck and total number deck remain NPcomplete when restricted to trees of diameter at most seven. We now prove that the endtree number deck problem remains NP-complete when restricted to trees with at most two sons per vertex. For proving this we use the numerical matching with target sums problem known to be NP-complete in the strong sense [8].The problem is defined as follows: consider two multisets X, Y, each containing m positive integers and a target vector
J(f(l)) is reducible in polynomial time to the recognition problem of an endtree number deck of a tree rooted at a centroid with at most two sons per vertex.

Proof: Consider an instance X = {XI ,...,x,}, Y = { j l , ...,y,}, 4 1,...,b 2 to the first problem and let q = 2maxuy! 1 {xi,yi,bi}. Define 2 1 = { x + 3q I x E X}, 2 2 = (y + 4q I y E Y}, Z3 = { b i+7 q + 11 lSiSm},Z4={zj=C{=1 ( bi + 7q+ 1)+j -l }7, 2, 3 = { n + q l X E {y + 2q I y E Y}. Let Z7 be a multiset containing 2m Occurrences of 2q - 1. For every r a Z,u Z g u Z, letZ,= { r - 1, r -2, ..., 1). Define R = (Ul, Zi) u ( U , , z1 . z2 Zr); R has I I = C, x x + C y Y y + 7qm + 2m - 1 elements, the maximal element being n. Let R be an

w,&=

instance for the second problem.

Consider a solution sl, ...,,s to the first problem. We construct a directed tree Twhose vertices are the elements of R as follows: we set a row with the vertices b1 - 7q + 1, ..., b, + 7 q + 1, and below a row with the vertices of Z1 u Z2. For every 1 Ii 5 m, we have s, = z{x~,,yi,}, xil + yi, = bi and we insert edges from bi + 7q + 1 to x i , + 39 and y i , + 4q. We make z2 E Z4 the father of bl + 7q + 1 and b2 + 7q + 1, we make z3 E & the father of z2 and b3 + 7q + 1 and so on until we make z, the father of z, - 1 and b, + 7q + 1. For every 1 5 i Im we make xi + 3q the father of x i + q and 2q - 1 and we make y i + 4q the father of y i + 2q and 2q - 1. Below every vertex r, r = xi + q or r = yi + 2q or r = 2q - 1, we insert a directed path of vertices r, r - 1, ..., 2, 1. It is easy to see that R is the endtree number deck of Tand Tis a tree rooted at a centroid having at most two rows per vertex. Conversely, consider a solution T to the instance of the second problem. Denote every vertex of T by the cardinality of the subtree rooted at the vertex. A vertex in Z4 is greater than 14q thus it can have as sons only vertices of Z4 u Z,. A vertex in Z3 is greater than 7q thus it can have as sons only vertices of Zl u ZF A vertex bi + 7q + 1 of Z3 can have as sons exactly one vertex xil + 3q from Z1 and one vertex yi,+ 4q from 3.For every b,, let si = {xii,bii} where xi, + 3q and yii + 44 are the sons of bi + 7q + 1. It is easy to see that $1, ...,,s is a solution to the instance of the first problem.

Corollary 5: The recognition problem of an endtree number deck of a tree rooted at a centroid remains NPcomplete when restricted to trees in which every vertex has at most two sons. The recognition

F. Gavril. I. Krasikov and J. Schonheim

68

problems for a total number deck of a tree and an edge number deck of a tree remain NP-complete when restricted to trees with vertices of maximum degree three.

4.4 NP-Completenessof the RND Problem The Minimum Cover problem, known to be NP-complete [S], is defined as follows: consider a family C of subset of a finite set Sand a positive integer k, k s ICI. Is there a subfamily C'of C,with IC'I s k, such that every element of S belongs to a subset in C'? Theorem 9: The Minimum Cover problem is reducible in polynomial time to the RND problem. PrOOf:

Consider an instance C = { S1,. ..,S,}, S = { s1,. ..,sp},k to the Minimum Cover problem. We replace every element of S by its index in S plus 2n and restate the input as follows: S is the set of integers from 2n + 1 to 2 n + p and C is a family of multisets of S. We construct the corresponding instance to the RND problem as follows: To make things clearer, we construct the instance for RND together with a candidate tree. Let mi = Zs sis, M = 1 + max 1 mi, N = (n + k + l)M+ 1; N is the number of vertices in the tree. The tree has a root with a multiset of N + k + 1 M's. The root has a set F1 of n children corresponding to the elements of C,a set F2 of k children corresponding to the elements of C' and an additional child X.To the children in F1 correspond the multisets Si,..., SL, each Si obtained from Si by appending to it M -mi- 1 ones. To the children of F2 correspond multisets which are copies of 4'....,SA. Consider a vertex of F1, corresponding to some S/. Its children are lSil vertices, corresponding to the elements of Siwith multisets (N - sj ,i + n,sj - n - i - 1), and M - mi - 1 terminal vertices. Let F4 denote the set of children of the vertices in F l , corresponding to the elements of S. A child of a vertex Si in F1, corresponding to some sj, has attached to it a path with si- n vertices and a path with n - 1 vertices. The instance to the RND problem in the family of above multisets with multiples deleted. If the instance C,S,k has a solution C' for the Minimum Cover problem, then we assign the vertices of F2 to the elements of C'. For a vertex in F2 corresponding to some SiE C', we join it by edges to the vertices of F3 corresponding to the elements of Si and to M- m, - 1 terminal vertices. If IC'I < k we take k - IC'I vertices of F2 as copies of vertex X. It is easy to see that this tree is a solution to the corresponding instance of RND.Conversely, consider a tree T which is a solution to the instance of the RND problem. By the construction, the multisets corresponding to the vertices in F3 and those corresponding to the vertices of F4 are distinct, thus they are represented by distinct vertices in T. Also, the multisets corresponding to two vertices sj,s; E F4 are distinct by their identity or by the identity of their fathers, thus they are represented by distinct vertices in T. Therefore in T appear distinct vertices for the multisets corresponding to F3 u F4 If in T , a vertex of F3, corresponding to some sj E S is a son of a vertex in F1, then a vertex of F4 corresponding to sj is a son of a vertex in F2 and they can be interchanged. In this way we obtain a tree in which the vertices in F3 are children only to the vertices of F2. Thus, the vertices in F2 define a cover C' of S.

4

Corollary 6:

The RND problem is NP-complete even for trees with vertices of maximum degree three. In this case the reduction is also from Minimum Cover problem, but in the candidate tree the root is replaced by a path with n + k + 1 vertices to which the vertices of F1 u F2 u { X } are attached and every vertex Siin F1 is replaced by a path with IS) vertices to which the vertices in F4 corresponding to the elements of Si are attached. Some minor changes complete the reduction.

Numerical decks of trees

69

5. Concluding Remarks We have seen new aspects of the tree recognition and reconstruction problem. Being aware of the successes in recognizing and reconstructing trees from partial decks, we attempted to obtain recognition and reconstruction by using rather partial information from the Deck namely some numerical information such as the cardinalities of connected components in the cards of the deck. The numerical nature of the data lead to algorithms whose computational complexity turns out to differ surprisingly for the ND and END problems; the first being polynomial while the second NP complete, even if reduced to trees with some particular structure. In [9] and recently in [S]more general numerical decks are used based on cards like T - {vl,...,vs} called s-decks D,, thus the usual decks are 1-decks. More s is larger less the recognition and reconstruction from Ds= (01, D2,...,D,} is dependent on structural properties like similar vertices or isomorphic branches. It is also conjectured that every tree is reconstructible from D3. It is very likely that the corresponding algorithms will turn out to be of low complexity.

References P.J. Kelly; A congruence theorem for trees, Pacific J. Math., %1-968 (1957). F.Harary, E.Palmer; The reconstruction of a tree from its maximal subtrees, Canad. J. Math., 18,803810 (1966). Y.Caro,J. Schonheim; Decomposition of a tree into isomorphic subtree., Ars. Combinatoria, 9,119-130 (1980). I. Krasikov, M.N. Ellingham and W.J. Myrvold; Legitimate number decks for trees, Ars. Combinatoria, 21,15-17 (1986). I. Krasikov; Interchanging branches and similarity in a tree, Graphs and Combinatorics, 7 , 165-175 (1991). I. Krasikov and J. Schonheim; The reconstruction of a tree from its number deck, Discrete Math., 53. 137-145 (1985). F.Gavril and J. Schonheim; Constructing trees with prescribed cardinalities for the components of their vertex deleted subgraphs, J. of Algorithms, 6.23-252 (1985). W.B. Giles; Reconstructing trees from two point deleted subtrees, Discrete Mathematics, 15,325332 (1976).