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
Coffee shops worldwide throw away billions of paper cups each year. Discuss
garik1379 [7]

Answer:

They should give out a coffee cup to each person and charge full price for the first time that you fill the cup but then after they finish the first drink they should offer a discount if you reuse the same cup. They should tell you that you can bring back coffee cups from even a few days ago and you could still be eligible for the discount. This way even people that don't drink as much coffee can still be eligible to get a discount on their coffee.

Explanation:

:)

4 0
2 years ago
n macOS, what launch point provides access to almost all the settings needed to administer a macOS system?
Fynjy0 [20]

Answer:

System preferences.

Explanation:

MacOS is the primary operating system designed and developed for Apple computers (MacBook).

In macOS, system preferences is a launch point that provides access to almost all the settings needed to administer a macOS system. The system preferences allow users to change various settings on their Mac computers such as changing the desktop layout, desktop picture (wallpaper), size and location of the dock, font size, appearance, energy saver etc.

5 0
3 years ago
Don't pat any attention to this
Sauron [17]

Answer: what? do you need any help, bc I can help with any question you have

Explanation:

4 0
3 years ago
Read 2 more answers
Using the flowchart diagram, identifythe decision point of this solution?
ELEN [110]

Answer:

Is there an early pay discount?  

Explanation:

This determines and instructs what path the code should take,

if there is no early pay discount, it has different instructions to follow.

3 0
3 years ago
One of the disadvantages of cable technology is that:
Artemon [7]

Answer:

The answer is letter C

Explanation:

Systems used by many providers require customers to share bandwidth with neighbors

8 0
3 years ago
Other questions:
  • Which information is necessary to determine an object's speed?
    13·1 answer
  • What is this I’m so lost
    9·1 answer
  • PowerPoint provides a wide variety of predefined shapes that can add visual insert to a slide true or false
    10·2 answers
  • Write a statement that increases the value of the int variable total by the value of the int variable amount. that is, add the v
    5·1 answer
  • Which key should you press and hold to select multiple cells?
    8·2 answers
  • All states that have altered judicial selection techniques in recent years have adopted some form of:
    10·2 answers
  • What keyword is used in Java to create a parent/child relationship between two classes?
    14·1 answer
  • You have received an update package for a critical application you are running on a virtual machine. You have been told to insta
    8·1 answer
  • A Python file that contains variables and functions and can be used in other programs is called a
    5·1 answer
  • Which statement is true about the energy of electromagnetic radiation?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!