Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3 ( 7 = 7 ) Reconstructing a total order A group of n runners finished a close race. Unfortunately, the officials at the

Problem 3(7=7) Reconstructing a total order
A group of n runners finished a close race. Unfortunately, the officials at the finish line were unable to note
down the order in which the racers finished. Each runner, however, noted the jersey number of the runner
finishing immediately ahead of her or him. (There were no ties.) The race officials ask each runner to give
an ordered pair, containing two pieces of information: (a) first, his or her own jersey number and (b) second,
the jersey number of the runner who finished immediately ahead of him or her. The winner of the race, who
did not see anybody finish ahead of her, enters for (b).
You have been asked to design an algorithm that takes as input the n pairs and returns the order in which
the runners finished the race. Assume each runner is honest.
Give a deterministic \Theta (n log n) time algorithm, and justify the running time of the algorithm. (Hint: Use
sorting.

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_2

Step: 3

blur-text-image_3

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

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

More Books

Students also viewed these Databases questions

Question

(a) What is the best model for the data provided?

Answered: 1 week ago

Question

7. Identify six intercultural communication dialectics.

Answered: 1 week ago