Given a polynomial P(x) of degree n and a value a, show how to divide P(x) by (x
ID: 3765745 • Letter: G
Question
Given a polynomial P(x) of degree n and a value a, show how to divide P(x) by (x - a) in Theta (n) time. In other words you must compute polynomial Q(X) of degree n - 1 and value r such that P(x) = Q(x) + (x - a) + r How can you use the above algorithm to compute the value P(a)? Given a sequence of values a_1,...,a_n an give an algorithm that finds the coefficients of the polynomial P(x) of degree n such that P(x) = 0 if and only if x = a_i, for some i. You can assume the elements a_i are distinct. Your algorithm should run in time O(n log^2 n). Given two patterns P and P' you want an algorithm that determines where P or P' appears in a given text T. Builds a finite automaton that enters an accepting state only in the above situation. Try to make your automaton as simpler as possible (meaning your score will depends on how small the automaton is).Explanation / Answer
Given a polynomial P(x) of degree n and a value a, show how to divide P(x) by (x
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.