Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

problem 1: Translate the given formula into a prefix form expression in Scheme:

1844_prefix form expression.jpg

problem 2: Define a procedure which takes three numbers as arguments and returns the sum of the squares of two larger numbers.
 
problem 3: Consider the given mathematical function:

1345_mathematical function.jpg

(a) prepare a procedure which computes f by means of the recursive process.
(b) prepare a procedure which computes f by means of the iterative process.
 
problem 4: Each of the given two procedures defines a method for adding two positive integers in terms of procedures inc, which increments its argument by 1, and dec, which decrements its argument by 1:

(define (plus1 a b)
(if (= a 0)
b
(inc (plus1 (dec a) b))))
 
(define (plus2 a b)
(if (= a 0)
b
(plus2 (dec a) (inc b))))

 
By using the substitution model, describe the process generated by each procedure in evaluating (+ 2 5). Are such processes iterative or recursive?
 
problem 5:

a) prepare a recursive procedure (digits n) which computes the number of digits in the integer n by using a linear recursive process. For illustration, (digits 42) must return 2 and (digits 13579) must return 5.

b) Reprepare (a) in such a way that a linear iterative process is produced. Call the procedure digits-it.

c) By using the substitution model, illustrate that your procedure in (b) generates a linear iterative process.
 
problem 6: Simpson's Rule is a more accurate method of numerical integration. By using Simpson's Rule, the integral of a function f between a and b is approximated as:

504_simpsons rule.jpg

where  h = (b  -  a)/n, for some even integer n, and yk= f(a + kh). (Increasing n increases the accuracy of the approximation.)

Define a procedure which takes as arguments f, a, b, and n and returns  the value of the  integral, computed by using Simpson's Rule. Use your process to integrate cube between 1 and 2  (with n = 100 and n = 1000)

Computer Engineering, Engineering

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

Have any Question?


Related Questions in Computer Engineering

Systems analysis assignment can you answer the 4 questions

Systems Analysis assignment : Can you answer the 4 questions please? Continuing Case: Personal Trainer, Inc. Personal Trainer, Inc. owns and operates fitness centers in a dozen Midwestern cities. The centers have done we ...

Question 1 a server with an upload rate of 5000 bitssec

Question : 1. A server with an upload rate of 5,000 bits/sec must distribute a 10,000 bit file to 20 clients. Each client has a download rate of 4,000 bits/sec. What is the minimum time required to distribute the file to ...

1 what is the price of a semiannual 1000 par value bond

1) What is the price of a semiannual $1,000 par value bond with four years left until maturity that pays a coupon of 3.75% and is yielding 5.25%? What would it be yielding if the price decreased to $973.47? Assume semian ...

Review questionsrq web server environment kroenke book chap

Review Questions(RQ) Web Server Environment Kroenke Book Chap 11 The Review Questions (RQ) listed below can also be found in the Kroenke textbook, starting on page 526. This is NOT the entire list of Review Questions, bu ...

The single-cycle design on p 17 of the notes is capable of

The single-cycle design on p. 17 of the notes is capable of performing more instructions than the subset that were discussed in §4.1 of the lecture notes. Open the MIPS Architecture Volume II-A: The MIPS32 Instruction Se ...

Question suppose you are now acting as a consultant to an

Question : Suppose you are now acting as a consultant to an organization of your choice that has one or more specific compliance requirements. Considering this scenario, respond to the following: • Describe your selected ...

A courier service advertises that its average delivery time

A courier Service advertises that it's average delivery time is less than six hours for a local deliveries. The random sample of times for 12 deliveries twin I'm just across town. The sample has a mean delivery time of 5 ...

Question 1 the facilities coordinator is a critical role

Question: 1. The facilities coordinator is a critical role. Put yourself in the position of the facilities coordinator. 2. Determine and list the qualities you have that would make you an excellent candidate for this pos ...

student who is taking quizzes public class student

/** A student who is taking quizzes. */ public class Student { private String name; private double totalScore; private int quizCount; public Student (String n) { name = n; totalScore = 0; quizCount = 0; } public String g ...

Do you need computers or information and communication

Do you need computers or information and communication technologies to store, organize, and manage data in organizations? Explain how the present day organizations in a developed country like the USA store and manage the ...

  • 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

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As