Problem 1
Suppose you are given a list of COS111 students that contains the name and
the class year of each student. Write an algorithm that finds the numbers
of first year students, sophomores, juniors, seniors, and others (we do
get special students, graduate students and high school students occasionally;
assume they are marked in some special way).
The result provided by your algorithm should be the counts for the
5 categories. Organize your description in a step-by-step fashion.
Be as precise as possible. What are the basic steps used by your algorithm?
What is the input?
Problem 2 :
Write an algorithm to schedule laboratory assistants
for COS 111. Assume that there are 4 lab sections,
and each needs 3 assistants. Assume you
have a list of free afternoons for each of 12 lab assistants.
Since I am not giving you the actual schedules of the assistants, you have to
write in general terms how you would proceed. Assume that the lab sections on
Monday, Tuesday, Wednesday, and Thursday afternoon.
Organize your description in a step-by-step fashion.
Be as precise as possible. What are the basic steps used by your algorithm?
What is the input?
Problem 3:
Is there always a solution to problem 2? In other words, is it possible that
you can be given a list of free times that makes it absolutely impossible
to put three assistants in each session? Justify your answer.
What do you think a computer program
should do if it discovers that the problem it is trying to solve doesn't
have a solution?