Prolog is the most commonly used logic programming language. It supports non-deterministic programming through backtracking and pattern matching through unification.

learn more… | top users | synonyms

0
votes
0answers
70 views

Date (Parse_Time) in Prolog

I just need some help on this question: Write a PROLOG rule that given two people (P1 and P2) and a date D returns the list of all dates of when P1 and P2 have exchanged messages until date D. ...
2
votes
1answer
135 views

Prolog Sudoku solver taking too long

I was wondering if there's any way I can improve this code's execution. I want to use it on a 9*9 grid, but it takes too long to solve this as 4*4. This program takes as input a 4*4 matrix ...
3
votes
1answer
75 views

Complete graph traversal algorithm in Prolog

Given a table, I want to explore all possible transition between the elements in the table. ex: for a table with size 3 [0,1,2], the output of the algorithm should be 0->1, 1->0, 0->2, 2->1, 1->2, ...
0
votes
1answer
99 views

Range of all variables in List in Prolog

I have a list in Prolog like this: Puzzle = [ A1, A2, A3, B1, B2, B3, C1, C2, C3 ]. And I want every variable in the list to be a number in the range of 1 to 9. Currently ...