Design an efficient algorithm that chooses a subset

Assignment Help Data Structure & Algorithms
Reference no: EM133074036

Question 1: Consider the flow network drawn in the figure below, with a starting flow f in blue (assume all edges without a blue number have flow 0). Starting with the flow f, simulate the Ford-Fulkerson

2172_figure.jpg

Figure 1: Black numbers are capacities, blue numbers are flow.

algorithm to find a maximum flow on this network. A complete answer will contain a list of successive augmenting paths and, for each augmenting path chosen, a picture of the new flow network after augmenting the flow along that path. Finally, list every minimum capacity cut on this network.

Question 2: Suppose that G is a flow network such that every edge in G has the same capacity d. Construct an algorithm that outputs a maximum flow on G in 0 (|V||E|) time (note the run time does not depend on d).

Question 3: Let G = (V, E) be any flow network with edge capacities c(e), let U be any minimum capacity s-t cut in G, and let (u, v) ∈ E be any edge such that u ∈ U, v 1428_notin.jpg U. Prove that in any maximum flow f on G, f (u, v) = c(u,v) (that is, the edge (u, v) is fully saturated with flow).

Question 4: You are planning seating for a wedding, and would like to mix-and-match people from different families so that everyone can mingle. However, you only have a limited number of tables which can each seat a limited number of people. To solve this problem, you will come up with a general algorithm that can either match people to tables so that no two people from the same family are seated at the same table, or determine if it is impossible to do so.

The input to the algorithm will be the following. You are given a list of n positive integers f1,...., fn, where fi is the number of people in the ith family, as well as m positive integers t1,t2 tm where tj represents the number of people that can be seated at table j. Give an efficient algorithm that will decide if it is possible to seat everyone at the tables so that no two members from the same family are seated at the same table.

Question 5. The Montreal Jazz Fest is on this summer, and you know what that means: it's time to make some money by selling bootleg recordings! You have a list of the events that are being played at the Jazz Fest, namely: their start times, the length of each event, and also the location at which the event is playing. However, it may be impossible to attend every event in order to make a bootleg recording, so, you will have to hire some accomplices to help you out Naturally, in order to maximize your profit, you would prefer to figure out the minimum number of people you need to hire in order to cover every single event. Being a computer scientist, you decide to come up with an algorithm to solve the job.

Give an efficient algorithm for the following problem. As input, you receive a list of locations L1,....Lm and a list of events E1...E2,...En occuring on a single day, where each event Ei is specified by a start time an event length 4, and the location Li that the event occurs at (you may assume that all events are scheduled so that no two overlap at the same location). You also receive a list of integers tii for each pair of locations Li, Lj that represents the travel time from location i to location j in minutes. Your algorithm should determine the fewest number of people required to attend all of the events, and output an event schedule for each of the persons.

Question 6. Suppose you have a computer with n applications. Let's (imaginatively) call these applications A1, A2,.....An. You would like to update some of these applications to their latest and greatest versionst; however, there may be new problems introduced between the newly updated applications and legacy software. Your goal is to figure out how to choose a subset of applications so that your overall benefit is maximized.

As input, you receive a list of applications A1, ..... An and subset S ⊆ [n] of applications that have available updates. For each i ∈ S, the input contains a positive integer bi representing the benefit you get by updating that application. Finally, for each (unordered) pair of applications Ai, Aj, the input contains a positive integer xij which represents the penalty you have to pay if you update one application and not the other application. Design an efficient algorithm that chooses a subset U ⊆ S of the applications to update in order to maximize the quantity.

i∈U bi - ∑i∈U,i1428_notin.jpgU xij

Reference no: EM133074036

Questions Cloud

Calculate the price of the bond : Crane issued $490,000 of 5%, 5-year bonds on January 1, 2021. Interest is payable semi-annually. Calculate the price of the bond
What should the final repayment be : Given a rate of inflation of 3.5% per annum during the period, and if Beta's real cost of the loan is 16% per annum, what should the final repayment be
Analysis of the super bowl : State tax dollars were used to fund the Glendale, Arizona Super Bowl. Which of the following people would you count in an economic impact analysis of the Super
Appraise the role of treasury management : For TATA Motors Corp., candidates are required to identify an actual, or potential, major strategic decision which impacts, or has impacted, on significant fina
Design an efficient algorithm that chooses a subset : Design an efficient algorithm that chooses a subset U ? S of the applications to update in order to maximize the quantity
Calculate the stock price after the recapitalization : It will issue $570,798 of perpetual debt to repurchase its stocks. If its tax rate is 31.1%, calculate the stock price after the recapitalization.
Calculate the npv of the project : YYY is a company considering a new capital budgeting project. The project requires an initial investment in a machine with a cost of $250,000.
Reasons for the saving and loan crisis of the 1980 : What does that episode tell us about the regulation of financial institutions in the 21st Century? Do you think that we, as a financial system
How many years does this bond have left till maturity : A corporation has 9.0% coupon bond with YTM of 8.2%. The current market value of the bond is $1,057.00, and the coupon payments are paid annually.

Reviews

len3074036

1/26/2022 9:28:22 PM

READ THE INSTRUCTIONS VERY CAREFULLY AND DO EVERY LITTLE SUBSECTION THAT IS REQUESTED!

Write a Review

Data Structure & Algorithms Questions & Answers

  Create a b-tree of order seven that has hundred entries

Using the B-tree ADT, create a B-tree of order 7 that has 100 entries. Use a random-number generator to randomly create the keys between 1 and 1000.

  Database distribution strategy-simple database application

For this assignment, you will design and develop a distributed database infrastructure for an organization of your choice. You may use the database you created in another unit or you may choose to create a new database to work with for this assign..

  Describe what is meant by a parallel algorithm

Describe what is meant by a parallel algorithm. Explain how the pseudocode used in this book can be extended to handle parallel algorithms.

  Explain how you would adapt the rasterisation algorithm

Explain how you would adapt the rasterisation algorithm you have learned in the lecture that discretises lines to discretely represent the boundary of a circle.

  What is the recurrence for the worst-case runtime

What is the recurrence for the worst-case runtime of the algorithm below?

  Opens an output file with the external name

Design an algorithm that does the following: opens an output file with the external name number_list.dat, uses a loop to write the numbers 1 through 100 to the file and then closes the file.

  Describe one advantage and one disadvantage of adt table

Based on your analysis, what would be the most appropriate implementation of the three (a binary search tree, ordered vector, or unordered vector) for the given scenario? Explain your answer.

  MITS5512 Methods of Data Assignment

MITS5512 Methods of Data Assignment Help and Solution, Victorian Institute of Technology - Assessment Writing Service - Visualisation and Exploratory Analysis

  Analyze how the chart and pseudocode was created

Fill in the following table by walking through the logic above.The idea is to analyze how the chart and pseudocode was created, because you will be doing this in a few minutes

  Define wan and provide an example of typical wan setup

Define a WAN and provide an example of a typical WAN setup and describe the components. Provide a picture, chart, or image if possible.

  What type of operations does your algorithm do

There is a set of numbers stored in a file, but we don't know how many it contains. Write an algorithm in pseudocode to calculate the average of the numbers stored in this file. What type of operations does your algorithm do? How many of each of ..

  Distributed system algorithms

Distributed system algorithms - Leader Election (id),  In: Processor's id , Out: LEADER if processor has largest id, NOT_LEADER if otherwise

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