The starting point of this article is the question "How to retrieve
fingerprints of rhythm in written texts?". We address this problem in the case
of Brazilian and European Portuguese. These two dialects of Modern Portuguese
share the same lexicon and most of the sentences they produce are superficially
identical. Yet they are conjectured, on linguistic grounds, to implement
different rhythms. We show that this linguistic question can be formulated as a
problem of model selection in the class of variable length Markov chains.
We propose a new nonparametric test for the supposition of independence
between two continuous random variables. The test is based on the size of the
longest increasing subsequence of a random permutation. We identified the
independence assumption between the two continuous variables with the space of
permutation equipped with the uniform distribution and we show the exact
distribution of the statistic. We calculate the distribution for several sample
sizes.