# Internal Path Length

Discussion in 'Homework Help' started by zulfi100, Jan 31, 2016.

1. ### zulfi100 Thread Starter Active Member

Jun 7, 2012
464
1
Hi,
I am reading a book, i am attaching its text again. Its providing a formula for calculating the internal path length :

$$\sum(i-1)l_i$$
Above is book formula in Latex
$$T_S=44kHz$$
Above is the example of Latex given in Tutorial
(Sorry Latex not working)
I mean
Summation(i-1) li
but i am not able to find the internal path length correctly using the attached BST.
I cant verify the internal path Length for level 3 (note root is at level 1) using the formula:

Summation (i-1) li where li is the number of nodes on level I, root is at level 1.

For level 1:

Summation (1-1) *1 = 0 (correct)

For level 2:

Summation[(1-1) * 1 + (2-1) *2] = 2 (correct)

For level 3:

Summation [(1-1) * 1 +{ (2-1) *2} + {(3-1) * 4}] = 10 (Not correct, it should be six from figure)

Zulfi.

File size:
174.8 KB
Views:
7
• ###### Internal Path Length for Level3.jpg
File size:
27.5 KB
Views:
7
Last edited: Jan 31, 2016
2. ### WBahn Moderator

Mar 31, 2012
23,194
6,989
It's very hard to figure out what you are asking. What does T_S = 44 kHz have to do with any of this?

How do you figure that it should be six?

How many nodes are there in a tree of height 3? What is the path length from the root to each of those nodes? What is the sum of all of those path lengths?