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

  What single question can you ask a person

assume you were in a country where each person was either a truth teller or a liar. (A truth teller always tells the truth, a liar always lies.) What single question could you ask a person that would allow you to detect whether that person was a t..

  Describe an efficient filing system to store large word doc

Describe an efficient filing system to store a large number of Word documents on your personal PC.

  Explain the steps you would take in testing modifications

Developers can spend much time in making database and program modifications to improve or expand system functionality. Explain some of the steps you would take in testing modifications.

  Object oriented design of a class

Object oriented design to develop a parent class known as Book which will receive the ISBN, author, title and price of book and select and print the details of all books with the price of more than $50.00.

  Relational algebra tree for queries

Sketch a relational algebra tree (RAT) for each of queries and use the heuristic rules to convert the queries into a more efficient form. Describe each step and state any transformation rules utilized in the process.

  Write down a recurrence relation

Write down a recurrence relation

  Tomas friedman authored a book entitled the world is flat

the world is flat please respond to the followingin 2006 thomas friedman authored a book entitled the world is flat.

  Consider a processor with a delayed branch that has three

consider a processor with a delayed branch that has three delay slots. three compilers compiler a compiler b and

  Draw the tree graph for tictactoe game

draw the tree/graph for this file (circles as nodes and lines from parents to children). The board positions in the nodes are real. The weights are not what would be in the real game

  Explain the importance of having a test coupled

Explain the importance of having a test coupled with real users' views of the product at the end of the development effort, even if it is the test of a prototype and not the fully developed software.

  The number closest from the average is the number

Also, your test desire would be very incomplete as I was asking for 6 test: taking the average of 1 number does not seem to be a very extensive test either. you don not need screen dump for the test. just a table with list of inputs and expected r..

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