Problem1 Assume you are given an array-like data structure, E, such that E is arbitrarily large...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Problem1 Assume you are given an array-like data structure, E, such that E is arbitrarily large and there is no way to know the size of it. The array E is populated with integer values, from the beginning up to the nth cell, sorted in increasing order. The rest of the cells after the nth contain a very large integer call it max and you don't know n. Your goal is to describe an algorithm that receives an integer value x (x < max) and returns the position of that integer in E in O(log n). You can assume that x exists in E Problem2 The AA department has received several applications for teaching assisteacher Assisnt po sitions from its students. The applicants are provided with the list of available courses and asked to submit a list of their preferences. The teacher Assis committee at UNIV prepares a sorted list of the applicants (according to the applicants' background and experience) for each course and the toteacher Assisl number of teacher Assiss needed for the course. Note that there are more students than available teacher Assis spots. There can also be multiple teacher Assiss per course, though a single teacher Assis can only be assigned to 1 course. Making matter more complicated, certeacher Assisin applicant-course are disallowed since an applicant does not have enough background in a specific course. We will say that A (an applicant) prefers C (a course) to C ' iff C is ranked higher than C' on his/her preference list. The committee wants to apply an algorithm to produce steacher Assisble assignments such that each student is assigned to at most one course. The assignment of the teacher Assiss to courses is steacher Assisble if none of the following situations arises. 1. If an applicant A and a course C are allowed and not matched, but A prefers C more than his/her assigned course, and C prefers A more than, at least, one of the applicants assigned to it. 2. If an applicant, A, and a course, C, are allowed such that A is unmatched, and C has an empty spot or an applicant A' assigned to it such that C prefers A to A' . You need slove these problems: 1.Modify the Gale-Shapley algorithm to find a steacher Assisble assignment for the teacher Assiss-Courses matching problem. Write pseudo code of modified algorithm. 2.Prove that the modified algorithm produces steacher Assisble teacher Assiss-Courses assign ments. Problem1 Assume you are given an array-like data structure, E, such that E is arbitrarily large and there is no way to know the size of it. The array E is populated with integer values, from the beginning up to the nth cell, sorted in increasing order. The rest of the cells after the nth contain a very large integer call it max and you don't know n. Your goal is to describe an algorithm that receives an integer value x (x < max) and returns the position of that integer in E in O(log n). You can assume that x exists in E Problem2 The AA department has received several applications for teaching assisteacher Assisnt po sitions from its students. The applicants are provided with the list of available courses and asked to submit a list of their preferences. The teacher Assis committee at UNIV prepares a sorted list of the applicants (according to the applicants' background and experience) for each course and the toteacher Assisl number of teacher Assiss needed for the course. Note that there are more students than available teacher Assis spots. There can also be multiple teacher Assiss per course, though a single teacher Assis can only be assigned to 1 course. Making matter more complicated, certeacher Assisin applicant-course are disallowed since an applicant does not have enough background in a specific course. We will say that A (an applicant) prefers C (a course) to C ' iff C is ranked higher than C' on his/her preference list. The committee wants to apply an algorithm to produce steacher Assisble assignments such that each student is assigned to at most one course. The assignment of the teacher Assiss to courses is steacher Assisble if none of the following situations arises. 1. If an applicant A and a course C are allowed and not matched, but A prefers C more than his/her assigned course, and C prefers A more than, at least, one of the applicants assigned to it. 2. If an applicant, A, and a course, C, are allowed such that A is unmatched, and C has an empty spot or an applicant A' assigned to it such that C prefers A to A' . You need slove these problems: 1.Modify the Gale-Shapley algorithm to find a steacher Assisble assignment for the teacher Assiss-Courses matching problem. Write pseudo code of modified algorithm. 2.Prove that the modified algorithm produces steacher Assisble teacher Assiss-Courses assign ments.
Expert Answer:
Related Book For
Intermediate Accounting IFRS
ISBN: 978-1119372936
3rd edition
Authors: Donald E. Kieso, Jerry J. Weygandt, Terry D. Warfield
Posted Date:
Students also viewed these algorithms questions
-
Jan Flenderson, marketing manager at Awesome Bits Games (ABG), was starting to get worried. The Kickstarter crowdfunding campaign for the latest company board game, Undead Rising, had gone live at 3...
-
Mike is a salesperson in a retail carpet store. He is paid $500 base salary per month plus 5% commission on sales over $10,000. His sales this month were $23,750. His total deductions were $152.75....
-
Describe how Raj Gupta used three different political tactics to close the sale of Rohm and Haas.
-
1. What is kaizen costing? 2. What are the two general methods of information gathering and sharing when undertaking a benchmarking exercise?
-
In 2010, Tim Brown competed in the FIFA World Cup soccer championship. He was a midfielder for New Zealand, and it was the first time in 28 years for New Zealand to qualify for the World Cup. As a...
-
Create a problem definition for Williwonks, as described in Problem 1. Estimate the weights of importance. Include at least one requirement and one constraint.
-
"Managing Away Bad Habits Team Assignment Organizational Behavior IILeadership Assigned is ashort case from the exercise Managing Away Bad Habits. The task is to develop a turnaround strategy for...
-
Discuss the concepts of judicial accountability and judicial independence. Describe each method of selecting judges. Discuss how each of the three methods of selecting judges relates to...
-
As Assistant Grant Officer for The Ministry of Silly Walks, it is your job to make sure all required paperwork is in order for all grant recipients. The most important piece of paperwork is the...
-
Tamara and Tony Mapp, a married couple, report the following items for the year: Taxable income AMT adjustments Tax preferences Regular tax liability $136560 35160 38400 14794 What is their...
-
A 52.0-g metal weight, heated to 86.00C, is placed into 159 g of water at 21.80C contained in a perfectly insulating thermos flask. After some time, the temperature inside the thermos flask...
-
The unadjusted Allowance for Doubtful Accounts has a $100 credit balance. The aging of accounts receivable is as follows: Customer: Sue Age 0-30 days 30-60 days60-90 daysover 90 days $2,000 Tom Mato...
-
Prescription or the statute of limitations applies to the following instances When the statute does not provide for a deadline for the payment of the tax When the taxpayer opts to carry over its...
-
Calculate, for the 2020 taxation year, your minimum Net Income for Tax Purposes as per the Section 3 ordering rules. Case: Taxpayer Information Jana Larson is a 45 year-old widow. Jana has two...
-
The purpose of this case is to come up with a contingency plan[s] in order to sustain the program Move With Me, a program that serves thousands of community members throughout Lower Manhattan. The...
-
Fuhremann Co. is a full-service manufacturer of surveillance equipment. Customers can purchase any combination of equipment, installation services, and training as part of Fuhremann's security...
-
Brad Dolan, a shareholder of Rhode Corporation, has asked you, the firms accountant, to explain why his share warrants were not included in diluted EPS. In order to explain this situation, you must...
-
Briefly describe the unresolved issues related to fair value accounting.
-
A small company wishes to setup a fund that can be used for technology purchases over thenext6years. Their forecast is for \($12\),000 to be needed at the end of year 1, decreasing by \($2\),000 each...
-
An easy payment plan offered by a local electronics store for your new audio system calls for payments of $2,000, $2,500, $3,000, and $3,500 at the ends of years 1 through 4, respectively. Your money...
-
A person you trust asks you to loan them \($2\),000 at the end of year 1, \($1\),000 at the end of year 2, nothing in year 3, and then they will pay you \($1\),000 in year 4, \($2\),000 in year 5,...
Study smarter with the SolutionInn App