Ask Question, Ask an Expert

+1-415-315-9853

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

The ietf internet protocol performance metrics ippm working

The IETF Internet Protocol Performance Metrics (IPPM) working group develops standard metrics that can be applied to the quality, performance, and reliability of a network. How could this group's work help a network desi ...

Mobile app part 3 riskreference the microsoft project file

Mobile App Part 3 Risk Reference the Microsoft Project file you created in Assignment 5(AT THE ATTACHED): Mobile App Part 2 (Gantt and PERT Charts) for the completion of this assignment. Write a two to three page paper i ...

In this exercise we illustrate the problem of using

In this exercise, we illustrate the problem of using nonprobabilistic cryptosystems, such as schoolbook RSA, imprudently. Nonprobabilistic means that the same sequence of plaintext letters maps to the same ciphertext. Th ...

1 prove or show that the worst case time for the mul method

1. Prove or show that the worst case time for the mul method of the Polynomial class implemented in this chapter is O(n 2 ). 2. We have provided two implementations of the Set ADT in Chapter 1 and Chapter 4. (a) Implemen ...

1 given an unsorted list of n values what is the

1. Given an unsorted list of n values, what is the time-complexity to find the k t h smallest value in the worst case? What would be the complexity if the list were sorted? 2. What is the O(·) for the findSortedPosition( ...

Where the structured cabling standards are voluntary local

Where the structured cabling standards are voluntary, local codes have the force of law. If you were to prepare a guide for your employees concerning these codes, what would be in it?

Individual expanded website planexpand your website

Individual: Expanded Website Plan Expand your website plan. Select at least three interactive features that could be added to your site. Identify the following: • What purpose would each feature serve for your site and i ...

1 rewrite the longest common substring code as a class2

1. Rewrite the longest common substring code as a class. 2. Write a program that uses a brute force technique to find the longest common substring. Use the Timing class to compare the brute force method with the dynamic ...

1 discuss two security mechanisms applied at the

1. Discuss two security mechanisms applied at the application layer. Are they safer than those applied at the lower network layer? Support your response. 2. Are there security mechanisms applicable at transport layer? Is ...

1 given the parameters shown above calculate the total page

1. Given the parameters shown above, calculate the total page table size for a system running 5 applications that utilize half of the memory available. 2. Given the parameters shown above, calculate the total page table ...

  • 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

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

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen