Beta

Is it a group? (Group theory, Abstract algebra)

Description:

Is it a group?

In abstract alegbra a group is a set and a binary operation. Our sets will contain non-integers and we are just going to deal with finite groups. The binary operation will be a function that takes in two elements of the set and returns a single value.

Your task in this kata is to create a group object and a function that decides if the group is valid.

In order for a set and binary operation to be a group it must satisfy four conditions: Let a,b,c be elements in our set and * our binary operation (function)

  1. The set must be closed under the binary operation: a*b is an element of the set.
    (The output from given_function(a,b) is an element of the set)

  2. The set must be associative under the binary operation:
    (a*b)*c=a*(b*c)
    (given_function(given_function(a,b),c) = given_function(a, given_function(b,c)) )

  3. There must be an identity element i so that for any other element of the set a:
    i*a=a=a*i (given_function(i,a)=a=given_function(a,i))

  4. For each element a there must be an inverse element a^-1 in the set, such that: a*a^-1=i=a^-1*a (given_function(a,a^-1)=identity)

The wikipedia page is really useful for a clearer/thorougher understanding. I would also reccomend looking up Cayley tables and designing a function to create one for a group object, makes it much easier to see where you have gone wrong.

https://en.wikipedia.org/wiki/Group_(mathematics)#Definition_and_illustration

Mathematics
Algorithms

Stats:

CreatedMar 26, 2020
PublishedMar 26, 2020
Warriors Trained63
Total Skips1
Total Code Submissions180
Total Times Completed31
Python Completions31
Total Stars7
% of votes with a positive feedback rating89% of 22
Total "Very Satisfied" Votes18
Total "Somewhat Satisfied" Votes3
Total "Not Satisfied" Votes1
Total Rank Assessments20
Average Assessed Rank
6 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • ewanmurr Avatar
Ad