2. Design an algorithm to find out the shortest paths from vertex V1 to the others and describe the steps of the algorithm's execution.
3. A communication system has nine characters: c1, c2, c3, c4, c5, c6, c7, c8, c9. The probability of each character is as follows: 5, 22, 3, 9, 10, 11, 28, 4, 8.
1. Draw the Huffman tree for these characters.
2. Encode these characters using Huffman code.