CSE 12: Survey of Computer Science
Assignment #7 (Algorithms and User interface design)

Laboratory work for 11/3:
Start the multimedia with Start>Run uc, which launches the multimedia for The Univesal Computer. This week you will study two units from the multimedia:

1) Detection of Emerging Trends. At the end of this unit is an assignment to do a literature search research on Object-Oriented Programming. See if you can find any new trends in the development of UML (Unified Modeling Language). Show your results to the TA. You may work on this exercise in pairs, if you like (optional).

2) Under User interface and web design, go through just the first section, Usability. After going through this content, you will be ready to work on exercises 8.10 and 8.11 in the book (and given below). Begin working on these exercises in pairs (required). You will continue working on 8.11 and 8.12 as homework and present your results in a presentation next week.

Laboratory work for 11/10:
In this lab, you will do two things:

1) Present the results of your work on exercises 8.11 and 8.12 in class next week. I recommend that each pair present one Powerpoint presentation, showing your critique and proposed redesign of a user interface. Each pair should complete their presentation in 5-7 minutes.

2) Start the multimedia with Start>Run uc, and go through the second section of User interface and web design: HTML.

Homework exercises:
Do the following exercises in The Universal Computer:

Exercise 7.3: Suppose the size of A is 100 and we initialize the first five elements as we did above. (A[0]=9, A[1]=4, A[2]=5, A[3]=6, A[4]=8.) Under what circumstance would the revised algorithm be more efficient? Under what circumstance would its performance be the same?

Exercise 7.12: What is the conditional expression in line 11 comparing? Discuss examples for when it would succeed and fail.

Exercise 7.13: What is line 14 swapping? Discuss an example.

Exercise 7.16: If there are 10 elements in sortArray, how many times will line 6 be executed? How many times will line 8 be executed? How many times will line 11 be executed? How many times will line 14 be executed? If there are 100 elements, how many times will line 11 be executed?

Exercise 7.20: What does the computation of line 5 accomplish? How does it rely on the behavior of integer division? Give an example.

Exercise 7.43: Why does repeatedly dividing the array in half require roughly log2(N) comparisons to ensure that a key is not in the array? Hint: Any N which is a power of 2 is equal to the product 2*2*..*2 (where there are log2(N) factors).

Exercise 7.44: Under what conditions should we sort an array before searching it?

Exercise 7.58: For example, suppose one algorithm’s measure is 6N and a second algorithm’s measure is 2N2. Compute the two values for powers of 10 up to 1,000,000. Compare the size of the two numbers with the size of their difference. What happens, and what is its significance?

Exercise 7.62: If chess-playing is an exponential problem, and people are relatively slow to consider the consequences of possible moves, why are some people good chess players? Why only recently did a special-purpose supercomputer defeat the world champion?

Exercise 8.3: To the left [in the book] is a graphic of a floppy disk. (A firm plastic case encases this disk; before this design, they really were floppy.) How many ways can this disk be inserted in a drive? How does the shape of the disk affect its use? (Is it a square, or is a rectangle? What are those notches for?) How well does this design support Norman’s principles? How so? Can you propose a better design?

Exercise 8.4 (social/ethical): When people cannot figure out to use a mechanical or computer system, why do they sometimes apologize, saying things like, “I’m sorry, I’m no good with mechanical things” or “I’m no good at computers”? Who’s to blame here? What are the business costs as well as broader social costs of interfaces that discourage users? What if anything can be done to alleviate these costs?

Extra credit:

Exercise 7.23: Modify the pseudocode for BinarySearch so that instead of NOTFOUND it returns a value indicating where one might want to insert the key value that was not found in the array. (More extra credit: modify and test program BiSearch.java to make sure your algorithm works.)

Exercise 7.41: In the worst case, is hashing worse, the same, or still better than linear search? Why?
How can the possibility of the worst case be minimized?

Exercise 7.56 (explore): On the web, find yet another sort algorithm and describe how it works.

Exercise 8.6 (explore, social/ethical): Do some research on the web to learn about accessible web design. What legislation and court rulings mandate accessible web design? What are a few techniques that web page designers can incorporate to made their content more accessible to hearing- or visually-impaired users?

Exercise 8.10: How well does the newer user interface of The Universal Computer improve on The Universal Machine, in terms of the principles discussed above?

Exercise 8.11: Evaluate a user interface for another software system—any application or a web site of your choosing—in terms of the usability principles outlined above. Try to take into account the intended purpose and audience of the program. Write up a report describing both the strengths and weaknesses of the interface. Look for things that work as well as things that don’t—effective design isn’t easy! This is a good project for groups of students to work on, then present their results to the rest of a class, which can provide feedback on the group’s work.

Exercise 8.12: Next, propose a redesign of the interface you just critiqued. You may want to do a mock-up of a redesign on paper or use screen capture and graphics editing tools to manipulate the original design.

Note: for exercises 8.11 and 8.12, as noted above, you will present your result as a presentation in lab, Monday 11/10. Then upload your presentation as part of your homework assignment. You may find it useful to use Powerpoint to make your presentations; you may also find a free screen capture tool useful. Screenhunterfree lets you capture rectangular areas to the clipboard, which you can then paste into Powerpoint or other applications.

Due: Monday, 11/10, anytime before midnight.

Hand in: When you're ready to submit your assignment, combine the answers to all the exercises into one text file. Then, attach your file to assignment #7 (where you got this assignment) in Blackboard.

Prof. Blank