 
Summary: CS 6890 Homework 1 (20 points)
Written homework provides an excellent framework for achieving the goals of this course. Because
assignments are done as a group and any questions are discussed in class or during office hours,
written solutions to the homework will not be provided. These are typed exercises, but you are
certainly encouraged to actually program some of them. Be sure to show your work for all the
problems.
Note, these exercises may be done in groups of one or two (or with instructor approval, three). If
more than one person is involved, list all the names on ONE set of answers. Groups may change
throughout the semester. Answers should not be compared with others not in your group.
1. Three wise men are in audience with the king. It is common knowledge that there are three red
hats and two white hats. The king puts a hat on the head of each of the three wise men, and asks
them (sequentially) if they know the color of the hats on their head. The first wise man says
that he does not know; the second wise man says that he does not know; then the third wise
man says that he knows. What is the color of the hat of the third man? Explain briefly. If the
third man is blind, can he still determine the color of his hat?
2. Let B denote the collection of all books in your library and for each book xB, let f(x) be the
author of the book x. Does this rule define a function? If not, then what modifications can you
make to the rule to make it a function?
3. A company knows from experience that the demand for bicycles is D(p) = 1202*sqrt(p) where
p is the price. (So if the price is p, you will sell D(p) bicycles.) What price should you charge if
