function indistinguishable_state_map($table) { # Assumes that $table is filled according to the table filling # algorithm. $map = array(); $set = new set($this->states); while ($set->count()) { $p = $set->one(); foreach ($set->all() as $q) { if (!$table->differ($p, $q)) { $map[$q] = $p; $set->del($q); } } } return $map; }