FACTOID # 27: If you're itching to live in a trailer park, hitch up your home and head to South Carolina, where a whopping 18% of residences are mobile homes.

 Home Encyclopedia Statistics States A-Z Flags Maps FAQ About

 WHAT'S NEW

SEARCH ALL

Search encyclopedia, statistics and forums:

(* = Graphable)

Encyclopedia > Set (computer science)

In computer science, the set is a collection of certain values without any particular order. It corresponds with the mathematical concept of set, but with the restriction that it has to be finite. Disregarding sequence, it is the same as a list. A set can be seen as an associative array where the value of each key-value pair is ignored.

Sets can be implemented using various data structures. Ideal set data structures make it efficient to check if an object is in the set, as well as enabling other useful operations such as iterating through all the objects in the set, performing a union or intersection of two sets, or taking the complement of a set in some limited domain. Popular methods include arrays (in particular bit arrays), hash tables, and any sort of tree structure. A Bloom map implements a set probabilistically, using a very compact representation but risking a small chance of false positives on queries. Any associative array data structure can be used to implement a set by letting the set of keys be the elements of the set and ignoring the values.

However, very few of these data structures support set operations such as union or intersection efficiently. For these operations, more specialized set data structures exist.

One of the earliest languages to support sets was Pascal; many languages now include it, whether in the core language or in a standard library. Java programming language offers `Set` interface to support sets. In C++, STL provides `set` classes.

Results from FactBites:

 Set (computer science) - Wikipedia, the free encyclopedia (280 words) It corresponds with the mathematical concept of set, but with the restriction that it has to be finite. Ideal set data structures make it efficient to check if an object is in the set, as well as enabling other useful operations such as iterating through all the objects in the set, performing a union or intersection of two sets, or taking the complement of a set in some limited domain. One of the earliest languages to support sets was Pascal; many languages now include it, whether in the core language or in a standard library.
 Computer science - Wikipedia, the free encyclopedia (1685 words) Computer science (abbreviated CS or compsci) is a discipline that deals with all areas of computation, both in theoretical terms, and in hardware and software. Computer graphics is the field of visual computing, where one uses computers both to generate visual images synthetically and to integrate or alter visual and spatial information sampled from the real world. Theoretical computer science is the mathematics of computing.
More results at FactBites »

Share your thoughts, questions and commentary here