Toggle navigation
?
users online
Logout
Open hangout
Open chat for current file
/* The infamous problem that is making rounds on facebook these days. * Jack is looking at Anne, Anne is looking at George * Jack is married, George is not. * Is a married person looking at an unmarried person? * * yes, no, undetermined. * */ % Type "check(_, _)." at the console to run the program. unmarried(X) :- not(married(X)). unmarried("George"). unmarried("Anne"). married("Jack"). married("Anne"). looking_at("Jack", "Anne"). looking_at("Anne", "George"). check(X, Y):- looking_at(X,Y), married(X), unmarried(Y).