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

The best algorithm to solve a given problem is one that requires less space in memory and takes less time to complete its execution. But in practice it is not always possible to

The simplest implementation of the Dijkstra's algorithm stores vertices of set Q into an ordinary linked list or array, and operation Extract-Min(Q) is just a linear search through

7. String manipulation 7.a Write a C Program using following string manipulation functions a) strcpy b) strncpy c) strcmp d) strncmp e) strlen f) strcat

#why all the 4 operations i.e. insertion n deletion from rear end and front end is valid in input restricted DEQUE

A tree is a non-empty set one component of which is designated the root of the tree while the remaining components are partitioned into non-empty groups each of which is a subtree

characteristics of a good algorithm

Program: Program segment for insertion of an element into the queue add(int value) { struct queue *new; new = (struct queue*)malloc(sizeof(queue)); new->value = val

What is quick sort?   Answer Quick sort is one of the fastest sorting algorithm used for sorting a list. A pivot point is chosen. Remaining elements are divided or portio

Define Merge Sort  Merge sort is a perfect example of a successful application of the divide and conquer method. It sorts a given array A[0...n-l] by separating it into two ha