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

1 in an alphabet with 20 symbols what is the number of

1. In an alphabet with 20 symbols, what is the number of leaves in a Huffman tree? 2. Is the following code an instantaneous one? Explain 00 01 10 11 001 011 111 3. Assume a message is made of four characters (A, B, C, a ...

Write a graphics program that draws 12 strings one each for

Write a graphics program that draws 12 strings, one each for the 12 standard colors, besides Color.WHITE, each in its own color. Provide a class ColorNameViewer and a class ColorNameComponent.

1 in chapter 8 we learned that a circuit-switched network

1. In Chapter 8, we learned that a circuit-switched network needs end-to-end addressing during the setup and teardown phases. Define end-to-end addressing in a telephone network when two parties communicate. 2. When we h ...

Construct a 3-bit counter using three d flip-flops and a

Construct a 3-bit counter using three D flip-flops and a selection of gates. The inputs should consist of a signal that resets the counter to 0, called reset, and a signal to increment the counter, called inc. The output ...

Even with the best security system an organizations

Even with the best security system, an organization's information systems are never fully safe from outside attacks or malicious activities from insiders. As a result, an organization must be prepared to take curative me ...

Capture network traffic while accessing a website with your

Capture network traffic while accessing a website with your web browser. In Wireshark, go to Statistics > HTTP > Packet Counter >Create Stat. How many Response Packets did you capture? What types of Response Packets and ...

You are currently working for a company with outdated

You are currently working for a company with outdated multimedia tools. Give proposal to your manager that includes the following: An overview describing how multimedia has evolved The tools or protocols you recommend fo ...

1 implement a loop that prompts a user to enter a number

1. Implement a loop that prompts a user to enter a number between 1 and 10, giving three tries to get it right 2. Sometimes students write programs with instructions such as "Enter data, 0 to quit" and that exit the data ...

First questionwhere would you like to be in 5 years 10

First Question Where would you like to be in 5 years, 10 years? What impact do you anticipate information assurance will play in your education and career? The self-reflection should be a minimum of 1 full page, Times Ne ...

As is so often true in cryptography it is easy to weaken a

As is so often true in cryptography, it is easy to weaken a seemingly strong scheme by small modifications. Assume a variant of the OFB mode by which we only feed back the 8 most significant bits of the cipher output. We ...

  • 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