1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Artyom0805 [142]
3 years ago
10

Define a function in Scheme (or relation in Prolog) that checks whether a set of elements (represented as a list) is a subset of

another set (represented as a list).
Computers and Technology
1 answer:
mafiozo [28]3 years ago
4 0

Answer:

subset([],[]).

       subset([X|L],[X|S]) :-

           subset(L,S).

       subset(L, [_|S]) :-

           subset(L,S).

Success:

     subset([1,3], [1,2,3]).

     subset(X, [1,3,4]).        % error handling to compare sets in a given order

Fail:

     subset([2,1], [1,2,3]).   % compares in a different order from the first.

Explanation:

The function "Subset" in the source code above accepts two sets, then checks if the first set is a subset of the second. The code returns true if the condition is met.

You might be interested in
How to install specific version of create-react-app so.
marusya05 [52]

Answer:

First, go to the package.json file and change the version of react, react-dom, and react-scripts to the desired version.

Next, clear the node_modules and the package-lock.json file.

Finally, hit:

npm install

8 0
2 years ago
What state yall be livin in?
iogann1982 [59]
Florida -_- wbu?????
7 0
4 years ago
Read 2 more answers
On a chart created in excel, the horizontal axis is also called the ____.
Artyom0805 [142]
The chart<span> types created in Excel have two axes: a </span>horizontal axis  and a vertical axis. These charts are used to<span> illustrate the workbook data graphically in order to see trends.</span><span>
On a chart created in excel, the horizontal axis is also called the X axis. The vertical axis on the other hand is called Y axis.


</span>
3 0
3 years ago
When using an hdmi to dvi adapter, what two dvi port types will the adapter work with?
Inga [223]
When using an HDMI to DVI adapter, the adapter will work with two DVI ports which are <span>DVI-D and DVI-I ports

</span>DVI<span> is a digital signal that has the same format as the video portion of </span>HDMI<span>. However, </span>DVI<span> doesn't carry the audio signal whereas the </span>HDMI does<span>.
This means that if you are only using the video signal you can use a simple </span>DVI to HDMI<span> plug-</span>adapter<span> that changes the physical connections.</span> 
5 0
4 years ago
What can Strings store
horsena [70]
A string is generally considered as a data type and is often implemented as an array data structure of bytes (or words) that stores a sequence of elements, typically characters, using some character encoding. String may also denote more general arrays or other sequence (or list) data types and structures.
5 0
4 years ago
Read 2 more answers
Other questions:
  • Many people view drug and alcohol abuse as a social problem.<br> A. TRUE<br> B. FALSE
    9·1 answer
  • Network id is 192.168.10.32/28. what would be the ip address, if you assign the last available ip address in the range
    14·2 answers
  • Technician A says one disadvantage of fiber optic cables is that they are more expensive and very heavy. Technician B says one d
    6·1 answer
  • Design two subclasses of Employee…SalariedEmployee and HourlyEmployee. A salaried employee has an annual salary attribute. An ho
    12·1 answer
  • Two-dimensional random walk (20 points). A two-dimensional random walk simulates the behavior of a particle moving in a grid of
    14·1 answer
  • E-mail played a role in political upheavals in Europe because it became an important means of communication in Europe. E-mail, c
    13·1 answer
  • In information security, a specification of a model to be followed during the design, selection, and initial and ongoing impleme
    5·1 answer
  • A program that doesn’t work properly needs to be debugged. true or false
    8·1 answer
  • What will the following program display in the console?
    13·2 answers
  • Answer if you know Javascript, html, css, python, and Ruby.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!