Which of the following is the equivalent prefix notation of the follow...
Prefix Notation:
Prefix notation, also known as Polish notation, is a way of writing arithmetic expressions in which the operator is placed before its operands. This notation eliminates the need for parentheses to indicate the order of operations.
Given Expression:
(M N) * (P / O) - (Q / R)
Explanation:
To convert the given expression into prefix notation, we need to move the operator before its operands. Let's break down the given expression step by step.
1. First Operand: (M N)
- The first operand is (M N).
- We need to move the operator and operands to the prefix notation.
- The operator is multiplication (*), and the operands are M and N.
- In prefix notation, we write it as * MN.
2. Second Operand: (P / O)
- The second operand is (P / O).
- We need to move the operator and operands to the prefix notation.
- The operator is division (/), and the operands are P and O.
- In prefix notation, we write it as / PO.
3. Third Operand: (Q / R)
- The third operand is (Q / R).
- We need to move the operator and operands to the prefix notation.
- The operator is division (/), and the operands are Q and R.
- In prefix notation, we write it as / QR.
4. Main Expression: (M N) * (P / O) - (Q / R)
- Now, let's combine the prefix notations of the operands with the main operator (-).
- In prefix notation, we write it as - * MN / PO / QR.
Final Answer:
The equivalent prefix notation of the given expression (M N) * (P / O) - (Q / R) is - * MN / PO / QR, which is represented by option 'B'.
Which of the following is the equivalent prefix notation of the follow...
(M + N) * (P / O) - (Q / R)
⇒ (((M + N) * (P / O)) - (Q / R))
⇒ ((( +MN) * (/ PO)) - (/ QR))
⇒((*(+ MN) (/ PO)) - (/ QR))
= ( - (*( + MN) (/ PO) (/ QR)))
= - * + MN / PO / QR