Problem Set Week 01

Before Tuesday Class

Q71. Consider this little bit of logic that describes a tourist's thinking process (taken from the title of a 1970s movie): “if it’s Tuesday, this must be Belgium. Otherwise, I have no idea where we are.” Sketch a flowchart that represents this flow of thought.

Q72. Sketch a flowchart that represents this bit of logic: “if you are a woman then if you are over 40 you should have this test no matter what but if either parent had diabetes women should have the test no matter what. Men only need to take the test if they are overweight.”

Q73. Sketch a flowchart that represents this bit of logic: “if cell E$3 is greater than cell G$12 then value is G$12; otherwise, value is G$12-E$3.”

Q74. Sketch a flowchart that represents this bit of logic: “if the balance is less than the minimum alternative payment then just pay the balance, otherwise, pay the minimum alternative payment.”

Q75. Sketch a flowchart that represents this bit of logic: “If you can get a direct flight for under $1500 take it unless it leaves from SFO before 9 am. Otherwise, see if anything is available on frequent flier miles no matter what the routing. If you can’t find anything, use Expedia to find the cheapest flight out of OAK.”

Before Thursday Class

Q79. Use stepwise refinement to create a flow chart for this set of instructions: Do A and then B. If C, then while E do F and after that do G, otherwise do H. Do I.

Q80. If A: until B do C and then, do D if E, otherwise do F while G. Otherwise if H, then if I do J else do K. Do L.

Q87. Sketch a flow chart to represent the following scenario. The Alameda County Waste Management Authority (ACWMA) has decided to spend some money on a public relations campaign to increase the level of composting ("green bin") recylcing. Data on hand says that current levels are 4 kg per household of four per week. The plan is to spend $10,000 on advertising each month until the level has gone over 6 kg per week for four weeks in a row.
Prefatory concern – what does 4 kg / household of 4 / week mean? The amount of compost likely depends on the number of people in a household. We don't want to get the numbers wrong by failing to take this into account. So, in our data collection, we double the number for households of 2, halve it for households of 8, etc. Why not just express it as "kg/person/week"? That would work fine mathematically. Perhaps the PR folks had wanted to focus on households (and families) so as to induce a greater sense of collective responsibility.

Before Lab

Q88. Convert the following statement to “pseudo-Excel” formulas (follow the example to see what we mean by that).
Example. "If it is Tuesday, this must be Belgium, otherwise it is France" would become something like

= if(day="Tuesday","Belgium","France")

If the calculated payment (CALC_PMT) is less than the alternative monthly minimum payment (ALT_MIN_PMT) then the payment is the alternative monthly payment otherwise it is the calculated payment.

Q89. Convert the following statement to “pseudo-Excel” formulas (follow the example to see what we mean by that).
Example. "If it is Tuesday, this must be Belgium, otherwise it is France" would become something like

= if(day="Tuesday","Belgium","France")

If the current balance (BAL) is less than the calculated payment then pay the balance off, otherwise, pay the calculated payment.

Q90. Convert the following statement to “pseudo-Excel” formulas (follow the example to see what we mean by that).
Example. "If it is Tuesday, this must be Belgium, otherwise it is France" would become something like

= if(day="Tuesday","Belgium","France")

If the calculated payment is less than the alternative minimum monthly payment then pay the alternative monthly minimum unless it is more than the remaining balance in which case just pay the balance off. Otherwise pay the calculated payment.

Classes and Lab

Q76. Sketch a flowchart that represents this bit of logic: If I have anything that is due tomorrow then if I am acing the class already and if I have some money I’ll go out drinking by myself (since all my friends will be busy), but if I don’t have any money I’ll stay home and watch reruns on cable. If, on the other hand, I’m not acing this class, I’ll stay home and study. If I don’t have anything due tomorrow, then if I have some money I’ll see if some friends are around and if so I’ll party with them. Otherwise, I’ll drink alone. If I don’ t have any money I’ll just stay home and watch reruns on cable.

Q83. Weimer & Vining (1989) characterize policy problems in terms of market failure and government failure. Any given problem, they suggest, can be placed in one of four categories: (1) market AND government failure; (2) government works (policy corrects for market failure); (3) market works; (4) government failure to correct for market failure. Their suggested strategy is to start by asking whether there is a market failure and then whether there is government failure. Using the two conditionals, "Is there evidence of market failure?" and "Is there evidence of government failure?" construct a flowchart that would permit you to classify any given situation into one of the four aforementioned categories.

Q86. Sort clients into four categories promising, troubling, recalcitrant, hopeless on the basis of two tests which can be passed or failed.

Q87. Sketch a flow chart to represent the following scenario. The Alameda County Waste Management Authority (ACWMA) has decided to spend some money on a public relations campaign to increase the level of composting ("green bin") recylcing. Data on hand says that current levels are 4 kg per household of four per week. The plan is to spend $10,000 on advertising each month until the level has gone over 6 kg per week for four weeks in a row.
Prefatory concern – what does 4 kg / household of 4 / week mean? The amount of compost likely depends on the number of people in a household. We don't want to get the numbers wrong by failing to take this into account. So, in our data collection, we double the number for households of 2, halve it for households of 8, etc. Why not just express it as "kg/person/week"? That would work fine mathematically. Perhaps the PR folks had wanted to focus on households (and families) so as to induce a greater sense of collective responsibility.

Q91. Sketch flow chart that captures logic of the following process.

Organization consists of intake personnel, counselors, followup social workers, and clerical staff.

When a new client contacts the organization intake personnel determine which of four types of case it is by asking two questions. If a client is returning having already been "typed" she is sent to the appropriate waiting room. Types 1 and 3 are referred to counselor A, type 2 to counselor B, type 4 to counselor C.
Client goes to waiting room until counselor is free. Sessions take 1 hour so the wait can be long. If more than one person waiting client is advised to go away and come back later.
In session, if the client is over 18 they get treatment protocol 1 otherwise they get treatment protocol 2.