Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Text Book - Algorithm Design by Jon Kleinberg and Eva Tardos

Chapter 12 - Local Search

Exercises

Q1. Consider the problem of finding a stable state in a Hopfield neural network, in the special case when all edge weights are positive. This corresponds to the Maximum-Cut Problem that we discussed earlier in the chapter: For every edge e in the graph G, the endpoints of G would prefer to have opposite states.

Now suppose the underlying graph G is connected and bipartite; the nodes can be partitioned into sets X and Y so that each edge has one end in X and the other in Y. Then there is a natural "best" configuration for the Hopfield net, in which all nodes in X have the state +1 and all nodes in Y have the state -1. This way, all edges are good, in that their ends have opposite states.

The question is: In this special case, when the best configuration is so clear, will the State-Flipping Algorithm described in the text (as long as there is an unsatisfied node, choose one and flip its state) always find this configuration? Give a proof that it will, or an example of an input instance, a starting configuration, and an execution of the State-Flipping Algorithm that terminates at a configuration in which not all edges are good.

Q2. Recall that for a problem in which the goal is to maximize some underlying quantity, gradient descent has a natural "upside-down" analogue, in which one repeatedly moves from the current solution to a solution of strictly greater value. Naturally, we could call this a gradient ascent algorithm. (Often in the literature you'll also see such methods referred to as hill-climbing algorithms.)

By straight symmetry, the observations we've made in this chapter about gradient descent carry over to gradient ascent: For many problems you can easily end up with a local optimum that is not very good. But sometimes one encounters problems-as we saw, for example, with the Maximum-Cut and Labeling Problems-for which a local search algorithm comes with a very strong guarantee: Every local optimum is close in value to the global optimum. We now consider the Bipartite Matching Problem and find that the same phenomenon happens here as well.

Thus, consider the following Gradient Ascent Algorithm for finding a matching in a bipartite graph.

As long as there is an edge whose endpoints are unmatched, add it to the current matching. When there is no longer such an edge, terminate with a locally optimal matching.

(a) Give an example of a bipartite graph G for which this gradient ascent algorithm does not return the maximum matching.

(b) Let M and M' be matching's in a bipartite graph G. Suppose that |M'| > 2|M|. Show that there is an edge e' ∈ M' such that M ∪{e'} is a matching in G.

(c) Use (b) to conclude that any locally optimal matching returned by the gradient ascent algorithm in a bipartite graph G is at least half as large as a maximum matching in G.

Q3. Suppose you're consulting for a biotech company that runs experiments on two expensive high-throughput assay machines, each identical, which we'll label M1 and M2. Each day they have a number of jobs that they need to do, and each job has to be assigned to one of the two machines. The problem they need help on is how to assign the jobs to machines to keep the loads balanced each day. The problem is stated as follows. There are n jobs, and each job j has a required processing time tj. They need to partition the jobs into two groups A and B, where set A is assigned to M1 and set B to M2. The time needed to process all of the jobs on the two machines is T1 = ∑jA tj and T2 = jBtj. The problem is to have the two machines work roughly for the same amounts of time-that is, to minimize |T1 - T2|.

A previous consultant showed that the problem is NP-hard (by a reduction from Subset Sum). Now they are looking for a good local search algorithm. They propose the following. Start by assigning jobs to the two machines arbitrarily (say jobs 1, . . . , n/2 to M1, the rest to M2). The local moves are to move a single job from one machine to the other, and we only move jobs if the move decreases the absolute difference in the processing times. You are hired to answer some basic questions about the performance of this algorithm.

(a) The first question is: How good is the solution obtained? Assume that there is no single job that dominates all the processing time-that is, that tj ≤ ½i=1nti for all jobs j. Prove that for every locally optimal solution, the times the two machines operate are roughly balanced: ½T1 ≤ T2 ≤ 2T1.

(b) Next you worry about the running time of the algorithm: How often will jobs be moved back and forth between the two machines? You propose the following small modification in the algorithm. If, in a local move, many different jobs can move from one machine to the other, then the algorithm should always move the job j with maximum tj. Prove that, under this variant, each job will move at most once. (Hence the local search terminates in at most n moves.)

(c) Finally, they wonder if they should work on better algorithms. Give an example in which the local search algorithm above will not lead to an optimal solution.

Q4. Consider the Load Balancing Problem from Section 11.1. Some friends of yours are running a collection of Web servers, and they've designed a local search heuristic for this problem, different from the algorithms described in Chapter 11.

Recall that we have m machines M1,...,Mm, and we must assign each job to a machine. The load of the ith  job is denoted ti. The make span of an assignment is the maximum load on any machine:

maxmachinesMijobs j assigned toMi tj.

Your friends' local search heuristic works as follows. They start with an arbitrary assignment of jobs to machines, and they then repeatedly try to apply the following type of "swap move."

Let A(i) and A(j) be the jobs assigned to machines Mi and Mj, respectively. To perform a swap move on Mi and Mj, choose subsets of jobs B(i) ⊆ A(j) and B(j) ⊆ A(j), and "swap" these jobs between the two machines. That is, update A(i) to be A(i) ∪ B(j) - B(i), and update A(j) to be A(j) ∪ B(i) - B(j). (One is allowed to have B(i) = A(i), or to have B(i) be the empty set; and analogously for B(j).)

Consider a swap move applied to machines Mi and Mj. Suppose the loads on Mi and Mj before the swap are Ti and Tj, respectively, and the loads after the swap are T'I and T'j. We say that the swap move is improving if max(T'i, T'j) < max(Ti, Tj)-in other words, the larger of the two loads involved has strictly decreased. We say that an assignment of jobs to machines is stable if there does not exist an improving swap move, beginning with the current assignment.

Thus the local search heuristic simply keeps executing improving swap moves until a stable assignment is reached; at this point, the resulting stable assignment is returned as the solution.

Computer Engineering, Engineering

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

Have any Question?


Related Questions in Computer Engineering

What is the transmission type transmission form

What is the Transmission Type, Transmission Form, Transmission Speed, Address for Transmission and Collusion for hubs?

Represent each of the following values in the ieee 754

Represent each of the following values in the IEEE 754 32-bit format, truncating inexact values. Indicate the percent error of the value stored compared to the exact value. This will require you to convert the 32 bit flo ...

Mary kate is a project manager in the it department for a

Mary Kate is a project manager in the IT department for a university. She has been asked to manage a project to create faculty intranet. The university has multiple campuses in various locations, and professors and other ...

Question 500-700 wordsoperations management involves

Question: 500-700 words Operations management involves various activities, such as process design, selection, management of information technology, work systems, planning and development, and quality assurance (Slack, Ch ...

Do research to identify three organizations that develop

Do research to identify three organizations that develop and operate e-commerce Web sites for their clients. Visit their Web sites and identify current job openings. What sort of responsibilities are associated with thes ...

Answer the following questions whats the synchronous

Answer the following Questions : What's the synchronous distribution ? What are the guidelines for menu layout or list them?

A national report indicates that the mean and standard

A national report indicates that the mean and standard deviation of the ACT scores of incoming freshman at American public universities are 24.6 and 6.2, respectively. A sample of 30 incoming freshmen at a small, suburba ...

Compare remote authentication dial-in user service radius

Compare Remote Authentication Dial-In User Service (RADIUS) and Terminal Access Controller Access-Control System Plus (TACACS+).

Suppose that the demand curve for tickets to see a football

Suppose that the demand curve for tickets to see a football team play a game is given by Q = 80,000 - 40P and marginal cost is zero. The team's stadium can host 75,000 fans. 1) How many tickets would the team sell if it ...

Consider the labor market of the telecom industry is

Consider the labor market of the telecom industry is originally at an equilibrium level E0 and w0. Assume that now the companies offer each employee an iPhone as employment benefit every year. The firms can get iPhone at ...

  • 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