Arrange the following prefix expressions based on their values in increasing order :
A. + - * 2/ 8 4 3 2
B. ↑ - * 3 3 * 4 2 5
C. + - ↑ 3 2 ↑ 2 3 / 6 - 4 2
D. * + 3 + 3 ↑ 3 + 1 1 3
Choose the correct answer from the options given below :
Solution
The correct answer is 2) B, A, C, D
Key Points
To arrange the given prefix expressions based on their values in increasing order, let's evaluate each expression:
- A. + - * 2 / 8 4 3 2
- First, evaluate the innermost operations: / 8 4 = 2
- Next, * 2 2 = 4
- Then, - 4 3 = 1
- Finally, + 1 2 = 3
- B. ↑ - * 3 3 * 4 2 5
- First, evaluate the innermost operations: * 3 3 = 9
- Next, * 4 2 = 8
- Then, - 9 8 = 1
- Finally, ↑ 1 5 = 1^5 = 1
- C. + - ↑ 3 2 ↑ 2 3 / 6 - 4 2
- First, evaluate the innermost operations: ↑ 3 2 = 9
- Next, ↑ 2 3 = 8
- Then, - 9 8 = 1
- Next, - 4 2 = 2
- Then, / 6 2 = 3
- Finally, + 1 3 = 4
- D. * + 3 + 3 ↑ 3 + 1 1 3
- First, evaluate the innermost operations: * + 3 + 3 ↑ 3 2 3
- Next, * + 3 + 3 9 3
- Then, * + 3 12 3
- Finally, * 15 3 = 45
So, the correct order based on increasing values is: B (1), A (3), C (4), D (45)