CelloClemens a, Henri 🦆b

Sorting socks can often be a time-consuming task. This paper introduces the fastest method known in the scientific community to tackle this challenging task. Details required to implement the new algorithm and data structure will be introduced and discussed. Abundant application of this novel algorithm may be able to reduce the time required for sorting socks considerably.

Introduction

While sorting algorithms are one of the most discussed algorithms in the computer science community, application of this field to laundry is still quite new. In fact, no research is known to the authors connecting the fields of computer science and laundry sorting. A few definitions are required in order to establish a baseline for the algorithm discussed in the following paper.

Definitions

In this section, a few definitions that are common in the field of theoretical laundry science shall be intro- duced. These are required to understand the algorithm and its advantages.

Sock

Let Λa be the Set of laundry. The set of socks, Σ ⊂ Λa is defined as Σ := {s ∈ Λa|χ(s) = 1}1, where χ(s) is the Euler characteristic of s. For every sock s there is an equal counterpart s−1 giving rise to the identity s ∼= s−1. The task commonly known as “sock sorting” is in fact the search for this isomorphism η and matching every sock s to its inverse s−1.

LetΛ⊆Λa beasetoflaundryitems. Thenalaun- dry basket is a triplet (Λ,+,−) representing a data structure that implements the following functions:

• get() L ∈ Λa, returns a uniformly random laundry item from the basket or L0, the Zero element of laundry, if there are no items left.

• put(L ∈ Λa), deposits the given laundry item into the basket.

Note that both operations run in O(1). Because of the nature of a laundry basket, finding a unique item requires transferring the content of the whole bas- ket to a new basket—thus requiring O(n) operations, with n being the number of items currently inside the basket.

Prior Research

To fully appreciate the gravity of HADES, it has to first be discussed how most recent research tackles the problem of sock sorting. The following code describes the most recently developed sock sorting algorithm from the paper by my colleague2 which is the current industry standard. Notice the method has a runtime complexity of O(n2).

Concepts

The basis for every fast algorithm is a simple yet equally fast data structure. To enable the low run-time achieved by HADES, the introduction of a new data structure—the “laundry rack”—is integral.

Laundry Rack

Let Λ ⊆ Λa be a set of laundry. A laundry rack (See Figure 2) is a triplet (Λ,+,−) representing a data structure that implements the following methods:

Algorithm

Making use of the novel advanced features of a “drying rack” we are able to implement the following algorithm in O(n):

s evident from the algorithm above, only one loop performing operations which are all in O(1) is required—putting the algorithm in a O(n) runtime complexity class. Assuming that ∀L ∈ Λ∃L −1|L ∼= L−1, the algorithm always yields a correct solution for the problem.3

Discussion and Results

To evaluate the algorithm’s performance, it has been executed on different platforms consisting of diverse hardware:

From the above data it is evident that HADES bears a clear advantage in comparison to the conventional algorithm when it comes to sock sorting. Utilising advanced statistical modelling, we calculated a speedup factor of about 3.1415926535897932384626433 · n. The data also illustrates the scalability of the algorithm and its adaptability to different hardware.

Conclusion

It can be concluded that the algorithm presented in this paper is greatly superior to the conventional method of sorting socks. It will probably revolutionise not only the field of laundry science but also have great impact in the industry.

The data structures outlined above may become abundantly used and become the future industry standard. Although the field of laundry science is still rather new, there are still a lot of open questions to be answered. However, it is unlikely that a faster sock sorting algorithm than HADES can be developed.

Acknowledgements

We shall use this historic opportunity to thank the Journal of Immaterial Science for publishing great memes research. We also want to thank our university for giving us this opportunity for depression and self-loathing research and personal advancement. It is also only appropriate to thank the air. Without it, no laundry would be dry and we would not have written this paper.

Notes and References

1. Yes, some socks have holes. So what?!
2. My Colleague et al. “A first approach to sock sorting”. In: Journal of Laundry Science (13 1969).
3. Proof is left as an exercise to the reader.