Polynomials, Data Structure & Algorithms

Polynomials like  5x4   +  2x3   +  7x2     +  10x  -  8  can  be  represented by using arrays. Arithmetic operations such as addition & multiplication of polynomials are common and most often; we have to write down a program to implement these operations.

The easiest way to represent polynomial of degree 'n' is to store up the coefficient of (n+1) terms of the polynomial in an array. To gain this, each of the elements of the array must contain two values, namely, exponent and coefficient. Whereas maintaining the polynomial, it is supposed that the exponent of each of the successive term is less than that of the earlier term. Once we create an array to represent a polynomial, we can employ such an array to perform common polynomial operations such as addition & multiplication.

Program 2 accepts 2 polynomials as input & adds them.

Posted Date: 4/4/2013 6:35:45 AM | Location : United States







Related Discussions:- Polynomials, Assignment Help, Ask Question on Polynomials, Get Answer, Expert's Help, Polynomials Discussions

Write discussion on Polynomials
Your posts are moderated
Related Questions
In computer programming, Trees are utilized enormously. These can be utilized for developing database search times (binary search trees, AVL trees, 2-3 trees, red-black trees), Gam

Write an algorithm for binary search. Algorithm for Binary Search 1.  if (low> high) 2.  return (-1) 3.  Mid = (low + high)/2 4.  if ( X = = a[mid]) 5.  return (mid); 6.

Almost Complete Binary Tree :-A binary tree of depth d is an almost whole binary tree if: 1.Any node and at level less than d-1 has two children. 2. for any node and in the tree wi


For the Oscillating sort to be applied, it is necessary for the tapes to be readable in both directions and able to be quickly reversed. The oscillating sort is superior to the po

Write a program for reversing the Linked list

In assignment, you have already started the process of designing a database for the Beauty Salon mini-case (enclosed again below), mainly in the phase of conceptual database design

The data structure needed to evaluate a postfix expression is  Stack

Q. How do we represent a max-heap sequentially? Explain by taking a valid   example.         Ans: A max heap is also called as a descending heap, of size n is an almos

How to construct a data flow diagram for a college assignment and marking systemA