Question

1.Say that we code 256 different letters. Let num(X) be the number of times an arbitrary...

1.Say that we code 256 different letters. Let num(X) be the number of times an arbitrary letter appears in the text . Assume that for every X and Y both num(Y ) > num(X)/2 and num(X) > num(Y)/2 hold. Is the ASCII (8 bits) code worse than the Huffman code in this case?

Homework Answers

Answer #1

No, the ASCII code will work equivalently as huffman code in this case. In both type of coding we will require 8 bits for each character.

For the huffman coding to optimise the required bits, the difference in number of appearance of characters must not be following the above condition.

The largest time appearing number in this case is always less than twice the smallest appearing number.

So that makes sum of any two numbers of appearance of letters less than any number's occurence, and hence we can't get any benifit of huffman coding.

Know the answer?
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
Similar Questions
Use python language please #One of the early common methods for encrypting text was the #Playfair...
Use python language please #One of the early common methods for encrypting text was the #Playfair cipher. You can read more about the Playfair cipher #here: https://en.wikipedia.org/wiki/Playfair_cipher # #The Playfair cipher starts with a 5x5 matrix of letters, #such as this one: # # D A V I O # Y N E R B # C F G H K # L M P Q S # T U W X Z # #To fit the 26-letter alphabet into...
Let x = day of observation and y = number of locusts per square meter during...
Let x = day of observation and y = number of locusts per square meter during a locust infestation in a region of North Africa. x 2 3 5 8 10 y 2 3 12 125 630 (a) Draw a scatter diagram of the (x, y) data pairs. Do you think a straight line will be a good fit to these data? Do the y values almost seem to explode as time goes on? No. A straight line does not...
Let x = day of observation and y = number of locusts per square meter during...
Let x = day of observation and y = number of locusts per square meter during a locust infestation in a region of North Africa. x 2 3 5 8 10 y 2 3 12 125 630 (a) Draw a scatter diagram of the (x, y) data pairs. Do you think a straight line will be a good fit to these data? Do the y values almost seem to explode as time goes on? No. A straight line does not...
QUESTION 1 What does the following code segment output? int red, blue; red = 7; blue...
QUESTION 1 What does the following code segment output? int red, blue; red = 7; blue = red + 2 * 5 red++; blue = blue + red; cout << blue; 4 points    QUESTION 2 Is the following statement true or false? The Boolean expression in the following if statement will be true for all values of x in the range from 10 to 20 (including the endpoints) and false for all other values: int x; if (x >=...
Note: Do not use classes or any variables of type string to complete this assignment Write...
Note: Do not use classes or any variables of type string to complete this assignment Write a program that reads in a sequence of characters entered by the user and terminated by a period ('.'). Your program should allow the user to enter multiple lines of input by pressing the enter key at the end of each line. The program should print out a frequency table, sorted in decreasing order by number of occurences, listing each letter that ocurred along...
Code in Java SAMPLE PROGRAM OUTPUT Because there are several different things your program might do...
Code in Java SAMPLE PROGRAM OUTPUT Because there are several different things your program might do depending upon what the user enters, please refer to the examples below to use to test your program. Run your final program one time for each scenario to make sure that you get the expected output. Be sure to format the output of your program so that it follows what is included in the examples. Remember, in all examples bold items are entered by...
1.A fair die is rolled once, and the number score is noted. Let the random variable...
1.A fair die is rolled once, and the number score is noted. Let the random variable X be twice this score. Define the variable Y to be zero if an odd number appears and X otherwise. By finding the probability mass function in each case, find the expectation of the following random variables: Please answer to 3 decimal places. Part a)X Part b)Y Part c)X+Y Part d)XY ——- 2.To examine the effectiveness of its four annual advertising promotions, a mail...
Case 46: Sleeping on the Job: A Managerial Challenge Marty is an African American nurse who...
Case 46: Sleeping on the Job: A Managerial Challenge Marty is an African American nurse who has worked in a major university hospital for over six years evaluating patients’ rehabilitation needs. She used to have an autonomous job making patient visits in area city hospitals; however, two years ago her role in the hospital changed, and she is now working Monday through Friday in an office. Three years ago Marty’s mother was diagnosed with dementia and is now dependent in...
1.Establishing the virtual Management: As known, managing virtual staff requires a different method or approach than...
1.Establishing the virtual Management: As known, managing virtual staff requires a different method or approach than managing local staff. Due to that reason, Golden Scent has developed a strategic plan to successfully manage its virtual staff in the USA. Identify the suitable manager. to make sure our work will proceed as we planned, Golden Scent willrecruit a virtual manager with the essential skills and knowledge required to manage virtual employees. Find the skilled people to work with. Since not everyone...
1.The sample mean is an unbiased estimator for the population mean. This means: The sample mean...
1.The sample mean is an unbiased estimator for the population mean. This means: The sample mean always equals the population mean. The average sample mean, over all possible samples, equals the population mean. The sample mean will only vary a little from the population mean. The sample mean has a normal distribution. 2.Which of the following statements is CORRECTabout the sampling distribution of the sample mean: The standard error of the sample mean will decrease as the sample size increases....
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT