doubt in greedy algorithm?
i read "greedy algorithm always make the choice that look best at the moment it may be the optimal solution or may not be".
.
suppose we have to go delhi from bihar and we have two way to go.
1.bihar___100km___orissa____120km___delhi
2.bihar___80km___orissa___180km___delhi
.
so friends accoding to dynamic programming we chose bihar__80km__orissa__120km__delhi.(because in this way we have to cover the less distance as a whole).
.
but according to greedy we look the problem and chose minimum distance from bihar to 1st stopage(80km)and then chose min distance from 1st stopage to delhi(180).
.
is that realy means of greedy algorithm or else.
help me i m in confucian.