Sunday, August 24, 2014

Set Theory with Go Lang - I

Set Theory have huge importance in computer science, in any terms or language (technical language like Java, C#) when it comes to providing efficient and performance oriented solution, one must think of providing data structures which are cost effective and provide best in class performance.

In this series, we will see implementation of Set Data Structure using Go Lang. But first we have to clear some basics of Set Theory in mathematical terms and analogy. Some of the basic definition and understanding with respect to Algebraic Discrete Mathematics.


So let's get started with basic concepts,


  • Set
    • Set means a collection of objects of any sort.
      • Object is broad term. Let's take a look at some example of sets:
        • The Set of all Females in company.
        • A pair of shoes.
        • The set of all ideas contained in a book.
        • A collection of movies.
        • Set have synonyms like 'Collection', 'Class', 'Aggregate'.
    • In generalization we think of a set as a collection of objects which share some common property. However, this restriction is not necessary, as a set containing a dog, a letter 'A', a jacket and Mr. Smith is an acceptable set but it may be uninteresting and not important.
  • Membership
    • A fundamental concept of Set Theory is that of membership or belonging to a set. Any object belonging to a set called a member or an element of that set.  
    • A set is called well defined if it is possible to determine, by means of certain rules, whether any given object is a member of the set.
  • Standards
    • Capital letters with or without subscripts will be used throughout do denote sets, and lowercase letters will be used to denote the elements.  
    • If an element  p belongs to a set A, then we write 

 
                 which is read as "p is an element of set A" or "p belongs to set the set A" or "p is in A".
    • If an element p does not belong to the set A, then we express this fact as
 
                 
                  which is read as "p is not an element of set A" or "p does not belong to set A".
    • There are several ways in which set can be specified. For example, a set consisting of the elements 1,3, and a is generally written as 
               
                  Now if we wish to denote this set as S, then we write as

I look forward to write some basic mathematical models which we will be implementing with Go Lang. I will try to write more about the functions in set theory so readers can understand what functions are there and yes, please comment if there are any suggestions or criticism.

No comments:

Post a Comment