Docstoc

sets

Document Sample
sets Powered By Docstoc
					Introduction
     to
   Sets
   A set is just a collection of stuff
• But the stuff must be written inside curly
  braces

• Each item in the curly braces is separated by
  commas

• Some examples of sets include:
{a, b, c, d , e, f }
      {}
Called the empty set
{bob,1,8, clown, hat}
{bob,1,8,{1,2,3}, a,
b,{clown, bob}, hat,
      1
4,{{{{ }}}},clown}
 There are two very small rules about the
             stuff in the Set

1. You don’t list anything more than once



2. The order you list things in doesn’t matter
  {a, b, a, b, e, f }
Is not the correct way to write out this set (it repeats
an element)
  {a, b, a, b, e, f }
Is not the correct way to write out this set (it repeats
an element)
Both of these would be considered identical
Sets since they have all the same elements
and only the order is different.


                   {1,2,3}
                   {3,1,2}
  So what if I get tired of writing out all of
                 these Sets?
• Just as with logic we can make up place holders
  (variables) to refer to any Set we specify.
  Typically we use single capital letters to do this.


            A  {a, b, c, d , e, f }

  So now I can just use      A   and we all
  know what I mean.
  Let’s consider the following sets

A  {a, b, c, d , e, f }
B  {1,2,3}
                             How many items are in
C  {{a, b},{c, d }}         each of the sets on the
                             left?
D  {{},{},10,11}
E  {}                     |A| = 6    |C| = 2
                           |B| =3     |D| = 4
                           |E| = 0
   Some well known and named sets
• “N” is the natural numbers {0, 1, 2, 3, 4, 5, …}
• “Z” is the set of integers {…-2,-1,0,1,2,…}
• “Q” is the set of rational numbers (any
  number that can be written as a fraction
• “R” is the set of real numbers (all the
  numbers/fractions/decimals that you can
  imagine
           Cardinality

              A
This is just asking how many
elements are in the set…
           Cardinality

              A
This is just asking how many
elements are in the set… and we just
learned how to do it.
     Solve the following problems
A  {alpha, beta, gamma}   1. What is |A|?
B  {5,0,5,10}               3
C  {{a,{b}},{c, d }}
                           2. What is |B|+|C|
D  {{},{},10,11}             6
E  {}
                           3. What is |D|+|E|-|A|?
                              1
            Set Builder Notation
• We don’t always have the ability or want to directly
  list every element in a set. So Mathematicians have
  invented “Set Builder Notation”



             {x : x  N }
 This can be read as “All x’s such that x is
 an element of the Natural Numbers”
           Set Builder Notation
• Two key symbols that we will see:



       This means “is an element of”


        This means “is subset of”
               For example
• We can say


 5   ,2,3,4,5
      1
 {1,3,5}  {1,2,3,4,5}
Set Builder Notation consists of two halves

• The first half gives a description of what
  values we want to include in our set
• The second half places constrains on which of
  the values mentioned in the first half we will
  actually use.
            Examples

{x : x  2  5}
{x : x  2k & k {1,2,3}}
             x
{x : x  N &  N }
             3
      Example Answers


{x : x  2  5}  {2.5}
             Examples


{x : x  2k & k  {1,2,3}}  {2,4,6}
            x
{x : x  N &  N }  {0,3,6,9,12,...}
            3
            More Practice



Understanding Set Builder Notation
               Set Operations
• Just like in logic there are lots of ways we can
  perform operation on sets. Most of these
  operations are different ways of combining
  two different sets buy some (like Cardinality)
  only apply to a single set.
               Union

         A B
Create a new set by combining all of
the elements or two sets
             Union Examples
A  {1,2,3,4,5}       A B  {0,1,2,3,4,5,6,8}
B  {0,2,4,6,8}       B  A  {0,1,2,3,4,5,6,8}
C  {0,5,10,15}
                      C  D  {0,5,10,15}
D  {}

      ( A  C )  ( D  B)  {0,1,2,3,4,5,6,8,10,15}
          Intersection

         A B
Create a new set using the elements
the two sets have if common
         Intersection Examples
A  {1,2,3,4,5}        A B  {2,4}
B  {0,2,4,6,8}        B  A  {2,4}
C  {0,5,10,15}
                      CD        {}
D  {}

         ( A  C )  ( D  B)    {5}
            Difference

          A B
Create a new set by taking all of the
elements of the first set (A) and
removing all of the elements in the
second set (B)
           Difference Examples
A  {1,2,3,4,5}
                       A  B  {1,3,5}
B  {0,2,4,6,8}
                       B  A  {0,6,8}
C  {0,5,10,15}
D  {}                 C  D  {0,5,10,15}


       ( A  C )  ( D  B)  {1,2,3,4}
 Practice with Set Operations


Set Operations
            Power Set
       A              P ( A)
   2         or




Create a set that consists of all of the
subsets of the set that is given (A)
              Power Set Examples


A  {1,2,3}         2 A  {{1,2,3}, {1,2}, {1,3},

B  {a, b, c, d }         {2,3}, {1}, {2}, {3}, {}}

       P(B)    {{a, b, c, d },{a, b, c},{a, b, d },
                {a, c, d },{b, c, d },{a, b},{a, c},
                {a, d },{b, c},{b, d },{c, d },{a},
                {b},{c},{d },{}}
       Cartesian Product

          A B
Create a new set consisting of
coordinate pairs by combining pairs
of elements (one from each set) in all
possible combinations.
       What is a coordinate pair
• Its just like what you learned about when you
  learned about graphing or points
• It is something written in the form (x, y)
• The first value in the parentheses is the x-
  coordinate
• The second value in the parentheses is the y-
  coordinate
     Cartesian Product Examples
A  {1,2,3}         A B  {(1, a), (1, b), (1, c), (2, a),
                               (2, b), (2, c), (3, a ), (3, b), (3, c)}
B  {a, b, c}
                   B  A  {( a,1), (a,2), (a,3), (b,1), (b,2),
C  {1,5}
                               (b,3), (c,1), (c,2), (c,3)}
         C  A  {( 1,1), (1,2), (1,3), (5,1),
                 (5,2), (5,3)}

        B C  {( a,1), (a,5), (b,1), (b,5),
               (c,1), (c,5)}

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:17
posted:9/28/2012
language:Unknown
pages:37