Answered step by step
Verified Expert Solution
Question
1 Approved Answer
5. (8 points) Given two polynomials of degree at most n, f(x)=anxn+an1xn1++a1x+a0 and g(x)=bnxn+bn1xn1+b1x+b0, where the coefficients 0ai,bi100 for 1in. a) Give an algorithm to
5. (8 points) Given two polynomials of degree at most n, f(x)=anxn+an1xn1++a1x+a0 and g(x)=bnxn+bn1xn1+b1x+b0, where the coefficients 0ai,bi100 for 1in. a) Give an algorithm to compute f(x)g(x) in o(n1.8) time. b) Given k red points whose coordinates are (p1,1),(p2,1),,(pk,1) and l blue points whose coordinates are (q1,1),(q2,1),,(ql,1), where 1pi,qin. For every pair of blue point and red point, draw a segment to connect between them. For each such segment, it creates an intersection point with the line y=0. Give a o(n1.9)-time algorithm to determine how many distinct intersection points that have been created on y=0. For example, in Figure 1, there are 3 distinct intersection points on y=0. Figure 1: An instance with l=k=2 and n=5
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started