English 中文(简体)
How to solve this logical description with Prolog? [duplicate]
原标题:

The criminal is one of A, B, C and D.

A says: "It s not me"
B says: "It s D"
C says: "It s B"
D says: "It s not me"

And we know that only one of them tells the truth.

Who is the one? I want to solve it by using Prolog.

It s an interview question.

问题回答

暂无回答




相关问题
How do I solve the linear programming relaxed MKP?

I am studying about Knapsack problem. So I do not understand one thing here. The profit/pseudo-resource consumption ratios Uj = Pj / Wj with Wj = Rji * Aj I hope so you people know this equation ...

Recommended library for linear programming in .Net? [closed]

Can anyone recommend a library - free, or commercial but affordable ( There are some listed here: http://en.wikipedia.org/wiki/Linear_programming#Solvers_and_scripting_.28programming.29_languages ......

How to choose an integer linear programming solver?

I am newbie for integer linear programming. I plan to use a integer linear programming solver to solve my combinatorial optimization problem. I am more familiar with C++/object oriented programming on ...

Solving linear systems in Maxima

I m trying to write a general solver for a linear system in Maxima using linsolve(eqlist, varlist), but without having to explicitly specify the dimension of the problem. This works, but fixes the ...

Linear Independence Matrix

Suppose we have a m by n matrix A with rank m and a set K⊆{1..n} such that the columns of A indexed by K are linearly independent. Now we want to extend K and find a set L so that k⊆L and columns ...

热门标签