Find the largest number of these intervals so

Assignment Help Chemistry
Reference no: EM13874361

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.

Reference no: EM13874361

Questions Cloud

What are universal wastes? : What are universal wastes?
Company has calculated its pretax income : At the beginning of 2010, the retained earnings of the Cameron Company were $212,000. For 2010, the company has calculated its pretax income from continuing operations to be $120,000. During 2010, the following events also occurred:
How would presence of second technology that had higher cost : How would the presence of a second technology that had higher operating costs but lower capacity costs affect peak-load pricing and investment in the capital-intensive technology?
Inverse distance weighted interpolation : The following is a Python implementation of IDW. This function takes two input variables. Z is a list of lists where each element list contains four values: X, Y, Value, and Distance to target point. Z can also be a NumPy 2-D array. Variable b is the..
Find the largest number of these intervals so : 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 n..
Explain why it is possible to interpret a two-part tariff : Explain why it is possible to interpret a two-part tariff as a two-block-rate tariff. Explain the circumstances under which this equivalency might not hold. Why might a consumer choose to have access and still consume zero units?
Practice of public health or community health nursing : Identify a new law or regulation that affects the practice of public health or community health nursing.
Show the number of students whose zip is 07070 : Show the number of students whose zip is 07070. List all students (display student_id, first name, last name, and employer) who live in Columbus, OH. Show the zip, state and city that have > 5 students as residents.
How was dr. snow able to test his proposed explanation : According to the "Answering the Three Questions" video, in what way was the "miasmas" (bad smells) explanation inconsistent and How was Dr. Snow able to test his proposed explanation?

Reviews

Write a Review

Chemistry Questions & Answers

  What role did sulfuric acid play in this reaction

Question- If the product produce when styrene is reacted with sulfuric acid in the presence is 1-phenylethanol. What role did sulfuric acid play in this reaction

  A liquid-solid slurry containing 9.0%w/w sodium

An aqueous solution containing 7%w/w of sodium carbonate is fed to the reactor at a rate of 100 kg min.1, where it mixes with a gas stream containing 70 mol% CO2 and 30 mol% air. All of the sodium carbonate in the feed reacts to form sodium bicarbona..

  Define what is the pressure inside the bottle

If we inject 120.0 mL of liquid helium and allow the entire system to warm to room temperature (25°C), what is the pressure inside the bottle

  Explain network covalent compounds

Which of the following is/are network covalent compounds A. sodium chloride B. diamond C. quartz (silicon dioxide) D. both B & C

  Describe what is the molarity of the chloride ion

lead nitrate is needed to precipitate all of the chloride ion in a 10.00-mL sample of an unknown. What is the molarity of the chloride ion in the student's unknown?

  Determine the molarity of a solution containing 4 moles

Problem- Determine the molarity of a solution containing 4 moles of Li2SO4 in 2L solution, 2.4 moles of CuSO4 in 1.5L solution, and 3.7 moles of NaOh in 4.2L solution.

  Calculate the osmotic pressure

calculate the osmotic pressure in torr of 6.00 L of an aqueous 0.889 m solution at 30.°c, if the solute concerned is totally ionized into three ions.

  Find out the net work produced and the efficiency

The pressures ranges between 0.2 bar and 60 bar. Determine the net work produced and the efficiency of the cycle?

  The benzoic acid is much stronger than the weak acid phenol

Benzoic acid is much stronger than the weak acid phenol consequently benzoic acid reacts with the weak base bicarbonate while phenol does not. using a schematic show a scheme for the total separation of the three compounds in a mixture of benzoic ..

  What pathlength cell is required to obtain the absorbance

In ethanol, with an absorbance of 1.210 (no units) at a wavelength of 530 nm. At this wavelength, the extinction coefficient of rhodamine 6G in EtOH is 116,000M^-1 cm^-1. If I have a 0.100 M solution of rhodamine 6G, what pathlength cell will be n..

  Explain product xyz necessarily vanish when integrated over

Does the product xyz necessarily vanish when integrated over a a) cube, b) tetrahedron, c) hexagonal prism, each centered on origin?

  An addition to an alkene initiated by a nucleophilic attack

An electrophilic addition is? Answer . a) An addition to an alkene initiated by a nucleophilic attack. b) An addition to an alkene initiated by an electrophilic attack

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd