Question

3. Let T be the rooted tree consisting of a single root vertex. For n 2, let Tn be the rooted tree consisting of a root vertex with four children, where the subtree rooted at each child is the tree Tn-1. (a) Calculate how many paths in Tn start from the root vertex and end at a leaf vertex. (b) What is the minimum number of bits (0s and 1s) required to represent a path in Tn that starts at the root vertex and ends at a leaf vertex? Show your work and simplify your answer as much as possible. (c) Describe how to encode a path in Tr that starts at the root vertex and ends at a leaf vertex using the number of bits you gave in part (c). (d) Encode the bold path in T3 using your method from part (c)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a) number of paths is equal to number of children of root node *number of childeren of that node = 4*4 = 16.

b) number of minimum bits to represent the path:- four childeren can be represented with minimum of 2 digits and next childrens also with two digits so 2+2=4 bits. eg 0000 shows first path from.first children k1 of root and first children of k1.

c) we can encode a path of given tree as follows

1. encode the number if children of root i.e. in given tree, encoding of children is 00,01,10,11.

2. similarly subsequent children of these paths can be encoded.

d) for the bold path encoding is as follows:+

encode from root to first child - 01

encode from above child to leaf- 11,

so encoding is 0111.

Add a comment
Know the answer?
Add Answer to:
Let T_1 be the rooted tree consisting of a single root vertex. For n greaterthanorequalto 2,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT