English
Related papers

Related papers: Two Algorithms to Find Primes in Patterns

200 papers

A prime sieve is an algorithm that finds the primes up to a bound $n$. We say that a prime sieve is incremental, if it can quickly determine if $n+1$ is prime after having found all primes up to $n$. We say a sieve is compact if it uses…

Data Structures and Algorithms · Computer Science 2019-02-20 Jonathan P. Sorenson

In this article, we study the problem of finding the longest common separable pattern between several permutations. We give a polynomial-time algorithm when the number of input permutations is fixed and show that the problem is NP-hard for…

Combinatorics · Mathematics 2007-06-13 Mathilde Bouvel , Dominique Rossin , Stephane Vialette

The class $(r,2)$-CSP, or simply Max 2-CSP, consists of constraint satisfaction problems with at most two $r$-valued variables per clause. For instances with $n$ variables and $m$ binary clauses, we present an $O(n r^{5+19m/100})$-time…

Discrete Mathematics · Computer Science 2008-03-26 Alexander D. Scott , Gregory B. Sorkin

Odd numbers can be indexed by the map k(n)=(n-3)/2, n belonging to 2N+3. We first propose a basic primality test using this index function that was first introduced in article (8). Input size of operations is reduced which improves…

General Mathematics · Mathematics 2021-06-03 Marc Wolf , François Wolf

We investigate algorithms to find the first vertex in large trees generated by either the uniform attachment or preferential attachment model. We require the algorithm to output a set of $K$ vertices, such that, with probability at least…

Probability · Mathematics 2015-12-02 Sébastien Bubeck , Luc Devroye , Gábor Lugosi

Given a sequence of integers, we want to find a longest increasing subsequence of the sequence. It is known that this problem can be solved in $O(n \log n)$ time and space. Our goal in this paper is to reduce the space consumption while…

Data Structures and Algorithms · Computer Science 2017-12-27 Masashi Kiyomi , Hirotaka Ono , Yota Otachi , Pascal Schweitzer , Jun Tarui

Let $\mathbf{f} = (f_1, \ldots, f_R)$ be a system of polynomials with integer coefficients in which the degrees need not all be the same. We provide sufficient conditions for which the system of equations $f_j (x_1, \ldots, x_n) = 0 \ (1…

Number Theory · Mathematics 2017-03-10 Shuntaro Yamagishi

This note investigates the prime values of the polynomial $f(t)=qt^2+a$ for any fixed pair of relatively prime integers $ a\geq 1$ and $ q\geq 1$ of opposite parity. For a large number $x\geq1$, an asymptotic result of the form $\sum_{n\leq…

General Mathematics · Mathematics 2021-04-15 N. A. Carella

We show that if you represent all primes with less than n-digits as points in n-dimensional space, then they can be stored and retrieved conveniently using n-dimensional geometry. Also once you have calculated all the prime numbers less…

Computational Geometry · Computer Science 2015-12-02 K. Eswaran

A new Combined Sieve algorithm is presented with cost proportional to the number of enumerated factors over a series of intervals. This algorithm achieves a significant speedup, over a traditional sieve, when handling many ([10^4, 10^7])…

Number Theory · Mathematics 2020-12-08 Seth Troisi

Let f be a degree D univariate polynomial with real coefficients and exactly m monomial terms. We show that in the special case m=3 we can approximate within eps all the roots of f in the interval [0,R] using just O(log(D)log(Dlog(R/eps)))…

Numerical Analysis · Mathematics 2025-10-20 J. Maurice Rojas , Yinyu Ye

We study permutation (jumbled/Abelian) pattern matching over a general alphabet $\Sigma$. Given a pattern P of length m and a text T of length n, the classical task is to decide whether T contains a length-m substring whose Parikh vector…

Data Structures and Algorithms · Computer Science 2026-01-15 MD Nazmul Alam Shanto , Md. Tanzeem Rahat , Md. Manzurul Hasan

The prime number graph is the set of points $(n,p_n)$ where $p_n$ denotes the $n^{\rm th}$ prime. Let $L(n)$ be the minimum number of straight line segments needed to cover the first $n$ points in this set. Let $B(n)$ be the largest number…

Number Theory · Mathematics 2026-05-25 Carl Pomerance , Patrick Solé

We provide a number of algorithmic results for the following family of problems: For a given binary m\times n matrix A and integer k, decide whether there is a "simple" binary matrix B which differs from A in at most k entries. For an…

Data Structures and Algorithms · Computer Science 2018-03-19 Fedor V. Fomin , Petr A. Golovach , Fahad Panolan

We give a new proof of F\"urer's bound for the cost of multiplying n-bit integers in the bit complexity model. Unlike F\"urer, our method does not require constructing special coefficient rings with "fast" roots of unity. Moreover, we prove…

Computational Complexity · Computer Science 2014-07-15 David Harvey , Joris van der Hoeven , Grégoire Lecerf

Let $n$ and $k$ be positive integers, and $f_n(k)$ (resp. $g_n(k)$) be the number of unital subrings (resp. unital irreducible subrings) of $\mathbb{Z}^n$ of index $k$. The numbers $f_n(k)$ are coefficients of certain zeta functions of…

Number Theory · Mathematics 2022-12-01 Hrishabh Mishra , Anwesh Ray

We show that given the order of a single element selected uniformly at random from $\mathbb Z_N^*$, we can with very high probability, and for any integer $N$, efficiently find the complete factorization of $N$ in polynomial time. This…

Quantum Physics · Physics 2024-06-07 Martin Ekerå

The Permutation Pattern Matching problem, asking whether a pattern permutation $\pi$ is contained in a permutation $\tau$, is known to be NP-complete. In this paper we present two polynomial time algorithms for special cases. The first…

Combinatorics · Mathematics 2023-06-22 Michael H. Albert , Marie-Louise Lackner , Martin Lackner , Vincent Vatter

We present a polynomial-time algorithm that discovers all maximal patterns in a point set, $D\subset\mathbb{R}^k$, that are related by transformations in a user-specified class, $F$, of bijections over $\mathbb{R}^k$. We also present a…

Machine Learning · Computer Science 2022-02-01 David Meredith

In this work, we obtain the following new results. 1. Given a sequence $D=((h_1,s_1), (h_2,s_2) ..., (h_n,s_n))$ of number pairs, where $s_i>0$ for all $i$, and a number $L_h$, we propose an O(n)-time algorithm for finding an index interval…

Data Structures and Algorithms · Computer Science 2008-09-15 Hsiao-Fei Liu , Peng-An Chen , Kun-Mao Chao