Homework 1 // Due at lecture Jan 28, Wed
Primary contact for this homework: Mengmeng Chen [mchen at cs dot wisc dot edu]
You must do this homework alone. Please staple multiple pages together.
Problem 1
What is your favorite website? Why?
N/A
Problem 2
What is the email address of your section's mailing list? (should be in the "To:" field of any correspondences you receive)?
Problem 3
(This question has no wrong answers.)
-
What is your expected major(s)?
-
Have you taken any other CS courses in the past? If yes, please list them.
-
Why are you taking this course?
-
What do you hope to get out of it?
Problem 4
“Who is the best player in NBA? Kobe Bryant or LeBron James?”
-
Can this question be answered by a digital computer directly?
No
-
If the answer is 'yes', explain how; if the answer is 'no', could you try to answer the question by proposing a new question that can be computed by a computer? (Don't worry that your answer may not be agreed by others.)
The point is that the definition of 'best' is ambiguous. Instead, one may ask, "who averages more points in every game in this season so far?" or "whose salary is higher this year?" "who's got more NBA champions in the last ten years?"
Problem 5
Say we had a 'black box', which takes two numbers as input and outputs their sum. See Figure 1(a). Say we had another box capable of multiplying two numbers together. See Figure 1(b). We can connect these boxes together to calculate p × (m + n). See Figure 1(c). Assume we have an unlimited number of these boxes. Show how to connect them together to calculate:
-
x+b
-
The average of the four input numbers w,x,y and z
-
a^2+2ab+b^2 (Can you do it with one add box and one multiply box?)
Problem 6
John got a new 'MacBook pro' with 2.66GHz Intel Core 2 Duo processor and 4GB DDR3 SDRAM; Mike got an old PC with 1.2GHz Intel Pentium III processor and 512MB SDRAM. John claims that his 'MacBook' is much more powerful than Mike's PC whereas Mike says that both computers are theoretically the same because they can do the same computation. Write two brief paragraphs arguing both sides.
Mike is right because every computer is a universial computing device and, given sufficient time and memory, should be able to perform the same computation and produce the same results.
John is that in that his new MacBook can perform computation at a much higher speed than than Mike's. In situations where results must be produced within a short time, John's new MacBook is more powerful than Mike's.
Problem 7
Abstraction is a key notion in computer world. It allows us to not get bogged down in details and work efficiently. One example is the usage of the high-level languages, which makes it possible for the programmers to focus on the tasks they try to accomplish and write 'machine independent' codes. Now try to demonstrate the notion of abstraction with a real life example. First, find a task (i.e., bake a cake or send a mail) you want to accomplish and describe the steps how you plan to do it in general. Then, break down each step into more detailed steps.
For example:
Mail a letter to a friend
1. Write a letter
1.1 Find a piece of paper
1.2 Find a pen
1.3 Write the letter
2. Put the letter inside an envelop.
....
3. Go to the post office.
....
4. Pay for the postage.
...
|