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
What is a power surge?
Damm [24]
D. A spike of electricity. They are fast and have a short duration.
4 0
2 years ago
PLZ HELP 60 points!! Minor changes to objects which only take effect at render time are called:
slega [8]
It’s literally all b
5 0
2 years ago
1. How are computers helpful
d1i1m1o1n [39]

Answer:

Brainliest

Explanation:

It’s hard to imagine banks without technology. In fact, computers have been in use in banking since the 1950s, when Bank of America introduced a computer designed specifically for processing checks. Each new decade has brought innovations that change the way banks manage daily operations and serve customers. Today, you may not even leave your house to do your banking. As much as technology has changed the use of the computer in the banking sector, banks continue to adjust the way they do things.

8 0
3 years ago
What is the requirement for self-contained recovery devices
dexar [7]
Babahskdjdndnd jbsbsjsjsnsns ndsnssnsnsnxjxjx skzjnansmansna Jaunansmans
4 0
3 years ago
Does technology make us more alone?
Anika [276]
Both yeah and no, depending on personal opinion
3 0
3 years ago
Other questions:
  • 3. Find the product of (a² +3a+5) x (a+7)​
    7·1 answer
  • There is a simple pattern for derermining if a binary number is odd. What is it and why does this pattern occur?
    8·1 answer
  • Create a datafile called superheroes.dat using any text-based editor, and enter at least three records storing superheroes’ name
    9·1 answer
  • Which of the following examples can be solved with unsupervised learning?
    8·1 answer
  • Hello pls answer<br><br><br>what is the use of loop in java​
    5·1 answer
  • ( BRAINLIEST) <br> Name 2 input devices and 2 output devices on a smart phone.
    12·1 answer
  • If C2=20 and D2=10 what is the result of the function = mathcal I F(C2=D2,^ prime prime Ful "Open")?
    11·1 answer
  • A good algorithm should have which three components?
    6·1 answer
  • What is the importance of knowing the concept of programming?
    8·1 answer
  • Mack signs into his laptop and gets a message saying all his files have been encrypted and will only be released if he sends mon
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!