I'm learning prolog in a course. I've been given a question similar to this one, and I also got the same problem (in which it doesnt produce all solutions),
any idea why, will using cuts help? thanks in advance
EDIT: The exercise I've been given is to generate all possible max independent sets from a binary tree. In the second part of the question, I get an integer binary tree, from which i need to get all the mis's, and from those i need to get the one with the maximum on adding its numbers. i.e. if i have a mis with 1,3,9 and a mis with 1,3,4 - i'll return the one with 1,3,9.