Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Chemistry Expert

Could somebody help with these two exercises please

Exercise 1:

Compatible intervals Given n open intervals (a1, b1), (a2, b2), . . . , (an, bn) on the real line, each representing start and end times of some activity requiring the same resource, the task is to find the largest number of these intervals so that no two of them overlap.

Investigate the three greedy algorithms based on

  1. a- Earliest start first.
  2. b- Shortest duration first.
  3. c- Earliest finish first.

For each of the three algorithms, either prove that the algorithm always yields an optimal solution or give a counterexample showing this not to be the case.

Exercise 2: 

Rumor spreading problem: There are n people, each in possession of a different rumor. They want to share all the rumors with each other by sending electronic messages. Assume that a sender includes all the rumors he or she knows at the time the message is sent and that a message may only have one addressee.

  1. a- Design a greedy algorithm that always yields the minimum number of messages they need to send to guarantee that every one of them gets all the rumors
  2. b- Give the efficiency of your proposed algorithm as a function of n.

Chemistry, Academics

  • Category:- Chemistry
  • Reference No.:- M91539467
  • Price:- $20

Guranteed 24 Hours Delivery, In Price:- $20

Have any Question?


Related Questions in Chemistry

A student finds that the mass of an object is 662 kg she is

A student finds that the mass of an object is 6.62 kg. She is told that her measurement has an error of 12.3%. What is the true mass (in kg) of the object?

A hydrogen atom emits a photon as its electron changes from

A hydrogen atom emits a photon as its electron changes from n = 5 to n = 2. For the H atom, E n  = -2.18E-18*(1/n 2 ) J. What is the wavelength (in m) of the photon?  ( ) m The number of significant digits is set to 3; t ...

A gas is confined to a cylinder with a moveable piston to

A gas is confined to a cylinder with a moveable piston (to allow the gas to expand or contract) under a pressure of 1 atmosphere. When the temperature of the gas is increased, 850 J of heat is added, and the gas expands, ...

One liter of nitrogen n2 and one liter of carbondioxide co2

One liter of nitrogen (N 2 ) and one liter of carbondioxide (CO 2 ), initially at one atmosphere pressure, are forcedinto a single evacuated 500 mL vessel. What is the total pressure, in atmospheres,if the temperature re ...

Use valence bond theory to explain the bonding in f2 hf and

Use valence bond theory to explain the bonding in F2, HF, and ClBr. Sketch the overlap of the atomic orbitals involved in the bonds.

A saturated solution of sroh2aq at 25 degrees celcius has

A saturated solution of Sr(OH)2(aq) at 25 degrees Celcius has measured a pH of 13.5. Estimate the solubility of Sr(OH)2(aq) in water at 25 degrees Celsius

Nitro glyerine is an explosive used by the mining industry

Nitro glyerine is an explosive used by the mining industry. It detonates according to the following equation: 4C 3 H 5 N 3 O 9 (l)→ 12CO 2 (g) + 6N 2 (g) +10H 2 O(g) + O 2 (g) What volume is occupied by the gases produce ...

A mixture containing 33 moles of no and 076 mole

A mixture containing 3.3 moles of NO and 0.76 mole ofCO 2  was allowed to react in a flask at a certaintemperature according to the equation. NO (g) + CO 2  (g) ↔ NO2 (g) + CO (g) At equilibrium 0.21 mole of CO 2  was pr ...

1-write balanced equation for the double-replacement

1-Write balanced equation for the double-replacement precipitation  reaction described, using the smallest possible integer coefficients. A precipitate forms when aqueous solutions of  nickel(II) iodide  and  potassium c ...

Use the simulator for the hydrogen atom Use the simulator for the hydrogen atom

Use the simulator for the hydrogen atom (https://phet.colorado.edu/en/simulation/hydrogen-atom) to estimate the energy needed to transfer one mole of electrons from the energy level n = 1 to the level n = 3.

  • 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