Explain the pop and push instruction

Assignment Help Mathematics
Reference no: EM131636583

Question: The "pushdown store," or "stack," is a storage structure that operates much like a set of plates stacked on a spring in a cafeteria. All storage locations are initially empty. An item of data is added to the top of the stack by a "push" instruction, which pushes any previously stored items farther down in the stack. Only the topmost item on the stack is accessible at any moment, and it is fetched and removed from the stack by a "pop" instruction. Let's consider strings of integers that are an even number of characters in length; half the characters are positive integers, and the other half are zeros. We process these strings through a pushdown store as follows: As we read from left to right, the push instruction is applied to any nonzero integer, and a zero causes the pop instruction to be applied to the stack, thus printing the popped integer. Thus, processing the string 12030040 results in an output of 2314, and processing 12304000 results in an output of 3421. (A string such as 10020340 cannot be handled by this procedure because we cannot pop two integers from a stack containing only one integer.) Both 2314 and 3421 can be thought of as permutations,

1006_2.png

respectively, on the set A = 51, 2, 3, 46.

a. What permutation of A = 51, 2, 3, 46 is generated by applying this procedure to the string 12003400?

b. Name a permutation of A = 51, 2, 3, 46 that cannot be generated from any string where the digits 1, 2, 3, and 4 appear in order, no matter where the zeros are placed.

Reference no: EM131636583

Questions Cloud

Discuss the leadership behaviors : Select the basic values that will provide the foundation of your model and discuss the leadership behaviors that will result from those values
Discuss about the set of all strings of finite length : Let A = {x, y} and let A* be the set of all strings of finite length made up of symbols from A. A function f: A* ? Z is defined as follows.
How you would use advertising as means of helping to market : Topic: Creative Suggestions. Give creative suggestions as to how you would use advertising as a means of helping to market your office.
Examples of unitary and federal systems : What are some good examples of unitary and federal systems? Use them in your comparisons.
Explain the pop and push instruction : The "pushdown store," or "stack," is a storage structure that operates much like a set of plates stacked on a spring in a cafeteria.
Compare the strengths and weaknesses of each system : In contrast, federal systems allow first-order civil divisions to have some autonomy, while the central government maintains authority over some areas.
How marriage are viewed from three sociological perspectives : Summarize U.S. social class ladder as proposed by Joseph Kahl and Dennis Gilbert. How marriage and family are viewed from the three sociological perspectives.
Social networking generally should not present any issues : Social networking generally should not present any issues from an advertising perspective either,
Implications in the school lunch market for widgecorp : What are the implications in the school lunch market for Widgecorp? What are the implications for the penetration into the lunch market

Reviews

Write a Review

Mathematics Questions & Answers

  Questions on ferris wheel

Prepare a Flexible Budget Gator Divers is a company that provides diving services such as underwater ship repairs to clients in the Tampa Bay area.

  Logistic map

This assignment has two question related to maths. Questions are related to bifurcation cascade and logistic map.

  Finding the probability of cards

This assignment has questions related to probabiltiy.

  Systems of ode

Find all the xed points, and study their stability and Draw the phase portrait of the system, as well as the graphs of the solutions in all relevant cases.

  Derive the boolean expression

Derive the Boolean Expression and construct the switching circuit for the truth table stated

  System of equations

Evaluate which equations are under-identified, just-identified, and over-identified.

  Linear programming problem

Linear programming problem consisting of only two constraints with one objective function.

  Find the natural domain

Find the natural domain of the given functions.

  Introduction to numerical methods

Compute the coecients of the polynomials using the term recurrence relation.

  Chart of the topological manifold

De?nition of smoothness of functions on a smooth manifold is chart independent and hence geometric.

  Mathematics in computing

Questions related on mathematics in computing.

  Complex problems

Complex problems

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