Set Cartesian Product

Set Cartesian Product

Mathematics LET Subcommands SET CARTESIAN PRODUCT SET CARTESIAN PRODUCT PURPOSE Carry out the cartesian product of 2 sets with numeric elements. DESCRIPTION The Cartesian product of two sets is the set containing all the possible element pairs of the 2 original sets. For example, the Cartesian product of the 3-element set 1 3 5 and the 4-element set 1 4 9 16 is the 12-element pair of sets: (1,1), (1,4), (1,9), (1,16), (3,1), (3,4), (3,9), (3,16), (5,1), (5,4), (5,9), (5,16) SYNTAX LET <v3> <v4> = SET CARTESIAN PRODUCT <v1> <v2> <SUBSET/EXCEPT/FOR qualification> where <v1> is the variable containing the elements of the first set; <v2> is the variable containing the elements of the second set; <v3> is the variable containing the elements of the resultant set corresponding to <v1>; <v4> is the variable containing the elements of the resultant set corresponding to <v2>; and where the <SUBSET/EXCEPT/FOR qualification> is optional and rarely used in this context. EXAMPLES LET Y3 Y4 = SET CARTESIAN PRODUCT Y1 Y2 LET Y3 Y4 = SET CARTESIAN PRODUCT Y1 Y2 SUBSET Y1 > 10 LET Y3 Y4 = SET CARTESIAN PRODUCT Y1 Y2 FOR I = 1 1 3 NOTE If the elements of a mathematical “set” are numbers (or can be translated into numbers-- always possible), then a DATAPLOT variable can be used to store the items of the mathematical set. To store the set with the 12 elements 1 3 5 7 11 1 4 9 16 1 8 27, form the variable Y with the following command: LET Y = DATA 1 3 5 7 11 1 4 9 16 1 8 27 Larger sets can be created with the READ or SERIAL READ commands. DEFAULT None SYNONYMS None RELATED COMMANDS SET CARDINALITY = Computes the number of elements in a set. SET UNION = Carries out a set union. SET INTERSECTION = Carries out a set intersection. SET COMPLEMENT = Carries out a set complement. VECTOR DOT PRODUCT = Carries out a vector cross product. MATRIX MULTIPLICATION = Carries out a matrix multiplication. APPLICATIONS Mathematics IMPLEMENTATION DATE 87/10 PROGRAM LET Y1 = DATA 1 3 5 7 9 LET Y2 = DATA 1 4 9 16 LET Y3 Y4 = SET CARTESIAN PRODUCT Y1 Y2 SET WRITE DECIMALS 0 WRITE Y1 Y2 Y3 DATAPLOT Reference Manual March 19, 1997 3-105.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    1 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us