Find Jobs
Hire Freelancers

C++ code

$30-5000 USD

クローズ
投稿日: 21年以上前

$30-5000 USD

完了時にお支払い
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
プロジェクト ID: 2888048

プロジェクトについて

リモートプロジェクト
アクティブ 21年前

お金を稼ぎたいですか?

Freelancerで入札する利点

予算と期間を設定してください
仕事で報酬を得る
提案をご説明ください
登録して仕事に入札するのは無料です

クライアントについて

UNITED STATESのフラグ
United States
0.0
0
メンバー登録日:11月 28, 2002

クライアント確認

ありがとうございます!無料クレジットを受け取るリンクをメールしました。
メールを送信中に問題が発生しました。もう一度お試しください。
登録ユーザー 投稿された仕事の合計
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
プレビューを読み込み中
位置情報へのアクセスが許可されました。
あなたのログインセッションの有効期限がきれ、ログアウトされました。もう一度ログインしてください。