Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5. We proved in class that during the TMA, at most O(n) rejections might occur. In this question you are requested to show a matching

image text in transcribed

5. We proved in class that during the TMA, at most O(n) rejections might occur. In this question you are requested to show a matching lower bound in the worst case) and also that a much faster execution could occur, if the input is 'friendly enough'. (a) Describe an input of preferences lists n females and n males, which will cause the total number of rejections, ("no I will never marry you) occurring during the algorithm to be as small as possible. What is this number (as a function of n) ? Prove your answer. (b) Repeat the previous bullet, but now the number of rejections should be as large as possible. running time of TMA is as large as possible (for a set of n people, when n is given to you). Same, but now as what is the input that yields the minimum time. 5. We proved in class that during the TMA, at most O(n) rejections might occur. In this question you are requested to show a matching lower bound in the worst case) and also that a much faster execution could occur, if the input is 'friendly enough'. (a) Describe an input of preferences lists n females and n males, which will cause the total number of rejections, ("no I will never marry you) occurring during the algorithm to be as small as possible. What is this number (as a function of n) ? Prove your answer. (b) Repeat the previous bullet, but now the number of rejections should be as large as possible. running time of TMA is as large as possible (for a set of n people, when n is given to you). Same, but now as what is the input that yields the minimum time

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 Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

3rd Edition

0760049041, 978-0760049044

More Books

Students also viewed these Databases questions

Question

3. Write a policy statement to address these issues.

Answered: 1 week ago