Question: CSCI 2 7 0 Homework # 7 Due Date: Wednesday, November 2 0 th , 3 : 1 5 pm 1 . Let

CSCI 270 Homework \#7
Due Date: Wednesday, November 20th,3:15pm
1. Let \( G=(V, E)\) be a flow network with source \( s,\operatorname{sink} t \), and integer capacities. Suppose that we are given a maximum flow in \( G \).
(a) Suppose that we increase the capacity of a single edge \((u, v)\in E \) by 1. Give an \( O(V+E)\)-time algorithm to update the maximum flow.
(b) Suppose that we decrease the capacity of a single edge \((u, v)\in E \) by 1. Give an \( O(V+E)\)-time algorithm to update the maximum flow.
2. At a dinner party, there are \( n \) families \( a_{1}, a_{2},\cdots, a_{n}\) and \( m \) tables \( b_{1}, b_{2},\cdots, b_{m}\). The \( i^{\text {th }}\) family \( a_{i}\) has \( g_{i}\) members and the \( j^{\text {th }}\) table \( b_{j}\) has \( h_{j}\) seats. Everyone is interested in making new friends and the dinner party planner wants to seat people such that no two members of the same family are seated at the same table. Design a polynomial-time algorithm that decides if there exists a seating assignment such that everyone is seated and no two members of the same family are seated at the same table, and explain your answer.
3. You must assign \( n \) students to \( m \) summer programs as evenly as possible. Each student has provided a list of programs he or she is willing to attend, and every program has at least one interested student. Ideally, the students would be evenly spread between the programs, so that no program takes more than \(\left\lceil\frac{n}{m}\right\rceil \) students. However, this will likely be impossible. Design a polynomial-time algorithm to find an assignment that minimizes the number of students assigned to the fullest program.
4. On your homework assignment, you are asked to provide your first name, last name, and ID number. Unfortunately, each student only provided two of the three pieces of information on their latest homework. If only a name and ID are given, it is impossible to distinguish whether the name is a first name or a last name. If a first name and last name are given, the first name will always come first, followed by the last name.
Some students provided their information more than once on different homework assignments (but not necessarily the same two pieces of information they provided before). Some students may have submitted multiple times for the same assignment, and other students may not have submitted at all. Assume that no student gave contradictory information. It is guaranteed that the ID will be unique, but first name and last name are not necessarily unique.
Give a polynomial runtime algorithm to determine the minimum possible number of students enrolled in the class, and explain your reasoning.
CSCI 2 7 0 Homework \ # 7 Due Date: Wednesday,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!