Questions tagged [abstract-algebra]
Abstract algebra is the study of algebraic structures, including groups, rings, fields, vector spaces, and the like.
76 questions
15
votes
8
answers
1k
views
The monoids with three elements
Objective
There are seven monoids with three elements, up to isomorphism. Give implementations to all of them, such that their domains are all the same, and that they have the same identity element.
...
12
votes
29
answers
1k
views
Generate the group table for Z_n
Groups are a widely used structure in Mathematics, and have applications in Computer Science. This code challenge is about the fewest # of characters to create a group table for the additive group Zn.
...
9
votes
4
answers
757
views
Find a primitive polynomial
Objective
Given a prime number \$p\$ and an integer \$n \geq 2\$, find a degree-\$n\$ primitive polynomial modulo \$p\$.
Mathematical explanation
When we perform "modular arithmetic" over ...
17
votes
2
answers
468
views
Output a primitive element for each field size
A primitive element of a finite field is a generator of the multiplicative group of the field. In other words, alpha in F(q) is ...
12
votes
9
answers
889
views
Output the symmetric inverse semigroup
The symmetric inverse semigroup is a very important object in the study of semigroups, for a number of reasons, but most obviously due to the Wagner-Preston theorem. In brief, for any set \$X\$, the ...
19
votes
9
answers
1k
views
Conjugate permutations
A permutation of size n is a reordering of the first n positive integers. (meaning each integer appears once and exactly once). Permutations can be treated like functions that change the order of a ...
30
votes
46
answers
3k
views
How does the square end?
In base-10, all perfect squares end in \$0\$, \$1\$, \$4\$, \$5\$, \$6\$, or \$9\$.
In base-16, all perfect squares end in \$0\$, \$1\$, \$4\$, or \$9\$.
Nilknarf describes why this is and how to work ...
9
votes
2
answers
232
views
Primitive words
Given a list of values, 1, 2, -1, or -2, we will allow the following simple moves:
Remove adjacent values which are negatives of each other. e.g. ...
17
votes
2
answers
706
views
Construct this point
Given a constructible point \$(x, y) \in \mathbb R^2\$, output the steps required to construct \$(x, y)\$
Constructing a point
Consider the following "construction" of a point \$(\alpha, \...
18
votes
7
answers
3k
views
Polynomial Long Division
Implement polynomial long division, an algorithm that divides two polynomials and gets the quotient and remainder:
(12x^3 - 5x^2 + 3x - 1) / (x^2 - 5) = 12x - 5 R 63x - 26
In your programs, you will ...
7
votes
1
answer
361
views
Solving the high school algebra problem
We learned many identities involving addition, multiplication and exponentiation in highschool, for example:
$$ \begin{aligned}
(a+b)c &= ac + bc \\
(a b)^c &= a^c b^c \\
(a^b)^c &= a^{bc}
...
27
votes
27
answers
4k
views
Modular multiplicative inverse
Your task is to given two integer numbers, a and b calculate the modular multiplicative inverse of a modulo b, if it exists.
...
20
votes
6
answers
1k
views
Free Kei Friday
A kei (圭) is an algebraic structure that abstracts the idea of mirror reflections.
The kei is given as a set of mirrors \$X\$ and a closed reflection operation \$(\rhd) : X\times X\rightarrow X\$. We ...
8
votes
4
answers
432
views
Determine if two trees are equal in the free quandle
To start we are going to define an "\$\operatorname{FBM}\$" as follows:
Every integer is an \$\operatorname{FBM}\$.
If \$a\$ and \$b\$ are \$\operatorname{FBM}\$s, then \$a \lhd b\$ is an \$...
14
votes
5
answers
550
views
Generate a subgroup of a free group
In group theory, the free group with \$n\$ generators can be obtained by taking \$n\$ distinct symbols (let's call them \$a, b, c ...\$ etc), along with their inverses \$ a^{-1},b^{-1},c^{-1} ...\$ . ...