0% found this document useful (0 votes)
12 views6 pages

Test 1 Algorithm 26 September 2024

The document discusses optimization techniques for minimizing loss in job assignments and the application of Dijkstra's algorithm for finding the shortest path in graphs. It highlights the importance of not executing all possible jobs and addresses the challenges posed by negative edge cycles. Additionally, it touches on dynamic programming and maximizing capacity in optimization problems.

Uploaded by

Samprit Nandi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views6 pages

Test 1 Algorithm 26 September 2024

The document discusses optimization techniques for minimizing loss in job assignments and the application of Dijkstra's algorithm for finding the shortest path in graphs. It highlights the importance of not executing all possible jobs and addresses the challenges posed by negative edge cycles. Additionally, it touches on dynamic programming and maximizing capacity in optimization problems.

Uploaded by

Samprit Nandi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

1.

Given,
objective = min loss
Con seints = not exe cuting all possible jobs is not
allowed.

nence, We shout be oedy on jobc wiHh teast ta


shoud be
nd assign tham the |atest Fossible deadline.

Stepl:
Select With lenst loss Vadue
fivst, we

2 4

Step2:
(00 121

J Js
2 3 4

tep 3; 300 |2/


Slep 4: 400, 3 o6 12|
Jg J3 J Is
J, 2 34
2 4

min loss = loot 40Ot 26O t121= q2|


2 Dijk stra's
Shortst patn algoritm does not
for negtve edge cycles
Let us jusHfy 4hat
tht With belon example

A
For this grabb, We assnme
to yerch Vertea C
B fom vetea A.
-2

Level A as o. Remaining Vertices shond be


leveled as oc.

Level (e) = min(a, Ot A)


= minlo Ot2)
= min (aay 2) =2
- 2
Level (B)= minoo,
=
otAB)
min (o, o t 3)=3
min (leel (B level(OF 2
- . C wil e
moseed as next Vesten of
A With level2:
he nave yeached
Werex. destintiy
-2 Sholest path as tey
iysha's aloA>c
44ched tially
lain in Seen tcan
e S
ib) tib)
)
(Aun-)+fsfr-)) veturn 7
ie4) else
n-I Yetun
(6) fib ||n==2) (n==) Jf
calculate
(6
fibwe iftuncti to
iven thistolloing )(Gnt tob it
belN eKnntle an shsn 'us Let
tnb)em Snt lappint Duer
tencti techque
ith n YecuYeive
an is
Dnami.
i2otin
edy ntr Soli Ttmum
hggve doesn't dijeshns hene.
l. lesa's dij
am minimized
tha wontve we
0+3
= -2 ()
= Level
sem. soMdve Cost 4inal
ABC þath te S.elected
eeeta wehad gsnphg tom as But
Canse a Tise in ttme complexi
ymamc prrgram

ti(5)
e(3)
tie)
fic)

11

Gracat
Let
Aig.
Atgi strncls jn ed sptima"
the

2 3
Weight 2

10
2812
As er the iven matix, hb have 3 obecb
With gven Corespondir rtdneight.
e hwe to maximie tee
Ctacdy 6, rohatbe
fi
T4 Ghond be hote that no @objed
Can he tcdched rtially
Canse a ree in twe complexity
in yamic prrgram

is)
21i)
4

1
4 erecal Atgo. stryes in lrzl optima
Let the belsn
bel ennple -

ob) 2

Weisht 1 2

28 )2

As der the fiven matna, he have 3 objeb


With gren Corsprndir trtit and neiht.
Ne have a lnapsen bith Catacty 6,
the hve to
tohabe
maxime the ht
It Ghd be hoted that no @obecb
Can he tcched trtially
We be

then we'll 4etch


l0+28 =3

but had we fetched


sbe and obs

tot t= 2t2 &= 4


stucles

You might also like