Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Analysis of Algorithms Problem 1: The Music Club A music club asks its members upon joining to rank in order of preference, a fixed set

image text in transcribed
image text in transcribed
image text in transcribed
Analysis of Algorithms Problem 1: The Music Club A music club asks its members upon joining to rank in order of preference, a fixed set of k classic song titles, with rank 1 being the most preferred title, and rank k being the member's least preferred. This preference ranking is called the member's preference profile. Members are then allowed to listen to contemporary song titles in the club's library, and as they do so, the club's music app automatically maintains a ranked list of their favourite song titles, called the member's top ranked list. The library contains m song titles, each of which is given a unique index from 1 to m. Each top ranked list is a list of library indexes (which are independent of the indexes used for the preference profile). The club owner wants to implement a feature that would recommend a song title from the top ranked lists of the members whose preference profiles are the nearest to that of the requestor He defines the distance between two preference profiles as the the number of times that they disagree on the relative ordering of a given pair of songs. For example, suppose that Alice and Bob are members with the following preference profiles: Alice: Sz, Ss S1,Ss, S Bob: Sa, Sa, Sz, S1 S Then this means that Alice likes Song #2 the most, and Song #4 the least, while Bob likes Song #3 the most and Song #Ste least. Observe that both prefer Song #2 over Song #5 (because each ranked Song #2 higher than Song #5), so they agree on the song pair (2,5). But they disagree on the song pair (2.3) because Alice likes Song # 2 more than she does Song #3, while Bob does not. The song pairs that they disagree on are (2, 3), (2.4), (15), (3, 5), (4, 5), (1,3), (1, 4), so the distance between their preference profiles is 7 According to the club's owner, the best song to recommend to a member with preference profile P, and top ranked list T, is the highest ranked song, that is not already in T, taken from the top ranked lists of members whose preference distance from P is minimum. If there is more than one song with the same ranking that is not in T, then the song with the lowest index in the library should be recommended. Given the preference profile and the top ranked list for each of n members, deter??ne the best song to recommend to the first member of the list, and print its index in the library. If all the songs on the most similar club members' top ranked lists are already on the first member's list, then return-1 Analysis of Algorithms Problem 1: The Music Club A music club asks its members upon joining to rank in order of preference, a fixed set of k classic song titles, with rank 1 being the most preferred title, and rank k being the member's least preferred. This preference ranking is called the member's preference profile. Members are then allowed to listen to contemporary song titles in the club's library, and as they do so, the club's music app automatically maintains a ranked list of their favourite song titles, called the member's top ranked list. The library contains m song titles, each of which is given a unique index from 1 to m. Each top ranked list is a list of library indexes (which are independent of the indexes used for the preference profile). The club owner wants to implement a feature that would recommend a song title from the top ranked lists of the members whose preference profiles are the nearest to that of the requestor He defines the distance between two preference profiles as the the number of times that they disagree on the relative ordering of a given pair of songs. For example, suppose that Alice and Bob are members with the following preference profiles: Alice: Sz, Ss S1,Ss, S Bob: Sa, Sa, Sz, S1 S Then this means that Alice likes Song #2 the most, and Song #4 the least, while Bob likes Song #3 the most and Song #Ste least. Observe that both prefer Song #2 over Song #5 (because each ranked Song #2 higher than Song #5), so they agree on the song pair (2,5). But they disagree on the song pair (2.3) because Alice likes Song # 2 more than she does Song #3, while Bob does not. The song pairs that they disagree on are (2, 3), (2.4), (15), (3, 5), (4, 5), (1,3), (1, 4), so the distance between their preference profiles is 7 According to the club's owner, the best song to recommend to a member with preference profile P, and top ranked list T, is the highest ranked song, that is not already in T, taken from the top ranked lists of members whose preference distance from P is minimum. If there is more than one song with the same ranking that is not in T, then the song with the lowest index in the library should be recommended. Given the preference profile and the top ranked list for each of n members, deter??ne the best song to recommend to the first member of the list, and print its index in the library. If all the songs on the most similar club members' top ranked lists are already on the first member's list, then return-1

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

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

Define induction and what are its objectives ?

Answered: 1 week ago

Question

Discuss the techniques of job analysis.

Answered: 1 week ago

Question

How do we do subnetting in IPv6?Explain with a suitable example.

Answered: 1 week ago

Question

Explain the guideline for job description.

Answered: 1 week ago

Question

What is job description ? State the uses of job description.

Answered: 1 week ago

Question

Methods of Delivery Guidelines for

Answered: 1 week ago