SearcharxivSearch

arXiv subjects

Pablo Rotondo

Publications and source records attributed to Pablo Rotondo.

6 recordsLinked to original sources

Efficient Uniform Sampling of Surjections via their Profiles

In this article, we develop efficient sampling algorithms for random surjections from $[n]$ to $[k]$ for all $n \geq k$. We make no assumption about $n$ and $k$. In particular, we do not make the common assumption that the ratio $\frac{n}{k}$ is constant. All our guarantees are uniform in $n$ and $k$. Our first insight is that all the complexity in sampling random surjections is captured by sampling a smaller structure which we call the \emph{profile} of the surjection. More precisely, the profile associates to each occurring preimage size $s$ the number of preimages of size $s$. Using standard techniques, we show that the problem of sampling surjections reduces to sampling the profile with the induced distribution. This is partly explained by the fact that profiles are always sublinear, with at most $\sqrt{2n}$ entries in the worst case. We provide a complete set of algorithms to directly sample the \emph{profile} of a random surjection with the induced distribution, covering the full parameter space. These algorithms are shown to be optimal up to logarithmic factors in the expected size of the output. Our algorithms are based on exact-size Boltzmann samplers, which are standard rejection-based samplers. We partition the parameter space into three main regions. In each region, we optimize both the rejection rate and the cost of each sampling round. Profiles capture a number of relevant statistics of random surjections and might be of independent interest. In a related context, profiles have been recently studied by Devroye et al. for random mappings. As a spin-off result, we answer an open question from Devroye and Los '25 by providing an optimal algorithm also for the profiles of a random mapping when $k > n/\log n$. The results of this article are not only of theoretical interest but lead to samplers implementable in practice.

cs.DS

Shannon Weights for binary dynamical recurrent sources of zero entropy

A probabilistic source is defined as the set of infinite words (over a given denumerable alphabet) endowed with a probability $\mu$. The paper deals with general binary sources where the distribution of any symbol (0 or 1) may depend on an unbounded part of the previous history. The paper studies Shannon weights: whereas the classical Shannon entropy ${\cal E}_{\mu}$ is the average amount of information brought by one symbol of the emitted word, the Shannon weight sequence deals with the average amount of information $m_{\mu}(n)$ that is brought by the emitted prefix of length $n$. For a source with a non zero entropy, the estimate $m_{\mu}(n)\sim{\cal E}_{\mu} \cdot n$ thus holds. The paper considers the model of dynamical sources, where a source word isemitted as an encoded trajectory of a dynamical system of the unit interval, when endowed with probability $\mu$. It focus on sources with zero entropy and gives explicit constructions for sources whose Shannon weight sequence satisfies $m_{\mu}(n)=o(n)$, with a prescribed behaviour. In this case, sources with zero entropy lead to dynamical systems built on maps with an indifferent fixed point. This class notably contains the celebrated Farey source, which presents well-known intermittency phenomena. Methods are based on analytic combinatorics and generating functions, and they are enlarged, in the present dynamical case, with dynamical systems tools (mainly transfer operators).

math.DS

Mathematical Models to Analyze Lua Hybrid Tables and Why They Need a Fix

Lua (Ierusalimschy et al., 1996) is a well-known scripting language, popular among many programmers, most notably in the gaming industry. Remarkably, the only data-structuring mechanism in Lua are associative arrays, called tables. With Lua 5.0, the reference implementation of Lua introduced hybrid tables to implement tables using both a hashmap and a dynamically growing array combined together: the values associated with integer keys are stored in the array part, when suitable, everything else is stored in the hashmap. All this is transparent to the user, who gets a unique simple interface to handle tables. In this paper we carry out a theoretical analysis of the performance of Lua's tables, by considering various worst-case and probabilistic scenarios. In particular, we uncover some problematic situations for the simple probabilistic model where we add a new key with some fixed probability $p>\frac12$ and delete a key with probability $1-p$: the cost of performing T such operations is proved to be $\Omega(T\log T)$ with high probability, where linear complexity is expected instead.

cs.DM

Lochs-type theorems beyond positive entropy

Lochs' theorem and its generalizations are conversion theorems that relate the number of digits determined in one expansion of a real number as a function of the number of digits given in some other expansion. In its original version, Lochs' theorem related decimal expansions with continued fraction expansions. Such conversion results can also be stated for sequences of interval partitions under suitable assumptions, with results holding almost everywhere, or in measure, involving the entropy. This is the viewpoint we develop here. In order to deal with sequences of partitions beyond positive entropy, this paper introduces the notion of log-balanced sequences of partitions, together with their weight functions. These are sequences of interval partitions such that the logarithms of the measures of their intervals at each depth are roughly the same. We then state Lochs-type theorems which work even in the case of zero entropy, in particular for several important log-balanced sequences of partitions of a number-theoretic nature.

math.NT

Analysis of the Continued Logarithm Algorithm

The Continued Logarithm Algorithm - CL for short- introduced by Gosper in 1978 computes the gcd of two integers; it seems very efficient, as it only performs shifts and subtractions. Shallit has studied its worst-case complexity in 2016 and showed it to be linear. We here perform the average-case analysis of the algorithm: we study its main parameters (number of iterations, total number of shifts) and obtain precise asymptotics for their mean values. Our 'dynamical' analysis involves the dynamical system underlying the algorithm, that produces continued fraction expansions whose quotients are powers of 2. Even though this CL system has already been studied by Chan (around 2005), the presence of powers of 2 in the quotients ingrains into the central parameters a dyadic flavour that cannot be grasped solely by studying the CL system. We thus introduce a dyadic component and deal with a two-component system. With this new mixed system at hand, we then provide a complete average-case analysis of the CL algorithm, with explicit constants.

cs.DM

The recurrence function of a random Sturmian word

This paper describes the probabilistic behaviour of a random Sturmian word. It performs the probabilistic analysis of the recurrence function which can be viewed as a waiting time to discover all the factors of length $n$ of the Sturmian word. This parameter is central to combinatorics of words. Having fixed a possible length $n$ for the factors, we let $\alpha$ to be drawn uniformly from the unit interval $[0,1]$, thus defining a random Sturmian word of slope $\alpha$. Thus the waiting time for these factors becomes a random variable, for which we study the limit distribution and the limit density.

cs.DM