list sorting algorithm without built in functions
Ältere Kommentare anzeigen
My professor gave me this problem to solve in matlab but it is the first time I have seen something like this. I am pretty sure that it has to be an algorithm that sorts the 2 lists of people, the input would be all the guests (assume there are 300 guests) and output is the sorted lists but I am struggling with it:
For the latest American Music Awards, my cousin, an event organizer, was faced with the following challenge in planning the afterparty: because of enmities between performers, she was asked to come up with a plan (possibly using adjacent but disjoint venues) that would decrease the possibility of a large-scale heated dispute. Research showed that every performer on the list would have at most three enemies attending. It is possible to split the attendants in two groups so that every performer has at most one enemy in their group. Prove it? Assume: if A is an enemy of B, B is also an enemy of A.
2 Kommentare
James Tursa
am 6 Feb. 2020
What is the MATLAB question? This sounds more like a mathematical proof assignment.
"It is possible to split the attendants in two groups so that every performer has at most one enemy in their group?"
Wouldn't that depend on the mapping of who doesn't like who? For example, if all people born during the months of January to June dislike the people born July to December, then the two groups would be obvious. However, I can think of at least one complex relationship that would involve the inability to split 4 people into two groups with no more than 1 enemy within the group.
In any case, this is obviously a task/test for you to figure out.
Antworten (0)
Kategorien
Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!