# Questions tagged [polynomials]

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

89 questions
Filter by
Sorted by
Tagged with
8 votes
3 answers
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 ...
• 16.7k
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 ...
• 16.7k
18 votes
13 answers
2k views

• 210k
20 votes
4 answers
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}$, ...
• 43.7k
3 votes
3 answers
114 views

### One out of Infinity: Interpolating polynomials [duplicate]

For this challenge, when given a list of (x,y) points your submission needs to output a polynomial function that goes through all of them. For example, if your points were ...
• 14.4k
14 votes
5 answers
941 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 <...
• 43.7k
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 <...
19 votes
4 answers
377 views

• 192
21 votes
12 answers
2k views

### Symbolic Differentiation of Polynomials

Symbolic Differentiation 1: Gone Coefishin' Task Write a program that takes in a polynomial in x from stdin (1 < deg(p) < 128) and differentiates it. The input polynomial will be a string of ...
• 733
3 votes
1 answer
2k views

### Minimum of a Polynomial in Python

What is the shortest amount of code that can find the minimum of an inputted polynomial? I realize that you can import packages like Numpy and others, but using only user defined functions, what is ...
21 votes
2 answers
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 ...
• 10.8k
20 votes
1 answer
953 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 (or ...
• 21.2k
5 votes
1 answer
600 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 ...
12 votes
7 answers
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 ...
• 279
26 votes
1 answer
1k views

### Find real roots of a polynomial

Write a self-contained program which when given a polynomial and a bound will find all real roots of that polynomial to an absolute error not exceeding the bound. Constraints I know that Mathematica ...
• 43.1k
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. ...
• 4,162
13 votes
3 answers
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 ...
• 10.1k
11 votes
7 answers
4k views

### Implement Shamir's Secret Sharing reconstruction

Shamir's secret sharing scheme is a simple way of protecting a secret by splitting it into several parts needed to reconstruct it. Your task is to implement Shamir's Secret Sharing reconstruction ...
• 3,138
16 votes
5 answers
2k 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 ...
• 5,949