Added matrix uniqueness algorithms