CS 253 Homework # 3 Problem 1. You have a choice beween the following two versions of the assignment. "Arithmentic" version: Write a program that converts infix arithmetic expressions into a postfix form and then evaluates the resulting postfix expression (as described in the lecture notes). Use linked lists for the data structures.You must create your own Stack and Queue class (you may want to use my code to start with). "Logic" version: Same as above, but you will be converting and evaluating logical expressions. Here is some extra help, if you decide to take this challenge. In propositional logic, elementary propositions can be combined by five logical connectives: P <--> Q : P if and only if Q P --> Q : If P then Q (or P implies Q) P & Q : P and Q P v Q : P or Q ~ P : not P The truth tables for these logical connectives are: P Q | P <--> Q | P --> Q | P & Q | P v Q | ~ P | | | | | T T | T | T | T | T | F T F | F | F | F | T | F F T | F | T | F | T | T F F | T | T | F | F | T Logical expressions involving these connectives may combine many connectives applied according to the following operation hierarchy: all ~ are applied first next all & are applied next all v are applied next all --> are applied finally all <--> are applied Parentheses may be used to override this hierarchy. A Logical expression which always evaluates to true is called a tautology. Example: (P --> Q) <--> (~P v Q) is a tautology, because it is true for all possible combinations of true/false values of P and Q. Write a program that tells you if the expression entered is a tautology or not. Assume that you have no more than three propositional symbols in your expressions -- call them P, Q, R. Again, you must use the linked list implementation of the data structures needed. For both versions, submit the code and example runs to prove that your program works as intended. Use the examples from the lecture notes as one of the test cases. Explain the data structures used. Problem 2. Given the following postorder and inorder traversals of a binary tree, draw the tree: Postorder: A B C D E F I K J G H Inorder: C B A E D F H I G K J Explain your answer in a systematic and recursive fashion.