Related papers: Unshuffling a Square is NP-Hard
A square is a concatenation of two identical words, and a word $w$ is said to have a square $yy$ if $w$ can be written as $xyyz$ for some words $x$ and $z$. It is known that the ratio of the number of distinct squares in a word to its…
Described are two algorithms to find long approximate palindromes in a string, for example a DNA sequence. A simple algorithm requires O(n)-space and almost always runs in $O(k.n)$-time where n is the length of the string and k is the…
A square is the concatenation of a nonempty word with itself. A word has period p if its letters at distance p match. The exponent of a nonempty word is the quotient of its length over its smallest period. In this article we give a proof of…
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.…
Motivated by mass-spectrometry protein sequencing, we consider a simply-stated problem of reconstructing a string from the multiset of its substring compositions. We show that all strings of length 7, one less than a prime, or one less than…
We consider words over a binary alphabet. A word $w$ is overlap-free if it does not have factors (blocks of consecutive letters) of the form $uvuvu$ for nonempty $u$. Let $M(w)$ denote the number of positions that are middle positions of…
We consider the problem of deciding, given a sequence of regions, if there is a choice of points, one for each region, such that the induced polyline is simple or weakly simple, meaning that it can touch but not cross itself. Specifically,…
Data format reverse engineering commonly involves identifying conserved format motifs. However, this process typically requires establishing a common ordering for format elements across instances, particularly for formats using…
We address the separability problem for straight-line string constraints. The separability problem for languages of a class C by a class S asks: given two languages A and B in C, does there exist a language I in S separating A and B (i.e.,…
A permutation p is realized by the shift on N symbols if there is an infinite word on an N-letter alphabet whose successive left shifts by one position are lexicographically in the same relative order as p. The set of realized permutations…
We present an algorithm that enumerates and classifies all edge-to-edge gluings of unit squares that correspond to convex polyhedra. We show that the number of such gluings of $n$ squares is polynomial in $n$, and the algorithm runs in time…
The Thorp shuffle is defined as follows. Cut the deck into two equal piles. Drop the first card from the left pile or the right pile according to the outcome of a fair coin flip; then drop from the other pile. Continue this way until both…
We introduce the idea that the P vs NP problem can have a finer structure. Given the NP complete problem of interest, the configurations space of the problem can be divided in (at least) two regions. In one region, polynomial algorithms to…
Let $\mathcal{SS}_k(n)$ be the family of {\it shuffle squares} in $[k]^{2n}$, words that can be partitioned into two disjoint identical subsequences. Let $\mathcal{RSS}_k(n)$ be the family of {\it reverse shuffle squares} in $[k]^{2n}$,…
The scheduling problem consists of finding a common 1 in two remotely located N bit strings. Denote the number of 1s in the string with the fewer 1s by epsilon*N. Classically, it needs at least O(epsilon*N) bits of communication to find the…
In this article, we give a polynomial algorithm to decide whether a given permutation $\sigma$ is sortable with two stacks in series. This is indeed a longstanding open problem which was first introduced by Knuth. He introduced the stack…
In a graph, a matching cut is an edge cut that is a matching. Matching Cut is the problem of deciding whether or not a given graph has a matching cut, which is known to be NP-complete even when restricted to bipartite graphs. It has been…
A curious number is a palindromic number whose base ten representation has the form $a \ldots a b \ldots b a \ldots a$. In this paper, we determine all curious numbers that are perfect squares. Our proof involves reducing the search for…
The fundamental question considered in algorithms on strings is that of indexing, that is, preprocessing a given string for specific queries. By now we have a number of efficient solutions for this problem when the queries ask for an exact…
We propose a new kind of sliding-block puzzle, called Gourds, where the objective is to rearrange 1 x 2 pieces on a hexagonal grid board of 2n + 1 cells with n pieces, using sliding, turning and pivoting moves. This puzzle has a single…