Related papers: Olry Terquem's forgotten problem
We consider the problem of sorting $n$ items, given the outcomes of $m$ pre-existing comparisons. We present a simple and natural deterministic algorithm that runs in $O(m + \log T)$ time and does $O(\log T)$ comparisons, where $T$ is the…
The {\em longest common subsequence (LCS)} problem is a classic and well-studied problem in computer science. Palindrome is a word which reads the same forward as it does backward. The {\em longest common palindromic subsequence (LCPS)}…
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.…
The Collatz sequence for a given natural number $N$ is generated by repeatedly applying the map $N$ $\rightarrow$ $3N+1$ if $N$ is odd and $N$ $\rightarrow$ $N/2$ if $N$ is even. One elusive open problem in Mathematics is whether all such…
We study the enumeration of answers to ontology-mediated queries (OMQs) where the ontology is a set of guarded TGDs or formulated in the description logic ELI and the query is a conjunctive query (CQ). In addition to the traditional notion…
We create a simple test for distinguishing between sets of primes and random numbers using just the sum-of-digits function. We find that the sum-of-the-digits of prime numbers does not have an equal probability of being odd or even. The…
We consider the problem of indexing a string $t$ of length $n$ to report the occurrences of a query pattern $p$ containing $m$ characters and $j$ wildcards. Let $occ$ be the number of occurrences of $p$ in $t$, and $\sigma$ the size of the…
We consider a generalisation of the classical Lehmer problem about the parity distribution of an integer and its modular inverse. We use some known estimates of exponential sums to study a more general question of simultaneous distribution…
The problem of the fluctuation of the Longest Common Subsequence (LCS) of two i.i.d. sequences of length $n>0$ has been open for decades. There exist contradicting conjectures on the topic. Chvatal and Sankoff conjectured in 1975 that…
Normally a chess problem must have a unique solution, and is deemed unsound even if there are alternatives that differ only in the order in which the same moves are played. In an enumerative chess problem, the set of moves in the solution…
We present a certain generalization of a recent result of M. I. Cirnu on linear recurrence relations with coefficient in progressions [2]. We provide some interesting examples related to some well-known integer sequences, such as Fibonacci…
We present a new approach to the problem of enumerating permutations of length n that avoid a fixed consecutive pattern of length m. We use this idea to give explicit upper and lower bounds on the number of permutations avoiding a pattern…
The classic string indexing problem is to preprocess a string S into a compact data structure that supports efficient pattern matching queries. Typical queries include existential queries (decide if the pattern occurs in S), reporting…
Erd\H{o}s asked for positive integers $m<n$, such that $m$ and $n$ have the same set of prime factors, $m+1$ and $n+1$ have the same set of prime factors, and $m+2$ and $n+2$ have the same set of prime factors. No such integers are known.…
The element distinctness problem is the problem of determining whether the elements of a list are distinct, that is, if $x=(x_1,...,x_N)$ is a list with $N$ elements, we ask whether the elements of $x$ are distinct or not. The solution in a…
In this paper, we revisit the much studied LCS problem for two given sequences. Based on the algorithm of Iliopoulos and Rahman for solving the LCS problem, we have suggested 3 new improved algorithms. We first reformulate the problem in a…
Prime numbers are one of the most intriguing figures in mathematics. Despite centuries of research, many questions remain still unsolved. In recent years, computer simulations are playing a fundamental role in the study of an immense…
Based on Euclid's algorithm, we find a kind of special sequences which play an interesting role in the study of primes. We call them W Sequences. They not only ties up the distribution of primes in short interval but also enables us to give…
The Binary Jumbled String Matching problem is defined as: Given a string $s$ over $\{a,b\}$ of length $n$ and a query $(x,y)$, with $x,y$ non-negative integers, decide whether $s$ has a substring $t$ with exactly $x$ $a$'s and $y$ $b$'s.…
The order preserving pattern matching (OPPM) problem is, given a pattern string $p$ and a text string $t$, find all substrings of $t$ which have the same relative orders as $p$. In this paper, we consider two variants of the OPPM problem…