#137 new

Binary logic in prolog

Reported by Bailey523 | December 13th, 2018 @ 01:51 AM

I want to solve following problem using inference making power of prolog.

One day, 3 persons, a, b, c were caught by police at the crime spot. When police settled interrogating them:

i) a says I am innocent
ii) b says a is criminal
iii) c says I am innocent.

Its known that

i) Exactly one person speaks true.
ii) Exactly one criminal is there.

Who is criminal? To model above problem in First Order logic: Consider c/1 is a predicate returns true when argument is Criminal we can write:

(not(c(a)),c(c)) ; (c(c),c(a)).
 c(a); c(b); c(c).
(not(c(a)),not(c(b))) ; (not(c(a)),not(c(c))) ; (not(c(b)),not(c(c))).
After modelling above statements in prolog, I will query:
it should return:
But error I got:
"No permission to modify static procedure `(;)/2'"


Comments and changes to this ticket

  • David Glines

    David Glines September 10th, 2019 @ 03:39 AM

    As a little reward their pay rates will have all the more purchasing force in KC due to the minimal effort of living. Likewise, KC is a colossal metro region, not a little ranch town! Truly, it's hard to leave your companions/church/running gathering/whatever, yet that is the way things are!! In the event that workers are really worried about the eventual fate of the USDA after the move, at that point remain with the https://www.achieveessays.com/academic-writing-help.html service.

    With regards to particular lab hardware, setting up new labs that are appropriately authorized, zoned and prepared isn't something you can do in a brief timeframe.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Provides common named scopes and object based searching.

People watching this ticket