Question: We can define a binary tree representation T² for an ordered general tree T as follows (see Figure 8.21): ¢ For each position p of
¢ For each position p of T, there is an associated position p² of T².
¢ If p is a leaf of T, then p² in T² does not have a left child; otherwise the left child of p² is q², where q is the first child of p in T.
¢ If p has a sibling q ordered immediately after it in T, then q² is the right child of p² in T; otherwise p² does not have a right child.
Given such a representation T² of a general ordered tree T, answer each of the following questions:
a. Is a preorder traversal of T² equivalent to a preorder traversal of T?
b. Is a postorder traversal of T² equivalent to a postorder traversal of T?
c. Is an inorder traversal of T² equivalent to one of the standard traversals of T? If so, which one?

D G (b) (a) B.
Step by Step Solution
3.39 Rating (161 Votes )
There are 3 Steps involved in it
a yes... View full answer
Get step-by-step solutions from verified subject matter experts
