Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Computer Engineering Expert

problem 1: Show that we can represent pairs of non-negative integers by using only numbers and arithmetic operations if we represent the pair a and b as the integer that is the product 2a3b. Give the corresponding definitions of procedures cons, car, and cdr.
 
problem 2: Make a Money data structure which is made up of amount and currency.

a) prepare a constructor for this data structure.
 
b) Make accessors for this data structure.

c) prepare operations convert-money (takes a Money object and a currency symbol and returns the Money object of the requested currency), add-money and subtract-money (add and subtract Money objects possibly from various currencies and return a Money object with currency of the first Money object argument).

problem 3: This problem deals with the AVL trees. You should use mutable pairs or lists to implement this data structure:

a) Define a procedure called make-avl-tree that makes an AVL tree with one node. As well create another constructor build-avl-tree which creates an AVL tree from a root, left subtree and right subtree. The constructors return an AVL tree object.
 
b) Make procedures for accessing the root, left subtree and right subtree, and as well mutators for changing the root, left subtree and right subtree of an avl argument.
 
c) prepare a procedure called (insert n t). This procedure consists of 2 arguments: n is the value being inserted and t is the AVL tree.
 
d) prepare a procedure called (lookup n t). This procedure consists of 2 arguments: n is the value being looked up and t is the AVL tree. The subtree with n as its root is returned (or '() if no such node is found).
 
e) prepare a procedure called (print-as-list t). This procedure prints the AVL tree passed in t as a regular list (not a mutable list).
 
f) prepare down a procedure called (print-inorder t). This procedure prints the AVL tree passed in t in inorder traversal form.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91840

Have any Question? 


Related Questions in Computer Engineering

1 how is an incident response plan different from a

1. How is an incident response plan different from a disaster recovery plan? 2. What is risk appetite? Explain why risk appetite varies from organization to organization. 3. What is a cost benefit analysis?

Do you feel that social media should be used as a basis for

Do you feel that Social Media should be used as a basis for hiring or firing an employee (why or why not)? Answer in about two paragraphs with reference. Must be 100-200 words and show an understanding and full developme ...

Overviewyou are a mobile application developer working for

Overview: You are a mobile application developer working for Mick Jagger who owns Wild Horses Incorporated (WHI).  Mick's company is just getting started with Android mobile application development. Mick wants to make su ...

In an rsa digital signature scheme bob signs messages xi

In an RSA digital signature scheme, Bob signs messages xi and sends them together with the signatures si and her public key to Alice. Bob's public key is the pair (n,e); her private key is d. Oscar can perform man-in-the ...

1 is creating a timeline more important for the design of

1. Is creating a Timeline more important for the design of the project then for actually coding it? How so? 2. Is it possible to translate a feature, like Panorama, that uses multiple screens in a desktop environment, to ...

The rsa encryption algorithm is based on the fact that it

The RSA encryption algorithm is based on the fact that it is hard to factor a large number (250+ digits). If you were able to factor a large number quickly how would you be able to find the encryption ( e ) and decryptio ...

1 why is it important for organizations to have a business

1. Why is it important for organizations to have a business continuity plan in place? 2. Why is important for organizations to have a disaster recovery plan? 3. If companies have both a BCP and a DRP in place do they nee ...

The truck-assembly division of a large company produces two

The truck-assembly division of a large company produces two different models: the Aztec and the Bronco. Their basic operation consists of separate assembly departments: drive-train, coachwork, Aztec final, and Bronco fin ...

Course conclusionnbspnbspplease respond to the followingyou

"Course Conclusion"   Please respond to the following: You have just completed 10 weeks of an introduction to networking course. Imagine you have been asked to create a one-day training course that highlights the importa ...

Give an outline of the server implementation showing how

Give an outline of the server implementation showing how the operations getRequest and sendReply are used by a server that creates a new thread to execute each client request. Indicate how the server will copy the reques ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro