Beruflich Dokumente
Kultur Dokumente
Reliability, Availability,
Maintainability, and Safety
PROJECT THESIS
Department of Production and Quality Engineering
Norwegian University of Science and Technology
Preface
Here, you give a brief introduction to your work. What it is (e.g., a Masters thesis in RAMS at
NTNU as part of the study program xxx and. . . ), when it was carried out (e.g., during the autumn semester of 2021). If the project has been carried out for a company, you should mention
this and also describe the cooperation with the company. You may also describe how the idea
to the project was brought up.
Trondheim, 2012-12-16
(Your signature)
Ola Nordmann
ii
Acknowledgment
I would like to thank the following persons for their great help during . . .
If the project has been carried out in cooperation with an external partner (e.g., a company),
you should acknowledge the contribution and give thanks to the involved persons.
You should also acknowledge the contributions made by your supervisor(s).
O.N.
(Your initials)
iii
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Acknowledgment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ii
iii
1 Introduction
1.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.5 LP Relaxation: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
2.1.8 Dual: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
12
2.2 Example: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
2.3 Theorems: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
18
iv
19
CONTENTS
19
21
21
3.1.3 Example:
22
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
23
4.1.1 Algorithm : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
24
26
4.2.1 Algorithm: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
27
29
29
29
5.1.2 Algorithm: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
5.1.3 Example: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
32
5.1.4 Iteration(k)= 1: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
32
5.1.5 k=2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33
5.1.6 k=3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
5.1.7 k=4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
36
38
38
39
39
7 Relation between the primal-dual algorithm of Steiner Tree/Forest Problem and Hitting Set Problem
40
CONTENTS
8 Analysis of Steiner Tree/Forest Algorithm
1
41
41
8.2 Proof: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
A Acronyms
45
B Additional Information
46
B.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
46
46
Bibliography
47
Curriculum Vitae
48
Chapter 1
Introduction
Primal-Dual method is a well-known mathematical method that is widely used for solving combinatorial optimization problems, that can be represented by integer linear programming.This method was first proposed by Dantzig, Ford, and Fulkerson as a tool for solving linear
programs[1]. Basically, this method is used to design approximation algorithms for many NP hard problems that can be modelled as integer linear programming.
Many problems are there which are NP -hard and do not have polynomial- time algorithms
for optimal solution(unless P=NP). Examples are vertex cover, set cover, max Independent set,
steiner tree etc. For those problems we donot yet know whether there exists any algorithms that
will simultaneously produce an optimal solutions in polynomial time
In primal-dual method we try to find a solution in polynomial time that closely approximates
the optimal solution.
1.1 Objectives
The main objectives of this work
1. To present clearly the primal-dual method from a computer science perspective and highlight its application in solving combinatorial problems like the Hitting Set problem and
the Steiner Tree/Forest problem.
2
CHAPTER 1. INTRODUCTION
Chapter 2
Background of Primal-Dual Method
Some basic definitions required to understand the primal-dual method is given below.The descriptions given here is taken from the following papers[1][2][3][4]
2.1 Definitions
2.1.1 Linear Programming Problem:
Linear programming is a mathematical method to achieve the best result (maximum or minimum) of a linear objective function over R n , subject to some linear equality or linear inequality
constraints.So,linear programs are problems that can be represented as shown below:
Linear program representation for a minimization problem:
where x is a (n 1) vector that represents the real variables whose values to be determined, c is
a (n 1) vector and b is a (m 1) vector of known real coefficients, A is a (m n) matrix of known
coefficients.
4
Figure 2.1: Feasible region of a linear programming problem with two variables
valued points within the polytope, not the entire polytope.Any solution in that region is a feasible solution. The optimal solution may not be found at an extreme points of the polytope.
Figure 2.2: Feasible region of a linear programming problem with two variables
2.1.5 LP Relaxation:
For any ILP(Integer Linear Programming) we can generate an LP(Linear Program) by taking the
same objective function and same inequality constraints but relaxing the constraint that the
variables should be integer.
e.g. x = {0, 1} can be relaxed with the continuous constraint 0 x 1
Optimal solution of the LP is not necessarily integral. The feasible region of the LP is larger
than the feasible region of the IP. Hence, the optimal value of the LP is no worse than the optimal
value of the IP.
T I LP
Integrality gap =max OP
OP TLP
OP TLP
Integrality gap =max OP
T I LP
10
11
2.1.8 Dual:
Given a linear programming problem, the dual can be formulated by seeing the problem from
another perspective. For a minimization primal problem, dual will be a maximization problem
and vice versa.
The corresponding dual problem of a primal minimization problem:
When the original problem(called the primal problem) is a minimization problem, the solution
to its dual provides a lower bound to the solution of the primal problem.
When the original primal problem is a maximization problem, the solution to its dual provides
a upper bound to the solution of the primal problem.
12
2.2 Example:
Min Vertex Cover Problem:
Input: A graph G = (V, E )
Output: Minimum subset of vertices such that each edge is covered.
The integer linear program for the problem:
13
This is basically the Maximum matching problem, as the inequality constraint says that in the
solution each vertex should be incident to only one edge.
Lets consider the graph shown below.
14
15
2.3 Theorems:
Basic theorems of Primal-Dual method is described below with proofs that closely follows the
proof and description given in the paper of Vazirani[2]
Theorem 1 Weak Duality Theorem:
If (x 1 , x 2 , ...., x n ) is a feasible solution for the primal minimization linear program and
(y 1 , y 2 , ...., y m ) is a feasible solution for the dual maximization linear program, then
n
X
cj xj
j =1
m
X
bi y i
i =1
Proof:
Lets consider about the primal minimization problem,
Since, (y 1 , y 2 , ...., y m ) is a feasible dual solution and (x 1 , x 2 , ...., x n ) is non-negative ,then
n
X
cj xj
j =1
n X
m
X
( a i j y i )x j
j =1 i =1
m X
n
X
( a i j x j )y i ...............................(1)
i =1 j =1
Also since, (x 1 , x 2 , ...., x n ) is a feasible primal solution and (y 1 , y 2 , ...., y m ) is non-negative ,then
m X
n
m
X
X
( a i j x j )y i
b i y i .............................(2)
i =1 j =1
i =1
n
X
cj xj
j =1
m
X
16
bi y i
i =1
cj xj
j =1
m
X
bi y i
i =1
c j x j =
m
X
i =1
b i y i
Pm
i =1 a i j y i
= cj
Pn
j =1 a i j x j
= bi
Proof: Since x and y are feasible primal and dual solution respectively,
n
X
j =1
a i j x j b i , i = 1, 2, ..m
17
and
m
X
a i j y i c j , j = 1, 2, ..n
i =1
n
X
a i j x j b i )y i 0, i = 1, 2, ..m
j =1
(c j
m
X
a i j y i )x j 0, j = 1, 2, ..n
i =1
(c j
j =1
m
X
a i j y i )x j 0.........(2)
i =1
ai j x j y i
i,j
bi y i +
=>
cj xj
cj xj
ai , j x j y i 0
i,j
b i y i 0..................(3)
cj xj =
bi y i
This holds if the inequalities (1) and (2) holds with equality and we obtaion our desired result.
P
from (1) either y i = 0 or nj=1 a i j x j = b i
P
from (2) either x j = 0 or m
i =1 a i j y i = c j
18
Chapter 3
Basic Primal-Dual Algorithm for Hitting Set
Problem
To understand the primal-dual algorithm hitting-set problem is taken as an example.
20
P P
eA
i :eTi
eA c e
.y i
eATi
|A Ti |.y i
i :eTi
y i = ce , d o :
21
22
3.1.3 Example:
We can represent minimum vertex-cover problem as a hitting set problem, and by using the
basic primal-dual algorithm we will get 2approximate solution.
Min Vertex Cover Problem:
Input: A graph G = (V, E ) with weights w i 0 i V
Output: Minimum-weight subset of vertices such that each edge is covered.
The integer linear program for the problem:
mi n
i V
w i xi
sub j ec t t o, x i + x j 1 (i , j ) E
x i = {0, 1} i V
Basically, here (u, v) E , either u or v should be picked in the solution.
Chapter 4
Improvements of Primal-Dual Algorithm
and their analysis
4.1 Improvement By adding Reverse Delete Step
In the previous algorithm after finding a feasible solution, let A, we are deleting elements
from A that are not needed for the feasibility of A. This algorithm can be modified if we delete
the elements from A in the reverse order in which they were added to A. Because more weighted
edges are added later. So deleting unnecessary elements in reverse order will give better result.
Here also let A be the final solution.
4.1.1 Algorithm :
e E , x e = 0(pr i mal i n f easi bl e sol ut i on)
Ti T , y i = 0(d ual f easi bl e sol ut i on)
A0 =
B0 = A
k =0
whi l e A k i s not f easi bl e, d o :
k = k +1
23
24
k =
choose a vi ol at ed set Ti and i ncr ease y i , unt i l e k A k1 and
f or each such t i g ht e k ,
k = k + {e k }
A k = A k1 + k
B k = B k1 k
l =k
f or j = k d own t o 1
f or each e j
i f A l {e}i s f easi bl e
A l = A l {e}
Ret ur n A l
P P
eA
i :eTi
.y i
.y i
eATi
|A Ti |.y i
eA c e
i :e k Ti
y i = cek , d o :
25
l
|[k1
t =1 t +t =k t ] Ti |.y i
|A k1 + B k1 |.y i
|[B k1 Ti |.y i as A k1 Ti =
(As Ti is choosen as a violated set, it doesnot intersect with the already picked elements)
=
|B k1 Ti |.y i
(1) A k B k = A(feasible)
0
|A Ti |.y i
|A k1 + B k1 |.y i
eA x e
26
|[B k1 Ti |.y i as A k1 Ti =
0
4.2.1 Algorithm:
e E , x e = 0
Ti T , y i = 0
A0 =
B0 = A
k =0
whi l e A k i s not f easi bl e, d o :
k = k +1
k = vi ol at ed (A k1 )
k =
i ncr ease y i , Ti k uni f or ml y unt i l e k A k1 and
f or each such t i g ht e k ,
k = k + {e k }
A k = A k1 + k
l =k
f or j = k d own t o 1
f or each e j
i :e k Ti
y i = cek , d o :
P P
eA
i :eTi
.y i
.y i
eATi
|A Ti |.y i
P P
k ( Ti k |A Ti |).k ........(1)
|A Ti |
|A Ti |.y i
k:Ti k k
yi
So comparing (1) and (2) we can say if this algorithm is approximation, then
P P
P
k ( Ti k |A Ti |).k k |k |.k
=
k (|k |)k
27
Ti k
Or,
28
|A Ti | |k |
Ti k
|ATi |
|k |
Chapter 5
Primal-Dual Algorithm for Steiner
Tree/Forest problem
5.1 Steiner Tree Problem
Input:An undirected graph G = (V, E ),
an edge cost function c : E > Q + ,
and a collection of disjoint subsets of V, {R 1 , R 2 , ..., R m }(Required set of vertices)
Output:A minimum cost subgraph of G in which each pair of vertices belonging to the same
set R i is connected.(For minimum steiner forest problem).
Minimum Steiner tree is a special case in which m = 1.
r (u, v)=
0 otherwise
The problem now is to find a minimum cost subgraph of G that contains a u v path for
each pair (u, v) with r (u, v) = 1
29
30
f (S)=
0 otherwise
eE c e x e
e:e(S) x e
f (S)
S V
x e {0, 1}, e E
mi ni mi ze
sub j ect t o,
eE c e x e
e:e(S) x e
f (S)
S V
x e 0 , e E
Corresponding Dual problem:
maxi mi ze
sub j ect t o,
SV
S:e(S) y S
f (S)y S
ce
e E
y S 0 , S V
The primal-dual algorithm for the Steiner Tree problem is same as the primal-dual algorithm
for the hitting set problem where we start with primal infeasible and dual feasible solution and
increase the dual variables for violated sets ultil the primal solution becomes feasible.But the
choice of violated sets are different in case of the Steiner Tree algorithm.
5.1.2 Algorithm:
e E , x e = 0
S V , y s = 0
F0 =
k =0
whi l e F k i s not f easi bl e, d o :
k = k +1
k = ac t i ve(F k1 )
k =
i ncr ease y s , S k uni f or ml y unt i l e k F k1 and
X
y s = cek , d o
S:e k (S)
f or each t i g ht e k ,
k = k + {e k }
F k = F k1 + k
F = Fk
f or j = k d own t o 1
f or each e j
i f F {e}i s f easi bl e
F = F {e}
Ret ur n F
31
5.1.3 Example:
Lets consider the graph below:
5.1.4 Iteration(k)= 1:
Active sets
{a}, {b}, {c}, {d }
If we increase the dual variables of active sets by 6, edge (a, e) and (b, f ) will become tight, as
y s = y {a} + 0
S:(a,e)(S)
(As,the dual variables for other sets S V, such that (a, e) (S) is zero,except y {a} )
= 6 = c (a,e)
Similarly,
X
S:(b, f )(S)
y s = y {b}
32
5.1.5 k=2
Active sets
{a,e},{b,f},{c},{d}
If we increase the dual variables of active sets by 2, edge (a, c) becomes tight, as
X
S:(a,c)(S)
= 6+8+2
= 16 = c (a,c)
33
A 2 = A 1 (a, c)
5.1.6 k=3
Active sets
{a,e,c},{b,f,},{d}
If we increase the dual variables of active sets by 1, edge (d , f ) becomes tight, as
X
S:(d , f )(S)
= 9+3
= 12 = c (d , f )
y s = y {d } + y {b, f }
34
A 3 = A 2 (d , f )
5.1.7 k=4
Active sets
{a,e,c},{b,f,d}
If we increase the dual variables of active sets by 1, edge (a, b) becomes tight, as
S:(a,b)(S)
= 6+2+2+6+3+1
= 20 = c (a,b)
35
A 4 = A 3 (a, b)
36
37
Chapter 6
Steiner Tree/Forest Problem As a Hitting Set
Problems
6.1 Steiner Tree problem
Input:
An undirected graph G = (V, E ),
an edge cost function c : E > Q + ,
and a collection of disjoint subsets of V, {R 1 , R 2 , ..., R m }(Required set of vertices)
Output:
A minimum cost subgraph of G in which each pair of vertices belonging to the same set R i is
connected.
Relaxed Primal Problem:
mi ni mi ze
sub j ect t o,
eE c e x e
e:e(S) x e
f (S)
x e 0 , e E
38
S V
39
mi ni mi ze
P
sub j ect t o,
eTi
eE c e x e
xe 1
Ti T
x e 0 , e E
A cost function for elements is defined as the cost of the edges in the graph G, c : E -> Q +
Chapter 7
Relation between the primal-dual algorithm
of Steiner Tree/Forest Problem and Hitting
Set Problem
Also k is changed in the steiner tree problem as the set of minimal violated sets or active sets at
iteration k
k = {Ti = ( S i ) : S i V, S i i s a connec t ed component at i t er at i on k, f (S i ) = 1}
So,at each iteration k dual variables for only the connected components, for which f (S i ) =
1((u, v) E : u S i and v S i , u, v R j ,for some j = 1, ..m) is getting incremented.
m
40
Chapter 8
Analysis of Steiner Tree/Forest Algorithm
8.1 Analysis of the Approximation Ratio
Let A is the final solution.
The cost of the algorithm is C =
eA c e
P P
P P
k ( Ti k |A Ti |).k ............(1)
eA
i :eTi
.y i
eATi
|A Ti |.y s
|A Ti |
k:Ti k k
k:Ti k k
= 2.
P P
= 2.
P P
= 2.
i :Ti k k
k |k |.k
41
yi
42
P P
P
k ( Ti k |A Ti |).k k (2|k |).k ..............(3)
Ti k
|A Ti | 2|k |
|ATi |
|k |
Ti k
Ti k
Ti k
S i Vk
|(A k1 B k1 )Ti |
|k |
|B k1 Ti |
|k |
2 As A k1 Ti =
|B k1 (S i )|
|k |
S i Vk
|B k1 (S i )|
|Vk |
2 As |k | = |Vk |
Si
S i Vk Deg B k1
|Vk |
2..................(4)
So, basically we want to prove for each iteration k, the average degree of connected components for which f (S i ) = 1, is 2
8.2 Proof:
At each iteration k, we are having a graph, lets say Hk with vertex set V and edge set A k1 .
Hk will have connected components of two types:
(1)Active components S V where f (S) = 1
(2)Inactive components S V where f (S) = 0
Each such component we can shrink to a node,thus we will have another set of nodes, lets
0
say Vk
0
43
k1
where S v is the
corresponding component of v in Hk
0
Or,
d eg (v)
|P k |
vP k
claim 1:
Average degree of vertices in a forest is 2
Let no of vertices=n
No of edges in forest n-1
The summation of degrees in forest 2(n 1)
The average degree of vertices 2(n 1)/n
2
Claim 2:
P
d eg (v)
|Q k |
vQ k
in Hk is 2 for each k
Lets take v Q k
44
v
Hence, d eg (v) in Hk 2 Or, Deg B k1
2
So,v Q k d eg (v) 2
Hence,
P
d eg (v)
|Q k |
vQ k
in Hk 2
Claim 3:
0
Claim 3 directly proves the fact that,average degree of active sets in each iteration is 2
Hence it proves the 2 approximation of Steiner tree or Steiner forest problem.
Appendix A
Acronyms
FTA Fault tree analysis
MTTF Mean time to failure
RAMS Reliability, availability, maintainability, and safety
45
Appendix B
Additional Information
This is an example of an Appendix. You can write an Appendix in the same way as a chapter,
with sections, subsections, and so on.
B.1 Introduction
B.1.1 More Details
46
Bibliography
47
Curriculum Vitae
Name:
Your Name
Gender:
Female
Date of birth:
1. January 1995
Address:
Home address:
Nationality:
English
Email (1):
your.name@stud.ntnu.no
Email (2):
yourname@gmail.com
Telephone:
+47 12345678
Your picture
Language Skills
Describe which languages you speak and/or write. Specify your skills in each language.
Education
School 1
School 2
School 3
Computer Skills
Program 1
48
BIBLIOGRAPHY
Program 2
Program 3
Experience
Job 1
Job 2
Job 3
49