1. Consider a set S of n classes, where each class i has a start time...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Consider a set S of n classes, where each class i has a start time s; and a finish time f. We want to broadcast an announcement that will be heard by all classes; if the announcement is broadcast at time t, then all classes i such that s; ≤ t ≤ f; will hear the announcement. We are willing to broadcast the announcement multiple times, so we can hit all classes, but we want to minimize the number of broadcasts. (a) Consider a greedy approach that repeatedly picks the midpoint of the shortest remaining class, and then removes all classes that are hit by that broadcast time. Give and demonstrate a counterexample to show that this approach does not always find the minimum number of broadcast times. (b) Design and write a greedy algorithm that, given the start times s; and finish times fi for each class, will find a minimum size set of times when the announcements can be broadcast in order to hit all classes. (c) Prove that your algorithm from (b) is correct. 1. Consider a set S of n classes, where each class i has a start time s; and a finish time f. We want to broadcast an announcement that will be heard by all classes; if the announcement is broadcast at time t, then all classes i such that s; ≤ t ≤ f; will hear the announcement. We are willing to broadcast the announcement multiple times, so we can hit all classes, but we want to minimize the number of broadcasts. (a) Consider a greedy approach that repeatedly picks the midpoint of the shortest remaining class, and then removes all classes that are hit by that broadcast time. Give and demonstrate a counterexample to show that this approach does not always find the minimum number of broadcast times. (b) Design and write a greedy algorithm that, given the start times s; and finish times fi for each class, will find a minimum size set of times when the announcements can be broadcast in order to hit all classes. (c) Prove that your algorithm from (b) is correct.
Expert Answer:
Answer rating: 100% (QA)
a Counterexample to the greedy approach Consider the following class schedule Class 110001100 Class ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
In Exercises 7683, use a graphing utility to graph the function. Use the graph to determine whether the function has an inverse that is a function (that is, whether the function is one-to-one). f(x)...
-
On May 1, 2017, Herron Industries AG issued CHF600,000, 9%, 5-year bonds at face value. The bonds were dated May 1, 2017, and pay interest annually on May 1. Financial statements are prepared...
-
ABC Corp. paid two cash distributions during year 5. The first was $42,000, and the second was $33,000. Accumulated earnings and profits (E & P) at the end of year 4 were $10,000. Current E & P for...
-
What is the relationship between UCs and system capability requirements?
-
Bracewell Company reported net income of $195,000 for 2012. Bracewell also reported depreciation expense of $45,000 and a loss of $5,000 on the sale of equipment. The comparative balance sheet shows...
-
you will be selecting TWO professional roles in the early childhood field. These roles might include one you presently have or could include roles you desire in the future. You will select your roles...
-
Having paying guests in ship staterooms is extremely important to the financial health of a cruise company. Percentage of stateroom occupancy is an often-reported metric on cruise ships. Holland...
-
Ebony Inc. obtained a 25-year mortgage and an operating line of credit from the bank on January 1 of the current year. Ebony paid $5,000 in fees to the bank associated with obtaining this financing....
-
QUESTION FOUR (a) The sales manager of a company has budgeted K120, 000 for an advertising programme for one of the firm's product. The selected advertising programme consists of running...
-
By using the beginning balances on row 3 and the prompts in column C, please explain how to allocate the correct numbers in the correct columns. Transactions: Operating Assets and Liabilities...
-
Instructions Note: This is individual assignment. Any attempt to copy from other will affect your marks. Part II: You will be assigned a country to study and compare with Saudi Arabia, which will be...
-
Answer the following True/False questions based on this figure. Investment Goods Intermediate Production Possibilities Analysis 0 Panel A Production Possibilities 1995 Investment Goods 0 Panel B...
-
QUESTION 3 (Conceptual Data Models) Prepare an Object Class Diagram for a Wedding Cake Ordering system with the following description: For each Customer, the system must store Customer ID, Customer...
-
A taxpayer may avoid tax on income by having the payment made to another taxpayer. True False Caleb's medical expenses before reimbursement for 2021 include the following: Medical premiums $11,000...
-
What are some of the various ways to implement an awareness program?
-
Did you ever wonder how people find the decimal expansion of it to a large number of places? One method depends on the following identity? ( = 16 tan-1 (1/5) - 4 tan-1 (1/239) Find the first 6 digits...
-
In Problems 1-3, evaluate the given double integral by changing it to an iterated integral. 1. S is the region between y = x2 and y = (x. 2. If S is the region between y = x and y = 3x - x2. 3. If S...
-
A chord of a parabola that is perpendicular to the axis and 1 unit from the vertex has length 1 unit. How far is it from the vertex to the focus?
-
Reverse-current readings (in nanoamperes) are made at the location of a transistor on an integrated circuit. A sample of size 10 is taken every half hour. Since some of the units may prove to be...
-
In order to establish control charts for an extraction job, 30 samples of five measurements of the extracted ores are taken, and the results are \(\overline{\bar{x}}=25.96\) tons and \(\bar{s}=1.5\)...
-
If the sample standard deviations instead of the sample ranges are used to estimate \(\sigma\), the control limits for the resulting \(\bar{x}\) chart are given by \(\overline{\bar{x}} \pm A_{1}...
Study smarter with the SolutionInn App