Chapter 11

Trees

[18/100%]
Show
LaTeX
Problem 182

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

?
Problem 183

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

?
Problem 184

Prove that in an undirected tree T=(V,E)\mathfrak {T}=(V, E) containing at least one edge, the number of leaves 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 185

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 the graph becomes a tree.

?
Problem 186

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

?
Problem 187

Prove Lemma 76 on page 221.

Lemma 76: Suppose an arbitrary vertex v∈Vv \in V is chosen in an undirected tree T=(V,E)\mathfrak {T}=(V, E). For each vertex uu denote by n(u)n(u) the minimal length of a path from vv to uu. For each undirected edge (u,w)(u, w) define its direction from uu to ww if n(u)<n(w)n(u)<n(w). Then the resulting graph is a directed tree with root vv.

?
Problem 188

Prove Theorem 77 on page 223 in the reverse direction.

Theorem 77: Definitions 93 (p. 221) and 94 (p. 222) of a directed tree are equivalent.

Definition 93 (Directed tree): a directed graph T=(V,E)\mathfrak {T}=(V, E) is called a (directed) tree if 1) it has exactly one source r∈Vr \in V, called the root of the tree; 2) exactly one edge leads into each of the remaining vertices; 3) every vertex is reachable from the root.

Definition 94 (Directed tree, inductive definition): a directed graph is a tree in the following cases. 1) Any graph T0=(V,E)\mathfrak {T}_{0}=(V, E) with a single vertex V={v}V=\left\{ v\right\} and empty edge set E=∅E=\emptyset is a tree; the vertex vv is called the root of this tree. 2) Suppose the graphs T1=(V1,E1),…,Tk=(Vk,Ek)\mathfrak {T}_{1}=\left(V_{1}, E_{1}\right), \ldots , \mathfrak {T}_{k}=\left(V_{k}, E_{k}\right) are trees with roots r1∈V1,…,rk∈Vkr_{1} \in V_{1}, \ldots , r_{k} \in V_{k} respectively, the vertex sets ViV_{i}, i=1,…,ki=1, \ldots , k, are pairwise disjoint, and r0r_{0} is a new vertex, r0∉Vir_{0} \notin V_{i}, i=1,…,ki=1, \ldots , k. Then the following graph T=(V,E)\mathfrak {T}=(V, E) is also a tree with root r0r_{0}: V={r0}∪⋃i=1kViV=\left\{ r_{0}\right\} \cup \bigcup_{i=1}^{k} V_{i}, E={(r0,ri):i=1,…,k}∪⋃i=1kEiE=\left\{ (r_{0}, r_{i}): i=1, \ldots , k\right\} \cup \bigcup_{i=1}^{k} E_{i}.

"The reverse direction" means: if a graph T\mathfrak {T} satisfies Definition 94, then conditions 1)-3) of Definition 93 hold for it, proved by induction on the construction from Definition 94.

?
Problem 189

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 from EE both of whose endpoints 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 190

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.

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

Problem 191

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

?
Problem 192

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 into each of the remaining vertices v∈V\{r}v \in V \backslash \left\{ r\right\} exactly one edge leads.

?
Problem 193

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

?
(a)

vertex v1v_{1} is a leaf;

(b)

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

(c)

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

(d)

exactly two vertices are leaves.

Problem 194

Suppose the root of a directed tree T\mathfrak {T} has five sons, and each of the remaining internal vertices has three or four sons, where the number of vertices with three sons is twice the number of vertices with four. How many vertices and edges are there in total in T\mathfrak {T}, given that its number of leaves equals 2626?

?
Problem 195

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) one can uniquely reconstruct the forest F\mathfrak {F}. Prove the analogous statement for the suffix traversal.

?
Problem 196

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

?
Problem 197

How many leaves and vertices are there in a complete binary tree of height hh?

?
Problem 198

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 \cdot d)+((c+a \cdot d)-(a+b) \cdot (c-d))

How many vertices were saved?

?
Problem 199

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, suffix, and infix traversals (for negation vertices with a single son, count it as the right one).

?