stack applications three applications of stacks are presented here these examples are central to many activities that computer must do and deserve time spent with them expression evaluation backtracking (game playingfinding pathsexhaustive searching memory managementrun-time environment for nested language features expression evaluation in particular we will consider arithmetic expressions understand that there are boolean and logical expressions that can be evaluated in the same way control structures can also be treated similarly in compiler this study of arithmetic expression evaluation is an example of problem solving where you solve simpler problem and then transform the actual problem to the simpler one asidethe np-complete problem there are set of apparently intractable problemsfinding the shortest route in graph (traveling salesman problem)bin packinglinear programmingetc that are similar enough that if polynomial solution is ever found (exponential solutions aboundfor one of these problemsthen the solution can be applied to all problems infixprefix and postfix notation we are accustomed to write arithmetic expressions with the operation between the two operandsa+ or / if we write + *choweverwe have to apply precedence rules to avoid the ambiguous evaluation (add first or multiply first?there' no real reason to put the operation between the variables or values they can just as well precede or follow the operands you should note the advantage of prefix and postfixthe need for precedence rules and parentheses are eliminated infix prefix postfix + +ab aba+ * + *bc abc*( ( *+ab-cd ab+cd- * - * * postfix expressions are easily evaluated with the aid of stack infixprefix and postfix notation key infix prefix postfix + +ab ab