SlideShare a Scribd company logo
1 of 13
Greedy
technique
Bharati C
Greedy technique
The greedy approach suggest
constructing a solution
Through a sequency of steps, each
expanding a partially constructed
solution obtained so for until a
complete solution to the problem is
reached.
Feasible solution
Satisfying condition from
the problem
Optimal solution
A solution which already
feasible & also give
minimum cost.
Optimization problem
Problem
either
minimum or
maximum
results .
Example
A--------------B
A person travelled A city to B
P
S1--- walk
S2 bicycle
S3 bus
S4 train
S5 plane
P
S1--- walk
S2 bicycle
S3 bus
S4 train
S5 plane
10 hours contrains
P
S4 train
S5 plane
10 hours contrains
Feasible solution is s4,s5
P
S4 train
S5 plane
10 hours contrains
Feasible solution is s4,s5
Optimal solution is s4
Minimum cost
Algorithm: greedy(D, n)
Solution=0
for i=1 to n do
{
s=select(D)
If (feasible(solution, s) then
Solution=union(solution, s)
}
return solution
Greedy method following activies
performed
1. Select some solution from input.
2. We check whether solution is feasible or
not.
3. From set of feasible solution .perticular
solution satisfies i.e optimal solution.
THANK YOU

More Related Content

What's hot

A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaEdureka!
 
Timed Concurrent Language for Argumentation: an Interleaving Approach
Timed Concurrent Language for Argumentation: an Interleaving ApproachTimed Concurrent Language for Argumentation: an Interleaving Approach
Timed Concurrent Language for Argumentation: an Interleaving ApproachCarlo Taticchi
 
Timed Concurrent Language for Argumentation
Timed Concurrent Language for ArgumentationTimed Concurrent Language for Argumentation
Timed Concurrent Language for ArgumentationCarlo Taticchi
 
cross docking Project review
cross docking Project reviewcross docking Project review
cross docking Project reviewAjinkya zanzane
 
Activities on Software Development
Activities on Software DevelopmentActivities on Software Development
Activities on Software DevelopmentNicole Ynne Estabillo
 
Concurrent Argumentation with Time: an Overview
Concurrent Argumentation with Time: an OverviewConcurrent Argumentation with Time: an Overview
Concurrent Argumentation with Time: an OverviewCarlo Taticchi
 
Profiling Java Programs for Parallelism
Profiling Java Programs for ParallelismProfiling Java Programs for Parallelism
Profiling Java Programs for ParallelismDmitry Anisimov
 
Beziers curve
Beziers curveBeziers curve
Beziers curverampal singh
 
Containerisation and Dynamic Frameworks in ICCMA’19
Containerisation and Dynamic Frameworks in ICCMA’19Containerisation and Dynamic Frameworks in ICCMA’19
Containerisation and Dynamic Frameworks in ICCMA’19Carlo Taticchi
 
Round Robin Scheduling Algorithm (Simulation)
Round Robin Scheduling Algorithm (Simulation)Round Robin Scheduling Algorithm (Simulation)
Round Robin Scheduling Algorithm (Simulation)Everywhere
 
Simulation of traffic at T-Junction
Simulation of traffic at T-JunctionSimulation of traffic at T-Junction
Simulation of traffic at T-JunctionAbhishek Upperwal
 
CS106 Lab 5 - Switch case
CS106 Lab 5 - Switch caseCS106 Lab 5 - Switch case
CS106 Lab 5 - Switch caseNada Kamel
 

What's hot (16)

A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
 
A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
 
Timed Concurrent Language for Argumentation: an Interleaving Approach
Timed Concurrent Language for Argumentation: an Interleaving ApproachTimed Concurrent Language for Argumentation: an Interleaving Approach
Timed Concurrent Language for Argumentation: an Interleaving Approach
 
Timed Concurrent Language for Argumentation
Timed Concurrent Language for ArgumentationTimed Concurrent Language for Argumentation
Timed Concurrent Language for Argumentation
 
cross docking Project review
cross docking Project reviewcross docking Project review
cross docking Project review
 
Activities on Software Development
Activities on Software DevelopmentActivities on Software Development
Activities on Software Development
 
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
 
Concurrent Argumentation with Time: an Overview
Concurrent Argumentation with Time: an OverviewConcurrent Argumentation with Time: an Overview
Concurrent Argumentation with Time: an Overview
 
Maths project
Maths projectMaths project
Maths project
 
Profiling Java Programs for Parallelism
Profiling Java Programs for ParallelismProfiling Java Programs for Parallelism
Profiling Java Programs for Parallelism
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 
Beziers curve
Beziers curveBeziers curve
Beziers curve
 
Containerisation and Dynamic Frameworks in ICCMA’19
Containerisation and Dynamic Frameworks in ICCMA’19Containerisation and Dynamic Frameworks in ICCMA’19
Containerisation and Dynamic Frameworks in ICCMA’19
 
Round Robin Scheduling Algorithm (Simulation)
Round Robin Scheduling Algorithm (Simulation)Round Robin Scheduling Algorithm (Simulation)
Round Robin Scheduling Algorithm (Simulation)
 
Simulation of traffic at T-Junction
Simulation of traffic at T-JunctionSimulation of traffic at T-Junction
Simulation of traffic at T-Junction
 
CS106 Lab 5 - Switch case
CS106 Lab 5 - Switch caseCS106 Lab 5 - Switch case
CS106 Lab 5 - Switch case
 

Similar to Greedy technique.

Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithmCHANDAN KUMAR
 
Informed Search.pptx
Informed Search.pptxInformed Search.pptx
Informed Search.pptxMohanKumarP34
 
General methodin Data Structure for UG.pptx
General methodin Data Structure for UG.pptxGeneral methodin Data Structure for UG.pptx
General methodin Data Structure for UG.pptxLakshmiSamivel
 
Transportation problem
Transportation problemTransportation problem
Transportation problemShubhagata Roy
 
module4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdfmodule4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdfShiwani Gupta
 
Backtracking & branch and bound
Backtracking & branch and boundBacktracking & branch and bound
Backtracking & branch and boundVipul Chauhan
 

Similar to Greedy technique. (6)

Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
 
Informed Search.pptx
Informed Search.pptxInformed Search.pptx
Informed Search.pptx
 
General methodin Data Structure for UG.pptx
General methodin Data Structure for UG.pptxGeneral methodin Data Structure for UG.pptx
General methodin Data Structure for UG.pptx
 
Transportation problem
Transportation problemTransportation problem
Transportation problem
 
module4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdfmodule4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdf
 
Backtracking & branch and bound
Backtracking & branch and boundBacktracking & branch and bound
Backtracking & branch and bound
 

More from mohanrathod18

Upload our ppt on internet
Upload our ppt on internetUpload our ppt on internet
Upload our ppt on internetmohanrathod18
 
Decrease and conquer technic
Decrease and conquer technicDecrease and conquer technic
Decrease and conquer technicmohanrathod18
 
Minimum spanning tree.
Minimum spanning tree.Minimum spanning tree.
Minimum spanning tree.mohanrathod18
 
Divide and conquer technic
Divide and conquer technicDivide and conquer technic
Divide and conquer technicmohanrathod18
 
Mathematical Analysis of Non-Recursive Algorithm.
Mathematical Analysis of Non-Recursive Algorithm.Mathematical Analysis of Non-Recursive Algorithm.
Mathematical Analysis of Non-Recursive Algorithm.mohanrathod18
 
Mathematical Analysis of Recursive Algorithm.
Mathematical Analysis of Recursive Algorithm.Mathematical Analysis of Recursive Algorithm.
Mathematical Analysis of Recursive Algorithm.mohanrathod18
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notationmohanrathod18
 
Brute force technic
Brute force technicBrute force technic
Brute force technicmohanrathod18
 

More from mohanrathod18 (11)

Flowchart
Flowchart Flowchart
Flowchart
 
Upload our ppt on internet
Upload our ppt on internetUpload our ppt on internet
Upload our ppt on internet
 
Trees
TreesTrees
Trees
 
Graph therory
Graph theroryGraph therory
Graph therory
 
Decrease and conquer technic
Decrease and conquer technicDecrease and conquer technic
Decrease and conquer technic
 
Minimum spanning tree.
Minimum spanning tree.Minimum spanning tree.
Minimum spanning tree.
 
Divide and conquer technic
Divide and conquer technicDivide and conquer technic
Divide and conquer technic
 
Mathematical Analysis of Non-Recursive Algorithm.
Mathematical Analysis of Non-Recursive Algorithm.Mathematical Analysis of Non-Recursive Algorithm.
Mathematical Analysis of Non-Recursive Algorithm.
 
Mathematical Analysis of Recursive Algorithm.
Mathematical Analysis of Recursive Algorithm.Mathematical Analysis of Recursive Algorithm.
Mathematical Analysis of Recursive Algorithm.
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
 
Brute force technic
Brute force technicBrute force technic
Brute force technic
 

Recently uploaded

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Dr. Mazin Mohamed alkathiri
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 

Recently uploaded (20)

Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 

Greedy technique.