Questions tagged [abstract-algebra]

Abstract Algebra is the study of algebraic structures, including groups, rings, fields, vector spaces, and the like.

Filter by
Sorted by
Tagged with
17
votes
8answers
1k views

Dividing Divisive Divisors

Given a positive integer \$n\$ you can always find a tuple \$(k_1,k_2,...,k_m)\$ of integers \$k_i \geqslant 2\$ such that \$k_1 \cdot k_2 \cdot ... \cdot k_m = n\$ and $$k_1 | k_2 \text{ , } k_2 | ...
9
votes
2answers
372 views

​Plane​ ​Blow​up​

The Blow-up is a powerful tool in algebraic geometry. It allows the removal of singularities from algebraic sets while preserving the rest of their structure. If you're not familiar with any of that ...
14
votes
16answers
612 views

Dihedral group D4 composition with custom labels

The dihedral group \$D_4\$ is the symmetry group of the square, that is the moves that transform a square to itself via rotations and reflections. It consists of 8 elements: rotations by 0, 90, 180, ...
28
votes
26answers
2k views

Fundamental Solution of the Pell Equation

Given some positive integer \$n\$ that is not a square, find the fundamental solution \$(x,y)\$ of the associated Pell equation $$x^2 - n\cdot y^2 = 1$$ Details The fundamental \$(x,y)\$ is a pair ...
9
votes
0answers
115 views

Order of Elements of the Rubik's Cube [duplicate]

Introduction All the possible moves and their combinations of a Rubik's Cube form a group. A group in general is a set with some binary operation defined on it. It must contain a neutral element with ...
4
votes
2answers
315 views

Finite Field Multiplication

