Difference between revisions of "CoE161 2S2223 Programming Activity 2"
Jump to navigation
Jump to search
(Created page with "== Instructions == '''Submission guidelines:''' * For every programming exercise, you are to submit your .ipynb file into your respective submission bin. * To download your ....") |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | == Instructions == | + | == Instructions for Part 1: Individual Work == |
'''Submission guidelines:''' | '''Submission guidelines:''' | ||
Line 17: | Line 17: | ||
You can checkout the exercise in this [https://colab.research.google.com/drive/1vwqCpNX0RAv4EiUAFjwPY1YPqDbSRAKn?usp=sharing link]. | You can checkout the exercise in this [https://colab.research.google.com/drive/1vwqCpNX0RAv4EiUAFjwPY1YPqDbSRAKn?usp=sharing link]. | ||
+ | |||
+ | == Instructions for Part 2: Group Work == | ||
+ | |||
+ | In this group activity, you are tasked to characterize your code and compare it with your group mates. | ||
+ | * Task 1 - Given your Huffman coding function, calculate the total lines of code executed by your function. How many lines are conditional statements? | ||
+ | * Task 2 - Are there any opportunities for parallelism in your code? E.g. are there any operations that can be done simultaneously without any data hazards? | ||
+ | * Task 3 - How many lines of code would be executed if the number of possible characters was increased by 2X? 4X? 8X? 16X? | ||
+ | * Task 4 - Create a short (10-minute) group presentation showing your results. Did you get similar results? |
Latest revision as of 06:34, 19 May 2023
Instructions for Part 1: Individual Work
Submission guidelines:
- For every programming exercise, you are to submit your .ipynb file into your respective submission bin.
- To download your .ipynb file, first in your Google Colab page go to File > Download > Download .ipynb file.
- Don't forget to rename your .ipynb file with the following format "class_lastname_firstname_studentnumber.ipynb".
Hidden Messages
From the discussions, we were taught the simple algorithm of Huffman coding. Review that section again to make sure you get this exercise right.
The objectives are:
- Task 1 - Extract the frequencies of the permuted text given to you.
- Task 2 - Create the Huffman coding function.
- Task 3 - Decode the hidden messages then answer the questions that follow.
You can checkout the exercise in this link.
Instructions for Part 2: Group Work
In this group activity, you are tasked to characterize your code and compare it with your group mates.
- Task 1 - Given your Huffman coding function, calculate the total lines of code executed by your function. How many lines are conditional statements?
- Task 2 - Are there any opportunities for parallelism in your code? E.g. are there any operations that can be done simultaneously without any data hazards?
- Task 3 - How many lines of code would be executed if the number of possible characters was increased by 2X? 4X? 8X? 16X?
- Task 4 - Create a short (10-minute) group presentation showing your results. Did you get similar results?