Saturday, October 8, 2011

Data Representation/Boolean Logic


DATA REPRESENTATION/BOOLEAN LOGIC

How amazing is it that computers can play chess or balance a check book?  The answer to this is the very basis of something called Boolean logic.  It was used first by George Boole, the British born Irish mathematician, in the mid 1800’s and enables many things to be mapped into bits and bytes.  It really comes down to the very basis of computers when you want to explain how Boolean logic works and it is so simple.  It starts with logic “gates” and relays and becomes something useful.

A Primer in Boolean Logic can be explained in an Internet search of this vast computer database based on the principles of Boolean logic.  Boolean logic is the logical relationship of search terms.


Boolean logic consists of three logical operators:
  • OR
  • AND
  • NOT
Each operator can be visually described by using Venn diagrams, as shown below.

OR logic

college OR university

  • the shaded circle with the word college representing all the records that contain the word "college"
  • the shaded circle with the word university representing all the records that contain the word "university"
  • the shaded overlap area representing all the records that contain both "college" and "university"
OR logic is most commonly used to search for synonymous terms or concepts.   The more terms or concepts we combine in a search with or logic, the more results.
OR logic collates the results to retrieve all the unique records containing one term, the other term, or both of them.








AND logic

poverty AND crime
  • In this search, we retrieve records in which BOTH of the search terms are present
  • This is illustrated by the shaded area overlapping the two circles representing all the records that contain both the word "poverty" and the word "crime"
  • We do not retrieve any records with only "poverty" or only "crime"
The more terms or concepts we combine in a search with AND logic, the fewer results retrieved.
poverty AND crime AND gender
Some search engines use the proximity operator NEAR to determine the closeness of terms of a source document. NEAR is a restrictive AND.  Most search engines default to proximity.

NOT logic

cats NOT dogs
  • This search, we retrieve records in which ONLY ONE of the terms is present.
  • This is illustrated by the shaded area with the word cats - all the records containing the word "cats"
  • No records are retrieved in the area overlapping the two circles where the word "dogs" appears, even if the word "cats" appears there too
Here is an example of how NOT logic works:







NOT logic excludes from your search results. When you use NOT: the term you do want may be present in an important way in documents that will be excluded because you wish to avoid that word. For example, consider a Web page that includes the statement that " cats are smarter than dogs." The search NOT would exclude this document from your results.

Combined AND and OR logic

Question: I want information about the behavior of cats.
Search: behavior AND (cats OR felines)
You can combine both AND and OR logic in a single search, as shown above.
The use of parentheses in this search is known as forcing the order of processing. In this case, we surround the OR words with parentheses so that the search engine will process the two related terms as a unit. The search engine will use AND logic to combine this result with the second concept. Using this method, we are assured that the semantically-related OR terms are kept together as a logical unit.

Quick Comparison Chart:
Full Boolean vs. Implied Boolean vs. Search Form


Full Boolean
Implied Boolean
Search Form Terminology
OR
college or university
[rarely available]
any of the words
at least one of the words
should contain the words
AND
poverty and crime
poverty   crime
all of these words
must contain the words
NOT
cats not dogs
cats   -dogs
must not contain the words
should not contain the words
NEAR, etc.
cats NEAR dogs
N/A

http://www.internettutorials.net/boolean.asp

No comments:

Post a Comment