Starting from:

$24.99

Program 2-A function called JHusbands

Implement the following program in standard Racket or Python.
1. A function called JHusbands that solves a generic version of the Jealous Husbands
problem. It takes as input (1) the number of husbands and wives,1 and (2) the capacity of
the boat. The order of parameters should be (a) number of husbands and wives and b)
capacity of the boat. Note that some parameters pose problems impossible to solve and
your program must have some way of detecting this fact.
If a search is successful, the program should output a solution. If a search fails, it should
output the sequence of explored states before the program judged the problem
impossible. In this case, it should also output a brief statement indicating the judgment
your program made to determine that no solution exists. There are no specific formatting
requirements for this output other than that it be easily interpretable on casual
inspections.

More products