Question

In class, we have studied the linear time algorithm for selection. In that algorithm, we have...

In class, we have studied the linear time algorithm for selection. In that algorithm, we have used groups of size 5. Suppose we are using groups of size 13.

• derive the corresponding recurrence formula.

• What is the corresponding time complexity of the algorithm?

I found the reccurance relation to be T(n)=O(n)+T(n/13)+T(19n/26), but I am having trouble finding the time complexity. Also I really want to learn this, so a detailed response would be nice. I believe it is O(n) but I am not sure as to why.

Homework Answers

Answer #1

For a given set of '13' elements the recurrence relation is, T(n)=O(n)+T(n/13)+T(19n/26),

By using the recurrence relation the time complexity can be derived as,

Assume that T (n)< C*n

T (n) = a*n + T (n/13) + T (19n/26)

C*n >= T(n/13) +T(19n/26) + a*n

C*n >= C*n/13+ C*19*n/26 + a*n

C >= 21*C/26 +a

C/26 >= a

C >= 26*a

There exists a constant , so that T (n) = O (n)

If the group is of size less than 5 , then T (n) > O (n) , Hence gouping size of 5 or more than 5 is optimal .

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1. Given an n-element array A, Algorithm X executes an O(n)-time computation for each even number...
1. Given an n-element array A, Algorithm X executes an O(n)-time computation for each even number in A and an O(log n)-time computation for each odd number in A. What is the best-case running time of Algorithm X? What is the worst-case running time of Algorithm X? 2. Given an array, A, of n integers, give an O(n)-time algorithm that finds the longest subarray of A such that all the numbers in that subarray are in sorted order. Your algorithm...
SCENARIO : OPIOID WITHDRAWL OUTGOING NURSE : So we have an Evet Ogam. She is a...
SCENARIO : OPIOID WITHDRAWL OUTGOING NURSE : So we have an Evet Ogam. She is a 34-year-old female brought in by ambulance, last night at 1800 for a heroin overdose. She was given 2 doses of naloxone, 2mg each dose. She vomited twice following the naloxone. Following stabilization in the ER, she has been brought up to our floor for monitoring. Pt is allergic to aspirin and has a history of back surgery in 2012, Pt has been admitted twice...
please answer and explain Video Transcript: Promoting Children's Health: A Focus on Nutrition in Early Childhood...
please answer and explain Video Transcript: Promoting Children's Health: A Focus on Nutrition in Early Childhood Settings: >> Our most important job is to keep the children safe and healthy. And within keeping them healthy and keeping them safe, we want to make sure that they are receiving proper nutrition. So at this age, starting healthy habits, we want to make sure that the preschool and kindergarten age children are receiving all that we can give them when it comes...
Read the case and answer the following Multiple choice questions. There are 5 questions total, where...
Read the case and answer the following Multiple choice questions. There are 5 questions total, where some of them might have more than one correct answers. You can choose more than one options where you think is suitable for the above question. PERFORMANCE MANAGEMENT Project Manager Oliver Caine skimmed his notes as he waited for Ben Robins to come to the meeting room. He hoped Ben would arrive soon, as he wanted to get the con-versation finished quickly. Ben walked...
Review the Robatelli's Pizzeria Case Study. Develop another internal controls system, but this time, in the...
Review the Robatelli's Pizzeria Case Study. Develop another internal controls system, but this time, in the purchases and fixed assets business areas. Prepare a 12- to 16-slide presentation describing the purchases and fixed assets business areas. Be sure to incorporate speaker notes as well as appropriate visuals, graphics, fonts, etc. Include any associated risk in these areas. Describe specific internal controls that include authorization of transactions, segregation of duties, adequate records and documentation, security of assets, and independent checks and...
New Wave Music New Wave Music is an international company that develops music software that is...
New Wave Music New Wave Music is an international company that develops music software that is used to compose music, play recordings in clubs, and produce albums. Founder and CEO Moritz Halbach is the company’s biggest fan. He said “I started this company from nothing, just me, my ideas, and my computer. I love music---love playing music, love writing programs for making music, love listening to music---and the money is nice, too.” Moritz says that he never wanted to work...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...
2. SECURING THE WORKFORCE Diversity management in X-tech, a Japanese organisation This case is intended to...
2. SECURING THE WORKFORCE Diversity management in X-tech, a Japanese organisation This case is intended to be used as a basis for class discussion rather than as an illustration of the effective or ineffective handling of an administrative situation. The name of the company is disguised. INTRODUCTION In light of demographic concerns, in 2012, the Japanese government initiated an effort to change the work environment in order to secure the workforce of the future. Japan is world renowned for its...
What tools could AA leaders have used to increase their awareness of internal and external issues?...
What tools could AA leaders have used to increase their awareness of internal and external issues? ???ALASKA AIRLINES: NAVIGATING CHANGE In the autumn of 2007, Alaska Airlines executives adjourned at the end of a long and stressful day in the midst of a multi-day strategic planning session. Most headed outside to relax, unwind and enjoy a bonfire on the shore of Semiahmoo Spit, outside the meeting venue in Blaine, a seaport town in northwest Washington state. Meanwhile, several members of...
Item 1 In the case below, the original source material is given along with a sample...
Item 1 In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism by clicking the appropriate radio button. Original Source Material Student Version There is a desperate need for theorists and researchers to generate and refine a new breed of learning-focused instructional design theoriesthat help educators and trainers to meet those needs, (i.e., that focus on learning and that foster development of initiative, teamwork, thinking skills, and diversity)....
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT