• Tidak ada hasil yang ditemukan

COL351: Analysis and Design of Algorithms Instructor

N/A
N/A
Protected

Academic year: 2024

Membagikan "COL351: Analysis and Design of Algorithms Instructor"

Copied!
2
0
0

Teks penuh

(1)

COL351: Analysis and Design of Algorithms Instructor: Ragesh Jaiswal

1. Is the factor-2 approximation for the greedy algorithm for the Minimum Makespan prob- lem shown in class tight?

2. Recall the Minimum Makespan problem discussed in class. We saw a greedy approxi- mation algorithm and showed an approximation guarantee of 2. Consider the following slightly modified algorithm:

GreedySortMakespan

- Consider jobs in decreasing order of duration - While all jobs are not assigned

- Assign the next job (as per the order defined) to a machine with least load

Let OP T denote the value of an optimal solution and G be the value of the above greedy solution. Then we will argue that G≤(4/3)·OP T. WLOG, let us assume that d(1)≥d(2)≥...≥d(n).

Let us call an problem instance (d(1), ..., d(n))niceif as per the above greedy algorithm, the job with the maximum finishing time isn. We will first argue that it is sufficient to analyze the approximation guarantee for nice instances.

Claim 1.1: If our greedy algorithm gives a factorcapproximation for nice instances, then it gives factorc approximation for all instances.

We can now focus on only nice instances. Again, for any nice instance, we useGto denote the value of the greedy solution and OP T to denote the value of an optimal solution.

Let us break the analysis into two cases: (i)d(n)≤OP T /3, and (ii)d(n)> OP T /3. For case (i), we can make the following claim:

Claim 1.2: Ifd(n)≤OP T /3, then G≤(4/3)·OP T.

Now, consider the case whend(n)> OP T /3. We first show that n≤2m.

Claim 1.3: Ifd(n)> OP T /3, then n≤2m.

Once, we realize the above the next thing we show is that in this case, the greedy algorithm gives an optimal solution.

Claim 1.4 If d(n)> OP T /3, thenGreedySortMakespan returns an optimal solution.

Combining all the above claims, we get that the above greedy algorithm gives an approx- imation guarantee of (4/3).

1

(2)

3. Given a sorted arrayA containingn distinct integers, design an algorithm to determine if there is an indexisuch that A[i] =i.

2

Referensi

Dokumen terkait

The PCB fixture will design according to the routing machine standard by using computer software, while the experimental analysis will use the strain gauge to

Variable valve timing is a system that allows for more efficient engine operation by varying the time at which valves opens, duration of opening, and valve overlap

Usahakan menggunakan sintax-syntax berikut sebanyak mungkin Comment Assignment Logical relational while loop for loop repeat loop conditional case input output

Definition 1.2 (Levitin) Brute force adalah pendekatan yang langsung/lem- peng untuk menyelesaikan suatu masalah, biasanya secara langusng sesuai de- ngan pernyataan masalah

• Terdapat beberapa strategi greedy yang heuristik yang dapat digunakan untuk me- milih objek yang akan dimasukkan ke dalam knapsack:.. Greedy

The condition was triggered by the increase of current transaction deficit as the impact of the weakening global demands and the decreasing export price commodities, while the domestic

Potential users’ final results of efficiency Average Time 105.4 seconds Successful Task Durations 6114 seconds Total Task Duration 6114 seconds Overall Relative Efficiency 100%

[7] proposed developing a software specified network security architecture using a special controller type flowvisor with advanced encryption standard AES encryption algorithm and the