Professional Documents
Culture Documents
However determine
we can
if the
algorithm can be used with
any
the problem has the
problem if
for if for
following properties
The algorithm is
easy to describe
g easy
This algorithm perform better than
can
other algorithms duet not in all cases
20
2
31
7 10
P A B
I
si
Iidontainhigh
sa s
fusibl5T
Here we have to complete the journey
B 12 Hrs with multiple
from A in
solutions
want to
If we
finish the journey in
minimum cost then it becomes a
minimizationproblem
Out of the two sol the train has
minimum cost will be the optimal sat
I Greedy Method
a
Dynamic Programming
optimization problems
GREEDYMETHI
a
Algorithm Greedy
affiant
i ton do
for E se select Ca
then
ifsolution
feasible x
solution tx
KNAPSACK
PROBLEM
IROBLEM
objects O 1 2 3 4 5 6 7
P 10 5 15 7 6 18 3
Profits
2 3 5 7 I 4 I
Weight w
516316 4.53
n
m 15
C
where O E KEI
Here we decided that we use the
Profit weight so we can calculate the
Profit per kg of every element
xltlx4tl
12tzx31xsjg.tt
1x10tystyygthtertts
Exipi
Constraint Exiwism
Objective ma Zai p