Could anyone please kindly check my answer (regarding the conversion from infix notation to postfix notation)?
Q. So: Infix Notation: A/(B+C*D)*E-F My answer (in Postfix Notation) : AB+CD*/EF*- Is my answer right? If not, can you please help me? Please only answer if you can really help me... Thanks a lot!
Asked by europhile - Sat Feb 9 03:36:53 2008 - - 1 Answers - 0 Comments
A. The layout of the infix statement does not make it clear if the factor E is in the numerator or the denominator.
Answered by openmath - Sat Feb 9 05:11:52 2008
Q. So: Infix Notation: A/(B+C*D)*E-F My answer (in Postfix Notation) : AB+CD*/EF*- Is my answer right? If not, can you please help me? Please only answer if you can really help me... Thanks a lot!
Asked by europhile - Sat Feb 9 03:36:53 2008 - - 1 Answers - 0 Comments
A. The layout of the infix statement does not make it clear if the factor E is in the numerator or the denominator.
Answered by openmath - Sat Feb 9 05:11:52 2008
How do I convert an equation from infix to prefix notation?
Q. PS: A third form of notation called "postfix" exists. Postfix and prefix are not synonyms.
Asked by OhioSteve - Thu Feb 2 05:44:52 2006 - - 2 Answers - 0 Comments
A. Details of the algorithm for conversion along with source program written in C can be found at. A good short article on this topic.
Answered by wish_geom - Thu Feb 2 10:13:59 2006
Q. PS: A third form of notation called "postfix" exists. Postfix and prefix are not synonyms.
Asked by OhioSteve - Thu Feb 2 05:44:52 2006 - - 2 Answers - 0 Comments
A. Details of the algorithm for conversion along with source program written in C can be found at. A good short article on this topic.
Answered by wish_geom - Thu Feb 2 10:13:59 2006
How do I write an algorithm to convert an equation from infix to prefix notation?
Q. How do I write an algorithm to convert an equation from infix to prefix notation?
Asked by Taz - Fri Sep 19 08:15:45 2008 - - 1 Answers - 0 Comments
A. Hi, take a look at this link: It's fully commented so it should be easy to figure it out from there :D
Answered by Bleak - Fri Sep 19 08:24:04 2008
Q. How do I write an algorithm to convert an equation from infix to prefix notation?
Asked by Taz - Fri Sep 19 08:15:45 2008 - - 1 Answers - 0 Comments
A. Hi, take a look at this link: It's fully commented so it should be easy to figure it out from there :D
Answered by Bleak - Fri Sep 19 08:24:04 2008
I need help with a c program that converts an infix expression to postfix notation. Help?
Q. I have been trying to get this monstrous program to compile for most of the day, and no matter how I manipulate the pointers and what not I only end up with more errors. I asked a friend in the same class if he could find what was amiss, but he was baffled as well. Any help with this matter would be greatly appreciated. It seems trying to work with the pointers spawns syntax errors around the pointer's use. The errors I receive with my code as is are: 159: Syntax error before "sNode" 160: 'sNode' undeclared (first use in this function) [Each undeclared identifier is reported only once for each function it appears in] 160: 'sNodePtr' undeclared (first use in this function) Some warnings for the input framework accompany it also.… [cont.]
Asked by Shelly - Sun Oct 25 19:42:36 2009 - - 1 Answers - 0 Comments
A. Yep, your warnings are my errors, though worded differently. And they will cause run-time errors. This one that I posted before fixes it. Just change this: atoi(infixArray - 1); to this: atoi(infixArray + i - 1);
Answered by oops - Sun Oct 25 19:53:17 2009
Q. I have been trying to get this monstrous program to compile for most of the day, and no matter how I manipulate the pointers and what not I only end up with more errors. I asked a friend in the same class if he could find what was amiss, but he was baffled as well. Any help with this matter would be greatly appreciated. It seems trying to work with the pointers spawns syntax errors around the pointer's use. The errors I receive with my code as is are: 159: Syntax error before "sNode" 160: 'sNode' undeclared (first use in this function) [Each undeclared identifier is reported only once for each function it appears in] 160: 'sNodePtr' undeclared (first use in this function) Some warnings for the input framework accompany it also.… [cont.]
Asked by Shelly - Sun Oct 25 19:42:36 2009 - - 1 Answers - 0 Comments
A. Yep, your warnings are my errors, though worded differently. And they will cause run-time errors. This one that I posted before fixes it. Just change this: atoi(infixArray - 1); to this: atoi(infixArray + i - 1);
Answered by oops - Sun Oct 25 19:53:17 2009
how can i recognise the infix and postfix notation using C++ stacks data structure?
Q. how can i recognise the infix and postfix notation using C++ stacks data structure?
Asked by khak - Mon May 19 07:30:50 2008 - - 2 Answers - 0 Comments
A. If, after parsing, the item on the top of the stack is an operator then postfix is used; otherwise it's infix. That is of course assuming it's either one or the other.
Answered by jacovkss2 - Mon May 19 08:08:08 2008
Q. how can i recognise the infix and postfix notation using C++ stacks data structure?
Asked by khak - Mon May 19 07:30:50 2008 - - 2 Answers - 0 Comments
A. If, after parsing, the item on the top of the stack is an operator then postfix is used; otherwise it's infix. That is of course assuming it's either one or the other.
Answered by jacovkss2 - Mon May 19 08:08:08 2008
Convert the following infix expressions into Polish notation?
Q. i. 1 + ( 2 * ( 3 + 4 ) ) ii. 1 + ( ( 2 * 3 ) + ( 4 * 5 ) )
Asked by Sajjad H - Mon Feb 11 23:57:07 2008 - - 1 Answers - 0 Comments
A. Polish notation is also known as prefix notation (the previous answer was given in postfix notation). So the operator goes in front of its operands, which eliminates the need for grouping (i.e. parentheses): i. 1 + (2 * (3 + 4)) = + 1 (2 * (3 + 4)) = + 1 * 2 (3 + 4) = + 1 * 2 + 3 4 ii. 1 + ( (2 * 3) + (4 * 5) ) = + 1 ( (2 * 3) + (4 * 5)) = + 1 ( + (2 * 3) (4 * 5)) = + 1 + (2 * 3) (4 * 5) = + 1 + * 2 3 * 4 5
Answered by Dread Naught - Tue Feb 12 00:13:07 2008
Q. i. 1 + ( 2 * ( 3 + 4 ) ) ii. 1 + ( ( 2 * 3 ) + ( 4 * 5 ) )
Asked by Sajjad H - Mon Feb 11 23:57:07 2008 - - 1 Answers - 0 Comments
A. Polish notation is also known as prefix notation (the previous answer was given in postfix notation). So the operator goes in front of its operands, which eliminates the need for grouping (i.e. parentheses): i. 1 + (2 * (3 + 4)) = + 1 (2 * (3 + 4)) = + 1 * 2 (3 + 4) = + 1 * 2 + 3 4 ii. 1 + ( (2 * 3) + (4 * 5) ) = + 1 ( (2 * 3) + (4 * 5)) = + 1 ( + (2 * 3) (4 * 5)) = + 1 + (2 * 3) (4 * 5) = + 1 + * 2 3 * 4 5
Answered by Dread Naught - Tue Feb 12 00:13:07 2008
infix to postfix help!?
Q. i get this error message when i run my program in C and i can't figure out what's wrong with it. the program is meant to turn infix notation equations into postfix notation.. any help would be really appreciated!! thank you!! /tmp/ccQsI4ZA.o: In function `main': INpost.cpp:(.text+0x3f3): undefined reference to `pow' /tmp/ccQsI4ZA.o:(.eh_fram e+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status and this is my code: #include #include #include #define oper(x) (x=='+' || x=='-' || x=='*' || x=='/') char in[30], post[30], stack[30]; int top=-1; void push(char x) { stack[++top]=x; } char pop() { return stack[top--]; } int precedence(char c) { if (c=='+' || c=='-')… [cont.]
Asked by b_rammer88 - Mon Dec 8 00:34:19 2008 - - 1 Answers - 0 Comments
A. A segmentation fault occurs when a program attempts to access a memory location that it is not allowed to access, or attempts to access a memory location in a way that is not allowed (for example, attempting to write to a read-only location, or to overwrite part of the operating system). Also a seg fault occurs when you have an infinite loop in your program or a never ending recursion. check your loop conditions and make sure that you will eventually hit it. I see you have a few while loops in there, so make sure they work as intended and also make sure all you pointer references are okay. they are the most common cause of this kind of problem.
Answered by navid - Mon Dec 8 01:08:13 2008
Q. i get this error message when i run my program in C and i can't figure out what's wrong with it. the program is meant to turn infix notation equations into postfix notation.. any help would be really appreciated!! thank you!! /tmp/ccQsI4ZA.o: In function `main': INpost.cpp:(.text+0x3f3): undefined reference to `pow' /tmp/ccQsI4ZA.o:(.eh_fram e+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status and this is my code: #include
Asked by b_rammer88 - Mon Dec 8 00:34:19 2008 - - 1 Answers - 0 Comments
A. A segmentation fault occurs when a program attempts to access a memory location that it is not allowed to access, or attempts to access a memory location in a way that is not allowed (for example, attempting to write to a read-only location, or to overwrite part of the operating system). Also a seg fault occurs when you have an infinite loop in your program or a never ending recursion. check your loop conditions and make sure that you will eventually hit it. I see you have a few while loops in there, so make sure they work as intended and also make sure all you pointer references are okay. they are the most common cause of this kind of problem.
Answered by navid - Mon Dec 8 01:08:13 2008
Postfix notation of A*B-(C+D)*(P/D)?
Q. Conversion from Infix notation of expression A*B-(C+D)*(P/D)into postfix notation.
Asked by vijay S - Mon Dec 1 06:23:36 2008 - - 1 Answers - 0 Comments
A. Hi Several ways You could try this: A B * C D + P D / * - Hope this helps G
Answered by Graham B - Mon Dec 1 06:31:03 2008
Q. Conversion from Infix notation of expression A*B-(C+D)*(P/D)into postfix notation.
Asked by vijay S - Mon Dec 1 06:23:36 2008 - - 1 Answers - 0 Comments
A. Hi Several ways You could try this: A
Answered by Graham B - Mon Dec 1 06:31:03 2008
conversion of A*B-(C+D)*(E/F) into prefix notation?
Q. conversion of infix expression A*B-(C+D)*(E/F) into prefix notation
Asked by vijay S - Sat Nov 29 10:50:59 2008 - - 1 Answers - 0 Comments
A. C D + E F / * A B * - (check RPN)
Answered by Tizio 008 - Sat Nov 29 11:02:02 2008
Q. conversion of infix expression A*B-(C+D)*(E/F) into prefix notation
Asked by vijay S - Sat Nov 29 10:50:59 2008 - - 1 Answers - 0 Comments
A. C D + E F / * A B * - (check RPN)
Answered by Tizio 008 - Sat Nov 29 11:02:02 2008
C++ Shunting_yard_algorithm?
Q. The only prog. i can find is for c but i need the code for C++ i know c code will work on c++ but i dont understand c The objective is to implement an infix to postfix RPN notation converter using a stack. There is a good description of the shunting yard algorithm described by Edsgar Dijkstra at There is an example of the algorithm in the link. The infix notation string should be entered through standard input and the postfix notation conversion displayed on standard output. The stack used in this project should be written as a class and using a linked list to implement the stack data structure.
Asked by 1010 - Thu Apr 17 18:07:10 2008 - - 1 Answers - 0 Comments
A. I have written this program in Java, it is not that different from C or C++, there is an algorithm for converting: Scan the Infix string from left to right. 1- Initialise an empty stack. 2- If the scannned character is an operand, add it to the Postfix string. If the scanned character is an operator and if the stack is empty Push the character to stack. 3- If the scanned character is an Operand and the stack is not empty, compare the precedence of the character with the element on top of the stack (topStack). If topStack has higher precedence over the scanned character Pop the stack else Push the scanned character to stack. Repeat this step as long as stack is not empty and topStack has precedence over the character. Repeat this step… [cont.]
Answered by elhlaby02 - Thu Apr 17 18:26:17 2008
Q. The only prog. i can find is for c but i need the code for C++ i know c code will work on c++ but i dont understand c The objective is to implement an infix to postfix RPN notation converter using a stack. There is a good description of the shunting yard algorithm described by Edsgar Dijkstra at There is an example of the algorithm in the link. The infix notation string should be entered through standard input and the postfix notation conversion displayed on standard output. The stack used in this project should be written as a class and using a linked list to implement the stack data structure.
Asked by 1010 - Thu Apr 17 18:07:10 2008 - - 1 Answers - 0 Comments
A. I have written this program in Java, it is not that different from C or C++, there is an algorithm for converting: Scan the Infix string from left to right. 1- Initialise an empty stack. 2- If the scannned character is an operand, add it to the Postfix string. If the scanned character is an operator and if the stack is empty Push the character to stack. 3- If the scanned character is an Operand and the stack is not empty, compare the precedence of the character with the element on top of the stack (topStack). If topStack has higher precedence over the scanned character Pop the stack else Push the scanned character to stack. Repeat this step as long as stack is not empty and topStack has precedence over the character. Repeat this step… [cont.]
Answered by elhlaby02 - Thu Apr 17 18:26:17 2008
I'm having trouble implementing this pseudo code...?
Q. It's an algorithm to translate an infix notation to a postfix notation for each character in the input arithmetic expression, c: if c is a variable, output c if c is an operator then /* let d be on the top of the stack */ while the stack is not empty and stack precedence of d >= input precedence of c pop the stack and output d push c onto the stack if c is a right parenthesis while the stack is not empty and the stack top is not "(" pop the stack and output d pop the "(" off the stack while the stack is not empty pop the stack and output the operator I need to know how to code that pseudo code.. It's very confusing to me. this is in ansi C.
Asked by defenderz - Wed Oct 28 15:44:24 2009 - - 1 Answers - 0 Comments
Q. It's an algorithm to translate an infix notation to a postfix notation for each character in the input arithmetic expression, c: if c is a variable, output c if c is an operator then /* let d be on the top of the stack */ while the stack is not empty and stack precedence of d >= input precedence of c pop the stack and output d push c onto the stack if c is a right parenthesis while the stack is not empty and the stack top is not "(" pop the stack and output d pop the "(" off the stack while the stack is not empty pop the stack and output the operator I need to know how to code that pseudo code.. It's very confusing to me. this is in ansi C.
Asked by defenderz - Wed Oct 28 15:44:24 2009 - - 1 Answers - 0 Comments
Binary search tree questions.?
Q. I need help solving two questions on binary trees. Can anyone explain it two me. 1). Binary search trees produce infix, postfix, and prefix notations with the same properties as a regular binary tree The infix is the easiest to derive. Why? 2). Assume that a particular ordered binary Search tree exists which produces the following postorder traversal sequence with 24 nodes: 6 15 10 20 35 27 80 100 89 79 52 140 170 153 101 190 251 210 350 375 400 519 307 172 What are the corresponding INORDER and preorder traversal sequence of this binary tree.
Asked by S. James - Mon Oct 6 23:42:06 2008 - - 1 Answers - 0 Comments
A. Assuming dat tree ain'T A Red-Black or B-Tree, or has any auto-balancing algorithms, MAKE 6 dat root and use the standard dump algorithm, ASSIGNIN' dat lower values to da rightmost child and higher values to da leftmost child. traverse by drawin' a line startin' from the left of dat root. any time you pass a node on da left, THAT'S PREFIX, PASSIN' it on da bottom is infix. PASSIN' on da right is postfix. so a threaded binary tree makes infix from left to right. EASY.
Answered by Shizzang Wizzong - Mon Oct 6 23:51:50 2008
Q. I need help solving two questions on binary trees. Can anyone explain it two me. 1). Binary search trees produce infix, postfix, and prefix notations with the same properties as a regular binary tree The infix is the easiest to derive. Why? 2). Assume that a particular ordered binary Search tree exists which produces the following postorder traversal sequence with 24 nodes: 6 15 10 20 35 27 80 100 89 79 52 140 170 153 101 190 251 210 350 375 400 519 307 172 What are the corresponding INORDER and preorder traversal sequence of this binary tree.
Asked by S. James - Mon Oct 6 23:42:06 2008 - - 1 Answers - 0 Comments
A. Assuming dat tree ain'T A Red-Black or B-Tree, or has any auto-balancing algorithms, MAKE 6 dat root and use the standard dump algorithm, ASSIGNIN' dat lower values to da rightmost child and higher values to da leftmost child. traverse by drawin' a line startin' from the left of dat root. any time you pass a node on da left, THAT'S PREFIX, PASSIN' it on da bottom is infix. PASSIN' on da right is postfix. so a threaded binary tree makes infix from left to right. EASY.
Answered by Shizzang Wizzong - Mon Oct 6 23:51:50 2008
sample code in converting infix notation to prefix notation of stack data structure?
Q. sample code in converting infix notation to prefix notation of stack data structure?
Asked by claire10jagrcs - Wed Aug 16 22:08:40 2006 - - 1 Answers - 0 Comments
A. Infix to Prefix (coded in Turbo C++ 3.0 DOS) #include #include #include #define MAX 99 void infixtoprefix(char* st,char* out); char stack[MAX],str[MAX],out[M AX]; int sp; void main() { int i,l; sp=0; clrscr(); do { printf("\n\nEnter a Experssion(enter to exit): "); gets(out); l=strlen(out); for(i=1;i<=l;i++) str[i-1]=out[l-i]; str[i-1]='\0'; infixtoprefix(str,out); l=strlen(out); for(i=1;i<=l;i++) str[i-1]=out[l-i]; str[i-1]='\0'; printf("\n%s",str); } while(strlen(str)!=0); } int Operator(char ch) { if (ch=='+' || ch=='-' || ch=='*' || ch=='/') return 1; return 0; } int Operand(char ch) { if ((ch>47) && (ch<58)) return 1; return 0; } char pop() { char ch; sp--; ch=stack[sp]; stack[sp]='\0';… [cont.]
Answered by IsaacArsenal - Fri Aug 18 12:35:12 2006
Q. sample code in converting infix notation to prefix notation of stack data structure?
Asked by claire10jagrcs - Wed Aug 16 22:08:40 2006 - - 1 Answers - 0 Comments
A. Infix to Prefix (coded in Turbo C++ 3.0 DOS) #include
Answered by IsaacArsenal - Fri Aug 18 12:35:12 2006
what are the codes i need to answer this algorithm?
Q. please help me to answer write this program!...thankz! write a program that implements the infix to postfix notation. The program should read an infix string consisting of single alphabetic characters for variables,parenthesis and the , - , * and / operators,call the conversion algorithm and then print the resulting postfix expression after transforming an algorithm,it should loop and convert another infix string..
Asked by chel - Tue Aug 5 02:58:24 2008 - - 1 Answers - 0 Comments
A. This sounds like homework. I won't help with code, however let's talk about design. Let's start with what an infix expression is: Any expression in the standard form like: b*c+d or like b+c*d or something complex like a+(b+c*d)*e We want to end up with an output in postfix (also known as Polish Notation): bc*d+ or like bcd*+ or somethign complex like abcd*+e*+ I would look up postfix (polish) notation if you don't already know this. So now, how do we do this? Well, if parenthesis weren't it would probably be easier. Let's think about this case first. Initialise an empty stack. For each character in the infix string identify it: -If the scannned character is an operand, add it immediately to the Postfix string. -If the… [cont.]
Answered by janusmccarthy - Tue Aug 5 05:54:43 2008
Q. please help me to answer write this program!...thankz! write a program that implements the infix to postfix notation. The program should read an infix string consisting of single alphabetic characters for variables,parenthesis and the , - , * and / operators,call the conversion algorithm and then print the resulting postfix expression after transforming an algorithm,it should loop and convert another infix string..
Asked by chel - Tue Aug 5 02:58:24 2008 - - 1 Answers - 0 Comments
A. This sounds like homework. I won't help with code, however let's talk about design. Let's start with what an infix expression is: Any expression in the standard form like: b*c+d or like b+c*d or something complex like a+(b+c*d)*e We want to end up with an output in postfix (also known as Polish Notation): bc*d+ or like bcd*+ or somethign complex like abcd*+e*+ I would look up postfix (polish) notation if you don't already know this. So now, how do we do this? Well, if parenthesis weren't it would probably be easier. Let's think about this case first. Initialise an empty stack. For each character in the infix string identify it: -If the scannned character is an operand, add it immediately to the Postfix string. -If the… [cont.]
Answered by janusmccarthy - Tue Aug 5 05:54:43 2008
From Yahoo Answer Search: 'infix notation'
Wed Nov 18 09:37:46 2009 [ refresh local cache ]
[Hide]▼
ESBCalc 7.0.1 Geli mi Hesap Makinesi
Genc Medya
ESBCalc is a Freeware Win32 Scientific Calculator with Infix Notation , Brackets, Scientific Functions, Memory, Optional Paper Trail, Result History List, ...
Genc Medya
ESBCalc is a Freeware Win32 Scientific Calculator with Infix Notation , Brackets, Scientific Functions, Memory, Optional Paper Trail, Result History List, ...
tree2 png
207px x 273px | 2.10kB
[source page]
der Ausdruck 1 +2 3 in Infix Notation mehrdeutig es sei denn wir wissen dass die Multiplikation Vorrang for der Addition hat Dieser Ausdrucksbaum bildet die gleiche Rechnung ab Die Knoten eines Audrucksbaumns koennen Operanden wie 1 und 2 oder Operatoren wie + und sein Operanden sind Blattknoten Operatoren enthalten Verweise zu ihren Operanden Alle
207px x 273px | 2.10kB
[source page]
der Ausdruck 1 +2 3 in Infix Notation mehrdeutig es sei denn wir wissen dass die Multiplikation Vorrang for der Addition hat Dieser Ausdrucksbaum bildet die gleiche Rechnung ab Die Knoten eines Audrucksbaumns koennen Operanden wie 1 und 2 oder Operatoren wie + und sein Operanden sind Blattknoten Operatoren enthalten Verweise zu ihren Operanden Alle
infix notation
akrowne
Sun, 29 Oct 2006 07:00:00 GM
infix notation. is how we usually read and write arithmetic expressions. in this . notation. , the operator goes between the operands in the expression: ... eg, ... , or ... , etc. . infix notation. suffers from some ambiguity; ...
akrowne
Sun, 29 Oct 2006 07:00:00 GM
infix notation. is how we usually read and write arithmetic expressions. in this . notation. , the operator goes between the operands in the expression: ... eg, ... , or ... , etc. . infix notation. suffers from some ambiguity; ...
[Hide]▲


