Find Jobs
Hire Freelancers

C++ code

$30-5000 USD

Avslutat
Publicerad över 21 år sedan

$30-5000 USD

Betalning vid leverans
PROBLEM In this assignment you are to write a program that will differentiate expressions in the variable X. The input to this program will be a series, each representing an infix expression to be differentiated. Each such expressions is to be viewed as a stream of tokens. Valid tokens are integers, the variable X, the binary operators (+, -, *, /, ^), and parentheses. To make scanning for tokens easy, you may assume that each token is followed by exactly one space, with the exception of the final token, which is followed by the end of line character. First the program will have to scan the infix expression, building up an appropriate binary tree representation of it. Once the binary expression tree is built, traverse it, building up an other binary expression tree, which represents the derivative of the original expression. The following differentiation rules should be used in this process: Suppose C is a constant, and S and T are expressions in X: Diff (C) = 0 Diff (X) = 1 Diff (S + T) = Diff (S) + Diff (T) Diff (S - T) = Diff (S) - Diff (T) Diff (S * T) = S * Diff (T) + T * Diff (S) Diff (S / T) = ((T * Diff (S)) - (S * Diff (T))) / (T ^ 2) Diff (S ^C) = (C * S ^ (C - 1)) * Diff (S) Finally, once the binary expression tree for the derivative has been built, print the expression. Print it in completely parenthesized infix notation to avoid ambiguity. Note that there are three distinct phases to this problem: 1) Parsing of the original infix expression into a binary tree representation 2) Building a binary tree representation of the derivative 3) Printing the derivative in completely parenthesized infix notation. ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased. ## Platform "C++" ## Deadline information Sorry for the short time
Project ID: 2888048

Om projektet

Distansprojekt
Senaste aktivitet 21 år sedan

Ute efter att tjäna lite pengar?

Fördelar med att lägga anbud hos Freelancer

Ange budget och tidsram
Få betalt för ditt arbete
Beskriv ditt förslag
Det är gratis att registrera sig och att lägga anbud på uppdrag

Om kunden

Flagga för UNITED STATES
United States
0,0
0
Medlem sedan nov. 28, 2002

Kundverifikation

Tack! Vi har skickat en länk för aktivering av gratis kredit.
Något gick fel med ditt e-postmeddelande. Vänligen försök igen.
Registrerade Användare Totalt antal jobb publicerade
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Laddar förhandsgranskning
Tillstånd beviljat för geolokalisering.
Din inloggningssession har löpt ut och du har blivit utloggad. Logga in igen.