Write a scheme function that computes the volume

Assignment Help Computer Engineering
Reference no: EM131295964

1. Find definitions of the scheme function EVAL and APPLY and explain their actions.

2. What does the following Scheme function do?

(define (y s lis)

(cond

((null? Lis' () )

((equal? s (car lis)) Hs)

(else (y s (cdr lis)))

) )

3. What does the following Scheme function do?

(define (x lis)

(cond

((null? lis) 0)

((not (list? (car lis)))

(cond

((eq? (car lis) #f) (x (cdr lis)))

(else (+ 1 (x (cdr lis))))))

(else (+ (x (car lis)) (x (cdr lis))))

4. Write a Scheme function that computes the volume of a sphere, given its radius.

5.  Write a Scheme function that takes a simple list of numbers as a parameter A and B and returns a list with the largest and smallest numbers in the input list.

6. Write a Scheme function that takes a list as a parameter and returns a list identical to the parameter except the last element has been deleted.

7. Describe how a multiple-processor machine could be used to implement - resolution. Could Prolog, as currently defined, use this method?

8. Write a set of rules for family relationships, including all relationships from grandparents through two generations. Now add these to the facts of Problem 3, and eliminate as many of the facts as you can.

9. Write the following English conditional statements as prolog-headed Horn clauses:

a. If Fred is the father of Mike, then Fred is an ancestor of Mike

b. If Mike is father of Joe and Mike is the father of Mary, then Mary is the sister of Joe.

c. If Mike is the brother of Fred and Fred is the father of Mary, then Mike is the uncle of Mary.

10. Using the structures parent (X, Y), male (x), and female (X) , write a structure that defines mother (X,Y).

11. Using the structures parent (X, Y), male (x), and female (X) , write a structure that defines sister (X,Y).

Reference no: EM131295964

Questions Cloud

Record of daily cash transactions in a text file : Question 1: A store owner keeps a record of daily cash transactions in a text file. Each line contains three items: The invoice number, the cash amount, and the letter P if the amount was paid or R if it was received.
What is a literature review : What is a literature review? What should be included in a literature review? Locate and provide a good literature review in your area of interest, and discuss its strengths and weaknesses.
Describe the role of each career : Describe the role of each career and explain what makes that profession different from the others. You can include, but are not limited to, factors such as education and experience requirements, services rendered or products offered, licensure, pa..
Segments in the absence of congestion : Assume that every TCP segment is 1 Kbytes and that a TCP connection begins with a 64- Kbyte congestion threshold. How many TCP segments have to be acknowledged before the congestion window reaches 100 segments in the absence of congestion?
Write a scheme function that computes the volume : Write a Scheme function that computes the volume of a sphere, given its radius - Describe how a multiple-processor machine could be used to implement - resolution. Could Prolog, as currently defined, use this method?
Give a good background regarding immuno suppressive therapy : Give a good background regarding Immuno suppressive Therapy. Do not include the information from the internet if it is not from an authentic scientific research paper or journal or from a newspaper.
Determine the monthly payment : Add a new field named LoanPayment using the Expression Builder. Insert the PMT function to determine the monthly payment for a 2-year loan, paid monthly, with a 5% yearly interest rate.
Managing telecommunications software engineering : Using the algorithms, programming languages, managing telecommunications software engineering, managing corporate information resources, and managing partnership-based information technology (IT) operations topics covered in this unit, discussion..
How can nurses encourage patients to make immediate : Using the Health Belief Model,how can nurses encourage patients to make immediate and permanent behavior changes; particularly as they relate to lifestyle choices?

Reviews

len1295964

11/30/2016 6:45:58 AM

Detailed Question: The problems of each chapter that are CIRCLED are to be completed: There are 6 problems and 5 small programming excersises Chapter Problem Set Questions* Programming Exercises 15 2,9,10 1,6,8 16 2,4,5 1,2

Write a Review

 

Computer Engineering Questions & Answers

  Explain protocol and network switching device

An area along the north wall of the coffee house has been set aside for the five computer stations, and since this is a very popular local hangout, it is expected that the computers, as well as wireless connections, would be in constant use. She i..

  Advantages and disadvantages of moving this functionality

Many of the functions of an adapter could be performed in software that runs on the node's CPU.

  Data management-erd diagram definition

The entity relationship diagram is crucial to the  creation of a successfully implemented application and database. A good understanding of how to identify the components that define the Entity Relationship Diagram is needed. Select one of the fol..

  Description of taskyour team 2-3 members will conduct an

description of taskyour team 2-3 members will conduct an analysis on selected organisation with regards to their use of

  Draw a behavioral state machine diagram

Draw a behavioral state machine diagram that describes the various states that a travel authorization can have through its approval process. A travel authorization form is used in most companies to approve travel expenses for employees.

  The microprocessor simulator

Modify the program in 07textio.asm to include three procedures. The first should read text from the keyboard and store it in RAM. The second should convert any upper case characters in the stored text to lower case. The third should display the te..

  How to draw a hierarchy chart

How to draw a hierarchy chart

  Reverse polish notation

Transform the following numerical arithmetic expression into the reverse Polish notation and display the stack operations in order evaluate the numerical result.

  Te research paper must be at least 6 pages in length not

the research paper must be at least 6 pages in length not including the cover page and references. it is required that

  How this might be solved by a parallel computing machine

Write at least two paragraphs: the first one identifying and describing a problem, the second one describing how you imagine solving it on a parallel platform.

  The algorithms of the parallel and perspective projection

I have a java application that reads in a vertex list and face list. I also have code to write 2-D lines and ouput that image file. In my code I have the standard 3D default values defined for: PRP and VRP reference points, VPN and VUP vectors, an..

  Prepare a slideshow on computer rendering of stochastic

prepare a slideshow on computer rendering of stochastic modelsrequirementsbullcover slide - project title date

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