Polynomial 3 Sem Project
Polynomial 3 Sem Project
Polynomial 3 Sem Project
Project Report
On
"Polynomial Solver App"
Prepared by
16CE068
A Report Submitted to
Charotar University of Science and Technology
for Partial Fulfillment of the Requirements for the
3rd Semester Software Group Project-I (CE244)
Submitted at
This is to certify that the report entitled “Polynomial Solver App” is a bonafied work
carried out by Mr. Patel Jainil A. (16CE068) under the guidance and supervision of
Martin K. Parmar for the subject Software Group Project-I (CE244) of 3rd Semester
of Bachelor of Technology in U & P U. Patel Department of Computer Engineering
at Faculty of Technology & Engineering – CHARUSAT, Gujarat.
To the best of my knowledge and belief, this work embodies the work of candidate
himself, has duly been completed, and fulfills the requirement of the ordinance relating
to the B.Tech. Degree of the University and is up to the standard in respect of content,
presentation and language for being referred to the examiner.
Martin K. Parmar
Assistant Professor
U & P U. Patel Department of Computer Engineering,
CSPIT, Changa, Gujarat.
The completion of any inter disciplinary project depends upon coordination, cooperation and
combined efforts of several resources of knowledge, creativity, skill, energy and time. The
work being accomplished now, I feel our most sincere urge to recall and knowledge through
these lines, trying our best to give full credits wherever it deserves.
I would like to thank our project guide Mr. Martin K. Parmar and Dean and Principle Dr.
Amit Ganatra who advised and gave us moral support through the duration of project.
Without there constant encouragement we could not achieve what we have.
It’s our good fortune that I had support and well wishes of many. I am thankful to all and
those whose names are forgotten to acknowledge here but contributions have not gone
unnoticed.
This Project is polynomial solver app, in which new algorithms are created to
multiply and divide polynomials with one variable.
Algorithms are not found at internet and are unique.
We deliver services like Sudoku solver and feedback services. The project is
for reducing time consumed in looping processes in mathematics.
What is a polynomial?
Degree
The degree of a polynomial with only one variable is the largest exponent of
that variable.
Description
Description
Project is about taking dynamic input and manipulating polynomials efficiently. Creating loops and
avoiding recursion is good for programming.
Main aim is to reduce time of users.
So only coefficients are taken with space as delimeter
App benefits
1)Dynamic
2)Enter only coefficients
3)Quick result
4)No recursion used
I tried to make a calculator but there are many android calculators app available so decided
to try Something new.
So decision to make a calculator that takes two polynomial of degree n and degree m and
multiply and divide those two polynomial was taken.
When we get a polynomial of degree 7 and are asked to multiply with degree 6 polynomial
then it is tedious job and there is no shortcut or app or directly made algorithm available. It
takes much time.so a new algorithm and app can make life easier.
App also offers a Sudoku solver for those who give feedback and ratings.
Front End
Android Studio is the official ntegrated development environment (IDE) for Google's Android operating
system, built on JetBrains' IntelliJ IDEA software and designed specifically for Android development. It
is available for download on Windows, macOS and Linux based operating systems. It is a replacement
for the Eclipse Android Development Tools (ADT) as primary IDE for native Android application
development.
Features of android studio:
Hardware requirement:
i. Android Smart phone
Class diagram
Class Term
I. Public float coef; //coefficients
II. Public int exp; //exponents
III. Term sum(term t2)
IV. Term sub(term t2)
V. Term mul(term t2)
Class Polynomial
I. Public int d;//degree of polynomial
II. Public Term t[d+1]; //terms in polynomial
III. Polynomial (int s) //constructor
IV. Void getdata(int b[]) //getting data
V. String putdata() //for returning string to print
VI. Polynomial sum(Polynomial p2)
VII. Polynomial sub(Polynomial p2)
VIII. Polynomial mul(Polynomial p2)
IX. Polynomial div(Polynomial p2)
X. Polynomial remainder(Polynomial p2)
XI. Polynomial div1(Polynomial p2) //division if degree is 0
Major functionality
Major Functionality
Minor Functionality
VI. Get help of polynomials
VII. Give feedback
VIII. Rate the app
IX. Try new Sudoku solver.
Add two polynomials.
Polynomial sum(Polynomial p2)
{
int q;
if( d>p2.d)
{ q= d; }
else
{ q=p2.d; }
Polynomial p3=new Polynomial(q);
if( d>p2.d)
{ for(int i=q;i>=q-p2.d-1;i--)
{
p3.t[i].coef= t[i].coef;
}
for(int i=p2.d;i>=0;i--)
{
p3.t[i].coef= t[i].coef+p2.t[i].coef;
} }
else
{ for(int i=q;i>=d;i--)
{
p3.t[i].coef=p2.t[i].coef;
}
for(int i=d;i>=0;i--)
{
p3.t[i].coef= t[i].coef+p2.t[i].coef;
} }
return p3;
}
}
Multiply two polynomials.
Polynomial mul(Polynomial p2)
{
int x;
x= d+p2.d;
Polynomial p3=new Polynomial(x);
for(int i= d;i>=0;i--)
{
for(int j=p2.d;j>=0;j--)
{
p3.t[i+j]=p3.t[i+j].sum( t[i].mul(p2.t[j]));
}
}
return p3;
}
Abstract algebra
Main article: Polynomial ring
In abstract algebra, one distinguishes between polynomials and polynomial functions. A polynomial f in
one indeterminate x over a ring R is defined as a formal expression of the form
where n is a natural number, the coefficients a0, . . ., an are elements of R, and x is a formal symbol,
whose powers xi are just placeholders for the corresponding coefficients ai, so that the given formal
expression is just a way to encode the sequence (a0, a1, . . .), where there is an n such that ai = 0 for
all i > n. Two polynomials sharing the same value of n are considered equal if and only if the
sequences of their coefficients are equal; furthermore any polynomial is equal to any polynomial with
greater value of n obtained from it by adding terms in front whose coefficient is zero. These
polynomials can be added by simply adding corresponding coefficients (the rule for extending by terms
with zero coefficients can be used to make sure such coefficients exist). Thus each polynomial is
actually equal to the sum of the terms used in its formal expression, if such a term aixi is interpreted as
a polynomial that has zero coefficients at all powers of x other than xi. Then to define multiplication, it
suffices by the distributive law to describe the product of any two such terms, which is given by the rule
and such that the degree of r is smaller than the degree of g (using the
convention that the polynomial 0 has a negative degree). The polynomials q and r are uniquely
determined by f and g. This is called Euclidean division, division with remainder or polynomial long
division and shows that the ring F[x] is a Euclidean domain.
Analogously, prime polynomials (more correctly, irreducible polynomials) can be defined as non-zero
polynomials which cannot be factorized into the product of two non-constant polynomials. In the case of
coefficients in a ring, "non-constant" must be replaced by "non-constant or non-unit" (both definitions
agree in the case of coefficients in a field). Any polynomial may be decomposed into the product of an
invertible constant by a product of irreducible polynomials. If the coefficients belong to a field or
a unique factorization domain this decomposition is unique up to the order of the factors and the
multiplication of any non-unit factor by a unit (and division of the unit factor by the same unit). When the
coefficients belong to integers, rational numbers or a finite field, there are algorithms to test
irreducibility and to compute the factorization into irreducible polynomials (see Factorization of
polynomials). These algorithms are not practicable for hand-written computation, but are available in
any computer algebra system. Eisenstein's criterion can also be used in some cases to determine
irreducibility.
Other applications
Polynomials serve to approximate other functions.such as the use of splines.Polynomials are frequently
used to encode information about some other object. The characteristic polynomial of a matrix or linear
operator contains information about the operator's eigenvalues. The minimal polynomial of an algebraic
element records the simplest algebraic relation satisfied by that element. The chromatic polynomial of
a graph counts the number of proper colourings of that graph.The term "polynomial", as an adjective,
can also be used for quantities or functions that can be written in polynomial form. For example,
in computational complexity theory the phrase polynomial time means that the time it takes to complete
an algorithm is bounded by a polynomial function of some variable, such as the size of the input.