Overview Given the integer representation of three elements in GF(2^64), give the product of the first two elements over GF(2^64) with the reducing polynomial defined as the polynomial m such that m(...
12
votes
2answers
280 views

Decompose Polynomials

Given an integral polynomial of degree strictly greater than one, completely decompose it into a composition of integral polynomials of degree strictly greater than one. Details An integral ...
12
votes
5answers
630 views

Sparse Protractor

Given some positive integer n, design a protractor with the fewest number of marks that lets you measure all angles that are an integral multiple of ...
17
votes
8answers
822 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 ...
20
votes
20answers
2k views

Find the Missing Numbers in the Fibonacci Sequence Mod K

Inspired by this Math.SE question. Background The Fibonacci Sequence (called F) is the sequence, starting 0, 1 such that each ...
17
votes
1answer
288 views

Counting Moufang Loops

A loop is a pretty simple algebraic structure. It is a tuple (G,+) where G is a set and + is a binary operator G × G → G. That is + takes two elements from G and returns a new element. The operator ...
18
votes
2answers
464 views

How many shuffles

A riffle shuffle is a type of shuffle where the deck is split into two partitions and the partitions are then spliced back together to create a new shuffled deck. The cards are spliced together in ...
23
votes
5answers
509 views

Determine How many Wheels There Are

Non-math explanation This is an explanation that is meant to be approachable regardless of your background. It does unfortunately involve some math, but should be understandable to most people with a ...
121
votes
11answers
12k views

(-a) × (-a) = a × a

We all know that \$(-a) \times (-a) = a \times a\$ (hopefully), but can you prove it? Your task is to prove this fact using the ring axioms. What are the ring axioms? The ring axioms are a list of ...
21
votes
9answers
2k views

Is the group cyclic?

Introduction You can skip this part if you already know what a cyclic group is. A group is defined by a set and an associative binary operation $ (that is, ...
22
votes
22answers
2k 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. ...
29
votes
4answers
944 views

Implement true string addition

Many languages allow strings to be "added" with +. However this is really concatenation, a true addition would follow the group axioms: It is closed (the addition ...
20
votes
32answers
2k 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 this out very well in this answer, ...
13
votes
2answers
745 views

Are these braids equal?

If you are not familiar with Braid-Theory I recommend that you read this first. This question assumes that you are at least familiar with the concepts at hand and assumes you are well familiar with ...
13
votes
4answers
1k views

Square root a number

The task is as follows: Given a positive integer x and a prime n > x, output the smallest positive integer ...
20
votes
9answers
4k views

Compute the inverse of an integer modulo 100000000003

The task is the following. Given an integer x (such that x modulo 100000000003 is not equal ...
16
votes
2answers
303 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 ...
9
votes
10answers
770 views

Rotational symmetry of string

A rotation "is made by splitting a string into two pieces and reversing their order". An object is symmetrical under an operation if the object is unchanged after applying said operation. So, a "...
14
votes
4answers
339 views

Find the number of subgroups of a finite group

Definitions You can skip this part if you already know the definitions of groups, finite groups, and subgroups. Groups In abstract algebra, a group is a tuple (G, ∗), where G is a set and &...
9
votes
3answers
188 views

Composition of permutations – the group product

Given two permutations in disjoint cycle form, output their product/composition in disjoint cycle form. To find the composition, convert the disjoint cycles to permutations in two-line notation. Each ...
20
votes
18answers
2k views

Draw me the (weird) unit circle!

Introduction You may know and love your normal unit circle. But mathematicans are crazy and thus they have abstracted the concept to any point that satisfies ...
20
votes
6answers
598 views

Quandle Quandary Episode I: Identifying Finite Quandles

Write a program that will determine if a given matrix represents a quandle. A quandle is a set equipped with a single (non-commutative, non-associative) operation ◃ which obeys the following axioms: ...
8
votes
3answers
326 views

Detect a Symmetric polynomial [closed]

A symmetric polynomial is a polynomial which is unchanged under permutation of its variables. In other words, a polynomial f(x,y) is symmetric if and only if ...
9
votes
1answer
289 views

Negative XOR primes

About a year ago you were asked to find the XOR primes. These are numbers whose only factors are 1 and themselves when performing XOR multiplication in base 2. Now were are going to spice things up ...
42
votes
14answers
2k views

No strings attached!

Intro There are 3 nails in the wall. You've got a piece of string that is fixed to the picture frame with both ends. To hang the picture, you entangled the string with the nails. But before letting ...
14
votes
7answers
360 views

Generate binary matrices which are distinct up to reflections

Here are all the 2x2 binary matrices ...
14
votes
5answers
627 views

Algebraic curve plotter

An algebraic curve is a certain "1D subset" of the "2D-plane" that can be described as set of zeros {(x,y) in R^2 : f(x,y)=0 }of a polynomial ...
12
votes
6answers
1k views

Define a field with 256 elements

A field in mathematics is a set of numbers, with addition and multiplication operations defined on it, such that they satisfy certain axioms (described in Wikipedia; see also below). A finite field ...
29
votes
2answers
895 views

Addition on Elliptic Curves

Addition on Elliptic Curves Disclaimer: This does not do any justice on the rich topic of elliptic curves. It is simplified a lot. As elliptic curves recently got a lot of media attention in the ...
43
votes
9answers
1k views

Cycling with Rubik's

While idly twisting my Rubik's cube around, my son noticed that it kept going back to the solved state. I'm pretty sure he thought this was some sort of voodoo magic at first, but I explained that if ...
13
votes
3answers
698 views

Irreducible polynomials over GF(5)

A polynomial with coefficients in some field F is called irreducible over F if it cannot be decomposed into the product of lower degree polynomials with coefficients in F. Consider polynomials over ...
17
votes
3answers
367 views

The Abelian Orders

Some background In math, a group is a tuple (G, •) where G is a set and • is an operation on G such that for any two elements x and y in G, x • y is also in G. For some x, y, z in G, basic group ...
11
votes
2answers
231 views

Which finite abelian group is this?

Description Write a function f(m, G) that accepts as its arguments a mapping m, and a set/list of distinct, non-negative ...
16
votes
5answers
1k views

Find the XOR Primes

In this challenge posed by xnor, we were asked to implement XOR multiplication. In this challenge the goal is to find the first n XOR primes. XOR primes are very ...
16
votes
3answers
639 views

Rolling the Dice

Rolling the Dice So, I was rolling dice a while ago and thought of a challenge. Given the cube with a net taken from input and a list of moves, find the square on the bottom at the end. I will use ...
17
votes
2answers
943 views

Random Golf of the Day #6: Roll a d20

About the Series First off, you may treat this like any other code golf challenge, and answer it without worrying about the series at all. However, there is a leaderboard across all challenges. You ...
14
votes
4answers
370 views

Counting Abelian groups of a given size

Background Last time, we counted groups of a given size, which is a non-trivial problem. This time, we'll only count Abelian groups, i.e., groups with a commutative operation. Formally, a group (G, &...
21
votes
3answers
616 views

Counting groups of a given size

Groups In abstract algebra, a group is a tuple \$(G,\ast)\$, where \$G\$ is a set and \$\ast\$ is a function \$G\times G\rightarrow G\$ such that the following holds: For all \$x, y, z\$ in \$G\$, \$...
12
votes
4answers
454 views

Multiply Pauli Matrices

The Pauli matrices are a set of 2x2 matrices which appear very commonly in quantum physics (no, you don't need to know any quantum physics for this challenge). If we include the identity in the set, ...
17
votes
4answers
617 views

Group Therapy: Identify Groups

Write a program, that determines whether the multiplication table of the given finite magma represents a group. A magma is a set with a binary operation that is closed, that means for all a,b in G, a*...
20
votes
1answer
836 views

Factor a polynomial over a finite field or the integers

Without using any built-in factoring/polynomial functions, factor a polynomial completely into irreducibles over the integers or a finite field. Input Your program/function will receive some prime (...
9
votes
24answers
701 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. ...
3
votes
1answer
552 views

Find number of polynomials with a root which is a root of unity

Write a program which takes an integer argument and outputs the number of degree n monic polynomials with coefficients that are -1,1 or 0 which have a root which is a root of unity. To make it a ...
10
votes
4answers
1k 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 ...