public boolean simplify(Constraint other) {
	if (nvariables<other.nvariables)
	    // Are we a subset of other?  Let other figure it out.
	    return other.simplify(this);

	// Is other a subset of us?
	for (int i=0; i<other.nvariables; ++i)
	    for (int j=0; j<nvariables; ++j)
		if (variables[j].equals(other.variables[i]))
		    break;
		else if (j>=nvariables-1)
		    return false;

	// remove other's variables from this
	for (int i=0; i<other.nvariables; ++i)
	    for (int j=0; j<nvariables; ++j)
		if (variables[j].equals(other.variables[i])) {
		    variables[j]=variables[--nvariables];
		    break;
		}
	constant -= other.constant;
	return true;
    }