Coding
Related Guides

# What are Greedy Algorithms?

, updated on September 23, 2016
Greedy algorithms are a category of algorithm that make locally optimal choices in hopes of coming close to a globally optimal solution. For example, an algorithm that needs to make 12 decisions may make one at a time as opposed to looking at all possible combinations of decisions.

## Problem Spaces

The effectiveness of greedy algorithms depends on the problem space. If there is some risk that an early decision will paint the algorithm into a corner, they may perform poorly. Greedy algorithms are known to perform poorly in a game such as chess where players commonly consider strategy many moves ahead.
An example of a greedy algorithm that may work is a tourist restaurant with no repeat customers that aggressively tries to upsell food items. If the restaurant depended on regular customers such annoying tactics could drive them out of business. However, since all the customers are new it makes sense for the restaurant to try to maximize each sale without regard to the future relationship with the customer. This strategy soon collapses if customers are able to share their opinions with technology such as reputation systems.

## Why Go Greedy?

Greedy algorithms are often selected when global data is uncertain, making globally optimized solutions impossible or expensive to develop. It is also common to select greedy algorithms for their simplicity and speed. In many problem spaces, calculating globally optimized solutions is prohibitively complex and resource intensive.
 Overview: Greedy Algorithms Type Algorithms Definition A category of algorithm that makes locally optimal choices in hopes that these will come close to a globally optimized solution. Value Typically cheaper to develop, faster and less resource intensive than a globally optimized algorithm. In some cases, globally optimized solutions are impossible due to factors such as uncertainty. Risks Greedy algorithms are typically sub-optimal.In some problem spaces, such as chess, they are extremely sub-optimal to the point of being useless. Related Concepts

## Algorithms

This is the complete list of articles we have written about algorithms.
Backward Induction
Brute Force
Decision Trees
Forward Chaining
Input Is Error
IT Examples
Proof Of Work
Reverse Algorithms
Soft Computing
More ...

## Algorithms

A few types of algorithms.

## Algorithms vs Code

The difference between algorithms and code.

## Deep Magic

An overview of deep magic, a technology term.

## Edit Distance

An overview of edit distance.

## Random Seed

The definition of random seed with examples.

## Soft Computing

The definition of soft computing with examples.

## Algorithmic Accountability

The definition of algorithmic accountability with examples.

## Input Is Error

An overview of input is error.

## IT Bias

An overview of IT biases with examples.

## Technology

Examples of how technology disrupted societies, economies, industries and culture.

## Technology Forces

A list of forces that shape technology in the long run.

## Types Of Technology

A list of major types of technology.

## Iot Examples

A definition of internet of things with examples.

## Architectural Technology

A list of common architectural technologies.

## Autonomous Technology

A definition of autonomous technology with examples.

## Consumer Technology

A definition of consumer technology with examples.

## Modernization

A definition of modernization with examples.

## Optical Fiber

A list of optical fiber applications.

## Technological Change

A definition of technological change with examples.
The most popular articles on Simplicable in the past day.

## New Articles

Recent posts or updates on Simplicable.
Site Map