cayleytable
Class groupIdentify

java.lang.Object
  extended by cayleytable.groupIdentify

public class groupIdentify
extends java.lang.Object

Class used to identify by name the current groupMatrix object that it contains.

Author:
Jeffrey Barr

Nested Class Summary
private  class groupIdentify.factorType
          Class to store a prime and number used of a prime factorization
private  class groupIdentify.num_order
          Class used to store element orders and the number of elements of that order
 
Field Summary
private  boolean identified
          Boolean result of the identification routine
private  groupMatrix identifyMatrix
          groupMatrix object that is to be identified.
private  java.lang.String name
          String object containing name of current groupMatrix object stored in the class.
 
Constructor Summary
groupIdentify()
          Creates a new instance of groupIdentify with a groupMatrix object of order 0 and no name.
 
Method Summary
private  java.util.ArrayList<groupIdentify.num_order> build_num_order_arrayList(int[] order)
          Method to determine the number of elements in the group of each order.
private  int[] build_order_array()
          Method to determine the order of each of the elements in the group.
private  boolean centerIsKlein4(java.util.ArrayList<java.lang.Integer> center_list, int[] order)
          Method to determine if the center elements in the group correspond to the Klein-4 group.
private  java.util.ArrayList<java.lang.Integer> computeCenter()
          Method to determine the elements in the group that are the center of the group.
private  java.lang.String determineInnerAutomorphism()
          Method to determine the inner automorphism of the group being identified.
 java.util.ArrayList<java.lang.Integer> generateSubGroupList(int element)
          Method to determine the elements in a subgroup that include a specific element.
private  java.lang.String generateUniqueFactor(groupIdentify.factorType nextFactor, int terms)
          Method to generate remaining factors based upon a specific number of a prime order and a number or terms those primes should be combined into.
 java.lang.String getName()
          Method to return name of group stored in identifyMatrix groupMatrix object
private  java.lang.String identifyAbelianXGroup(int[] order, java.util.ArrayList<groupIdentify.num_order> orderList)
          Method to determine remaining Abelian groups that have not been identified by the isCyclic, isTwoPrime, and isPrimeSqrd methods.
private  java.lang.String identifyNonAbelianGroup(int[] order, java.util.ArrayList<groupIdentify.num_order> orderList)
          Method to determine remaining non-Abelian group names for all groups of order less than or equal to 32.
private  boolean isCyclic(int[] order)
          Method to determine if current group is a cyclic group.
 boolean isIdentified()
          Method to return result of whether the group in identifyMatrix groupMatrix object could be identified.
private  boolean isPrime(int n)
          Method to determine if a given value is prime
private  boolean isPrimeSqrd(int n)
          Method to determine if a given value is prime^2
private  boolean isTwoPrime(int n)
          Method to determine if a given value is 2*prime
private  boolean normal(java.util.ArrayList<java.lang.Integer> subGroupList)
          Method to determine if the elements in a subgroup make up a normal subgroup.
private  int numElementsOfOrder(java.util.ArrayList<groupIdentify.num_order> orderList, int k)
          Method to determine the number of elements in a group of a given order.
private  java.util.ArrayList<groupIdentify.factorType> primeFactor(int n)
          Method to determine the prime factorization of a given value
 void resetGroupIdentify(groupMatrix myGroup)
          Method to update the identifyMatrix groupMatrix object stored in the class as well as the method to actually identify the group stored in the identifyMatrix groupMatrix object.
private  void showCenterOrders(java.util.ArrayList<java.lang.Integer> center_list, int[] order)
          Method to determine center elements in the group and their order.
private  boolean subGroupsAllNormal()
          Method to determine if all subgroups of the group are normal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

identifyMatrix

private groupMatrix identifyMatrix
groupMatrix object that is to be identified.


name

private java.lang.String name
String object containing name of current groupMatrix object stored in the class.


identified

private boolean identified
Boolean result of the identification routine

Constructor Detail

groupIdentify

public groupIdentify()
Creates a new instance of groupIdentify with a groupMatrix object of order 0 and no name.

Method Detail

resetGroupIdentify

public void resetGroupIdentify(groupMatrix myGroup)
Method to update the identifyMatrix groupMatrix object stored in the class as well as the method to actually identify the group stored in the identifyMatrix groupMatrix object.

Parameters:
myGroup - groupMatrix object to be identified

getName

public java.lang.String getName()
Method to return name of group stored in identifyMatrix groupMatrix object

Returns:
String containing name of the group

isIdentified

public boolean isIdentified()
Method to return result of whether the group in identifyMatrix groupMatrix object could be identified.

Returns:
boolean result of identification routine.

build_order_array

private int[] build_order_array()
Method to determine the order of each of the elements in the group.

Returns:
Array of integers containing order of all elements in the group

build_num_order_arrayList

private java.util.ArrayList<groupIdentify.num_order> build_num_order_arrayList(int[] order)
Method to determine the number of elements in the group of each order.

Parameters:
order - Array of integers containing order of all elements in the group
Returns:
ArrayList of groupIdentify.numOrder that contains the number of elements of a specific order of the group.

isCyclic

private boolean isCyclic(int[] order)
Method to determine if current group is a cyclic group.

Parameters:
order - Array of integers containing order of all elements in the group
Returns:
Boolean result of check to determine if the group is cyclic.

isPrime

private boolean isPrime(int n)
Method to determine if a given value is prime

Parameters:
n - integer value to check
Returns:
Boolean result of check for prime

isTwoPrime

private boolean isTwoPrime(int n)
Method to determine if a given value is 2*prime

Parameters:
n - integer value to check
Returns:
Boolean result of check for 2*prime

isPrimeSqrd

private boolean isPrimeSqrd(int n)
Method to determine if a given value is prime^2

Parameters:
n - integer value to check
Returns:
Boolean result of check for prime^2

identifyAbelianXGroup

private java.lang.String identifyAbelianXGroup(int[] order,
                                               java.util.ArrayList<groupIdentify.num_order> orderList)
Method to determine remaining Abelian groups that have not been identified by the isCyclic, isTwoPrime, and isPrimeSqrd methods. All remaining Abelian groups are of the cross product form.

Parameters:
order - Array of integers containing order of all elements in the group
orderList - ArrayList of groupIdentify.numOrder that contains the number of elements of a specific order of the group.
Returns:
String object containing name of the Abelian group

primeFactor

private java.util.ArrayList<groupIdentify.factorType> primeFactor(int n)
Method to determine the prime factorization of a given value

Parameters:
n - integer value to factor
Returns:
ArrayList of groupIdentify.factorType containing prime factors and the number of those primes used in the factorization

numElementsOfOrder

private int numElementsOfOrder(java.util.ArrayList<groupIdentify.num_order> orderList,
                               int k)
Method to determine the number of elements in a group of a given order.

Parameters:
orderList - ArrayList of groupIdentify.numOrder that contains the number of elements of a specific order of the group.
k - integer of order to check
Returns:
integer of numner of elements of the given order

generateUniqueFactor

private java.lang.String generateUniqueFactor(groupIdentify.factorType nextFactor,
                                              int terms)
Method to generate remaining factors based upon a specific number of a prime order and a number or terms those primes should be combined into.

Parameters:
nextFactor - groupIdentify.factorType containing next prime and the number of primes that are to be used
terms - integer providing number of terms in the cross product to be returned
Returns:
String object containing elements of the cross product in the name of the group

identifyNonAbelianGroup

private java.lang.String identifyNonAbelianGroup(int[] order,
                                                 java.util.ArrayList<groupIdentify.num_order> orderList)
Method to determine remaining non-Abelian group names for all groups of order less than or equal to 32. Will return error message in String and set identified to false if name cannot be determined or order is greater than 32.

Parameters:
order - Array of integers containing order of all elements in the group
orderList - ArrayList of groupIdentify.numOrder that contains the number of elements of a specific order of the group.
Returns:
String object containing name of the non-Abelian group

computeCenter

private java.util.ArrayList<java.lang.Integer> computeCenter()
Method to determine the elements in the group that are the center of the group. The center of the group consists of all elements in the group that commutes with all of the other elements.

Returns:
ArrayList of Integers representing elements that make up the center of the group

centerIsKlein4

private boolean centerIsKlein4(java.util.ArrayList<java.lang.Integer> center_list,
                               int[] order)
Method to determine if the center elements in the group correspond to the Klein-4 group.

Parameters:
center_list - ArrayList of Integers representing elements that make up the center of the group
order - Array of integers containing order of all elements in the group
Returns:
Boolean result of check if center is Klein-4 group

showCenterOrders

private void showCenterOrders(java.util.ArrayList<java.lang.Integer> center_list,
                              int[] order)
Method to determine center elements in the group and their order.

Parameters:
center_list - ArrayList of Integers representing elements that make up the center of the group
order - Array of integers containing order of all elements in the group

subGroupsAllNormal

private boolean subGroupsAllNormal()
Method to determine if all subgroups of the group are normal.

Returns:
Boolean result of check if all subgroups are normal

generateSubGroupList

public java.util.ArrayList<java.lang.Integer> generateSubGroupList(int element)
Method to determine the elements in a subgroup that include a specific element.

Parameters:
element - integer of element contained in subgroup
Returns:
ArrayList of Integers representing elements that make up the center of the group

normal

private boolean normal(java.util.ArrayList<java.lang.Integer> subGroupList)
Method to determine if the elements in a subgroup make up a normal subgroup. A normal subgroup is a group where the subgroup is commutative with all of the elements in the original group.

Parameters:
subGroupList - ArrayList of Integers representing elements that make up the center of the group
Returns:
Boolean result of check if subgroup are normal

determineInnerAutomorphism

private java.lang.String determineInnerAutomorphism()
Method to determine the inner automorphism of the group being identified.

Returns:
String Name of inner automorphism