q. execute your algorithm to convert the infix


Q. Execute your algorithm to convert the infix expression to the post fix expression with the given infix expression as input

Q = [(A + B)/(C + D) ↑ (E / F)]+ (G + H)/ I

 

Ans:

The given infix expression is as follows:-

Q = [(A + B) / (C + D) ^ (E + F)] + (G + H) / I

Symb               Stack                           Postfix Notation

[                    [

(                    [ (

A                  [ (                          A

+

[ ( +

 

B

[ ( +

AB

)

[

AB+

/

[ /

 

(

[ / (

 

C

[ / (

AB+C

+

[ / ( +

 

D

[ / ( +

AB+CD

)

[ /

AB+CD+

^

[ / ^

 

(

[ / ^ (

 

E

[ / ^ (

AB+CD+

/

[ / ^ ( /

AB+CD+

F

[ / ^

AB+CD+/

]

EMPTY

AB+CD+EF/^/

+

+

 

(

+ (

 

G

+ (

AB+CD+EF/^/G

+

+ ( +

 

H

+ ( +

AB+CD+EF/^/GH

)

+

AB+CD+EF/^/GH+

/

+ /

AB+CD+EF/^/GH+

I

+ /

AB+CD+EF/^/GH+I

POSTFIX is:-       AB+CD+EF/^/GH+I/+

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: q. execute your algorithm to convert the infix
Reference No:- TGS0156482

Expected delivery within 24 Hours