Prolog predicate for list that contains duplicate elements, Programming Languages

Assignment Help:

Write a Prolog predicate  has_duplicates(L)  that is true if list  L  contains duplicated elements (that is at least 2 copies of an element). For instance:

?- has_duplicates([a,e,b,d,s,e]).
Yes
?- has_duplicates([a,b,d,s,e]).
No
?- has_duplicates([]).
No 


Related Discussions:- Prolog predicate for list that contains duplicate elements

Temperature Calculation system, Detailed Description: • The program will t...

Detailed Description: • The program will take temperature readings as input from user for specified number of consecutive days. • Program will store these temperature values into

What is .net?, What is .NET? It is a foundation fairly neutral structure...

What is .NET? It is a foundation fairly neutral structure. Is a coating between the son and the selection language? It can handle many selection dialects, such as VB.NET,

Asp.net and asp.net ajax, ASP.NET and ASP.NET AJAX ASP.NET AJAX, formerly k...

ASP.NET and ASP.NET AJAX ASP.NET AJAX, formerly known as "Atlas", is an Enthusiasm rendering of an AJAX centered structure, designed for ASP.NET (although it can be used on other s

Simple encryption, i have to make a program that encrypt a text to numbers,...

i have to make a program that encrypt a text to numbers, i don''t know what is wrong in my code, the example of what i need: text: hi >> number: 17 23

CMIS 102, Calculate the total price based on several key parts required to ...

Calculate the total price based on several key parts required to build a state-of-the-art gaming computer. The user will have the option of selecting different parts.

Jquery, i am stuck on array part from getting response of jquery. anyone co...

i am stuck on array part from getting response of jquery. anyone could help?

Virtual Logic and Arrays, My programming class uses Virtual Logic (not virt...

My programming class uses Virtual Logic (not virtual studio) to learn how to program algorithms but we don''t get any assistance form the instructor so I am at a loss as to how I a

Draw the sequence diagram for the scenario, Draw the sequence diagram for t...

Draw the sequence diagram for the following scenario of eBroker. Sell Stock The user enters the username and password The system checks that the user is a valid user

Shell script to find a particular pattern from the file, Normal 0 ...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Higher order differential equations, We'll start this section off with the ...

We'll start this section off with the material which most text books that will cover in this section. We will take the matter from the Second Order chapter and expand this out to n

Write Your Message!

Captcha
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