 Hello everyone, welcome to this session. I am Dr. Asha Thurangi and today we are going to learn Shannon Pano Coding Technique. At the end of this session, you will be able to encode the messages of the transmitter using Shannon Pano Coding Technique. These are the contents of this session. Well, in the previous session, we studied types of coding techniques and how to encode a message ensemble using Shannon Pano Coding Technique. Before moving ahead, recall to which coding technique does Shannon Pano Coding Technique belongs. Yes, the answer is source coding technique. In the previous session, we saw how Shannon Pano Coding Technique is applied to find the code words and the efficiency of a system. In that case, we had no confusion in partitioning the messages. But this is not the case all time. Sometimes, there exists an ambiguity in selecting the position for partitioning the messages. How to deal with such problems with ambiguity is now discussed. Consider this example. Apply Shannon Pano Coding procedure for the following message ensemble. Given is set of messages consisting of messages from X1 to X7 with the probabilities as shown and M is equal to 2. Let us now solve this. As per the first step, arranging the messages with the decreasing order of their probabilities, here we get X1 at the top and X7 at the bottom as shown. Now pause this video for few seconds and think where to apply the partition first. Yes, there are two possible ways to partition these messages. Out of these two, the first approach to partition is by applying a first partition after X1 as shown. This gives the sum of probability of the upper message subset as 0.4 and the sum of probabilities of the lower message subset is 0.6. Consider the second approach. The first partition can be applied after message X2 as shown with this. Now the sum of probabilities of the upper message subset is 0.6 and the sum of probabilities of the lower message subset is 0.4. In both the cases, the difference between the sum of probabilities of two subsets is same that is 0.2. That means both approaches are correct as per the rule. Thus, there is ambiguity about which one to select for coding. Before finalizing this, let us apply Shannon Fano coding procedure using both approaches and see the difference. Consider the first approach. Arranging the given messages in the decreasing order of their probabilities, let us first partition the message after X1. 0 is assigned to messages in the upper subset and 1 is assigned to all the messages in the lower subset. Now as the upper subset consists of only one message, no more partition is possible further. Considering the lower subset, the partition is now applied after X3. This gives minimum possible probability difference between the two subsets. Once again, 0 is assigned to all the messages in the upper subset and 1 is assigned to all the messages in the lower subset. Continuing this process, now apply the partition between X2 and X3. 0 is assigned to upper subset messages and 1 is assigned to lower subset of this partition. The next possible partition is after X5 as shown. 0's and 1's are assigned as shown. This is continued till we get only one message in each subset. Let us see. Thus, we now see each message subset consists of only one message and no more further partition is possible. Thus, the code word is then obtained for each message by tracing 0's and 1's from left to right for each message. The final code words and the length of code for messages is as shown in the table. Average length of code word is then calculated by using the formula of L bar. Expanding this equation and substituting the values we get, L bar equal to 2.48 letters per message. Now let us use second approach. Again, considering the messages in the decreasing order of probabilities, let us now apply the first partition after X2. 0's are assigned to all the messages in the upper message subset. 1's are applied to all messages in the lower message subset. Now, let us continue this process till we get only one message per subset. Let us see how. Thus, we now see no more further partition is possible. With this, second approach, the code words and the length of each code word is obtained as shown. Average length of code word is then calculated again using the formula of L bar. Thus, expanding the equation and substituting the values, we now get L bar equal to 2.52 letters per message. We can now see the difference. Using first approach, average length of code word comes to be 2.48 letters per message. And using the second approach, it is 2.52 letters per message. We know that efficiency of the system is inversely proportional to the average length of the code word. Thus, the best approach to choose among the two would be the first approach which gives comparatively lower L bar. Further, let us now calculate entropy. Expanding the equation and substituting the values, we get entropy h of x equals to 2.42 bits per message. Now, the efficiency is calculated using the lower L bar. By using the formula as shown and substituting the values, we now get efficiency eta equal to 0.976, that is 97.6 percent. Thus, in this session, we have seen how Shannon Fano coding technique is applied for problems having ambiguity in partitioning the messages. You can also try to solve this problem considering m equal to 3 and check out the efficiency of the system. This is the reference used. Thank you.