Chapter 14

Trees

[27/100%]
Show
LaTeX
Problem 335

Determine whether an undirected tree is a planar, Eulerian, semi-Eulerian, Hamiltonian graph. Find its chromatic number.

?
Problem 336

Find a formula relating the number of vertices and edges for a forest of kk undirected trees.

?
Problem 337

Prove that in an undirected tree T=(V,E)\mathfrak {T}=(V, E) containing at least one edge, the number of leaf vertices equals 2+∑v∈V2(deg⁡v−2)2+\sum_{v \in V_{2}}(\operatorname {deg} v-2), where V2V_{2} is the set of non-leaf vertices.

?
Problem 338

Prove that if an undirected tree has exactly two leaf vertices, then it is a "line".

?
Problem 339

Prove that if in a connected undirected graph the number of vertices equals the number of edges, then one of the edges can be discarded so that afterwards the graph becomes a tree.

?
Problem 340

A center of an undirected graph G\mathfrak {G} is a vertex vv for which the length of the longest path from it to the other vertices is minimal. Prove that in a tree

?
(a)

all centers are adjacent;

(b)

there cannot be more than two centers.

Problem 341

Prove that in an undirected tree there exists a vertex through which all maximal simple paths pass.

?
Problem 342

Let T=(V,E)\mathfrak {T}=(V, E) be an undirected tree, v∈Vv \in V an arbitrary vertex of it. For each edge (u,w)∈E(u, w) \in E choose the orientation from uu to ww if the distance from vv to uu is less than from vv to ww. Prove that the resulting directed graph will be a directed tree with root vv.

?
Problem 343

Prove the following statement in two ways: if an undirected tree T=(V,E)\mathfrak {T}=(V, E) has a vertex vv of degree d>1d>1, then it has at least dd leaf vertices.

?
Problem 344

For the set of vertices V={v1,…,vn}V=\left\{ v_{1}, \ldots , v_{n}\right\} determine how many undirected trees there are in which

?
(a)

the vertex v1v_{1} is a leaf;

(b)

both vertices v1v_{1} and v2v_{2} are leaves;

(c)

all the vertices v1,…,vkv_{1}, \ldots , v_{k} are leaves;

(d)

exactly two vertices are leaves.

Problem 345

Let T=(V,E)\mathfrak {T}=(V, E) be a directed tree with root v0∈Vv_{0} \in V. For each vertex v∈Vv \in V define the subgraph Tv=(Vv,Ev)\mathfrak {T}_{v}=\left(V_{v}, E_{v}\right) as follows: VvV_{v} is the set of vertices reachable from vv in T\mathfrak {T}, and EvE_{v} is the set of edges of EE both of whose ends belong to VvV_{v}. Prove that

?
(a)

Tv\mathfrak {T}_{v} is a tree with root vv;

(b)

if two distinct vertices vv and uu have the same depth, then the trees Tv\mathfrak {T}_{v} and Tu\mathfrak {T}_{u} do not intersect.

Problem 346

Give an example of a directed graph for which the first two conditions from the definition of a tree hold, but which is not a tree.

?
Problem 347

A certain rumor spread as follows: its source called three of his friends, each of them passed on the rumor by phone to four of their friends, and each of them, in turn, passed it on to five of their friends. Determine how many people learned the rumor, given that none of them received more than one call and no one called the source of the rumor. Find how many calls were made in total.

?
Problem 348

Let ⩽\leqslant be a partial order relation on a finite set VV possessing the following two properties:

?
(a)

there exists a least element rr;

(b)

if elements xx and yy of the set VV are incomparable, a⩾x,b⩾ya \geqslant x, b \geqslant y, then aa and bb are also incomparable.

A binary relation E(x,y)E(x, y) on the set VV means that xx is the maximal one among the elements less than yy. Prove that the graph (V,E)(V, E) is a directed tree with root rr.

Problem 349

