Define a relationship even x which is true

Assignment Help Computer Engineering
Reference no: EM132121076

Recall the successor notation for representing natural numbers as terms in Prolog. In this notation, "0" stands for the number zero, "s (0)" stands for one, "s (s (0))" stands for two, and so on.

(a) Based on the successor notion, define a relationship "odd (X)" which is true if X is an odd number.

(b) Based on the successor notion, define a relationship "even (X)" which is true if X is an even number. Your definition should be built on top of the odd (X) relationship.

(c) How will Prolog answer the following question? ?- even(X). When several responses are possible, give two.

(d) How will Prolog answer the following question? ?- odd(s(X)). When several responses are possible, give two.

Reference no: EM132121076

Questions Cloud

Recall merge sort sorts a vector of elements : Write your own version of merge_sort(), merge(), and copy() functions.Do not use generic functions such as sort(), inplace_merge(), merge() or copy().
What annual rate of return must the fund portfolio earn : If you plan to invest for six years, what annual rate of return must the fund portfolio earn for you to be better off in the fund than in the CD?
Write a conjecture about how many leaves are present : Write a conjecture about how many leaves are present in a nonempty complete A-ary tree of height h.
Compare and contrast primary valuation alternatives : Compare and contrast primary valuation alternatives: historical costs (purchase price less accumulated depreciation), fair value (market price).
Define a relationship even x which is true : Based on the successor notion, define a relationship "odd (X)" which is true if X is an odd number.
Broker initial margin requirement : How much in cash or securities must you put into your brokerage account if the broker's initial margin requirement is 50% of the value of the short position?
Do you believe in the existence of wonder heaps : Give a one-sentence definition of i) worst-case running time, ii) tractable problems, iii) the Subset Sum Problem.
What is the npv of the investment : If you insulate your office for $16,000, you will save $1,600 a year in heating expenses. These savings will last forever.
How much more must you deposit today : How much more must you deposit today in order to have the same amount as your sister in 7 years?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write simple paragraph or two describing procedures

You need to write simple paragraph or two describing procedures that can be used for System Hardening of both IIS and Apache.

  Does the site follow an opt-in or opt-out policy or is the

use your favorite web search engine to obtain a list of web pages that include the words privacy statement. visit the

  How many times is it performed as function of matrix order n

What is its basic operation? How many times is it performed as a function of matrix order n? As a function of the total number of elements in the input matrice?

  What openings are on the front of the computer

What openings are on the front of the computer? What kinds of storage media can be used with this computer? Are there any openings for inserting new hard drives?

  Develop a detailed enhanced entity-relationship model

Develop a detailed Enhanced Entity-Relationship (EER) model to reflect the data requirements for the Garden Restaurant system

  Factors limiting use of personalization

Two key factors limiting use of the personalization to more precisely target marketing efforts to individual customers are? Matching profiles with the product offerings and delivering those offerings.

  Define multimedia sites that include audio and video

In the early 1990s, the Internet offered primarily text-based sites. Now Internet is rich in multimedia sites that include audio and video. What are some of the changes that needed to happen to the Internet in order to support this new functionalit..

  Plot astronomical distances and path of celestial objects

I think that one of the most interesting fields where conic sections are applied is astronomy. As a welder, I had to cut ellipse-shaped holes into the side of tanks routinely.

  Q1 implement the following function using actel act-1 logic

q1. implement the following function using actel act-1 logic block. complemented inputs are not available.nbsp .nbsp

  What similarities exist in mechanical and optical methods

What similarities exist in mechanical, electrical, and optical methods of computation? What shortcomings of mechanical computation did the introduction?

  Why are computer networks so tough to secure

define Why are computer networks so tough to secure.

  Slect two principles for policy and standards development

1.principles for policy and standards development please respond to the following select two principles for policy and

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