diff options
Diffstat (limited to 'tests/1-data-rep/questions.tex')
| -rw-r--r-- | tests/1-data-rep/questions.tex | 139 |
1 files changed, 125 insertions, 14 deletions
diff --git a/tests/1-data-rep/questions.tex b/tests/1-data-rep/questions.tex index 489ae8a..bc32ed8 100644 --- a/tests/1-data-rep/questions.tex +++ b/tests/1-data-rep/questions.tex @@ -2,16 +2,29 @@ \question Lucy records using her camera. The camera saves the audio and video parts of the recording seperately. Lucy transfers - recording to her computer. The audio file has a size of 12.8 kB. - Audio is recorded at a sample rate of 320 kB per second. The audio + recording to her computer. The audio file has a size of 19 MB. + Audio is recorded at a sample rate of 45 kHz. The audio resolution is 32 bits. \begin{parts} - \part[5] In minutes, how many seconds was the recording. + \part[5] In minutes and seconds, how long was the recording. + + \begin{solution} + \begin{align*} + size &= sample\ rate\times sample\ resolution\times length\\ + 18000000 \times 8 &= 45000\times32\times length\\ + 18000000 &= 45000\times4\times length\\ + 18000 &= 45\times4\times length\\ + 18000 &= 180\times length\\ + length &= 100\ seconds\\ + &= 1\ minute\ 40\ seconds\\ + \end{align*} + \end{solution} + \vspace{\stretch{1}} - \part[5] A video file consists of many still frames. Each + \part[4] A video file consists of many still frames. Each frame is a normal image. The size of a video file can therefore be expressed as: @@ -21,40 +34,138 @@ \end{align*} If each frame is 1920 pixels wide and 1080 pixels high in - resolution, and the bit depth of 24 bits, what is the file - size of the video file. + resolution, the bit depth of 24 bits, and her camera records + 30 frames each second. What is the file size of the video + file, rounded to 3 significant figures, in bytes, with some + sensible unit prefix? + + \begin{solution} + + Allow error carried forward for time + \begin{align*} + size &= length\times frames\ per\ second\times + resolution\times colour\ depth\\ + &= 100\times 30 \times 1920\times1080\times24\\ + &= 149299200000\ bits\\ + &= 18662400000\ bytes\\ + &\approx 18.7\ GB + \end{align*} + Three points for correct calculation. One point for + correct rounding and unit prefix. Accept other suitable + unit prefix. + \end{solution} \vspace{\stretch{1}} - + \pagebreak \part[1] Lucy combines the audio and video to form a file. She then runs a lossy compression algorithm on the resulting file. What is lossy compression? - \vspace{\stretch{1}} - \part[3] The file size after compression is reduced by 20\%. - What is the final file size? + \begin{solution} + Reducing the size of a file by removing data. + \end{solution} \vspace{\stretch{1}} + \part[3] The file size after compression is reduced by 95\%. + What is the final file size? Use your rounded value for + video file size. Once more leave your answer rounded to 3 + significant figures, in bytes, with a suitable unit prefix. + + \begin{solution} + + Allow error carried forward for size + \begin{align*} + Compressed\ Size &= + 18.7\times 10^9 + 19\times 10^6 * 0.05\\ + &= 935950000\\ + &= 0.93595\ GB\\ + &\approx 0.936\ GB + \end{align*} + Two points for correct calculation. One point for + correct rounding and unit prefix. Accept other suitable + unit prefix. + \end{solution} + \vspace{\stretch{2}} + \part[1] State an assumption made for part (d). + + \begin{solution} + There is no metadata or other factor that would influence + the file size. + \end{solution} + \vspace{\stretch{1}} + + \pagebreak + + \part[3] Using your rounded value for the total compressed + file size, and the length of recording, find a value for the + size of a compressed video with sound per second. + + Leave your answer rounded to 3 significant figures, with a + suitable unit and prefix. + + \begin{solution} + + Allow error carried forward for size or time + \begin{align*} + Rate &= size \div time\\ + &= 0.936\ GB \div 100\\ + &= 9.36\ MB/s + \end{align*} + Two points for correct calculation. One point for correct + unit and unit prefix. Accept other suitable unit prefix. + \end{solution} + + \vspace{\stretch{1}} + + \part[3] Lucy wants to record 1 hour of video. Estimate how + much space this will take on her hard drive when the video and + audio are combined and compressed, using your answer to (f). + + Leave your answer rounded to 3 significant figures, in bytes, + with a suitable unit prefix. + \begin{solution} + + Allow error carried forward for size or time + \begin{align*} + Size &= rate \times time\\ + &= 9.36 \times 60\times 60\\ + &\approx 33.7\ GB + \end{align*} + Two points for correct calculation. One point for correct + unit and unit prefix. Accept other suitable unit prefix. + \end{solution} + \vspace{\stretch{1}} \end{parts} \droptotalpoints \pagebreak - \question Let us say there is a string: + \question Let us say there are some bits: - \verb|Hi| + \centering + 000110111100000001111111001 \vspace{1cm} \begin{parts} - \part[2] If the string is encoded in 8 bit ascii, how much - space does the string take in bytes to store? + \part[2] Using run length encoding represent these bits. + \vspace{\stretch{1}} + + \part[2] Computers store information in binary. Let us say + that a run is represented by 5 bits: 4 bits for the length of + the run, and 1 bit for the bit in the run. For example 00000 + which is 5 zeroes would be 10010, using the first to bits to + represent the 5 and the final bit to represent the 0. + Represent your encoding in this format. + \vspace{\stretch{1}} \end{parts} + \droptotalpoints + \pagebreak \end{questions} |
