Chapter 12: Problem 2
Apply the merge sort to each of the following lists. Draw the splitting and merging trees for each application of the procedure. a) \(-1,0,2,-2,3,6,-3,5,1,4\) b) \(-1,7,4,11,5,-8,15,-3,-2,6,10,3\)
/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
Learning Materials
Features
Discover
Chapter 12: Problem 2
Apply the merge sort to each of the following lists. Draw the splitting and merging trees for each application of the procedure. a) \(-1,0,2,-2,3,6,-3,5,1,4\) b) \(-1,7,4,11,5,-8,15,-3,-2,6,10,3\)
All the tools & learning materials you need for study success - in one app.
Get started for free
Related to the merge sort is a somewhat more efficient procedure called the
quick sort. Here we start with a list \(L: a_{1}, a_{2}, \ldots, a_{n}\), and
use \(a_{1}\) as a pivot to develop two sublists \(L_{1}\) and \(L_{2}\) as follows.
For \(i>1\), if \(a_{i}
Let \(T=(V, E)\) be a tree with \(|V|=n \geq 2\). How many distinct paths are there (as subgraphs) in \(T\) ?
Let \(T=(V, E)\) be a tree where \(|V|=v\) and \(|E|=e\). The tree \(T\) is called graceful if it is possible to assign the labels \(\\{1,2,3, \ldots\), v the vertices of \(T\) in such a manner that the induced edge labeling - where each edge \(\\{i, j\\}\) is assigned the label \(|i-j|\), for \(i, j \in\\{1,2,3, \ldots, v\\}\), \(i \neq j\)-results in the e edges being labeled by 1,2 , \(3, \ldots, e\). a) Prove that every path on \(n\) vertices, \(n \geq 2\), is graceful. b) For \(n \in \mathbf{Z}^{+}, n \geq 2\), show that \(K_{1, n}\) is graceful.c) If \(T=(V, E)\) is a tree with \(4 \leq|V| \leq 6\), show that \(T\) is graceful. (It has been conjectured that every tree is graceful.)
Let \(T=(V, E)\) be a balanced complete \(m\)-ary tree of height \(h \geq 2\). If \(T\) has \(l\) leaves and \(b_{h-1}\) branch nodes at level \(h-1\), explain why \(l=m^{h-1}+(m-1) b_{h-1}\).
On the first Sunday of 1993 Rizzo and Frenchie start a chain letter, each of them sending five letters (to ten different friends between them). Each person receiving the letter is to send five copies to five new people on the Sunday following the letter's arrival. After the first seven Sundays have passed, what is the total number of chain letters that have been mailed? How many were mailed on the last three Sundays?
What do you think about this solution?
We value your feedback to improve our textbook solutions.