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
Algorithm for Z-Buffer Method (a)  Initialize every pixel in the viewport to the smallest value of z, namely z0 the z-value of the rear clipping plane or "back-ground". Store a

Explain the representations of graph. The different ways of representing a graph is: Adjacency list representation : This representation of graph having of an array Adj of

Explain the Scan-Line Algorithm This image-space method for removing hidden surfaces is an extension of the scan-line algorithm for filling polygon interiors. Instead of fillin

Data array A has data series from 1,000,000 to 1 with step size 1, which is in perfect decreasing order. Data array B has data series from 1 to 1,000,000, which is in random order.

Q. Write down an algorithm to convert an infix expression into the postfix expression.     Ans. Algo rithm to convert infix expression to post fix expression is given as

An algorithm is a sequence of steps to solve a problem; there may be more than one algorithm to solve a problem. The choice of a particular algorithm depends upon following cons

reverse the order of elements on a stack S using two additional stacks using one additional stack

Definition: A set of data values & related operations that are accurately specified independent of any particular implementation. As the data values and operations are described

This notation bounds a function to in constant factors. We say f(n) = Θ(g(n)) if there presents positive constants n 0 , c 1 and c 2 such that to the right of n 0 the value of f

P os t - o r d e r T r av er sal :  This can be done by both iteratively and recursively. The iterative solution would require a modification or alteration of the in-