Prolog predicate for list that contains duplicate elements, Programming Languages

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 

Posted Date: 3/22/2013 5:53:47 AM | Location : United States







Related Discussions:- Prolog predicate for list that contains duplicate elements, Assignment Help, Ask Question on Prolog predicate for list that contains duplicate elements, Get Answer, Expert's Help, Prolog predicate for list that contains duplicate elements Discussions

Write discussion on Prolog predicate for list that contains duplicate elements
Your posts are moderated
Related Questions
create a program that can determine the number of students that are doing their final year for a particular program (e.g. BCOM Information Systems), calculate the required credits

need someone to write a simple cobol program for me..urgent

#1. Every mathematics student likes primes numbers. Every mathematics student like parabolas. Let''s put them together to have some fun: Consider two natural numbers a and b. Of co


creating system flowchart for website

Shemrock Inc. is a brake pad manufacturing company. This company uses raw materials, such as carbon powder, iron, ash, and resin. It wants to develop an inventory management system

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

Define an Example of Switch Statement? estimate(number) int number; /* Estimate a number as none, one, two, several, many */ {       switch(number) { case 0 :

1. Write a bash shell script which searches through your folders for files with the extension *.tex, and then interactively deletes the corresponding *.aux, *.dvi and *.log files (

Windows XP using C# load a binary file and send it thru a USB port to the USB port of STM32. STM32 received the file and then write it into an I2C EEPROM.