[Tutor] creating a matrix of unknown dimensions(dimensions depend on input)

Julieta Rangel julieta_rangel@hotmail.com
Mon, 30 Apr 2001 19:02:40 -0500


Right now I'm trying to come up with a program that given a set of elements 
(at most 30), the computer will determine whether the set is a group or not. 
  (for a set to be a group, the set must be closed under the binary 
operation in use; the elements of the set must be associative, that is 
a*(b*c) = (a*b)*c; the set must contain an identity element e such that for 
any element a on the set, a*e = e*a = a
and finally, every element on the set must contain an inverse such that 
a*a^-1 = e).  To do this I want the computer to offer the user a table set 
up, so that the user can enter the table.  Here is where the matrix comes 
into place.  Since I don't know how many elements the set being tested will 
have, I need to make sure the computer asks the user how many elements the 
set has, so that the computer can create the matrix, which must be filled 
out by the user.  All the computer has to do know is to check the table 
(matrix) for all the properties to determine whether the set is a group or 
not.  Does this sound too confusing, anyway, at this point I'm maninly 
interested on how to create an n x n matrix based on any given input (up to 
30elements)

Again, any kind of help you can offer will be truly appreciated.

Julieta
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com