Skip to content
UoL CS Notes

Tutorial 1 Review

COMP116 Tutorials

This tutorial focuses on the answers for the first tutorial on numbers and polynomials.

Question 5

We are given the following numbers which can be expressed by the way of the following polynomials: \(\begin{align} 1567\rightarrow p(x)=&x^3+5x^2+6x+7\\ 3791\rightarrow q(x)=&3x^3+7x^2+9x+1 \end{align}\) By multiplying them together we get the following polynomial: \(\begin{align} p\cdot q(x)=&3x^6+22x^5+62x^4+109x^3\\ &+108x^2+69x+7 \end{align}\) The link between the set of digits and the set of numbers is such that each index relates to it’s place value.

Multiplying integers can be expressed in terms of finding the coefficients from the product of two polynomials.

As finding coefficients can be done quickly by exploiting properties of polynomial multiplication; this results in multiplication methods that are significantly faster than classical methods (grid method).

Question 6

This question is to prove that we can apply question 5 in any number base.

Converting between bases will increase the degree by a factor of their difference (base 6 to binary $=\text{degree}\times3$).

Summary

The purpose of these two questions is to show that you can complete multiplication via the use of polynomials. This will be advanced upon later in the way of showing an optimisation of multiplication for very large numbers.