subject

A group of computer scientists wants to create a fixed-length compression algorithm. The simplest way to achieve compression is to use a fixed-length code generator. The idea behind this type of code generator is to assign a fixed-length bit sequence to each symbol of the alphabet. As part of this group of computer scientists, your goal is to write a program to determine the alphabet used by the message to be compressed (set of different characters in the input message), and the frequency of each symbol in the alphabet, using conditionals, loops, and arrays. Input:A sequence of character values representing the message to be compressed. The maximum number of characters in the input message is 100.Example: BBBCCE*You must use a static array of characters to store the input message.*Output:The input message (character array).The number of symbols in the alphabet (integer value).The symbols in the alphabet (characters separated by a comma). You must print the alphabet's characters based on the order they appear in the input message. The number of bits per symbol (integer value). To calculate the number of bits used per symbol, you will use the following formula: ceil(log2(number of symbols in the alphabet)).A histogram showing the frequency of the symbols in the message (see the example below). You must print the information about the frequency of the symbols in the alphabet sorted in increasing order by their first appearance in the input message. Given the previous input, the output of your program must be:Message: BBBCCENumber of symbols in the alphabet = 5Characters in the alphabet = A, B,C, D,ENumber of bits per symbol = 3Histogram showing the frequency of the symbols in the alphabetA | B | ***C | **D | E | *NOTES:You can only use conditionals, loops, and arrays when writing your solution. Using strings will translate into a 100% penalty for your solution. The input message may have white spaces. Consider using getline instead of cin when writing your solution. You must include the cmath library to use the ceil function and the log2 function

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 04:20
Which network media uses different regions of the electromagnetic spectrum to transmit signals through air? uses different regions of the electromagnetic spectrum to transmit signals through air.
Answers: 2
question
Computers and Technology, 23.06.2019 22:20
If i uninstall nba 2k 19 from my ps4 will my career be gone forever?
Answers: 2
question
Computers and Technology, 24.06.2019 10:00
In which view can you see speaker notes?
Answers: 1
question
Computers and Technology, 24.06.2019 10:40
Joe needs to see the slide transitions and animations he has applied to his slides in a large view. which presentation view should he use? in which tab would joe find the animations option to make further changes, if any?
Answers: 1
You know the right answer?
A group of computer scientists wants to create a fixed-length compression algorithm. The simplest wa...
Questions
question
Mathematics, 17.10.2019 07:30
question
History, 17.10.2019 07:30
question
Mathematics, 17.10.2019 07:30
Questions on the website: 13722363