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
what is an algorithms

/* The program accepts matrix like input & prints the 3-tuple representation of it*/ #include void main() { int a[5][5],rows,columns,i,j; printf("enter the order of

Q. Describe the term array.  How do we represent two-dimensional arrays in memory?  Explain how we calculate the address of an element in a two dimensional array.

state difference between linear and non linear data structure. give one example scenario of each

need c++ algorithmic software program to derive one numerical outcome from 10 levels of variables with 135 combinations cross computed

Find a minimum cost spanning arborescence rooted at r for the digraph shown below, using the final algorithm shown in class. Please show your work, and also give a final diagram wh

Normally a potential y satisfies y r = 0 and 0 ³ y w - c vw -y v . Given an integer K³0, define a K-potential to be an array y that satisfies yr = 0 and K ³ y w - c vw -y v

1. The following is a recursive algorithm to calculate the k -th power of 2. Input k a natural number Output kth power of 2 Algorithem: If k =0then return 1 Else return 2* po

Arrays :- To execute a stack we need a variable called top, that holds the index of the top element of stack and an array to hold the part of the stack.