You are a conference organiser and you are asked to organise a conference for a company....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
You are a conference organiser and you are asked to organise a conference for a company. The capacity of the conference room is limited and hence you would want to minimise the number of people invited to the conference. To make the conference useful for the entire company, you need to make sure that if an employee is not invited, then every employee who is an immediate subordinate of this employee gets the invitation (if an employee is invited, then you may or may not invite a subordinate). The company has a typical hierarchical tree structure, where every employee except the CEO has exactly one immediate boss. Design an algorithm for this problem. You are given as input an integer array B[1...n], where B[i] is the immediate boss of the ith employee of the company. The CEO is employee number 1 and B[1] = 1. The output of your algorithm is a subset S C{1,.., n} of invited employees. Give running time analysis and proof of correctness. You are a conference organiser and you are asked to organise a conference for a company. The capacity of the conference room is limited and hence you would want to minimise the number of people invited to the conference. To make the conference useful for the entire company, you need to make sure that if an employee is not invited, then every employee who is an immediate subordinate of this employee gets the invitation (if an employee is invited, then you may or may not invite a subordinate). The company has a typical hierarchical tree structure, where every employee except the CEO has exactly one immediate boss. Design an algorithm for this problem. You are given as input an integer array B[1...n], where B[i] is the immediate boss of the ith employee of the company. The CEO is employee number 1 and B[1] = 1. The output of your algorithm is a subset S C{1,.., n} of invited employees. Give running time analysis and proof of correctness.
Expert Answer:
Answer rating: 100% (QA)
include include define N 8 number of employees using namespace std Note IDEA IS 1 find level of each ... View the full answer
Related Book For
Making Hard Decisions with decision tools
ISBN: 978-0538797573
3rd edition
Authors: Robert Clemen, Terence Reilly
Posted Date:
Students also viewed these algorithms questions
-
If an employee does not complete a Form W4, the employer must withhold tax as if the employee were single with no exemptions. True or False
-
Many would argue that if an employee receives a decent salary, he or she will be satisfied and remain with the organization. What are your thoughts on this statement? Does compensation motivate...
-
Given an array of n elements, give a linear-time algorithm to rotate the string k positions. That is, if the array contains a0, a1, , an1 , the rotated array is ak, ak+1, , an-1, a0, , ak1. Use at...
-
What is the wavelength of light if its frequency is 1.009 106 Hz?
-
The cell potential of a particular voltaic cell with the cell reaction 2Cr(s) + 3Cu2+(aq) 2Cr3+(aq) + 3 Cu(s) is 1.14 V. What is the maximum electrical work, per mole, that can be obtained from 6.61...
-
Mechanistic hypothesis and efficient market hypothesis Hudson Ltd had always classified interest paid as an operating cash flow. In 2024 Hudson Ltd changed its accounting policy and classified...
-
Sweet Bayou Airlines (SBA) flight 494 departs daily from Shreveport for Nashville at 8:47 a.m. The manager of the SBA office in Shreveport must receive a file that combines to contents of the file...
-
Callahan (2009) conducted a study to evaluate the effectiveness of physical exercise programs for individuals with chronic arthritis. Participants with doctor-diagnosed arthritis either received a...
-
Write a 2-page reflection that addresses the following: Describe a research method Research in Abnormal Psychology at the Cellular Level. In what type of instance would this Research in Abnormal...
-
D. Carson and F. Leggatt formed a partnership on June 1 to operate a shoe store. Carson contributed $50,000 cash and Leggatt contributed $50,000 worth of shoe inventory. During the month of June, the...
-
For the purposes of this project, the company/organization can be any of the following: company/organization for which you currently work. The A company/organization for which you have worked in...
-
Sanjay began trading on 1 February 2017, selling standard -rated goods and services. He decided not to register for VAT voluntarily. His turnover (excluding VAT) for the first 16 months of trading...
-
During the quarter to 31 December 2017, a taxable person makes the following supplies: Standard-rated supplies (including VAT) Zero-rated supplies Exempt supplies Input tax for the quarter is...
-
T Ltd has owned 90% of the ordinary share capital of B Ltd for many years. Both are UK resident. Recent results for the two companies are as follows: Trading profit/(loss) Chargeable gains Gift Aid...
-
Amy is domiciled in the UK and has lived in the UK all her life. On 1 January 2017 she leaves to work in Australia for two years, returning on 31 December 2018. During her absence she makes no visits...
-
Brist Ltd is a UK resident company which prepares annual accounts to 31 March. In the year to 31 March 2018, the company had a UK trading profit of 2,120,000 and received overseas property income of...
-
Monty Corporation has the following four items in its ending inventory: Item Cost Estimated Selling Price Estimated Disposal Costs Neutrinos $ 1,910 $2,190 $115 Ocillinos 5,060 4,960 107 Electrons...
-
What are the six activities involved in the physical supply/distribution system?
-
To help counselors identify teenagers who may become problem drinkers, a psychologist created a written test and individuals with scores above 75 on this test are flagged as potential problem...
-
Assess the probability that the New York Mets will win the WorldSeries (WS) next year. Call this probability p. Now assess the following probabilities: P(Win WS | Win Pennant) and P(Win Pennant). Use...
-
Consider the following situations that involve multiple objectives: a. Suppose you want to go out for dinner. What are your fundamental objectives? Create a fundamental-objectives hierarchy. b....
-
Give three reasons why the ICP accelerometer is the chosen transducer for vibration analysis.
-
More and more Japanese companies are moving in on what once was an exclusive U.S. preserve: making and selling the complex equipment that makes semiconductors. World sales are between \($3\) billion...
-
What can be used for a velocity output without the negative aspects of a seismic transducer?
Study smarter with the SolutionInn App