Save this video free

CS3130FS26Module1B2VidProc

DrHeUMSLTeaching · 1:06:32 · Watch on YouTube

Part of University of Missouri-St. Louis CS 3130. See all 21 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

The lecture compares brute-force evaluation of a degree-n polynomial with Horner’s rule, using operation counts to show why reusing intermediate results and factoring common terms can reduce computation. Under the assumption that an addition costs 1 time unit and a multiplication costs 10, brute force uses n additions and n(n+1)/2 multiplications, while Horner’s rule reduces the multiplication count to n by repeatedly factoring and sharing work.

Key takeaways

Chapters

0:00 Brute Force and Reusing the Result of x²
5:11 Problem-Solving Goal: Improve on Brute Force
8:11 Changing Evaluation Order by Grouping x⁴
14:19 Why Operation Counts Beat Execution-Time Comparisons
20:18 A CPU-Based 10-to-1 Cost Model
24:44 Counting Polynomial Additions by Reference
27:47 One-to-One Correspondence as a Counting Technique
36:43 Brute-Force Multiplications and Weighted Cost
40:40 Use Amdahl’s Law to Target Multiplications
46:27 Factoring the Quadratic to Share a Multiplication
52:47 Resource Sharing and the n = 3 Example
55:02 Greedy Factorization: Locally Best, Not Always Globally Best
59:10 Horner’s Rule Uses n Multiplications

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:01 So at this point we want to this is our first try. We want to solve this problem by the straightforward algorithm. That means we do not apply uh any special technique. We just do it you know. So later we will call it uh brute force. So we apply the brute force method. All right. And uh after we count the number of multiplications for each term. So we can count the number of

0:51 additions. Yeah. Because we need to do additions and we also we can count number of multiplications. The next step and before we do that counting next step we did another thing we want to see if our current method has some room for improvement. If there is some hope, we can do better than this straightforward or brute force method. And we did one simple example when we calculate x to the 4th. Similar to this general term but without leading coefficient.

1:41 If the leading coefficient is one, we can save one multiplication. [clears throat] So for this one, if we apply the straightforward method, we need a three multiplication. Three multiplications. But if we do it in a slightly different way after we complete the first multiplication, this x² We reuse it. This x² it's a temporary value but we do not throw it away. We store it. We store it

2:29 the cost of storage very cheap. Right? So we just pay a little small very little cost. We store this intermediate value. In the next round, we can reuse it. This is the next round. We reuse the stored partial result. The re after if we do in that way you can see we can save one one multiplication because the total number of multiplications in this way two you can see from three to two.

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, DrHeUMSLTeaching.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.