# L-4.1: Introduction to Greedy Techniques With Example | What is Greedy Techniques Hello friends, welcome to Gate Smashers In this video we are going to discuss
introduction to greedy algorithms or what you can call greedy techniques which is a very important topic in algorithm So guys, like the video quickly, subscribe
the channel if you haven't done it yet and please press the bell button so that
you get all the latest notifications So let's start what is actually a greedy
technique or what are greedy algorithms Algorithms which follow local optimal choice at each stage with intent of finding the global optimum What does it mean to say? We go towards the best choice at every stage locally Like we see with a simple example Let's say this is my source I have multiple paths from this source And these paths take me to some destination Let's say this is my destination D This is my source and that is my destination Now if we talk here, as soon as I started from the source I am at this stage It is saying that it follows the local optimal choice What does local optimal choice mean? At this stage, let's say the cost to go here is 10 The cost to go here is 20 The cost to go here is let's say 5 So what does it want to do in the greedy algorithm? Greedy algorithm at this stage, the minimum cost Cost wise means if we talk The cost to go here is 5, 20 and 10 So what does it want to do? First of all, it wants to follow this choice What is the reason for that? It follows the best or the optimal locally first And on the basis of that, it says With intent of finding the global optimum Means it wants on the basis that I can find global optimum result Or what I can do with global maximum result And here if we talk In this we talk about solution space,
feasible solutions or optimal solution I actually want to tell the greedy algorithm from a real life example Like if we talk As a student we have multiple career options Like we have an option that let's say if I have chosen non-medical So I have non-medical option that I can go to engineering line Or if I have chosen medical option then I can go to medical line Or I have banking sector option SSE etc. We can go for government jobs Or we can choose our business entrepreneurship Means I have multiple career options You can call this a solution space Means all these options are a solution space But out of this solution space We first find out feasible solution What is the meaning of feasible solution? Based on some selection criteria Means we on the basis of selection criteria Out of all the feasible, out of all the solution space I will find out the feasible condition I will find out the feasible solution To find out feasible solution means Let's say if I have done arts in 11th and 12th Then obviously I can't go to engineering field Means out of all the solution space One field will come out from there So what is my selection criteria? Based on some selection criteria You have to find out feasible solution So let's say if I have arts then on my selection criteria Engineering came out from here Medical came out from here Now what are the feasible solutions I have? I can go to banking line I can go to banking line after taking IBPS exam I can go to SSE I can go to government teacher or