Question

In: Computer Science

You want to reduce text communication with your corrupt friends in Wall Street. You suggest using...

You want to reduce text communication with your corrupt friends in Wall Street. You suggest
using Huffman coding to reduce the number of bits in communication.
You look over your previous 100 words of texts. You find the following words and their number
of occurrence in parenthesis: SELL (12), BUY (8), MOVE (19), HIDE (42), STOP (2) and WATCH
(17). This frequency is consistent over all your messages.

(a) What codewords do you recommend for each word?

(b) Whit these codewords, how many bits of communication do you need when texting 100
words compared to a fixed-length code?

Solutions

Expert Solution


(b) In 100 words text frequencies will be SELL (12), BUY (8), MOVE (19), HIDE (42), STOP (2) and WATCH
(17). There are 6 words. So, in normal encoding we will need 3 bits for each word. So, for 100 words we will need 300 bits.

If we use huffman encoding the number of bits needed will be:

12*4 + 8*5 + 19*2 + 42*1 + 2*5 + 17*3 = 229 bits

We can see the considerable amount of saving here.


Related Solutions

You have corrupt friends in Wall Street that supply you with the following information: the stock...
You have corrupt friends in Wall Street that supply you with the following information: the stock price of ten fraudulent companies every month for a year. You have access to the data for the entire year in advance. You would like to use this information to get as rich as possible by the end of the year. At the start of every month k, you look at the table S[i,k], which gives you the average return on on a $1...
Ben Graham stated that "if you want to make money on Wall Street, you must have...
Ben Graham stated that "if you want to make money on Wall Street, you must have the proper psychological attitude." Quoting the philosopher, Spinoza, Graham said "you must look at things in the aspect of eternity". What does this mean? How did this change Warren Buffet's life and the trajectory of investor psychology? And does this investment guidance hold true given the unprecedented swings in the stock market today?
Describe the history and current issues facing Wall Street. What did you learn about Wall Street...
Describe the history and current issues facing Wall Street. What did you learn about Wall Street that surprised you? What questions do you still have?
What do you think of Wall Street (or any financial markets)? Do we need Wall Street?...
What do you think of Wall Street (or any financial markets)? Do we need Wall Street? Why or Why not? Do a bit of research on how the financial markets (in the US, or other countries of your interest) were affected by the Covid-19 since March until now. What is "The Paradox of Thrift"? How does that apply to our current situation?
To reduce the number of workers in your HCP, you want to assess if a noisy...
To reduce the number of workers in your HCP, you want to assess if a noisy machine can be relocated away from workstation. Before relocation, you measure the TWA at the workstation and its distance from the machine (the only noise source) are 89 dB and 6 ft. If you move the machine further away from the workstation by 4 ft (that is a total of 10 ft from workstation), what dB would you be expected at the workstation? Will...
You want to send pumpkins to some of your friends for Halloween! You look up shipping...
You want to send pumpkins to some of your friends for Halloween! You look up shipping policies and find out that there are certain constraints involved when shipping packages. A pumpkin needs to weigh at least a certain amount in order to be eligible for shipping. At the same time, no pumpkin can weigh more than a certain amount due to packing restrictions. However, you have already purchased a whole lot of pumpkins in varying sizes. You now want to...
INTERNAL CONTROL PAPER Your are to find an article from sources such as The Wall Street...
INTERNAL CONTROL PAPER Your are to find an article from sources such as The Wall Street Journal , The Columbus Dispatch, Business First, etc. The article must be about a news story that occurred or was first reported no earlier than four months before the first day of the current semester. The article must summarize a breakdown of internal control of an organization and the theft of assets or other white collar crime that resulted. If you cannot find such...
You look in the Wall Street Journal and find that the price of the bond described...
You look in the Wall Street Journal and find that the price of the bond described above in part (a) is actually $1,100. What yield-to- maturity does this price imply? Part a of the above question is What is the price (per $1,000 of face value) of a 9 year 4% coupon-bond issued by the U.S. Treasury? You may assume that the discount rate is 6%.
1. You read in The Wall Street Journal that 30-day T-bills are currently yielding 5.7%. Your...
1. You read in The Wall Street Journal that 30-day T-bills are currently yielding 5.7%. Your brother-in-law, a broker at Safe and Sound Securities, has given you the following estimates of current interest rate premiums: Inflation premium = 2.50% Liquidity premium = 0.7% Maturity risk premium = 1.85% Default risk premium = 2.00% On the basis of these data, what is the real risk-free rate of return? Round your answer to two decimal places. 2. The real risk-free rate is...
Your friends suggest that you take a 15-year mortgage, because a 30-year mortgage is too long...
Your friends suggest that you take a 15-year mortgage, because a 30-year mortgage is too long and you will pay a lot of money on interest. If your bank approves a 15-year, $700,000 loan at a fixed nominal interest rate of 12% (APR), then the difference in the monthly payment of the 15-year mortgage and 30-year mortgage will be   ?(Note: Round the final value of any interest rate used to four decimal places. ) It is likely that you won’t...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT