# Questions tagged [polynomials]

For challenges involving polynomials, mathematical expressions that consist of variables and coefficients.

89 questions
Filter by
Sorted by
Tagged with
360 views

### Hermite interpolation

We already have a challenge for polynomial interpolation: given a list of points, output the coefficients of the polynomial that passes through them. Hermite interpolation is a generalization of ...
2k views

### Discrete Convolution or Polynomial Multiplication

Given two non empty lists of integers, your submission should calculate and return the discrete convolution of the two. Interestingly, if you consider the list elements as coefficients of polynomials, ...
389 views

### Rational Polynomial Interpolation

Explanation In this task you'll be given a set of N points (x1,y1),…,(xN,yN) with distinct xi values and your task is to interpolate a polynomial through these points. If you know what Lagrange ...
641 views

### Multiply numerical polynomials

A numerical polynomial is a polynomial $p$ in one variable with rational coefficients such that for every integer $i$, $p(i)$ is also an integer. The numerical polynomials have a basis given by ...
1k views

### Ryley's Theorem

S. Ryley proved following theorem in 1825: Every rational number can be expressed as a sum of three rational cubes. Challenge Given some rational number $r \in \mathbb Q$ find three rational ...
230 views

### Order of an algebraic number

Consider some arbitrary polynomial with integer coefficients, $$a_n x^n + a_{n-1}x^{n-1} + \cdots + a_1x + a_0 = 0$$ We'll assume that $a_n \ne 0$ and $a_0 \ne 0$. The solutions to this polynomial ...
825 views

### Chromatic polynomial of a graph

Given a undirected graph $G$ and a integer $k$, how many $k$-coloring does the graph have? Here by a $k$-coloring, we mean assigning one of the $k$ colors to each vertex of the graph, such ...
897 views

### Euler-Poincaré-Characteristic of Polyhedra

Given a triangulation of the surface of a polyhedron p, calculate its Euler-Poincaré-Characteristic χ(p) = V-E+F, where ...
1k views

### Resultant of two polynomials

The resultant of two polynomials is a polynomial in their coefficients that is zero if and only if $p$ and $q$ have a common root. It is a useful tool for eliminating variables from systems of ...
1k views

### Calculate Power Series Coefficients

Given a polynomial $p(x)$ with integral coefficients and a constant term of $p(0) = \pm 1$, and a non-negative integer $N$, return the $N$-th coefficient of the power series (sometimes called &...
1k views

### Prime polynomials

Given a polynomial, determine whether it's prime. A polynomial is ax^n + bx^(n-1) + ... + dx^3 + ex^2 + fx + g, where each term is a constant number (the ...
2k views

### Polynomialception

Given two polynomials f,g of arbitrary degree over the integers, your program/function should evaluate the first polynomial in the second polynomial. ...
377 views

For every given degree $n$ it is possible to construct (at least one) an integral polynomial $p \in \mathbb Z[X]$ such that $p(k)$ ($p$ evaluated in $k$) is the coefficient of the term $x^k\... 18 votes 13 answers 2k views ### Cyclotomic polynomial Background (skip to definitions) Euler proved a beautiful theorem about the complex numbers:$e^{ix} = \cos(x) + i \sin(x)$. This makes de Moivre's theorem easy to prove:  (e^{ix})^n = e^{i(nx)} \\... 19 votes 10 answers 2k views ### Is this polynomial a square? Given an integral polynomial$p$, determine if$p$is a square of another integral polynomial. An integral polynomial is a polynomial with only integers as coefficients. For example,$x^2+2x+1$... 12 votes 6 answers 526 views ### Is it a factor of a polynomial? A polynomial is divisible by a factor (x-n) if f(n)=0 for a function f. Your job: to ... 14 votes 13 answers 2k views ### Characteristic polynomial The characteristic polynomial of a square matrix$A$is defined as the polynomial$p_A(x) = \det(Ix-A)$where$I$is the identity matrix and$\det$the determinant. Note that this definition ... 7 votes 2 answers 290 views ### Find the Circle-Tangent Polynomials Introduction A circle-tangent polynomial is a polynomial of degree$N\ge3$or above that is tangent to the unit circle from inside at all of its N-1 intersection points. The two tails that exits the ... 10 votes 10 answers 455 views ### CGAC2022 Day 3:$n$-dimensional Chocolate Pyramid Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details. I've got an infinite supply of$n$-dimensional chocolate for some positive integer$n$. The shape of the ... 14 votes 7 answers 984 views ### Exponential transform of an integer sequence The exponential generating function (e.g.f.) of a sequence$a_n$is defined as the formal power series$f(x) = \sum_{n=0}^{\infty} \frac{a_n}{n!} x^n$. When$a_0 = 0$, we can apply the ... 18 votes 16 answers 1k views ### Multiplicity of a root of a polynomial Let$p(x)$be a polynomial. We say$a$is a root of multiplicity$k$of$p(x)$, if there is another polynomial$s(x)$such that$p(x)=s(x)(x-a)^k$and$s(a)\ne0$. For example, the ... 7 votes 5 answers 482 views ### Multiply multivariate polynomials We already have a challenge about multiplying multiply single-variable polynomials. This challenge is about multiply two polynomials with multiple variables Your task is given two multi-variable ... 17 votes 18 answers 2k views ### Computing a specific coefficient in a product of polynomials Generator functions This gives the context for why this challenge came to life. Feel free to ignore. Generator functions are a nice way of encoding the solution to a problem of combinatorics. You ... 19 votes 14 answers 2k views ### Rook Polynomials In combinatorics, the rook polynomial$R_{m,n}(x)$of a$m \times n$chessboard is the generating function for the numbers of arrangements of non-attacking rooks. To be precise: R_{m,n}(x) = \... 6 votes 3 answers 701 views ### Pretty-printing polynomials A polynomial over a variable x is a function of the form p(x) = anxn + an-1xn-1 + ... + a1x + a0 where a0 ... an are the coefficients. In the simplest case, the coefficients are integers, e.g. ... 13 votes 5 answers 1k 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 ... 14 votes 14 answers 2k views ### Print all Polynomials The set of all polynomials with integer coefficients is countable. This means that there is a sequence that contains each polynomial with integer coefficients exactly once. Your goal is it to write a ... 15 votes 7 answers 1k views ### Solve quadratic equations when 1+1=0 There already have been multiple challenges about carryless multiplication, this challenge will work with the same calculation rules. You task is given a quadratic polynomial ... 17 votes 14 answers 3k views ### Shamir's Secret Sharing Given n (the number of players), t (the threshold value), and s (the secret), output the <... 26 votes 19 answers 3k views ### Laguerre Polynomials Laguerre polynomials are nontrivial solutions to Laguerre's equation, a second-order linear differential equation:$xy''+(1-x)y'+ny=0$. For a given value of$n$, the solution,$y$, is named$...
3k views

What is the Ultraradical? The ultraradical, or the Bring radical, of a real number $a$ is defined as the only real root of the quintic equation $x^5+x+a=0$. Here we use $\text{UR}(\cdot)$ to ...
4k views

### Absolute Sums of Sidi Polynomial Coefficients

Background The Sidi polynomial of degree $n$ – or the $(n + 1)$th Sidi polynomial – is defined as follows. $$S_n(x) = \sum^n_{k=0}s_{n;k}x^n \text{ where } s_{n;k} = (-1)^k\binom n k (k+1)^n$$ The ...
1k views

### Polynomial Interpolation

Write a program that performs Polynomial Interpolation using true arbitrary precision rational numbers. The input looks like this: f(1) = 2/3 f(2) = 4/5 f(3) = 6/7 ... You may assume that there's ...
1k views

### Approximate a root of an odd degree polynomial

Every odd degree polynomial has at least one real root. However this root does not have to be a rational number so your task is to output a sequence of rational numbers that approximates it. Rules ...
675 views

### Golfing Expressions

We can write mathematical expressions using the standard math operators (,),+,...
376 views

### Partial Fractions

Given an input of a string, output the partial fraction in string form. The partial fraction decomposition of a rational fraction of the form $\frac{f(x)}{g(x)}$, where $f$ and $g$ are ...
4k views

### Shortest Program to Solve a Quartic Equation

Write the shortest program to solve a quartic equation. A quartic equation is a polynomial equation of the form: $ax^4 + bx^3 + cx^2 + dx + e=0$ A solution for $x$ is a number such that the above ...
529 views

### Locally invert a Polynomial

Challenge Given a polynomial $p$ with real coefficients of order $1$ and degree $n$, find another polynomial $q$ of degree at most $n$ such that $(p∘q)(X) = p(q(X)) \equiv X \mod X^{n+1}$, ...
2k views