Related papers: A path formula for the sock sorting problem
This short note deals with the so-called $ Sock \; Matching \; Problem$. We define $B_{n,k}$ as the number of all the finite sequences $a_1, \ldots, a_{2n}$ of nonnegative integers which contain at least one occurrence of $k$ $(1 \leq k…
If your socks come out of the laundry all mixed up, how should you sort them? We introduce and study a novel foot-sorting algorithm that uses feet to attempt to sort a sock ordering; one can view this algorithm as an analogue of Knuth's…
A sock ordering is a sequence of socks with different colors. A sock ordering is foot-sortable if the sequence of socks can be sorted by a stack so that socks with the same color form a contiguous block. The problem of deciding whether a…
Suppose one desires to randomly sample a pair of objects such as socks, hoping to get a matching pair. Even in the simplest situation for sampling, which is sampling with replacement, the innocent phrase "the distribution of the color of a…
Let $M$ be an ordered matching of size $n$, that is, a partition of the set $[2n]$ into 2-element subsets. The sock number of $M$ is the maximum size of a sub-matching of $M$ in which all left-ends of the edges precede all the right-ends…
A fork stack is a generalised stack which allows pushes and pops of several items at a time. We consider the problem of determining which input streams can be sorted using a single forkstack, or dually, which permutations of a fixed input…
A sock sequence is a sequence of elements, which we will refer to as socks, from a finite alphabet. A sock sequence is sorted if all occurrences of a sock appear consecutively. We define equivalence classes of sock sequences called sock…
We present new theoretical algorithms that sums the n-ary comparators output in order to get the permutation indices in order to sort a sequence. By analysing the parallel ranking algorithm, we found that the special comparators number of…
Defant and Kravitz considered the following problem: Suppose that, to the right of a foot, there is a line of colored socks that needs to be sorted. However, at any point in time, one can only either place the leftmost sock to the right of…
We study the space requirements of a sorting algorithm where only items that at the end will be adjacent are kept together. This is equivalent to the following combinatorial problem: Consider a string of fixed length n that starts as a…
We determine the maximal number of steps required to sort $n$ labeled points on a circle by adjacent swaps. Lower bounds for sorting by all swaps, not necessarily adjacent, are given as well.
Intriguing symmetries are uncovered regarding all magic squares of orders 3, 4, and 5, with 1, 880, and 275,305,224 distinct configurations, respectively. In analogy with the travelling salesman problem, the distributions of the total…
Various forms of sorting problems have been studied over the years. Recently, two kinds of sorting puzzle apps are popularized. In these puzzles, we are given a set of bins filled with colored units, balls or water, and some empty bins.…
The nodes in a network can be grouped into 'roles' based on similar connection patterns. This is usually achieved by defining a pairwise node similarity matrix and then clustering rows and columns of this matrix. This paper presents a new…
In sorting situations where the final destination of each item is known, it is natural to repeatedly choose items and place them where they belong, allowing the intervening items to shift by one to make room. (In fact, a special case of…
Let us call a sequence of numbers heapable if they can be sequentially inserted to form a binary tree with the heap property, where each insertion subsequent to the first occurs at a leaf of the tree, i.e. below a previously placed number.…
We characterise and enumerate permutations that are sortable by n-4 passes through a stack. We conjecture the number of permutations sortable by n-5 passes, and also the form of a formula for the general case n-k, which involves a…
We consider a logical puzzle which we call double pouring problem, which was original defined for $k=3$ vessels. We generalize this definition to $k \ge 2 $ as follows. Each of the $k$ vessels contains an integer amount of water, called its…
We study sorting machines consisting of a stack and a pop stack in series, with or without a queue between them. While there are, a priori, four such machines, only two are essentially different: a pop stack followed directly by a stack,…
This letter presents the solution to a counting problem, to the best of our knowledge not known in full generality, which can be mapped to both (i) ways to lace a $N$-holes-per-side shoe with $\ell$ shoestrings and (ii) a sum over the…