Shop-for-database-software

Shop-for-database-software

[Login to edit this page]

Using the algebra of sets, this article contains a basic introduction to sets, Boolean operations, Venn diagrams, truth tables, and Boolean applications. The Boolean algebra article discusses a type of algebraic structure that satisfies the axioms of Boolean logic. The binary arithmetic article discusses the use of binary numbers in computer systems.

Sets can contain any elements. We will first start out by discussing general set logic, then restrict ourselves to Boolean logic, where elements (or "bits") each contain only two possible values, called various names, such as "true" and "false", "yes" and "no", "on" and "off", or "1" and "0".

Let X be a set:

Imagine that set A contains all even numbers (multiples of two) in "the universe" (defined in the example below as all integers between 0 and 30 inclusive) and set B contains all multiples of three in "the universe". Then the intersection of the two sets (all elements in sets A AND B) would be all multiples of six in "the universe". The complement of set A (all elements NOT in set A) would be all odd numbers in "the universe".

While at most two sets are joined in any Boolean operation, the new set formed by that operation can then be joined with other sets utilizing additional Boolean operations. Using the previous example, we can define a new set C as the set of all multiples of five in "the universe". Thus "sets A AND B AND C" would be all multiples of 30 in "the universe". If more convenient, we may consider set AB to be the intersection of sets A and B, or the set of all multiples of six in "the universe". Then we can say "sets AB AND C" are the set of all multiples of 30 in "the universe". We could then take it a step further, and call this result set ABC.

While any number of logical ANDs (or any number of logical ORs) may be chained together without ambiguity, the combination of ANDs and ORs and NOTs can lead to ambiguous cases. In such cases, parentheses may be used to clarify the order of operations. As always, the operations within the innermost pair is performed first, followed by the next pair out, etc., until all operations within parentheses have been completed. Then any operations outside the parentheses are performed.

In this example we have used natural numbers, while in Boolean logic binary numbers are used. The universe, for example, could contain just two elements, "0" and "1" (or "true" and "false", "yes" and "no", "on" or "off", etc.). We could also combine binary values together to get binary words, such as, in the case of two digits, "00", "01", "10", and "11". Applying set logic to those values, we could have a set of all values where the first digit is "0" ("00" and "01") and the set of all values where the first and second digits are different ("01" and "10"). The intersection of the two sets would then be the single element, "01". This could be shown by the following Boolean expression, where "1st" is the first digit and "2nd" is the second digit:

(NOT 1st) AND (1st XOR 2nd)

We define symbols for the two primary binary operations as (logical AND/set intersection) and (logical OR/set union), and for the single unary operation / ~ (logical NOT/set complement). We will also use the values 0 (logical FALSE/the empty set) and 1 (logical TRUE/the universe). The following properties apply to both Boolean logic and set logic (although only the notation for Boolean logic is displayed here):

The first three properties define a lattice; the first five define a Boolean algebra. The remaining five are a consequence of the first five.


0 Comments

Write a comment

Rating:    

Share On Facebook
Search And Find
Epik Search:

Related Clips for Shop-for-database-software

Join The Epik Network
Join Now:

Browse The Epik Network

  • Sybilleek

    Hemiplegia

    Maryantin

    Sqlprimer

    Terryleahy

    Brucebanner

    Informante

    74

    Unarosablu

    Fabfilippo

    Sub-saharan

    Gideonlevy

    Susanminot

    Sethgoldman

    Didiercuche

    Meiji

    Luciencarr

    Aprender

    Netikka

    Positioning

    Miriamtoews