           (<= 2 (get count x))))))
 
 (defn- minimum-covers [base-set sets]
-  (let [sets    (sort #(>= (count %1) (count %2)) sets),
-        result  (atom []),
+  (let [result  (atom []),
         search  (fn search [rest-base-set current-cover cover-count sets]
                   (cond
                    (redundant? base-set current-cover cover-count)

                                 (for [N M
                                       :when (subset? A N),
                                       m (gens A),
                                       n (gens N),
                                       :when (not= m n)]
                                   (make-implication #{m} #{n}))),
              M-down-A     (set-of V | V M :when (proper-subset? V A)),
              candidates   (set-of U | U (disj M A),
                                       :when (not (exists [V M-down-A]
                                                    (subset? (intersection U A) V)))),
              candidates   (difference candidates
                                       (set-of (intersection X Y) | X candidates, Y candidates
                                                                    :when (and (not (subset? X Y))


                   :else
                   (when (covers? sets rest-base-set)
                     (let [counts (map-by-fn #(count (intersection rest-base-set %))
                                             sets),
                           sets   (sort #(>= (counts %1) (counts %2))
                                        sets)],
                       (search (difference rest-base-set (first sets))
                               (conj current-cover (first sets))
                               (reduce! (fn [map x]
                                          (if (contains? base-set x)
                                            (assoc! map x (inc (get map x)))
                                            map))
                                        cover-count
                                        (first sets))
                               (rest sets))
                       (search rest-base-set
                               current-cover
                               cover-count
                               (rest sets))))))]
    (search base-set
            #{}
            (map-by-fn (constantly 0) base-set)
