Write collection of rules for simplification of expressions

Assignment Help Basic Computer Science
Reference no: EM131677913

Question: In this exercise, we will look at the recursive application of rewrite rules, using logic programming. A rewrite rule (or demodulator in OTTER terminology) is an equation with a specified direction. For example, the rewrite rule x+O --+ x suggests replacing any expression that matches x + 0 with the expression x. The application of rewrite rules is a central part of equational reasoning systems. We will use the predicate rewrite (X, Y) to represent rewrite rules. For example, the earlier rewrite rule is written as rewrite (X+O , X) . Some terms are primitive and cannot be further simplified; thus, we will write primitive ( 0 ) to say that 0 is a primitive term.

a. Write a definition of a predicate simplify (x, Y) , that is true when Y is a simplified version of x-that is, when no further rewrite rules are applicable to any subexpression of Y.

b. Write a collection of rules for the simplification of expressions involving arithmetic operators, and apply your simplification algorithm to some sample expressions.

c. Write a collection of rewrite rules for symbolic differentiation, and use them along with your simplification rules to differentiate and simplify expressions involving arithmetic expressions, including exponentiation.

Reference no: EM131677913

Questions Cloud

Improve the performance of the set associative cache : Assume the cache miss penalty is 10ns. We want to use way prediction to improve the performance of the set associative cache
Write prolog clauses that define the predicate sorted : Write Prolog clauses that define the predicate sorted (L ) , which is true if and only if list L is sorted in ascending order.
What is the transmission time of this lte signal : What is the transmission time of this LTE signal? What is the minimum bandwidth required to transmit this LTE signal? How many bits per data symbol?
Key challenges of operations in an emergency returning : Find out key challenges of operations in an emergency returning in southeast area and develop a contingency plan
Write collection of rules for simplification of expressions : Write a collection of rules for the simplification of expressions involving arithmetic operators, and apply your simplification algorithm to some sample.
How can the advice in the primary post be integrated : What guidelines do you use - or you would advise be used - to ensure that the risk response strategy selected is effective for managing that risk?
Rules of the game for project management to be effective : Must everyone in the organization understand the “rules of the game” for project management to be effective?
Division between the epipelagic and mesopelagic zones : Answer the following questions in terms of physical and/or chemical factors that might explain, or partially explain, various divisions in the Figure 1.
Define salinity and what its measures : In your own words, define salinity and what its measures. What is the average salinity of the oceans? Be sure to include the value and the units.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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