Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions

Question

Explain the chemical properties of acids with examples.

Answered: 1 week ago

Question

Write the properties of Group theory.

Answered: 1 week ago