Print the Shannon-Fano-Elias code for the assigned symbol.
Given the previous input, the expected output is:
Symbol A, Code: 001
Symbol B, Code: 011
Symbol C, Code: 1010
Symbol D, Code: 1101
Symbol E, Code: 11110
You can safely assume that the input files will always be in the proper format.
You cannot use global variables. A 100% penalty will be applied to submissions using global variables.
You must define the critical sections following the guidelines that we discussed in class.
You must use POSIX threads. A penalty of 100% will be applied to submissions using a thread library other than the pthread library.
You can only use named POSIX semaphores, pthreads mutex semaphores, or pthreads condition variables to achieve synchronization. Using pthread_join or sleep to synchronize your threads is not allowed (you must use pthread_join to guarantee that the parent thread waits for all its child threads to end before ending its execution). A penalty of 100% will be applied to submissions using the previous system calls to synchronize the child threads.
You cannot use different memory addresses to pass the information from the parent thread to the child threads.
You must use the output statement format based on the example above.
Any citation style (APA, MLA, Chicago/Turabian, Harvard)
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.