Questions tagged [polynomials]

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

Filter by
Sorted by
Tagged with
12
votes
5answers
465 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
12answers
882 views

Construct a companion matrix

You have a number of polynomials who are lonely, so make them some companions (who won’t threaten to stab)! For a polynomial of degree n, there is an ...
7
votes
8answers
1k views

Construct a polynomial with given roots

The challenge is to write the shortest function/program to find a polynomial given the roots. The function or program should take valid input; that is, a list of integers representing the roots of the ...
8
votes
2answers
596 views

Laplace transform of a polynomial [duplicate]

Your goal is to write a program that will print out the Laplace transform of a polynomial function with integer coefficients \$f(x)\$. The Laplace transform of \$f(x)\$ is defined as \$\int_0^\infty f(...
21
votes
12answers
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 ...
20
votes
1answer
895 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 ...
25
votes
1answer
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 ...
12
votes
5answers
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 ...
11
votes
7answers
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 ...
15
votes
5answers
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 ...

1
2