As mentioned in a recent post, I own a dresser, which has been stocked with clothing* approximately twice in the last 3.5 years. (Eek, Boston, has it really been that long?) I don’t know who came up with dressers, but they probably didn’t have a day job. “So wait, I’m supposed to take all the clothes, sort them, fold them up, put them into the dresser arranged into rows, close the drawer, open the drawer, unrow, unsort, and unfold just to put them back on again?” As I mentioned, the dresser seems to me like a pessimal clothing management system. In my extended bachelory singleness my clothing management strategy underwent gradual stages of simplification, to the Closet/Floor system, the Basket/Floor system, and ultimately the almost-pinnacle-of-perfection, the Clean Pile / Dirty Pile system.
This system operates on the principle of minimum change in entropy, or delta-S, resulting from the removal of mutually inverse intermediate states. Operations that require energy to transition the articles of clothing from a high-entropy state to a lower entropy state knowing that they will soon be returned to the exact same high-entropy state by an inverse operation are reduced out, with the realization that the energy expended to produce the low-entropy state is not recovered in the act of returning to the high entropy state**. Upon shedding clothing flagged as ‘dirty’ due to being worn a full day, said clothing is flung onto a designated Dirty Pile at a known location on the floor. Since the clothing will be loaded into the washer in this state, there’s no reason it should transition to any intermediate state before this time. After being run through the washer and dryer cycle, the clothing emerges in a substantially similar pile form, although now flagged ‘clean’ due to the wash cycle. The pile is transferred in its native, unmodified form to a Clean Pile in a separate known location on the floor. Again, since the next state of interest is “on the body”, superfluous intermediate states (i.e. “in the dresser”) are omitted.
Application of this system results in substantial savings over the Dresser system. Over time, however, several inefficiencies in this new system have become evident. To better explain these inefficiencies, a brief recap of the generalized solution is in order. The complete laundry cycle consists of three required tasks in a specified sequence: Wash, Dry, Wear. The Wash cycle adds complexity since the mixing of certain articles of clothing is discouraged (e.g. whites vs. colors) and a complete Dirty Pile rotation may require multiple non-parallelizable cycle permutations ((machine sturdy | machine delicate | hand) wash (warm | cold) (separately | with like colors)), dictated mainly by the number of clothing articles bought for you by other people, who don’t have to wash them and therefore need not pay attention to cycle compatibility with your existing articles ;-) . The Wear cycle has special requirements too. To complete successfully, this cycle requires nominally at least 5 elements to be simultaneously present (nominally 2x socks, 1x underpants, 1x pants and 1x shirt). Therefore, the total Wear task overhead is dominated by the time required to locate all (ahem, clean) of the required articles.
The noted inefficiencies of the basic Clean Pile / Dirty Pile system can thus be summarized as follows:
- Application of heterogeneous clothing (light, dark) to a common Dirty Pile necessitates an additional sorting step before the pile contents can be applied to the washer
- As the number of articles of a given type (as a percentage of the total Clean Pile) decreases, the time required to fetch the next article of that type from the pile increases according to O(N/n), where n is the number of remaining articles of the required type and N is the total number of articles in the pile.
- A priori knowledge of the number of remaining articles of a given type (socks, pants, etc.) is not available. Since the search for an article terminates as soon as one of the article has been found (regardless of the percentage of the pile actually searched), the situation where n approaches zero can be reached without warning.
A few simple modifications to the system provide substantial improvement: Since the clothes destined for the dirty pile are already semi-sorted (white socks on feet, probably colored everything else except maybe shirt), and they have to be taken off and thrown in some direction anyway, expand the Dirty Pile to three separate piles: White, Colored and Weird. (The Weird pile encompasses the typical minority of hand wash, dryclean, flat dry and similar special-needs garments. It’s estimated that at typical acquisition volumes of Weird clothing by bachelors [i.e. gifts], this pile will take up to a month to fill and require rotation, producing a further optimization by reducing the total number of Weird cycles versus a unified 1-week pile containing one or more Weird articles.) The aim is to reduce the run-time of the sorting task by exploiting naturally-occurring states of partial sortedness in the clothing’s usage cycle, preserving such sortedness as it occurs and preventing the clothing from unnecessarily transitioning to a less-sorted state upon application to the Dirty Pile. Likewise, since the white and color piles are already homogeneous upon completion of a (wash/dry) laundry cycle, there’s no sense lumping them into a single Clean Pile and losing that hard-earned sortedness, so we create two Clean Piles, one for whites and one for colors. This subdivision of piles has most likely reduced the maximum size of a single pile to the level where it can be accommodated by an average bin or laundry basket, so we may now speak of clean/dirty “buckets” instead of piles. This prevents nearby amorphous piles from merging during an extended search as mentioned above, and most importantly, reduces the runtime of all O(n/N) cases by constraining N. The total number of pre-sorted piles/buckets may be dictated by the available space, but any nPiles>1 will yield improvement over the prior system. Finally, a small “reserve” pile, containing one pair of socks, one pair of pants, one pair of boxers, and one shirt, is defined. This pile is small enough to be kept in any convenient location, e.g. under the bed. Upon removal of a white or colored pile from the dryer, the contents of the Reserve pile are polled, and for each component not present, the first of that item dequeued from the dryer is added to the reserve. This is a very efficient process which avoids non-termination of the O(n/N) case where (n/N) is infinity.
* Clothing, n.: Something to satisfy my legal obligation to not be naked in pubic. :-(
** yeah, and parental units never took my argument for not making the bed because it will be unmade within 24 hours as a “clever optimization” rather than “willful act of defiance”, either.