My question is about Huffman D-ary code. Here is the problem:
Find the Huffman D-ary code for $(p_{1}, p_{2}, p_{3}, p_{4}, p_{5}, p_{6})=(6/25, 6/25, 4/25, 4/25, 3/25, 2/25)$:
a) for $D=2$ b) for $D=4$
Here in the solution manual, it has solved this problem like this:
for $D=2$:

for $D=4$:

Why is $p_{7}=1/25$ added? Is it correct? I know that since the number of symbols is not enough for D=4 we should add another probability to the end but shouldn't it be equal to 0? And also Why is $1/25$ added to tree of D=2 while we don't need it?
I don't understand what they are doing. The common procedure, as you point out, is to add one or several dummy symbols with zero probability, so that the total number of symbols is of the form $n = (D-1) k +1$