suppose i've defined three clubs in Prolog: now i wish to find the complement of football club from the combined three clubs (i.e answer should dis ...
suppose i've defined three clubs in Prolog: now i wish to find the complement of football club from the combined three clubs (i.e answer should dis ...
I have following source-code: This Prolog program splits a list List into two lists L and [R1|RN]. R1 is the first element of List which satisfies ...
Why isn't father/2 recognized and why can't I load a file that calls father/2? theogony.pl mythos.pl swipl ...
The given database: What I have so far: I'd like to get the unique sets of persons (of length > 1) in the database whose ages add up to 100. ...
I prepared a Prolog solution of a riddle about people living in a three-floor block with two sides(left,right) - so 6 flats. The solution is correct. ...
I'm learning prolog, and I'm confused by the claim that prolog uses proof by contradiction: The resolution proof process makes use of a technique ...
I have been asked to define a predicate subseq/2, with signature subseq(-,+), which is true when both its arguments are lists, and its first argum ...
I am trying to create a predicate isPrime/1 that checks if a given number is prime or not. I have come up with the following code: but it does not ...
I have this predicate and this works. But I also want to do it with my list_merge predicate. How can I combine them? ...
Let's say I have string as I want to convert this list in to this How can I do it?. ...
I want to write a predicate in Prolog, which creates a all possible segments of a given Size of a given List and returns the un-selected elements as a ...
I have a list L = [a, b, c] and I want to pick all unique non-repeating pairs: [a, b], [a, c], [b, c]. If I simply use the member function, it, of cou ...
Suppose, I wanted to write a program in prolog, which accepts a number input X, and outputs all value pairs for which the sum is X. This does not w ...
For my programming course's assignment, I have to write some Prolog code without using any pre-defined predicates (excluding , and ;), but saw no way ...
Prolog newbie here. In SWI Prolog, I'm trying to figure out how to parse a simple line of CSV reversably, but I'm stuck. Here's what I've got: Now ...
I have a Prolog program containing some facts and rules about a drug called Diclogenta eye drops. I wanted to create a program where the user enters t ...
I am trying to lower the inferences needed for executing my program in Prolog. My task is exactly the same as in: Prolog: Comparing Lists from Lists o ...
I can't figure out why my code isn't working. I want the code to give me possible combinations for N queens on a NxN chessboard. A possible combinatio ...
I have a semi complex shift scheduling problem in prolog. From what I saw it can be solved with CLF but I am not that familiar and the resources onlin ...
I can't seem to wrap my head around how this works, to be specific I don't understand how F1 represents the value of (N-1)! cause the way I see it onc ...