I have the following inequalities on 21 variables: http://pastebin.com/raw.php?i=FTU970Em When I run \"Reduce[ineq,Integers]\" on this, Mathematica hangs for a
While reading SICP I came across logic programming chapter 4.4. Then I started looking into the Prolog programming language and 开发者_运维问答tried to understand some simple assignments in Prolog.I f
I\'m trying to find a solution for a query on a generalized Fibonacci sequence (GFS). The query is: are there any GFS that have 885 as their 12th number? The initial 2 numbers may be restricted betwee
This question already has 开发者_如何学编程answers here: Closed 9 years ago. Possible Duplicate:
I have a very weird problem with PROLOG. I have used it before, but it\'s been a while and I\'m rusty. I have a list of variables and I need to ensure that none of them are the same.
I searched through here as best I could and though I found some relevant questions, I don\'t think they covered the question at hand:
:- use_module(library(clpfd)). % load constraint library % [constraint] Compute a list of distinct odd numbers (if one exists), such that their sum is equal to a given number.