Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 1: Choosing Electives [20 points One of the things we've already had to do is pick out electives for sixth grade. Basically, students rank
Problem 1: Choosing Electives [20 points One of the things we've already had to do is pick out electives for sixth grade. Basically, students rank a (long) set of electives in order of preference. But suppose for a moment that preferences are instead only provided in pairs. For instance, a student can specify that he or she "prefers" one elective to another. A given elective can be part of multiple pairwise preferences, but only two electives can be mentioned in any pair. So my kid might have specified the following: I preter lance over astronomy I prefer photography over dance I prefer band over astronomy I prefer photography over band Assuming there are n electives, a student can specify up to n(n-1) such preferences. And a student can specily as iew as zero preferences The school wants to convert the pairwise preferences into a partially ordered list. The most preferred electives should be at the top of the list. More concretely, an elective i should not be below some other elective j if the student has a preference fori over j. (For example. in my daughter's list, dance should never be below astronomy.) Your goal for this problem is to write an efficient algorithm that either (a) generates a partially ordered elective list from a set of preferences or (b) outputs that such an ordering is not possible When more than one partially ordered list is possible, your algorithm can output any such list that respects the student's preferences le. Give a tight asymptotic upper bound on the running time of your algorithm, and provide a brief justification for it. Full credit will be given for the asymptotically most efficient algorithm. Partial credit will be given for less efficient algorithms Your algorithm should be as efficient as possib
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started