Find Jobs
Hire Freelancers

information theory

$30-250 USD

Completed
Posted over 1 year ago

$30-250 USD

Paid on delivery
The test file “[login to view URL]” is the script from the movie “Monty Python and the Holy Grail.” It has been modified so that it contains only 30 different characters: lowercase a-z (ascii 9710-12210), “space (sp)” (ascii 3210), “line feed (lf)” (ascii 1010) “carriage return (cr)” (ascii 1310), and “end of text (etx)” (ascii 0310). All uppercase, punctuation, and numerals have been removed. The file is in “.txt” format, and contains 61,392 characters. It has also been compressed using zip. First, unzip the file, and note the size of the zipped file vs. the unzipped .txt file. Write the following programs: 1. Write a program to calculate the 30 letter probabilities directly from the file. 2. Write a program to construct a binary Huffman code based on these probabilities. 3. Print out a neat, concise table of your Huffman code, showing the character, probability, Huffman code representation, and code length for each character. 4. Write a program to Huffman encode the data, so that the output file is a sequence of ones and zeros. Then group the output bits symbols into groups of 8 bits (i.e. bytes) so that the final output file is a sequence of 8-bit ascii characters. 5. Have your program calculate the final length, in bits, of the compressed output file. Also have your program calculate the entropy of the source, based on your derived probability values, (assuming that source symbols are independent, which is not really true). 6. Have your program calculate the ratio of output bits per input character. This is Lavg for this compression scheme. 7. Compare Lavg to the calculated entropy of the source. Explain the differences you see. 8. Write a program to decode your encoded data. Confirm that it perfectly reconstructs the original file. Turn in your source code, your Huffman table, evidence that the programs work, and a summary of all calculated values. Include a write-up (1 page max) discussing your results. In particular, discuss the relationship between the (approximate) entropy of the source and the average length of the code. RULES: 1. Do not use library functions for Huffman coding, but feel free to use libraries for opening files, reading in its contents, and for any data structure you may need. 2. Plagiarism: Huffman coding is used fairly extensively in undergraduate programming assignments. As such, there are many resources online (e.g. [login to view URL])which do exactly what the assignment asks of you. You are free to refer to as many resources as you want (and cite them), but do NOT copy paste content from those resources, or from other students. Do NOT use tricks like renaming variables, shuffling the order of functions in the code etc. as this counts as plagiarism. Write your OWN code and submit it. That said, here are some hints (more on this during the live session): * Note that the file contains both carriage return and line feed characters. Depending on your prog. language and library, these may be stripped from the file during the processs of reading it into a string/array. Be careful, do not let this happen as this is incorrect. Total number of characters read in from the file MUST be 61392. Treat the \r and \n characters as it is. * The main idea is to replicate exactly what you're doing on pen and paper while performing Huffman coding. There are a few extra steps (such as calculating character probabilities) that you need to take care of. Once that's done, try to replicate whatever your method is on pen & paper. * You will need some data structures. Arrays/lists/arraylists can suffice (not the best tool for the job), but there are more efficient/convenient ones like dictionaries (hash maps), priority queues etc. To implement the nodes/leaves in a tree, you can use object oriented programming, or just store the binary tree in array form.
Project ID: 34732433

About the project

8 proposals
Remote project
Active 2 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
⭐ Algorithm Developer With C/C++/C#/Python/Java ⭐ I have been working on designing and implementing algorithm with C/C++/C#/Python/Java for 5 years. I have checked your project detail carefully. ✔️I can work full time, and I am sure that I can complete your work with 100% quality.✔️ Thank you for your attention.
$120 USD in 1 day
5.0 (47 reviews)
5.7
5.7
8 freelancers are bidding on average $160 USD for this job
User Avatar
Hi, I read your posting carefully and fully understand. I have been working on designing and implementing algorithm with Java/C/C++/C#/Python for 7 years. I can work full time and I am sure that I can complete your project with 100% quality. You can look up my reviews in the below URLs. https://www.freelancer.com/projects/c-programming/Data-search-script-34555024/details https://www.freelancer.com/projects/cplusplus-programming/Developer-34653894/details https://www.freelancer.com/projects/coding/Build-simple-Battleships-game-Ateiler/details https://www.freelancer.com/projects/java/STOCK-COMPARISON-CHART/details thanks!
$200 USD in 1 day
5.0 (44 reviews)
5.9
5.9
User Avatar
Hello, there! Please see my portfolios. I am an expert full stack development dealing with C, C++ , JAVA , C#, Python, etc... I have worked on many projects. I am open to discuss more details of the project now, Looking to working for you. Please contact me.
$140 USD in 7 days
4.9 (28 reviews)
4.9
4.9
User Avatar
Hello I can do this. Please share the details of the task so that I can check and confirm accordingly.
$200 USD in 7 days
5.0 (5 reviews)
4.6
4.6
User Avatar
Hello I already noticed your requirements in job posting. I also checked your attached file and got what you need. I am well skilled full-stack developer having great experience in Java, C Programming, Python, Software Architecture and C++ Programming. Website will be responsiveness for mobile devices and SEO-friendly. We can discuss more details with your idea and my recommendation. And I am sure to provide an innovative result with my skills and solutions. Please reach out to contact me. Stay safe
$200 USD in 3 days
5.0 (2 reviews)
4.2
4.2
User Avatar
Dear Client. How are you doing? Thank you for posting this project, and I'm very happy to bid on your project. I've read carefully your project details. I have rich experiences related to your project. Your satisfaction with the project is my top priority! If you give me a chance to work with you, then I will do my best to reach your requirements. I'm waiting for your kind response. Please send msg over chat. Let's go. I will do my best for you. Best Regards.
$250 USD in 3 days
5.0 (2 reviews)
1.8
1.8
User Avatar
Good evening Hopefully, you are doing good. Already noticed your posting in detail. information theory I also reviewed your attached file carefully. I am a software developer having great experience in Java, Software Architecture, C Programming, C++ Programming and Python. I will provide you the app as per your requirements where you can easily manage the content and functionality easily. we can discuss project budget and requirements. And I am confident to provide an innovative result with my skills and dedication. Please feel free to contact me so that we can discuss the further project with your idea and my experience. Best
$140 USD in 6 days
5.0 (1 review)
1.0
1.0

About the client

Flag of UNITED STATES
Athens, United States
5.0
1
Payment method verified
Member since Sep 23, 2022

Client Verification

Other jobs from this client

Dominoe Tile(Advanced algo)
$30-250 USD
Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.