1 introductionyou will create a c program to evaluate

Assignment Help Data Structure & Algorithms
Reference no: EM13347900

1 Introduction

You will create a C++ program to evaluate expressions combining set union, set intersection and parentheses. The program must exploit a stack to convert the matrix expressions from inx notation to postx notation and a second stack to evaluate the postx expression.

In order to maintain similar notation to arithmetic expressions, + will denote union and * will be intersection. You will evaluate expressions like A * B +C, (A + B)  (D +E  F) or A  B +(C * D), where A, B, C and D are sets.

We will dene the operation " + " of two sets A and B as the union of the contents of both sets:

                                                  A + B ≡ A U B                          (1)

Similarly, we will dene the operation " * " of A and B as the intersection of A and B:

                                                  A * B ≡ A ∩ B                          (2)

These denitions allow us to write long algebraic equations. We assign to the " + " a lower precedence than " * " (in the same way as we do in algebra) and parentheses change the precedence of an expression.

2 Input

The input is one script le, in the same format as the script le from previous homeworks, and two or more data les containing words. All operations supported in the previous homework (read(), write()) will still be supported. You will need to extend the script parser in order to accept expressions such as

                                                                      R0=(A+B)*C

There will be one expression per line, and there might be multiple expressions in each script le. You are expected to be able to reuse the results from previous expressions.

Reference no: EM13347900

Questions Cloud

You are expected to prepare a full situational audit of the : you are expected to prepare a full situational audit of the shangri-la hotel in singaporeand develop a strategic plan
The diverse measurement methods developed for different : the diverse measurement methods developed for different types of assets suggest that standard setters are confused
Problem 1a barometer is used to measure atmospheric : problem 1a barometer is used to measure atmospheric pressure and is filled with a high-density fluid. the pressure p
Human computer interactionnbsp students self-service : human computer interactionnbsp students self-service website for mobile devicesthis is a hypothetical interaction
1 introductionyou will create a c program to evaluate : 1 introductionyou will create a c program to evaluate expressions combining set union set intersection and parentheses.
Australia has recognised that its accounting standards need : australia has recognised that its accounting standards need to be harmonised with standards elsewhere in the world. to
Design and implement a set of classes and interfaces and : design and implement a set of classes and interfaces and use them to evaluate the rtas resource requirements.nbspyour
1 the scenarioyou have been asked to prepare a feasibility : 1. the scenarioyou have been asked to prepare a feasibility study and an initial design to enable a large holiday
The goal is to create a project that would let a user : the goal is to create a project that would let a user compute area and perimeter of a polygon. restrict the type of

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd