Abstract

We consider the selection of two basketball teams at a neighborhood playground to illustrate the greedy method. Usually the top two players are designated captains. All other players line up while the captains alternate choosing one player at a time. Usually, the players are picked using a greedy strategy. That is, the captains choose the best unclaimed player. The system of selection of choosing the best, most obvious, or most convenient remaining candidate is called the greedy method. Greedy algorithms often lead to easily implemented efficient sequential solutions to problems. Unfortunately, it also seems to be that sequential greedy algorithms frequently lead to solutions that are inherently sequential — the solutions produced by these algorithms cannot be duplicated rapidly in parallel, unless NC equals P. In the following subsections we will examine this phenomenon. We illustrate some of the important aspects of greedy algorithms using one that constructs a maximal independent set in a graph. An independent set is a set of vertices of a graph that are pairwise nonadjacent. A maximum independent set is such a set of largest cardinality. It is well known that finding maximum independent sets is NP-hard. An independent set is maximal if no other vertex can be added while maintaining the independent set property. In contrast to the maximum case, finding maxima? independent sets is very easy. Figure 7.1.1 depicts a simple polynomial time sequential algorithm computing a maximal independent set. The algorithm is a greedy algorithm: it processes the vertices in numerical order, always attempting to add the lowest numbered vertex that has not yet been tried. The sequential algorithm in Figure 7.1.1, having processed vertices 1,... , j -1, can easily decide whether to include vertex j. However, notice that its decision about j potentially depends on its decisions about all earlier vertices — j will be included in the maximal independent set if and only if all j' less than j and adjacent to it were excluded.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.