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
write short note on algorithms

Write a program for reversing the Linked list

After learning this, you will be able to: understand the concept of algorithm; understand mathematical foundation underlying the analysis of algorithm; to understand se

The disadvantages or limitations of the last in first out costing method are: The election of last in first out for income tax purposes is binding for all subsequent yea

Merging 4 sorted files having 50, 10, 25 and 15 records will take time  O (100)

Q. Write down the recursive function to count the number of the nodes in the binary tree.    A n s . R ecursive Function to count no. of Nodes in Binary Tree is writt

How can we convert a graph into a tree ? Do we have any standardized algorithm for doing this?

difference between recursion and iteration

Importance of Object-Oriented over java Java is basically based on OOP notions of classes and objects. Java uses a formal OOP type system that should be obeyed at compile-t

a. Explain the sum of subset problem. Apply backtracking to solve the following instance of sum of subset problem: w= (3, 4, 5, 6} and d = 13. Briefly define the method using a sta