Find Jobs
Hire Freelancers

C++

$20-25 USD

Completed
Posted about 22 years ago

$20-25 USD

Paid on delivery
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 Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased. ## Platform you can use any compilar....windows OS 98, me, 2000
Project ID: 2847394

About the project

6 proposals
Remote project
Active 22 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$9 USD in 14 days
4.9 (5 reviews)
2.8
2.8
6 freelancers are bidding on average $24 USD for this job
User Avatar
See private message.
$38.25 USD in 14 days
5.0 (80 reviews)
5.2
5.2
User Avatar
See private message.
$21.25 USD in 14 days
4.4 (72 reviews)
5.5
5.5
User Avatar
See private message.
$34 USD in 14 days
5.0 (1 review)
1.9
1.9
User Avatar
See private message.
$21.25 USD in 14 days
5.0 (4 reviews)
0.4
0.4
User Avatar
See private message.
$21.25 USD in 14 days
0.0 (1 review)
0.8
0.8

About the client

Flag of UNITED STATES
United States
0.5
1
Member since Mar 29, 2002

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.