Teaching
211 F '05
 
Assignments
Set 1
Set 2
Set 3
Set 4
Set 5
Set 6
Set 7
Set 8
Set 9
Set 10
Set 11
Set 12
Set 13
Set 14

Problem Set 1

If you run any of the functions (as opposed to just testing them), comment out the code for running the functions before you submit your solution.

N.B.: Tests are not runs. A test is when you evaluate an expression and compare it to some expected result, while a run is when you evaluate an expression without anticipating any particular result for the expression.

The goal of this problem set is to introduce you to some of the skills that a web site administrator, a computer programmer, a computer analyst, or a customer service person needs. This includes reading, writing, arithemtic, talking, and listening.

Problem 1:

Boston harbor has a limited processing capacity. Arriving ships that can't be processed line up for admission in the order in which they arrive. The harbor master has determined that, on the average, between 5 and 7 ships arrive every hour and 4 to 9 ships are processed. Assuming there are 8 ships in the harbor (which has 10 docking stations) and none waiting, he would like to know what kind of scenarios can develop over the next day. Tabulate one possible development in the following table:

hourin dockships waitingships arrivingships leaving
at t = 0 8 0 ? ?
at t = 1 ? ? ? ?
at t = 2 ? ? ? ?
at t = 3 ? ? ? ?
at t = ... ? ? ? ?
at t = 24 ? ? ? ?

What is the maximum number of waiting ships in your development?

What is the minimum number of ships waiting between the hours t = 12 and t = 24?

Determine a formula that describes how many ships are in dock/waiting at t = x + 1 based on the ships in dock/waiting and leaving/arriving at t = x.

Find someone else in class, copy his development and answer the first two questions. Do they differ? Why? Why not?

Problem 2:

A diabetic girl injects insulin based on measurements of her blood sugar level. If the blood sugar level is less than 120, she doesn't need to inject any insulin at all. For a value of 120, she injects 1 unit of insulin. For every additional increase of 20 in her blood sugar level, she gets one additional unit of insulin.

How much insulin does she need to inject for a blood sugar level of 130? 180?

Make a table that shows the number of units of insulin injected for blood sugar values of 100, 110, 120, ..., 200.

Create a formula for calculating the insulin injections.

Use the formula to determine how many units of insulin the girl needs to inject for a blood sugar level of 290.

Problem 3:

A rock accelerates at 9 meters per square-second like this:

after t = 0 1 2 3 4 5 ... 10 ... 15 seconds
it has traveled 0 4.5 18.0 40.5 72.0 112.5 ... ?? ... ?? meters

Create a formula for calculating how far the rock has gotten in t seconds.

Use the formula and a calculator or DrScheme's Interactions Window to fill in the two boxes with ?? in the above table.

Problem 4:

A firm wants to pre-print postcard stationary for rejection notices with all possible combinations of openings. The assumption is that each applicant can be addressed as either a Dr., Mr., or Mrs. followed by a blank space and followed by a colon (:) or a (,) depending on whether they want a formal or a friendly rejection notice, respectively.

Figure out and enumerate all possible combinations. Explain how you arrived at the result.

Problem 5:

Write down a paragraph on why you enrolled in CSU 211 and what your background in programming computers is. The paragraph must consist of exactly three complete, grammatically correct sentences. Don't use more than 30 words for the entire paragraph.


last updated on Sat Nov 26 15:34:41 EST 2005generated with PLT Scheme