Previous | Next --- Slide 36 of 54
Back to Lecture Thumbnails
Nina

How to understand the degree of freedom needed for polynomial? (or why we need two degree of freedom for cubic polynomial?) Thanks.

kmcrane

@Nina: if you think of the function p(t) as something where you give it t and it gives you the resulting value p(t), then there are still four things we need to pick: the four constants a, b, c, and d. These are what we're referring to (at least in this case) as "degrees of freedom," and choosing different values for this constants will give the curve different "shapes."

As for counting the number of degrees of freedom for any given polynomial, let's think about the first few. A zeroth-order "polynomial" is just

p(t) = a,

i.e., it always returns the same value a, independent of the value of t. This polynomial has just one degree of freedom: the value of a. A first-order polynomial looks like

p(t) = a + bt

and this time we can specify two values: a and b. From there we have quadratic (degree-2): p(t) = a + bt + ct^2

cubic (degree-3): p(t) = a + bt + ct^2 + dt^3

quartic (degree-4): p(t) = a + bt + ct^2 + dt^3 + et^4

and so on. (Notice that I've intentionally written the cubic polynomial in a different form than in the slide---it's important to realize that there's nothing special about which letters go in front of which factors; each is just some constant value, and the name is arbitrary.)

So, question for you: how many degrees of freedom do you have in a polynomial of degree k?

Nina

I think for polynomial of degree k:

p(t) = q_0 + q_1t + q_2t^2 + ... + q_kt^k

the unknown constrains are q_0, q_1, ... , q_k. So there should be (k+1) degree of freedom.

And sorry that I may not clearly describe my question. The part that I'm confusing is the sentence: "only need two degree of freedom to specify endpoints".

Since cubic polynomial:

p(t) = at^3 + bt^2 + ct + d

has 4 degree of freedom, only give 2 of them cannot decide the unique curve. And if given d(one degree of freedom), we can specify one endpoint p(0). But we cannot specify another endpoint p(1) if not given a, b, c(3 degree of freedom). So please correct me if I'm wrong, given 2 degree of freedom cannot specify unique both p(0) and p(1). Thanks

kmcrane

@Nina: Yes, I can see why this is confusing. You're thinking about degrees of freedom in terms of the particular choice of variables a, b, c, d we are using to specify the polynomial. But there are other ways we could have written down this polynomial, i.e., there are different bases. So it may be easier to think about degrees of freedom just in terms of a count: how many things can we specify, before we can no longer specify anything more? That's the number of degrees of freedom. (If you've taken linear algebra, what we're really saying is that there is a 4-dimensional vector space of cubic polynomials, and by picking the two endpoints we're restricting ourself to a 2-dimensional linear subspace. Picking different polynomial bases amounts to picking different coordinate systems for our linear spaces.)

It may help to see an explicit example. In particular, in this slide we used the "monomial basis" 1, t, t^2, t^3 to write our polynomial as

p(t) = at^3 + bt^2 + ct + d.

But we just as easily could have used the Bernstein basis t^3, 3t^2(1-t), 3t(1-t)^2, (1-t)^3, as we did when talking about Bezier curves. In this case, our polynomial p could be written as

p(t) = at^3 + 3bt^2(1-t) + 3ct(1-t)^2 + d(1-t)^3,

and most importantly, the choice of a now determines the location of our first endpoint; the choice of d now determines the location of our second endpoint. This example should make two things clear, namely:

(i) we are definitely only giving up two degrees of freedom by picking the endpoints, because we are only pinning down two values (a and d), and (ii) the values of the coefficients themselves are superficial, because they will change if we use a different polynomial basis.

In other words, this example makes it clear that our "degrees of freedom" are not the individual coefficients a, b, c, and d, but rather the "number of choices" we're allowed to make, independent of how these choices are parameterized.