Let T=(V,E)\mathfrak {T}=(V, E) be a directed tree, and let x⩽yx \leqslant y mean that the vertex yy is reachable from the vertex xx. Prove that ⩽\leqslant is a non-strict partial order relation on VV satisfying properties (а) and (б) from the previous problem.

?
Problem 350

Let G=(V,E)\mathfrak {G}=(V, E) be a directed graph with at least two vertices. Prove that the graph G\mathfrak {G} is a (directed) tree if and only if G\mathfrak {G} has no cycles, has a single source rr, and exactly one edge leads into each of the other vertices v∈V\{r}v \in V \backslash \left\{ r\right\}.

?
Problem 351

Let G=(V,E)\mathfrak {G}=(V, E) be a directed graph. Prove that G\mathfrak {G} is a (directed) tree if and only if G\mathfrak {G} has a vertex rr (the root) such that exactly one path leads from rr to any vertex vv.

?
Problem 352

Let the root of a directed tree T\mathfrak {T} have five children, and let each of the other internal vertices have three or four children, with the number of vertices with three children being twice the number of vertices with four. How many vertices and edges are there in total in T\mathfrak {T}, given that the number of its leaves equals 26?

?
Problem 353

Let the root of a directed tree T\mathfrak {T} have three children, and let each of the other internal vertices have two or four children, with the number of vertices with two children being half the number of vertices with four. How many vertices are there in total in T\mathfrak {T}, given that the number of its leaves equals 38?

?
Problem 354

Let F=(T1,…,Tn)\mathfrak {F}=\left(\mathfrak {T}_{1}, \ldots , \mathfrak {T}_{n}\right) be a forest of trees. Prove that from the sequence P=(PRF⁡(T1),…,PRF⁡(Tk))P=\left(\operatorname {PRF}\left(\mathfrak {T}_{1}\right), \ldots , \operatorname {PRF}\left(\mathfrak {T}_{k}\right)\right) the forest F\mathfrak {F} can be uniquely reconstructed. Prove the analogous statement for the postfix traversal.

?
Problem 355

Prove by induction that in every binary tree the number nn of vertices with two children is one less than the number ℓ\ell of leaves.

?
Problem 356

Find the number of leaves and vertices in a complete binary tree of height hh.

?
Problem 357

Construct a tree and an acyclic directed graph representing the following arithmetic formula

Φ=(a+b)/(c+a×d)+((c+a×d)−(a+b)×(c−d)). \Phi =(a+b) /(c+a \times d)+((c+a \times d)-(a+b) \times (c-d)).

How many vertices could be saved?

?
Problem 358

Construct a tree representing the following logical formula

Ψ=((x∨¬y)∧¬(z→(x∧y)))∨(¬z⊕y). \Psi =((x \vee \neg y) \wedge \neg (z \rightarrow (x \wedge y))) \vee (\neg z \oplus y).

For the resulting tree construct the prefix, postfix, and infix traversals (for vertices with negations regard the single child as the right one).

?
Problem 359

Determine the prefix, postfix, and infix traversals of the tree T1\mathfrak {T}_{1} depicted in fig. 12 on the next page, assuming that the edges leaving a single vertex are numbered from left to right.

Fig. 12: The tree \mathfrak {T}_{1}.Fig. 12: The tree \mathfrak {T}_{1}.

?
Problem 360

Determine the prefix and postfix traversals of the tree T2\mathfrak {T}_{2} depicted in fig. 13 on the opposite page, assuming that the edges leaving a single vertex are numbered from left to right.

Fig. 13: The tree \mathfrak {T}_{2}.Fig. 13: The tree \mathfrak {T}_{2}.

?
Problem 361

Let (x,z,u,v,/,−,×,y,z,−,x,y,+,×,+)(x, z, u, v, /,-, \times , y, z,-, x, y,+, \times ,+) be the postfix traversal of the tree of an arithmetic formula built from the variables x,y,z,u,vx, y, z, u, v and the operation signs,,+−×,/+- \times , /. Reconstruct this tree and the formula.

?