COS 109: Problem Set 0

Wed Sep 10 08:36:12 EDT 2014

Due 5:00 PM, Wednesday Sept 17, on paper, in class, or in the box outside my office (Room 311, 3rd floor, CS building).

Collaboration policy for COS 109: Working together to really understand the material in problem sets and labs is encouraged, but once you have things figured out, you must part company and compose your written answers independently. That helps you to be sure that you understand the material, and it obviates questions of whether the collaboration was too close.

You must list any other class members with whom you collaborated.

Problem set answers need not be long, merely clear enough that we can understand what you have done, though for computational problems, show enough of your work that we can see where your answer came from. There is no need to repeat the question, and it saves paper if you just give the answers. PLEASE submit typed material, not hand-written, and keep a copy for yourself in case something goes astray. Thanks.

Do not use Google or other search engines for these questions. Your task is to work from what you know and can reason about, not what you can look up.

1. In and Out

Estimation is a useful quantitative skill, and most problem sets will have some estimation questions. Webster's defines estimate as "to judge or determine generally but carefully; calculate approximately." Note the words generally and approximately. There isn't a correct answer; the task is to come up with a sensible ballpark or "back of the envelope" value. Keep in mind that if the data you start with is approximate, the results cannot be precise. Just because your calculator displays 8 figures, they aren't necessarily significant; do not blindly copy down all the digits.

(a) How many times a week (total for all undergrads) are prox cards used to enter dorms?

(b) How much disk space might it take to store a record of a typical single transaction: a particular student opens a specific entry/door at a specific time on a specific date? (Think of the number of letters, digits and other characters you would have to write down if you were doing this by hand; each of those characters takes at most one byte of storage.) Write down what might be in one such transaction, just to make it concrete.

(c) If you had records for a bunch of transactions, say an entire academic year, you might be able to compress the information so it takes less space. Briefly describe a way that you might be able to do this compression. We're not looking for anything sophisticated here, just an idea that might reduce the amount of space needed. It may help to think about what's repetitive and thus redundant and thus only needs to be stored once for a large group of related transactions.

(d) "The records of all student entries to all dorms since Princeton was founded in 1746 would just about fit on the disk in a current laptop computer." Is this statement likely to be pretty accurate (within a factor of 2 or 3), way too conservative (much more data would fit, say all of the Ivy League), or way too optimistic (it really would take a lot more disk space just for Princeton)? Be as quantitative as necessary to support your position, but not excessively so -- this is a question about ballpark figures. You can make any reasonable assumptions about squeezing that seem warranted from your answer to part (c). The "right" answer here may well depend on your assumptions, so be sure to state them clearly.

(e) Suppose a surveillance system takes a picture of you each time you use your prox. How many gigabytes (very roughly) would be required to store these pictures of you over the course of one academic year? State your assumptions clearly!

2. On the Street Where You Live

Here are some estimation questions in a different area, based on a random conversation with friends at Google. Make your best estimates, explaining your assumptions (briefly!), but don't anquish over it -- there are no "right" answers. For parts (b) through (d), state clearly what value(s) you are assuming from earlier answers, so we can give you credit for sound reasoning even if your starting numbers seem too far off.

(a) Google's goal for Street View is to have pictures taken along every road in the the world. Thinking parochially for the moment, estimate how many miles of streets there are in the USA. (Hint: imagine the country covered by a uniform grid with a road every mile in each direction. That would be too coarse in cities and suburbia but not bad in unpopulated areas.)

(b) How much money would Google spend on gas for all this driving?

(c) On average, Google takes one picture every foot. Supposing that Google uses ordinary point and shoot cameras (unlikely) and stores JPEG images, how much disk space would it take for the Street View images for the whole USA? If you don't know how big a typical image is, look at the sizes of some random pictures.

(d) How much would it cost to buy ordinary laptop or external hard disks to store this data? You can check sites like Amazon to see how much disks cost if you haven't a clue.

 

3. Gadget numbers

Many of our electronic gadgets have associated capacity or speed numbers that will be discussed in the class. The purpose of this problem is to help you become familiar with some of the gadgets and their numbers. Answer the following for your own hardware if possible, but if not, use a friend's. Be sure to get the units right.

(a) What is the capacity of the disk in your computer, in gigabytes? On a Mac, push the Apple logo button at the top left of the screen, and look at "About this Mac". On a Windows PC, try Start > Control Panel > System and Security > System.

(b) How much RAM does your computer have, in gigabytes?

(c) How many pixels does the screen of your computer have horizontally and vertically? How many total pixels is that?

(d) The "aspect ratio" is the ratio of width to height, and is usually given as something like "5:3", where the values are the width and height reduced to lowest common denominator. What is the aspect ratio of your laptop screen?

(e) Assuming that the pixels on the screen of your cell phone are the same size as the pixels on your laptop, approximately how many pixels are there on your cell phone screen? (Hint: how many pixels are there per square inch or cm on your laptop screen?) If you can easily find out exactly how many pixels there really are, include that information too.