Condensation Algorithm Implementation