CMSC 121 Intro to CS Fall 2017

NAME: ______

0) Assume pictures that are each 900x725.

a) How much space does a picture take (without any compression)?

i) in Bytes

ii) in Kilobytes

iii) in Megabytes

iv) in Gigabytes

b) We have 200 pictures. How much total space does it take to store them (without any compression happening)?

i) in Bytes

ii) in Kilobytes

iii) in Megabytes

iv) in Gigabytes

v) in bits

vi) in Megabits

c) On a 4 Gigabyte drive, how many of these pictures could we store?
d) Imagine a compression algorithm that after running it on a picture, each picture is now 593 KB.

i) What is the compression ratio? Express your answer as a fraction in lowest terms.

ii) What is the space savings ? (1 – compressed size / original size)

Express your answer as a percentage.

e) Now, imagine a different compression algorithm that gives a compression ratio of 7 : 4

How much space would each picture take if this algorithm were applied?

Express your answer in the measurement of your choice.

f) Using this compression algorithm, how many pictures could we store on a 4 GB drive?

g) Now, imagine a third compression algorithm that gives a compression ratio of 9 : 2

How much space would each picture take if this algorithm were applied?

Express your answer in the measurement of your choice.

h) Using the compression algorithm in part g, how many pictures could we store on a 4 GB drive?

1) An early version of USB had a transfer rate of 12 Mbps.

a) How long would it take to transfer 200 of the pictures from problem 0 (before compression)?

b) How long would it take to transfer 200 pictures from problem 0 after using the compression in part e (ratio of 7 : 4)?

c) How long would it take to transfer 500 pictures from problem 0 after using the compression in part g (ratio of 9 : 2)?

2) Consider video to be shown in a medium YouTube resolution.

Assume it takes about 17MB to store a single second of video before compression.

It’s The Great Pumpkin, Charlie Brown is 24 minutes and 42 seconds long.

a) Being prepared for YouTube resolution much space does it take to store It’s The Great Pumpkin, Charlie without compression?

b) LancerStar Telecommunications Company has developed a network that can transfer data at 700 Mbps (700 Megabits per second). How long would it take to transfer the video across this network?

c) Most video is compressed before transfer. Assuming a compression ratio of 5: 3, what would the size of the video be now?

d) With the compression in part c, how long would it take to transfer over the LancerStar network?

e) If it takes 39 seconds to compress the video as described in part c, and 20 seconds to decompress the video, is it quicker to use compression or just send the video as is? Explain your answer.