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 it called when you make predictions within given data?
denis23 [38]
<span>When a researcher uses given data to make a prediction, this is known as a hypothesis. The hypothesis generally serves as a starting point for future research, allowing a researcher to further develop their theory through additional testing, observation, and, if necessary, revision to the current hypothesis.</span>
4 0
3 years ago
Organizations should communicate with system users throughout the development of the security program, letting them know that ch
Fed [463]

Answer:

Yes it is true.The organization should indeed communicate with a system user throughout the development of a security program. A corporation needs a security policy that must be developed by management at all levels, including organization and employees at the operational level. For a corporate security plan, it is essential to reduce the resistance of the expected changes and define the objective.

Explanation:

Three objectives of the security plan in an organization are:

  • Identify the sensitive system and plan
  • Create and define the strategy and control of the system.
  • Develop and implement the training programs.

Security Information is one of the essential factors in the organization.For an organization, the information should be protected.

7 0
3 years ago
All of the following are examples of extracurricular activities except:
mart [117]
A, because normally that would be a requirment
8 0
3 years ago
Read 2 more answers
The process of determining that a user has permission to perform a particular action on a computer is called
Doss [256]
I believe that would be authorization.
5 0
3 years ago
Smith wants to get a job in network systems. Which major should he choose to give him the best chance of getting a job?
Sever21 [200]
<span>computer engineering</span>
5 0
3 years ago
Read 2 more answers
Other questions:
  • Of the different IRT roles, the _______________ is head of the team and issues the ultimate call regarding how to respond to an
    15·1 answer
  • What might be the best response to a cyberbuly attack
    6·2 answers
  • In 1-2 sentences describe how to use the thesaurus in the Word Processor
    11·2 answers
  • The correct or acceptable way of communicating on the internet is known as
    14·1 answer
  • A database program helps to ____________.
    9·2 answers
  • Since the web.xml file describes how the web application should be configured when it is deployed on a server, the file is known
    7·1 answer
  • Which of the following is part of the 6-by-6 rule?<br><br> i need help!!!!!
    5·1 answer
  • . Which of the following refers to the informal rules for how to behave online? A.
    9·1 answer
  • an existing technology that would allow users to transfer images from the camera to the computer without connecting them
    8·1 answer
  • To speed up data retrieval, more vehicles will be upgraded to cellular connections and be able to transmit data to the ETL proce
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!