Difference between revisions of "CSC231 Final Exam 2012"

From dftwiki3
Jump to: navigation, search
(Problem #1 (2 points))
 
(2 intermediate revisions by the same user not shown)
Line 30: Line 30:
 
** have 2 arrays A and B filled with floating point numbers, find the index where the index where A[i] + B[i] is max.
 
** have 2 arrays A and B filled with floating point numbers, find the index where the index where A[i] + B[i] is max.
 
-->
 
-->
 +
<onlydft>
 
=Problem #1 (2 points)=
 
=Problem #1 (2 points)=
  
Line 286: Line 287:
 
Write a program that contains the array ''Art'' in its data section, and that reconstruct the original multiline collection of emoticons that can be directly pasted into Skype.
 
Write a program that contains the array ''Art'' in its data section, and that reconstruct the original multiline collection of emoticons that can be directly pasted into Skype.
  
In the header of your program indicate your computation for the compression factor for our example string.  For example, if the number of bytes defined by '''db''' is 5 times smaller than the length of the full string, then the compression ratio will be 20%.  Explain how you compute your answer.  What is the lower bound for the compression ratio?  In other words, what is the lowest possible value for the compression ratio?
+
In the header of your program indicate your computation for the compression factor for our example string.  For example, if the number of bytes defined by '''db''' is 5 times smaller than the length of the full string, then the compression ratio will be 20%.  Explain how you compute your answer.   
 +
 
 +
What is the''' lower bound''' for the compression ratio?  In other words, what is the lowest possible value for the compression ratio?
  
 
==Requirements==
 
==Requirements==
Line 326: Line 329:
 
DNA sequences are ordered sequences of 4 different ''bases'' typically denoted A, C, G, and T.  A stands for ''adenosine'', C ''cytosine'', G ''guanine'', and T ''thymine''.
 
DNA sequences are ordered sequences of 4 different ''bases'' typically denoted A, C, G, and T.  A stands for ''adenosine'', C ''cytosine'', G ''guanine'', and T ''thymine''.
  
Since we only have 4 bases, we can represent each one by just 2 bits: 00 for ''A'', 01 for ''C'', 10 for ''G'' and ''11'' for T.  Your assignment is to write a program that takes an ASCII string representing a DNA sequence and to ''pack'' it into a collection of bytes.
+
Since we only have 4 bases, we can represent each one by just 2 bits: 00 for ''A'', 01 for ''C'', 10 for ''G'' and ''11'' for T.  Your assignment is to write a program that takes an ASCII string representing a DNA sequence and that ''packs'' it into a collection of bytes.
  
 
Here is an example:
 
Here is an example:
Line 372: Line 375:
  
 
   rsubmit final final3.asm
 
   rsubmit final final3.asm
 +
 +
</onlydft>

Latest revision as of 19:24, 2 May 2017

This final exam is take-home. It is open-books, open-notes, and open-Web. It is due a week after it is made available, at 11:59 p.m. on Wednesday December 19, 2012.

You cannot discuss the details of this exam with anyone except your instructor. The TAs are not allowed to help you out in any way. No question will be answered in person after 12:00 a.m. on 12/12/12. Instead, if you have questions regarding the exam, send them via email to thiebaut@cs.smith.edu, and the question and its answer will be broadcast back to the hole class via email. Please start your message subject with "Final Exam Question"; this will help me find the messages more easily.

The exam is given under the rules of the Smith College Honor Code.

Make sure you reference all work/resources you use in your documentation.

Files submitted past the deadline will not be graded. No exceptions!. If for some reason the server is down and you can't submit your files using the rsubmit command, email your file(s) to dthiebaut@smith.edu.









...