## Homework 12

### Due Thursday, November 20, 2014

1. Alternate Floyd-Warshall. Exercise 25.2-7, page 700.
Note: yes, use pseudocode for this problem.

2. Sibling rivalry. Exercise 26.1-6, page 714.

3. Peer grading. For the final exam at the Arbutus Culinary Masters Institute (ACMI), each student must prepare a meal of k dishes. Since the instructor cannot taste the work of all the students, the dishes are actually evaluated by other students. As always there are complications:
• A student must not evaluate his/her own work.
• Each of the k dishes must be evaluated by 3 different people.
• No one should be asked to evaluate more than d dishes.
• A student can only evaluate the work of another student who has similar grades. (This is the "peer" part of peer grading.) Here two students have similar grades if their GPAs are within 0.500.

The peer grading problem is to assign to each student a list of dishes to evaluate so that all of the requirements and constraints described above are satisfied.

Given a list of n students and their GPAs g1, g2, g3, ... gn, describe how you can construct a flow network G = ( V, E ) with a capacity function c such that the maximum flow in the flow network helps solve the peer grading problem at ACMI. Describe what the vertices, edges and capacities represent. Explain how the maximum flow in G corresponds to a solution to the peer grading problem.