More than 2019 cattle off summer school camp (seventh) Number-- real coefficient D polynomial factorization theorems

Pre-knowledge

Fundamental Theorem of Algebra

Theorem: Every complex polynomial coefficients frequency ≥ 1, at least one with a complex field.

Accordingly Release, complex coefficients of polynomial equations n times in the complex domain and only the n-th root (root weight calculated as the number of weight). (Just keep the polynomial dividing (XX A ), there can be introduced from the n-th root has a root)

Factorization Theorem polynomial with real coefficients

Theorem: number ≥ 1 each polynomial with real coefficients can be decomposed into a product of a single type due to the secondary and irreducible polynomial in the real domain.

certificate:

The number of times f (x) using mathematical induction.

When n = 1, one apparently irreducible polynomial, theorem;

Assuming that the theorem is true when the number of times ≤ n,

Provided f (x) is a polynomial of degree n, algebraic fundamental theorem, f (x) has a complex roots α.

If α is a real number, then $ f (x) = (x - \ alpha) f_1 (x) $, where $ f_1 (x) $ n-1 times for the polynomial with real coefficients;

If α is not a real number, then $ \ bar \ alpha $ root is f (x), then

$ F (x) = (x - \ alpha) (x - \ bar \ alpha) f_2 (x) \\ = [x ^ 2 - (\ alpha + \ bar \ alpha) x + a \ bar \ alpha] f_2 (X) $, where $ x ^ 2 - (\ alpha + \ bar \ alpha) x + a \ bar \ alpha $ is a quadratic irreducible polynomial with real coefficients, so $ f_2 (x) $ is n-2 times polynomial with real coefficients.

topic

A polynomial is given, it is determined whether a real number within a range decomposable.

analysis:

Theorem can be seen from the above, any irreducible polynomial in the real number range of only once or twice.

In addition, there are obviously odd polynomial with real coefficients has at least one real root.

(Assay contains constant

#include<bits/stdc++.h>
using namespace std;

int n, a[25];

int main()
{
    int T;
    scanf("%d", &T);
    while(T--)
    {
        scanf("%d", &n);
        for(int i = n; i >= 0;i--)  scanf("%d", &a[i]);
        if(n <= 1 || (n == 2 && a[1] * a[1] - 4 * a[2] * a[0] < 0))  printf("Yes\n");
        else  printf("No\n");
    }
    return 0;
}

 

Guess you like

Origin www.cnblogs.com/lfri/p/11326606.html