Questions tagged [polynomial-math]

Polynomial Math is a subset of mathematics dealing with mathematical expressions constructed from variables and constants using only the operations of addition, subtraction, multiplication, and non-negative integer exponents. Any polynomial math question should be programming related.

630 questions
0
votes
1 answer

Computing the powers of a polynomial f(x) modulo irreducible polynomial h(x) in MATLAB

Suppose I have a polynomial f(x)= a_0 + a_1*x + a_2*x^2 +...+ a_(n-1)*x^(n-1) with a_i elements of F_q, q prime. How do I compute the powers f(x)^0, f(x)^1, f(x)^2, ..., f(x)^k modulo another polynomial h(x) of degree n for any positive integer k…
0
votes
2 answers

CRC polynomial calculation

I am trying to understand this document, but can't seem to get it right. http://www.ross.net/crc/download/crc_v3.txt What's the algorithm used to calculate it? I thought it uses XOR but I don't quite get it how he gets 0110 from 1100 XOR 1001. It…
George Irimiciuc
  • 4,573
  • 8
  • 44
  • 88
0
votes
2 answers

Java negative value hash codes

so here is all of my code for reference. import java.io.*; import java.util.*; public class Plagiarism { public static void main(String[] args) throws Exception { //you are not using 'myPlag' anywhere, you can safely remove it // …
user3364788
  • 99
  • 2
  • 10
0
votes
4 answers

Stack around the variable ' ' is corrupted , c++ issue

I got a little problem about this program i am making , The main purpose of this program I am making is to get 2 polynomial and sum / sub / multiply it , Didn't finished the output and main() parts yet, just on the code itself, When I try to use the…
Pedram
  • 193
  • 1
  • 2
  • 16
0
votes
4 answers

Fast algorithmn for deciding whether a polynomial system of inequalities has a solution

I am looking for a fast algorithmn that decides whether a given system of k polynomial inequalities in n variables has a solution ( I do not need the solution ) For k > n. I have read about Cylindrical Algebraic Decomposition but have not been able…
Blackclaws
  • 436
  • 5
  • 20
0
votes
1 answer

SAGE: coefficients of Polynomial over finite fields

I need some help to get the coefficients of Polynomial. If tried y = var('y') q = y^3 -2*y + 1 coeff_list = [q(y=0)] + [q.coeff(y^k) for k in range(1, q.degree(y)+1)] but in GF(q) S. = PolynomialRing(GF(q),'y') q = y^3 -2*y + 1 coeff_list =…
user3327260
  • 1
  • 1
  • 1
0
votes
2 answers

Isabelle: this lemma about polynomials is only provable for idoms

In short: I have only a backgroung in computer science and not mathematics. I have proven a lemma in Isabelle for idoms and concluded that it cannot be proven for polynomials of rings 'a::comm_ring_1 poly. But I am not fully sure. In the Isabelle…
mrsteve
  • 4,082
  • 1
  • 26
  • 63
0
votes
2 answers

Linked lists method not working properly (java)

I've written a class which represents a polynom using a linked list (members in that list are objects of another class I made called PolyNodes). In that class I've written this method: public Polynom addNode (PolyNode p) { if (p==null) //if the…
Guy
  • 155
  • 11
0
votes
2 answers

Algorithm to find the maximum/minimum of a polynomial without graphing

For a quadratic equation of the form y=a*x^2+b*x+c the max/min occurs at x=-b/2a. Is there any hard and fast equation like this for higher polynomials (x>=4). For such polynomials the solution which I got online suggested to plot the curve and find.…
Hunter
  • 1
  • 1
  • 1
0
votes
2 answers

create a polynomial matlab

I have got vector of coefficients v=[v1, v2, v3] (added by user). I want to create a polynomial in a function. I would like to have a function fun(x), which solution will be my polynomial. After that I want to have a graph of this polynomial. This…
emlanny
  • 101
  • 1
0
votes
1 answer

Understanding NTRUEncrypt

I have trouble understanding the NTRUEncrypt algorithm. I read the wikipedia page, but I can not understand the example they gave. When I plug in the product of f and f_p onto wolfram, I do not see how the output relates to any inverse mod p. Can…
51st
  • 1
  • 1
0
votes
2 answers

Where can I find line buffering code?

I can't find any code for doing this. The only places I can find it is in GIS APIs. Preferably in java, but I can port other languages too. I'd even settle for a overview of all the formulas required.
Joren
  • 9,623
  • 19
  • 63
  • 104
0
votes
2 answers

Asymptotic run time complexity of an expression

Can I say that: log n + log (n-1) + log (n-2) + .... + log (n - k) = theta(k * log n)? Formal way to write the above: Sigma (i runs from 0 to k) log (n-i) = theta (k* log n)? If the above statement is right, how can I prove it? If it is wrong, how…
0
votes
2 answers

Polynomial knots in R

This question is about a possible way to graphically represent knot polynomials as given by expressions here and here in R. Unfortunately I didn`t get very far since my math knowledge is not so good. This is what I have tried phi <- seq(-30, 30,…
Fedja Blagojevic
  • 813
  • 1
  • 10
  • 18
0
votes
2 answers

Find the coefficients of a polynomial given its roots (zeros) in Prolog

How I can implement in Prolog program that find coefficients of the polynomial if I know its roots. for example: input data (2;-1) output (1;-1;2)