Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Your solutions must be typed, machine readable PDF files. All submissions will be checked for
plagiarism!
For each question requiring you to design an algorithm, you must justify the correctness of your
algorithm. If a time bound is specified in the question, you also must argue that your algorithm
meets this time bound.
Partial credit will be awarded for progress towards a solution.
Please note that for max flow algorithms you must clearly detail any graphs you are con-
structing. This means describing all vertices, edges, capacities, sources, and sinks. Diagrams
(either neatly hand-drawn or in LaTeX) are also encouraged as a supplement. In terms of
quoting known max flow algorithms, you may only quote the ones taught in lectures (i.e. Ford-
Fulkerson or Edmonds-Karp). To justify the correctness of a max flow algorithm, you must
explain why your algorithm result satisfies all conditions imposed by the problem. Roughly
10% of the total marks will be specifically allocated towards the clarity and conciseness of
your explanations.
Question 1 Arc Competition
[20 marks] Arc is hosting a training session for the members of various societies at UNSW. There
are n students who are Arc members, and m < n registered societies. Each of the n students is a
member of at least 1 and at most 4 of the m societies. Each of the m societies must send exactly
1 student to represent them at the training session.
In order to keep the crowd diverse, Arc would like to avoid all of the student representatives
studying degrees from the same faculty. Each of the n students is enrolled in a single degree
offered by 1 of the k ≤ n faculties at UNSW. For every faculty i ∈ [1..k], at most ui students
belonging to it will be allowed to attend the event.
Design an O(nm) algorithm that determines if it is possible to find a selection of students to attend
the event such that all of these criteria are met. If it is possible, also identify which m students
will attend.