Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Question :

Suppose you work for a company, iPuritan.com, that has strict rules for when two employees, x and y, may date one another, requiring approval from their lowest-level common supervisor.

The employees at iPuritan.com are organized in a tree, T, such that each node in T corresponds to an employee and each employee, z, is considered a supervisor for all of the employees in the subtree of T rooted at z (including z itself).

The lowest-level common supervisor for x and y is the employee lowest in the organizational chart, T, that is a supervisor for both x and y.

Thus, to find a lowest-level common supervisor for the two employees, x and y, you need to find the lowest common ancestor (LCA) between the two nodes for x and y, which is the lowest node in T that has both x and y as descendants (where we allow a node to be a descendant of itself).

Given the nodes corresponding to the two employees x and y, describe an efficient algorithm for finding the supervisor who may approve whether or not x and y may date each other, that is, the LCA of x and y in T.

What is the running time of your method?

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93131883

Have any Question?


Related Questions in Computer Engineering

Question suppose you have created a program that creates

Question : Suppose you have created a program that creates instances of different types of cars. Now you are creating a program that keeps track of different types of cars. Choose the abstract classes and concrete classe ...

Solve the following problem from fibonaccis liber abacia

Solve the following problem from Fibonacci's Liber abaci: A man left to his eldest son one bezant and a seventh of what was left; then from the remainder, to his next son he left two bezants and a seventh of what was lef ...

Question suppose that we have a set of activities to

Question : Suppose that we have a set of activities to schedule among a large number of lecture halls, where any activity can take place in any lecture hall. We wish to schedule all the activities using as few lecture ha ...

In the scenario activity operating systems and forensics

In the scenario activity Operating Systems and Forensics, which forensic tools would you utilize to recover and process evidence found on the hard drive and what is the objective of recovering data from the USB drive tha ...

The following table records the number of days the stock

The following table records the number of days the stock market recorded the following outcomes: # of Days NASDAQ Up NASDAQ Down NASDAQ Unchanged DJIA Up 30 15 4 DJIA Down 10 40 3 DJIA Unchanged 3 5 2 What is the probabi ...

Scheme number computera write a recursive procedure digits

Scheme number computer a. Write a recursive procedure (digits n) that computes the number of digits in the integer n using a recursive process. For example, (digits 42) should return 2 and (digits 13579) should return 5. ...

Really needing some help with this assignmentto convert

Really needing some help with this assignment. To convert degrees Celsius to degrees Kelvin, we simply add 273 (°K= °C + 273). Prompt the user for a temperature in degrees Celsius, then convert that temperature to degree ...

Question suppose that during the playing of the

Question : Suppose that during the playing of the coins-in-a-line game that Alice's opponent, Bob, makes a choice that is suboptimal for him. Does this require that Alice recompute her table of remaining Mi,j values to p ...

Ellen is an anthropologist who has been working at olduvai

Ellen is an anthropologist who has been working at Olduvai Gorge in Tanzania for the past six months. She has been conducting research on the Internet. She finds a Web site with an article that proposes a revolutionary t ...

Uranium vi fluoride is crucial for the enrichment of

Uranium (VI) fluoride is crucial for the enrichment of weapons-grade uranium. If a 1.0 mol sample of helium effuses in 255 s, how many seconds will it take for the same amount of uranium (VI) fluoride to effuse under the ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As