Converting an infix expression into a postfix expression, Data Structure & Algorithms

Q. Illustrate the steps for converting the infix expression into the postfix expression

 

for the given expression  (a + b)∗ (c + d)/(e + f ) ↑ g .                                                   

 

Ans:

The infix expression can be converted to postfix expression as follows: (a+b)*(c+d)/(e+f)^g

=(ab+)*(cd+)/(ef+)^g

 

=(ab+)*(cd+)/(ef+g^)

 

=(ab+cd+*)/(ef+g^)

 

=(ab+cd+*ef+g^/)

The postfix expression is given as:-

(ab+cd+*ef+g^/)

Posted Date: 7/10/2012 6:18:54 AM | Location : United States







Related Discussions:- Converting an infix expression into a postfix expression, Assignment Help, Ask Question on Converting an infix expression into a postfix expression, Get Answer, Expert's Help, Converting an infix expression into a postfix expression Discussions

Write discussion on Converting an infix expression into a postfix expression
Your posts are moderated
Related Questions
Type of Qualitative Method: Different  qualitative methods are suitable for different  types of study. Quite often we can  combine  qualitative and quantitative  methods. Many

Binary search tree. A binary search tree is a binary tree that is either empty or in which every node having a key that satisfies the following conditions: - All keys (if an

The minimum cost spanning tree has broad applications in distinct fields. It represents several complicated real world problems such as: 1. Minimum distance for travelling all o

Q. Enumerate number of operations possible on ordered lists and arrays.  Write procedures to insert and delete an element in to array.

Q. Explain the term hashing? Explain any five well known hash functions.                         Ans: Hashing method provides us the direct access of record from the f


Data array A has data series from 1,000,000 to 1 with step size 1, which is in perfect decreasing order. Data array B has data series from 1 to 1,000,000, which is in random order.

For the Oscillating sort to be applied, it is necessary for the tapes to be readable in both directions and able to be quickly reversed. The oscillating sort is superior to the po

Define Complete Binary Tree Complete Binary Tree:- A whole binary tree of depth d is that strictly binary tree all of whose leaves are at level D.

Give example of assertion and abstract data type For illustration, consider Natural ADT whose carrier set is the set of non-negative integers and whose operations are the usual