All Questions

Tagged with
14
votes
16answers
598 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, ...
24
votes
21answers
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
113 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
309 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
275 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
626 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
1answer
286 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 ...
23
votes
5answers
508 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 ...
111
votes
11answers
11k views

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

We all know that (-a) × (-a) = a × 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 rules that two ...
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. ...
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 ...
21
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
302 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 ...
14
votes
4answers
336 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 &...
19
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
597 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
324 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 ...
29
votes
2answers
829 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 ...
13
votes
3answers
677 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
222 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 ...
14
votes
4answers
368 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
608 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\$, \$...
17
votes
4answers
613 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
830 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
698 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 ...