Professional Documents
Culture Documents
Experimental Algorithms 14th International Symposium SEA 2015 Paris France June 29 July 1 2015 Proceedings 1st Edition Evripidis Bampis (Eds.)
Experimental Algorithms 14th International Symposium SEA 2015 Paris France June 29 July 1 2015 Proceedings 1st Edition Evripidis Bampis (Eds.)
Experimental Algorithms 14th International Symposium SEA 2015 Paris France June 29 July 1 2015 Proceedings 1st Edition Evripidis Bampis (Eds.)
https://textbookfull.com/product/experimental-algorithms-13th-
international-symposium-sea-2014-copenhagen-denmark-
june-29-july-1-2014-proceedings-1st-edition-joachim-gudmundsson/
https://textbookfull.com/product/ad-hoc-mobile-and-wireless-
networks-14th-international-conference-adhoc-now-2015-athens-
greece-june-29-july-1-2015-proceedings-1st-edition-symeon-
papavassiliou/
https://textbookfull.com/product/mathematics-of-program-
construction-12th-international-conference-mpc-2015-konigswinter-
germany-june-29-july-1-2015-proceedings-1st-edition-ralf-hinze/
https://textbookfull.com/product/algorithms-and-complexity-9th-
international-conference-ciac-2015-paris-france-
may-20-22-2015-proceedings-1st-edition-vangelis-th-paschos/
End User Development 5th International Symposium IS EUD
2015 Madrid Spain May 26 29 2015 Proceedings 1st
Edition Paloma Díaz
https://textbookfull.com/product/end-user-development-5th-
international-symposium-is-eud-2015-madrid-spain-
may-26-29-2015-proceedings-1st-edition-paloma-diaz/
https://textbookfull.com/product/web-and-wireless-geographical-
information-systems-14th-international-
symposium-w2gis-2015-grenoble-france-
may-21-22-2015-proceedings-1st-edition-jerome-gensel/
https://textbookfull.com/product/experimental-algorithms-15th-
international-symposium-sea-2016-st-petersburg-russia-
june-5-8-2016-proceedings-1st-edition-andrew-v-goldberg/
Experimental
Algorithms
14th International Symposium, SEA 2015
Paris, France, June 29 – July 1, 2015
Proceedings
123
Lecture Notes in Computer Science 9125
Commenced Publication in 1973
Founding and Former Series Editors:
Gerhard Goos, Juris Hartmanis, and Jan van Leeuwen
Editorial Board
David Hutchison
Lancaster University, Lancaster, UK
Takeo Kanade
Carnegie Mellon University, Pittsburgh, PA, USA
Josef Kittler
University of Surrey, Guildford, UK
Jon M. Kleinberg
Cornell University, Ithaca, NY, USA
Friedemann Mattern
ETH Zurich, Zürich, Switzerland
John C. Mitchell
Stanford University, Stanford, CA, USA
Moni Naor
Weizmann Institute of Science, Rehovot, Israel
C. Pandu Rangan
Indian Institute of Technology, Madras, India
Bernhard Steffen
TU Dortmund University, Dortmund, Germany
Demetri Terzopoulos
University of California, Los Angeles, CA, USA
Doug Tygar
University of California, Berkeley, CA, USA
Gerhard Weikum
Max Planck Institute for Informatics, Saarbrücken, Germany
More information about this series at http://www.springer.com/series/7407
Evripidis Bampis (Ed.)
Experimental
Algorithms
14th International Symposium, SEA 2015
Paris, France, June 29 – July 1, 2015
Proceedings
123
Editor
Evripidis Bampis
Université Pierre et Marie Curie LIP6
Paris
France
This volume contains the papers presented at the 14th International Symposium on
Experimental Algorithms (SEA 2015) held during June 29–July 1, 2015, in Paris. SEA
is an international forum for researchers in the area of design, analysis, and experi-
mental evaluation and engineering of algorithms, as well as in different aspects of
computational optimization and its applications. The preceding symposia were held in
Riga, Monte Verita, Rio de Janeiro, Santorini, Menorca, Rome, Cape Cod, Dortmund,
Ischia, Crete, Bordeaux, Rome, and Copenhagen.
In response to the call for papers, we received 76 submissions. Each submission was
reviewed by at least three reviewers. The submissions were mainly judged on origi-
nality, technical quality, and relevance to the topics of the conference. On the basis
of the reviews and on extensive electronic discussions, the Program Committee (PC)
decided to accept 30 papers. In addition to the accepted contributions, the program also
included three distinguished lectures by Alessandra Carbone (UPMC), Erik Demaine
(MIT), and Kurt Mehlhorn (MPI).
We would like to thank all the authors who responded to the call for papers, the
invited speakers, the members of the PC, the external reviewers and the members of the
Organizing Committee. We also would like to thank the developers and maintainers
of the EasyChair conference system, which was used to manage the electronic sub-
missions, the review process, and the electronic PC meeting. We also acknowledge
Springer for publishing the proceedings of SEA 2015 in their LNCS series.
Program Committee
Eric Angel Université d’Evry Val d’Essonne, France
Evripidis Bampis (Chair) Sorbonne Universités, UPMC, France
Vincenzo Bonifaci IASI CNR, Università di Roma “La Sapienza”, Italy
David Coudert INRIA Sophia Antipolis, France
Christoph Dürr CNRS, Sorbonne Universités, UPMC, France
Thomas Erlebach University of Leicester, UK
Loukas Georgiadis University of Ioannina, Greece
Leo Liberti Ecole Polytechnique, France
Giorgio Lucarelli University of Grenoble-Alpes, France
Alberto Marchetti-Spaccamela Università di Roma “La Sapienza”, Italy
Sotiris Nikoletseas University of Patras, Greece
Aris Pagourtzis National Technical University of Athens, Greece
Marina Papatriantafilou Chalmers University of Technology and
GöteborgUniversity, Sweden
Vijaya Ramachandran The University of Texas at Austin, USA
Nicolas Schabanel CNRS, Université Paris Diderot, France
Maria Serna Universitat Politecnica de Catalunya, Spain
Frits Spieksma KU Leuven, Belgium
Clifford Stein Columbia University, USA
Dorothea Wagner Karlsruhe Institute of Technology (KIT), Germany
Renato Werneck Amazon, USA
Christos Zaroliagis University of Patras, Greece
Norbert Zeh Dalhousie University in Halifax, Canada
Organizing Committee
Evripidis Bampis
Christoph Dürr
Giorgio Lucarelli
Subreviewers
Aris Anagnostopoulos Bapi Chaterjee
Alexandros Angelopoulos Riccardo De Masellis
Joaquim Assunção François Delbot
Moritz Baum Josep Diaz
Raphaël Bleuse Julian Dibbelt
VIII Organization
Data Structures
Graph Problems I
Combinatorial Optimization I
Combinatorial Optimization II
Other Applications I
Transportation Networks
Other Applications II
Graph Problems II
1 Introduction
Trees are ubiquitous in Computer Science. They have applications in every aspect
of computing from XML/HTML processing to abstract syntax trees (AST) in
compilers, phylogenetic trees in computational genomics or shortest path trees
in path planning. The ever increasing amounts of structured, hierarchical data
processed in many applications have turned the processing of the correspond-
ing large tree structures into a bottleneck, particularly when they do not fit in
memory. Succinct tree representations store trees using as few bits as possible
and thereby significantly increase the size of trees that fit in memory while still
supporting important primitive operations in constant time. There exist such
representations that use only 2n + o(n) bits to store the topology of a tree with
n nodes, which is close to the information-theoretic lower bound and much less
than the space used by traditional pointer-based representations.
Alas, the construction of succinct trees is quite slow compared to the construc-
tion of pointer-based representations. Multicore parallelism offers one possible
tool to speed up the construction of succinct trees, but little work has been done
in this direction so far. The only results we are aware of focus on the construc-
tion of wavelet trees, which are used in representations of text indexes. In [10],
This work was supported by the Emerging Leaders in the Americas scholarship
programme, NSERC, and the Canada Research Chairs programme.
c Springer International Publishing Switzerland 2015
E. Bampis (Ed.): SEA 2015, LNCS 9125, pp. 3–14, 2015.
DOI: 10.1007/978-3-319-20086-6 1
4 L. Ferres et al.
two practical multicore algorithms for wavelet tree construction were introduced.
Both algorithms perform O(n lg σ)1 work and have span O(n), where n is the
input size and σ is the alphabet size. In [21], Shun introduced three new algo-
rithms to construct wavelet trees in parallel. Among these three algorithms, the
best algorithm in practice performs O(n lg σ) work and has span O(lg n lg σ).
Shun also explained how to parallelize the construction of rank/select structures
so that it requires O(n) work and O(1) span for rank structures, and O(n) work
and O(lg n) span for select structures.
In this paper, we provide a parallel algorithm that constructs the RMMT tree
representation of [19] in O(n/p + lg p) time using p cores. This structure uses
2n + o(n) bits to store an ordinal tree on n nodes and supports a rich set of basic
operations on these trees in O(lg n) time. While this query time is theoretically
suboptimal, the RMMT structure is simple enough to be practical and has been
verified experimentally to be very small and support fast queries in practice [1].
Combined with the fast parallel construction algorithm presented in this paper, it
provides an excellent tool for manipulating very large trees in many applications.
We implemented and tested our algorithm on a number of real-world input
trees having billions of nodes. Our experiments show that our algorithm run on
a single core is competitive with state-of-the-art sequential constructions of the
RMMT structure and achieves good speed-up on up to 64 cores and likely beyond.
2 Preliminaries
Succinct Trees. Jacobson [15] was the first to propose the design of succinct
data structures. He showed how to represent an ordinal tree on n nodes using
2n + o(n) bits so that computing the first child, next sibling or parent of any
node takes O(lg n) time in the bit probe model. Clark and Munro [5] showed
how to support the same operations in constant time in the word RAM model
with word size Θ(lg n). Since then, much work has been done on succinct tree
representations, to support more operations, to achieve compression, to provide
support for updates, and so on [2,9,11,13,16–19]. See [20] for a thorough survey.
Navarro and Sadakane [19] recently proposed a succinct tree representa-
tion, referred to as NS-representation throughout this paper, which was the
first to achieve a redundancy of O(n/ lgc n) bits for any positive constant c.
The redundancy of a data structure is the additional space it uses above
the information-theoretic lower bound. While all previous tree representations
achieved a redundancy of o(n) bits, their redundancy was Ω(n lg lg n/ lg n) bits,
that is, just slightly sub-linear. The NS-representation also supports a large num-
ber of navigational operations in constant time (see Table 1 in [19]); only the
work in [9,13] supports two additional operations. An experimental study of
succinct trees [1] showed that a simplified version of the NS-representation uses
less space than other existing representations in most cases and performs most
operations faster. In this paper, we provide a parallel algorithm for constructing
this representation.
1
We use lg x to mean log2 x throughout this paper.
Parallel Construction of Succinct Trees 5
π : 1 → 1 φ : 1 → 1 ψ : 1 → 0
0 → −1 0 → 0 0 → 1
RMMT, which supports primitive operations inside the chunk in constant time
if the chunk is small enough. Additional data structures are used to support
operations on the entire sequence P in constant time.
Next we briefly review the RMMT structure and how it supports the primi-
tive operations for g = π. Navarro and Sadakane [19] discussed how to make
it support these operations also for φ and ψ while increasing its size by only
O(n/ lgc n). To define the version of the RMMT we implemented, we partition P
into chunks of size s = w lg n, where w is the machine word size. For simplicity,
we assume that the length of P is a multiple of s. The RMMT is a complete binary
tree over the sequence of chunks (see Figure 1). (If the number of chunks is not a
power of 2, we pad the sequence with chunks of zeroes to reach the closest power
of 2. These chunks are not stored explicitly.) Each node u of the RMMT represents
a subsequence Pu of P that is the concatenation of the chunks corresponding to
the descendant leaves of u. Since the RMMT is a complete tree, we need not store
its structure explicitly. Instead, we index its nodes as in a binary heap and refer
to each node by its index. The representation of the RMMT consists of four arrays
e , m , M , and n , each of length equal to the number of nodes in the RMMT. The
uth entry of each of these arrays stores some crucial information i about Pu : Let
the excess at position i of P be defined as sum(P, π, 0, i) = k=0 π(P [k]). e [u]
stores the excess at the last position in Pu . m [u] and M [u] store the minimum
and maximum excess, respectively, at any position in Pu . n [u] stores the number
of positions in Pu that have the minimum excess value m [u].
Combined with a standard technique called table lookup, an RMMT supports
the primitive operations for π in O(lg n) time. Consider fwd search(P, π, i, d)
for example. We first check the chunk containing P [i] to see if the answer is
inside this chunk. This takes O(lg n) time by dividing the chunk into portions
of length w/2 and testing for each portion in turn whether it contains the
answer. Using a lookup table whose content does not depend on P , the test
for each portion of length w/2 takes constant time: For each possible bit vector
of length w/2 and each of the w/2 positions in it, the table stores the answer of
fwd search(P, π, i, d) if it can be found inside this bit vector, or −1 otherwise.
As there are 2w/2 bit vectors of length w/2, this table uses 2w/2 poly(w) bits. If
we find the answer inside the chunk containing P [i], we report it. Otherwise, let
u be the leaf corresponding to this chunk. If u has a right sibling, we inspect the
sibling’s m and M values to determine whether it contains the answer. If so,
Parallel Construction of Succinct Trees 7
we let v be this right sibling. Otherwise, we move up the tree from u until we
find a right sibling v of an ancestor of u whose corresponding subsequence Pv
contains the query answer. Then we use a similar procedure to descend down the
tree starting from v to look for the leaf descendant of v containing the answer
and spend another O(lg n) time to determine the position of the answer inside
its chunk. Since we spend O(lg n) time for each of the two leaves we inspect and
the tests for any other node in the tree take constant time, the cost is O(lg n).
Supporting operations on the leaves, such as finding the ith leaf from the left,
reduces to rank and select operations over a bit vector P1 [1..2n] where P1 [i] = 1
iff P [i] = 1 and P [i + 1] = 0. rank and select operations over P1 in turn reduce
to sum and fwd search operations over P1 and can thus be supported by an
RMMT for P1 . P1 does not need to be stored explicitly because any consecutive
O(w) bits of P1 can be computed from the corresponding bits of P using table
lookup.
To analyze the space usage, observe that storing P requires 2n bits, while the
space needed to store the vectors e , m , M , and n is 2(n/s) lg n = 2n/w. The
space needed to store the same vectors for the RMMT of P1 is the same. Since we can
assume that w = Ω(lg n), the total size of the RMMT is thus 2n + O(n/ lg n) bits.
use a parallel prefix sum algorithm [14] in line 22 to compute the global excess
values at the ends of all superchunks and store these values in the corresponding
entries of e . The remaining local excess values in e , m , and M can now be
converted into global excess values by increasing each by the global excess at the
end of the preceding superchunk. Lines 23–28 do exactly this.
10 L. Ferres et al.
the universal lookup tables occupy only o(n) bits. Adopting the same strategy,
we can simplify our analysis and obtain Tp = O(n/p + lg p). Thus, we have the
following theorem:
Theorem 1. A (2n + o(n))-bit representation of an ordinal tree on n nodes and
its balanced parenthesis sequence can be computed in O(n/p + lg p) time using
O(n lg n) bits of working space, where p is the number of cores. This representa-
tion can support the operations in Table 1 of [19] in O(lg n) time.
4 Experimental Results
3
The code and data needed to replicate our results are available at http://www.inf.
udec.cl/∼josefuentes/sea2015.
4
http://pizzachili.dcc.uchile.cl
5
http://dumps.wikimedia.org/enwiki/20150112/enwiki-20150112-pages-articles.xml.
bz2 (January 12, 2015)
6
http://wiki.openstreetmap.org/wiki/Planet.osm (January 10, 2015)
12 L. Ferres et al.
Speedup
20
1 2.89 4.22 7.21 12.16 30.60
2 1.44 2.13 3.64 6.15 15.43 15
4 .73 1.10 1.87 3.18 7.98 10
8 .37 .57 .98 1.59 4.14
5
16 .25 .35 .58 .86 2.21
32 .18 .25 .39 .63 1.33 0
1 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64
64 .27 .29 .39 .48 1.01
# of cores
Fig. 2. Speed-up on ctree and osm data
sets
Running Time and Speed-Up. Table 1 shows the wall clock times achieved by
psta, libcds, and sdsl on different inputs. Each time is the minimum achieved
over three non-consecutive runs, reflecting our assumption that slightly increased
running times are the result of “noise” from external processes such as operating
system and networking tasks. Figure 2 shows the speed-up for the ctree and osm
inputs compared to the running times of psta on a single core and of sdsl.
The psta algorithm on a single core and sdsl outperformed libcds by an
order of magnitude. One of the reasons for this is that libcds implements a
different version of RMMT including rank and select structures, while psta and
sdsl do not. Constructing these structures is costly. On a single core, sdsl was
about 1.5 times faster than psta, but neither sdsl nor libcds were able to
take advantage of multiple cores, so psta outperformed both of them starting at
p = 2. The advantage of sdsl over psta on a single core, in spite of implementing
essentially the same algorithm, can be attributed to (1) lack of tuning of psta
and (2) some overhead with running parallel code on a single core.
Up to 16 cores, the speed-up of psta is almost linear whenever p is a power
of 2 and the efficiency (speed-up/p) is 70% or higher, except for ctree on 32
cores. This is very good for a multicore architecture. When p is not a power of 2,
speed-up is slightly worse. The reason is that, when p is a power of 2, psta can
assign exactly one subtree to each thread (see Algorithm 2), distributing the
work homogeneously across cores without any work stealing. When the number
of threads is not a power of two, some threads have to process more than one
subtree and other threads process only one, which degrades performance due to
the overhead of work stealing.
There were three other factors that limited the performance of psta in our
experiments: network topology, input size, and resource contention with the OS.
Topology. The four processors on our machine were connected in a grid topol-
ogy [8]. Up to 32 threads, all threads can be run on a single processor or on two
adjacent processors in the grid, which keeps the cost of communication between
Parallel Construction of Succinct Trees 13
threads low. Beyond 32 threads, at least three processor are needed and at least
two of them are not adjacent in the grid. This increases the cost of communica-
tion between threads on these processors noticeably.
Input size. For the two largest inputs we tested, osm and ctree, speed-up
kept increasing as we added more cores. For wiki, however, the best speed-
up was achieved with 36 cores. Beyond this, the amount of work to be done
per thread was small enough that the scheduling overhead caused by additional
threads started to outweigh the benefit of reducing the processing time per thread
further.
Resource contention. For p < 64, at least one core on our machine was avail-
able to OS processes, which allowed the remaining cores to be used exclusively
by psta. For p = 64, psta competed with the OS for available cores. This had
a detrimental effect on the efficiency of psta for p = 64.
values, however, is a key factor that helps psta to achieve very good performance.
References
1. Arroyuelo, D., Cánovas, R., Navarro, G., Sadakane, K.: Succinct trees in practice.
In: ALENEX, pp. 84–97. SIAM Press, Austin (2010)
2. Benoit, D., Demaine, E.D., Munro, J.I., Raman, V.: Representing trees of higher
degree. In: Dehne, F., Gupta, A., Sack, J.-R., Tamassia, R. (eds.) WADS 1999.
LNCS, vol. 1663, pp. 169–180. Springer, Heidelberg (1999)
3. Bingmann, T.: malloc count - tools for runtime memory usage analysis and profil-
ing, January 17, 2015
4. Blumofe, R.D., Leiserson, C.E.: Scheduling multithreaded computations by work
stealing. J. ACM 46(5), 720–748 (1999)
5. Clark, D.R., Munro, J.I.: Efficient suffix trees on secondary storage. In: SODA,
pp. 383–391 (1996)
6. Claude, F.: A compressed data structure library, January 17, 2015
7. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms,
chapter. Multithreaded Algorithms, third edn., pp. 772–812. The MIT Press (2009)
8. Drepper, U.: What every programmer should know about memory (2007)
9. Farzan, A., Munro, J.I.: A uniform paradigm to succinctly encode various families
of trees. Algorithmica 68(1), 16–40 (2014)
10. Fuentes-Sepúlveda, J., Elejalde, E., Ferres, L., Seco, D.: Efficient Wavelet tree
construction and querying for multicore architectures. In: Gudmundsson, J.,
Katajainen, J. (eds.) SEA 2014. LNCS, vol. 8504, pp. 150–161. Springer, Heidelberg
(2014)
11. Geary, R.F., Raman, R., Raman, V.: Succinct ordinal trees with level-ancestor
queries. In: SODA, pp. 1–10 (2004)
12. Gog, S.: Succinct data structure library 2.0, January 17, 2015
13. He, M., Munro, J.I., Satti, S.R.: Succinct ordinal trees based on tree covering. ACM
Trans. Algorithms 8(4), 42 (2012)
14. Helman, D.R., JáJá, J.: Prefix computations on symmetric multiprocessors. J. Par.
Dist. Comput. 61(2), 265–278 (2001)
15. Jacobson, G.: Space-efficient static trees and graphs. In: FOCS, pp. 549–554 (1989)
16. Jansson, J., Sadakane, K., Sung, W.K.: Ultra-succinct representation of ordered
trees. In: SODA (2007)
17. Lu, H.I., Yeh, C.C.: Balanced parentheses strike back. ACM Trans. Algorithms 4,
28:1–28:13 (2008)
18. Munro, J.I., Raman, V.: Succinct representation of balanced parentheses, static
trees and planar graphs. In: FOCS, pp. 118–126 (1997)
19. Navarro, G., Sadakane, K.: Fully functional static and dynamic succinct trees.
ACM Trans. Algorithms 10(3), 16:1–16:39 (2014)
20. Raman, R., Rao, S.S.: Succinct representations of ordinal trees. In: Brodnik, A.,
López-Ortiz, A., Raman, V., Viola, A. (eds.) Ianfest-66. LNCS, vol. 8066,
pp. 319–332. Springer, Heidelberg (2013)
21. Shun, J.: Parallel wavelet tree construction. CoRR abs/1407.8142 (2014)
Tree Compression with Top Trees Revisited
Abstract. We revisit tree compression with top trees (Bille et al. [2]),
and present several improvements to the compressor and its analysis. By
significantly reducing the amount of information stored and guiding the
compression step using a RePair-inspired heuristic, we obtain a fast com-
pressor achieving good compression ratios, addressing an open problem
posed by [2]. We show how, with relatively small overhead, the com-
pressed file can be converted into an in-memory representation that sup-
ports basic navigation operations in worst-case logarithmic time without
decompression. We also show a much improved worst-case bound on the
size of the output of top-tree compression (answering an open question
posed in a talk on this algorithm by Weimann in 2012).
1 Introduction
Labelled trees are one of the most frequently used nonlinear data structures in
computer science, appearing in the form of suffix trees, XML files, tries, and
dictionaries, to name but a few prominent examples. These trees are frequently
very large, prompting a need for compression for on-disk storage. Ideally, one
would like specialized tree compressors to certainly get much better compression
ratios than general-purpose compressors such as bzip2 or gzip, but also for the
compression to be fast; as Ferragina et al. note [10, p4:25]. 1
In fact, it is also frequently necessary to hold such trees in main mem-
ory and perform complex navigations to query or mine them. However,
common in-memory representations use pointer data structures that have signif-
icant overhead—e.g. for XML files, standard DOM2 representations are typically
8-16 times larger than the (already large) XML file [22,24]. To process such large
trees, it is essential to have compressed in-memory representations that directly
support rapid navigation and queries, without partial or full decompression.
1
Their remark is about XML tree compressors but applies to general ones as well.
2
Document Object Model, a common interface for interacting with XML documents.
c Springer International Publishing Switzerland 2015
E. Bampis (Ed.): SEA 2015, LNCS 9125, pp. 15–27, 2015.
DOI: 10.1007/978-3-319-20086-6 2
16 L. Hübschle-Schneider and R. Raman
Before we describe previous work, and compare it with ours, we give some
definitions. A labelled tree is an ordered, rooted tree whose nodes have labels from
an alphabet Σ of size |Σ| = σ. We consider the following kinds of redundancy
in the tree structure. Subtree repeats are repeated occurrences of rooted subtrees,
i.e. a node and all of its descendants, identical in structure and labels. Tree
pattern repeats or internal repeats are repeated occurrences of tree patterns, i.e.
connected subgraphs of the tree, identical in structure as well as labels.
Fig. 1. Five kinds of cluster merges in top trees. Solid nodes are boundary nodes,
hollow ones are boundary nodes that become internal. Source of this graphic: [2, § 2.1].
can be linear in their size [2], is an open problem. For relatively small docu-
ments (where the output of TreeRePair fits in cache), the navigation speed for
simple tree traversals is about 5 times slower than succinct representations [17].
Several other popular grammar compressors exist for trees. Among them,
BPLEX [5,6] is probably best-known, but is much slower than TreeRePair.
The TtoG algorithm is the first to achieve a good theoretical approximation
ratio [14], but has not been evaluated in practice.
Succinct Representations. Another approach is to represent the tree using
near-optimal space without applying compression methods to its structure, a
technique called succinct data structures. Unlabelled trees can be represented
using 2n + o(n) bits [13] and support queries in constant time [21]. There are a
few n log σ + O(n) bit-representations for labelled trees, most notably that by
Ferragina et al. [10], which also yields a compressor, XBZip. While XBZip has
good performance on XML files in their entirety, including text, attributes etc.,
evidence suggests that it does not beat TreeRePair on pure labelled trees. As
the authors admit, it is also slow.
Our primary aim in this paper is to address the question of Bille et al. [2]
regarding the practicality of the top tree approach, but we make some theoretical
contributions as well. We first give some terminology and notation.
A top tree [1] is a hierarchical decomposition of a tree into clusters, which
represent subgraphs of the original tree. Leaf clusters correspond to single edges,
and inner clusters represent the union of the subgraphs represented by their two
children. Clusters are formed in one of five ways, called merge types, shown in
Figure 1. A cluster can have one or two boundary nodes, a top- and optionally
a bottom boundary node, where other clusters can be attached by merging. A
top tree’s minimal DAG is referred to as a top DAG. For further details on the
fundamentals of tree compression with top trees, refer to [2]. Throughout this
paper, let T be any ordered, labelled tree with nT nodes, and let Σ denote
the label alphabet with σ := |Σ|. Let T be the top tree and T D the top DAG
corresponding to T , and nT D the total size (nodes plus edges) of T D. We assume
18 L. Hübschle-Schneider and R. Raman
a standard word RAM model with logarithmic word size, and measure space
complexity in terms of the number of words used. Then:
Theorem 1. The size of the top DAG is nT D = O lognTnT · log logσ nT .
σ
distinct label in the input. To code the root, we perform a merge of type (a) (see
Section 1.2 and Figure 1) between a dummy edge leading to the root and the
last remaining edge after all other merges have completed.
With these modifications, we reduce the amount of information stored with
the clusters to the bare minimum required for decompression, i.e. leaf clusters’
labels and inner clusters’ merge types.
Lastly, we speed up compression by directly constructing the top DAG dur-
ing the merge process. We initialize it with all distinct leaves, and maintain a
mapping from cluster IDs to node IDs in T D, as well as a hash map mapping
DAG nodes to their node IDs. When two edges are merged into a new cluster,
we look up its children in the DAG and only need to add a new node to T D
if this is its first occurrence. Otherwise, we simply update the cluster-to-node
mapping.
2.2 Navigation
We now explain how to navigate the top DAG with our reduced information
set. We support full decompression in time O(nT ), as well as operations to move
around the tree in time proportional to the height of the top DAG, i.e. O(log nT ).
These are: determining whether the current node is a leaf or its parent’s last
child, and moving to its first child, next sibling, and parent. Accessing a node’s
label is possible in constant time given its node number in the top DAG.
Proof (Theorem 2). As a node in a DAG can be the child of any number of other
nodes, it does not have a unique parent. Thus, to allow us to move back to a
node’s parent in the DAG, we need to maintain a stack of parent cluster IDs
along with a bit to indicate whether we descended into the left or right child. We
refer to this as the DAG stack, and update it whenever we move around in T D
with the operations below. Similarly, we also maintain a tree stack containing
the DAG stack of each ancestor of the current node in the (original) tree.
Decompression: We traverse the top DAG in pre-order, undoing the merge
operations to reconstruct the tree. We begin with nT isolated nodes, and then
add back the edges and labels as we traverse the top DAG. As this requires con-
stant time per cluster and edge, we can decompress the top DAG in O(nT ) time.
Label Access: Since only leaf clusters store labels, and these are coded as the
very first clusters in the top DAG (cf. Section 2.4), their node indices come before
all other nodes’. Therefore, a leaf’s label index i is its node number in the top
DAG. We access the label array in the position following the (i − 1)th null byte,
which we can find with a Select0 (i − 1) operation, and decode the label string
until we reach another null byte or the end.
Is Leaf: A node is a leaf iff it is no cluster’s top boundary node. Moving up
through the DAG stack, if we reach a cluster of type (a) or (b) from the left
child, the node is not a leaf (the left child of such a cluster is the upper one in
Figure 1). If, at any point before encountering such a cluster, we exhaust the
Another random document with
no related content on Scribd:
rostro y meneos del cuerpo me
enbiaua mensajeros de su pena.
Pero yo disimulaua pensando que
cansandola se acabaria su
pasion: y ello no era ansi, pero
cada dia creçia mas; yo reçebia
grandissima pena en verme
puesto en tanto peligro, y
pensaua de cada dia cómo se
podria remediar, y creyendo que
sola el ausencia seria el
remedio[581], doliame apartarme
de la compañia de mi amigo
Arnao. Por lo qual muchas vezes
llorando amargamente maldezia
mi ventura y a Sathanas pues a
tanto mal auia dado ocasion; y
estando pensando cómo me
despediria, como fue acabada la
feria acordó Arnao que nos
boluiessemos a Paris, y ansi
mandó a toda furia aparejar; y
estando todo lo neçesario a punto
dixome que partiesse yo con su
dueña, que él queria quedar a
negoçiar çierto contrato que le
faltaua, y que le fuessemos
aguardando por el camino, que a
la segunda xornada nos
alcançaria. Dios sabe quánta
pena me dio oyr aquel mandado,
y me pessaua no auer huydo
antes, pensando que fuesse
vrdimbre de Sathanas para
traerme por fuerça a la ocasion de
ofender; y por el contrario fue muy
contenta Beatriz, pensando que
se le aparejaua la oportunidad
forçosa que yo no podria huyr; y
ansi disponiendonos Arnao todo
lo neçesario, tomando la mañana
començamos nuestro camino; yua
Beatriz muy alegre y regocijada
lleuandome en su conuersaçion.
Deziame[582] muchos donayres y
gentilezas que el amor le
enseñaua, debajo de los quales
queria que yo entendiesse lo que
tenia en su voluntad, no se
atreuiendo a descubrirse del todo
hasta verse en lugar oportuno que
no la corriesse peligro de afrenta,
porque le pareçia a ella que yo no
respondia a su intinçion[583] como
ella quisiera. Avnque algunas
vezes juzgaua mi couardia ser por
que temia descubrir mi trayçion, y
ansi ella se desemboluia algunas
vezes demasiadamente por me
hazer perder el temor, y sufriasse
pensando que aquella noche no
se podria escusar sin que a ojos
çerrados se effectuasse la prueba
de nuestra voluntad; y ansi
aquella xornada se cumplió con
llegar ya casi a la noche a vna
villa buena que se llama Bruxelas,
que es en el mesmo ducado de
Brauante. Donde llegados mandé
que los moços diessen buen
recado a las caualgaduras, y al
huesped preuine que tuuiesse
bien de cenar; y pareçiome
çiertamente estar acorralado y
que en ninguna manera podia
huyr aquella oportunidad y
ocasion, porque çierto senti de la
dama que estaua determinada de
me acometer, de lo qual yo
demandé socorro a Dios; y como
fue aparejada la çena venimos a
çenar, lo qual se hizo con mucho
regoçijo, abundancia y plazer, y
como fue acabada la çena
quedamos sobre la tabla
hablando con el huesped y
huespeda su muger en diuersas
cosas que se ofreçieron de
nuestra conuersaçion; y como fue
passada alguna pieza[584] de la
noche dixe al huesped por
manera de cumplimiento: Señor
gran merçed reçebiré, que porque
esta Señora que comigo traygo es
muger de vn grande amigo mio
que me la fió, duerma con vuestra
muger, que yo dormiré con vos.
Beatriz mostró reçebir esto con
gran pena, pero calló
esforçandose por[585] la disimular;
y el huesped respondió: Señor, en
esta tierra no osamos fiar
nuestras mugeres de ninguna otra
persona mas que de nosotros,
quanto quiera que venga en
habito de muger; porque en esta
tierra suçedió vn admirable caso
en el qual vn hijo del señor deste
ducado de Brauante en habito de
muger gozó de la hija del Rey de
Ingalaterra y la truxo por suya
aqui; y como Beatriz vió que se le
aparejaua bien su negoçio,
avnque se le dilatasse algo,
inportunó al huesped le contasse
aquella historia como aconteçió.
Lo qual no me pessó a mi
pensando si en el entretanto
pudiesse amaneçer; y
importunado el huesped ansi
començó: Sabreis, señores, que
en este ducado de Brauante fue
en un tiempo vn bienaventurado
señor, el qual tubo vna virtuosa y
agraviada dueña por muger. Los
quales siendo algun tiempo
casados y conformes en amor y
voluntad sin auer generacion, y
despues en oraciones y ruegos
que hizieron a Dios suçedió que
vino la buena dueña a se
empreñar y de vn parto pario dos
hijos, el vno varon y el otro
hembra, los quales ambos en
hermosura no tenian en el mundo
par; y ansi fueron los niños
criados de sus padres con tanto
regalo como era el amor que los
tenian; y como fueron de vn parto
fueron los más semejantes que
nunca criaturas fueron[586]; en
tanta manera que no auia hombre
en el mundo que pudiesse poner
differençia entre ellos: ni los
mesmos padres lo sabian diçernir;
mas en todo el tiempo se
engañaron mientra los criauan,
que por solas las amas los venian
a conocer; y ansi acordaron de
los llamar de vn nombre por ser
tan semejantes en el aspecto,
rostro, cuerpo, ayre y dispusiçion.
Llamaron al varon Julio y a la hija
Julieta. Fueron estremadamente
amados de los padres por ser tan
lindos y tan deseados y no tener
más; y ansi yendo ya creçiendo
en edad razonable, conoçiendo
ya ellos mesmos su similitud
vsauan para su pasatiempo de
donayres y graçiosos exerçiçios
por dar plazer a sus padres; y
ansi muchas vezes se mudaban
los vestidos tomando Julio el
habito de Julieta; y Julieta el de
Julio; y representandose ante sus
padres con vn donayre gracioso
reçebian[587] plazer como con
tanta gracia se sentian vurlados
por sus amados hijos; y ansi
Julieta en el habito que mas le
plazia se yua muchas vezes a
solazar, agora por la çiudad,
agora por el mar; tomando la
compañia que más le plazia; y vn
dia entre otros salio de su
aposento atauiada de los vestidos
de su hermano Julio a toda
gallardia y con su espada ceñida:
y passando por la sala tomó dos
escuderos que alli halló y lançose
por el mar en vn vergantin que
para su solaz estaua a la contina
aparejado, y suçedió que
esforçandose el viento a su pesar
fueron lleuados por el mar
adelante sin poder resistir; y como
a los que Dios quiere guardar
ningun peligro les daña, avnque
con gran temor y tristeza fueron
llegados vna pieza de la noche a
la costa de Ingalaterra y lançados
por un seguro puerto sin saber
donde estauan; y como sintieron
la bonança y el seguro del puerto
aunque no conoçian la tierra,
llegandose lo más que pudieron a
la ribera determinaron esperar alli
el dia; y ansi, como Julieta venia
triste y desgraçiada y desuelada
por causa de la desusada
tempestad se echó luego debajo
del tapete a dormir, y lo mesmo
hizieron por la plaza del vergantin
los escuderos, y fue tan grande y
de tanta grauedad su sueño que
siendo venida gran pieza del dia
avn no despertaron; y suçedió
aquella mañana salir la infanta
Melisa hija del rey de Ingalaterra
a caza con sus monteros por la
ribera del mar, y como mirando
acaso vio dentro del agua el
vergantin ricamente entoldado y
que no pareçia persona que
viniesse en él, mandó que
saltassen de su gente y viessen
quién venia alli, y luego fue
auisada por los que dentro
saltaron que en la plaza del
vergantin estauan dos escuderos
dormiendo, y que dentro en el
tapete estaua el mas lindo y
agraçiado mançebo de edad de
catorce años que en el mundo se
podia hallar. Y cobdiçiosa la
infanta de lo ver mandó echar la
puerta en tierra y apeandose de
su palafren saltó dentro del
vergantin, y como vio a Julieta
dormida[588] con su espada
çeñida juzgóla por varon y ansi
como la vio tan linda y tan
hermosa en tan conueniente edad
fue luego enamorada della[589], y
aguardando a que despertasse,
por no la enojar, estuuo por gran
pieza contemplando su belleza y
hermosura; y como despertó la
saludó con gran dulçura
preguntandola por su estado y
viaje. Julieta le dixo ser un
cauallero andante que la fortuna
del mar le auia echado alli, y que
se tenia por bien açertado y
venturoso si la pudiesse[590] en
algo servir. Melisa ofreçiendosele
mucho para su consuelo la rogó
saliesse a tierra combidandola a
la caça, diçiendo que por aquellas
partes la auia mucha y muy
buena de diuersos animales; y
ansi como reconoçio Julieta el
valor de la dama, y por verse en
su tierra, holgó de la complazer, y
ansi le fue dado vn muy hermoso
palafren, en el qual caualgando
Julieta, y Melisa en el suyo, se
metieron con su compañia por la
gran espesura de la montaña a
vuscar venados[591]; y como no
se podia sufrir la infanta Melisa
por la herida de su llaga que la
atormentaua sin poderla sufrir,
procuró quanto pudo alongarse
de su gente y monteros por
probar su ventura, y quando con
Julieta se vió sola entre vnos muy
cerrados matorrales la inportunó
se apeasen a beber y a solazar
junto a vna muy graçiosa fuente
que corria alli, y quando fueron
apeadas las dos graciosas damas
començó Melisa a hablar a Julieta
con gran piedad; y avnque con
mucha verguença y empacho le
fue descubriendo poco a poco su
herida, y teniendo los ojos
lançados en el suelo, sospirando
de lo intimo del coraçon,
yendosele vn color y
veniendosele[592] otro le muestra
perdersele la vida si no la socorre;
y ansi como ya tiene por el gran
fuego que la abrasa descubierta
la mayor parte de su dolor,
queriendose aprouechar de la
oportunidad se arriscó a tanto que
abraçando a Julieta la besó[593]
en la boca con mucho dulçor y
suauidad; yendo pues el huesped
muy puesto en el proçeso de su
historia estaua Beatriz toda
tresladada en él pareçiendole que
todo aquel cuento era profeçia de
lo que a ella le auia de suçeder; y
ansi como el huesped aqui llegó,
Beatriz con vn gran sospiro me
miró con ojos de piedad y el
huesped proçedio sin echarlo de
ver, diziendo: Pues como Julieta
por el suçeso tiene entendido que
Melisa la tiene por varon, y viendo
que a su passion no la puede dar
remedio, estando confusa y
pensosa[594] qué camino tomaria,
acordó ser muy mejor descubrirle
ser muger como ella, antes que
ser tomada por cauallero neçio y
cobarde para semejantes casos
de amor, y dixo la verdad; porque
çierto era cosa de hombre
apocado[595] reusar vna dama de
tanta gentileza que se ofreçe con
tanta dulçura y buena
oportunidad; y asi con vn gentil y
agraçiado modo la auisa ser
donzella como ella, contandola
toda su ventura y viaje, padres y
naturaleza. Pero como ya la saeta
de amor auia hecho en ella su
cruel effecto, estaua ya tan
enseñoreado en su coraçon el
fuego que la abrasaua que le vino
tarde el socorro y auiso que de su
naturaleza le dio Julieta, y por
esta causa no le pareçió menos
hermoso el rostro de su amada,
mas antes a más amarla se
ençiende, y entre si pensaua su
gran dolor por estar desesperada
de remedio, y ansi reuentando
toda en lagrimas vañada, por
consolar algo su pena dezia
palabras que mouian a Julieta a
gran lastima y piedad. Maldezia
su mal hado y ventura, pues
qualquiera otro amor santo o
deshonesto podria tener alguguna
esperança de buen fin, y este no
tiene sino sospiros y llorar con
inmensa fatiga. Dezia llorando: si
te pareçia, amor, que por estar yo
libre de tu saeta estaua muy
vfana, y querias con algun
martirio subjetarme a tu vandera y
señorio, bastara que fuera por la
comun manera de penar, que es
la dama por varon: porque
entonçes yo empleara mi coraçon
por te seruir. Pero hasme herido
de llaga muy contra natural, pues
nunca vna dama de otra se
enamoró: ni entre los animales ay
qué pueda esperar vna henbra de
otra en este caso de amor. Esto
parece, amor, que has hecho
porque en mi penar sea a todos
manifiesto tu imperio. Porque
avnque Semiramis se enamoró de
su hijo y Mirrha de su padre y
Pasiphe del toro, ninguno destos
amores es tan loco como el mio:
pues avn se sufriera si tuuiera
alguna esperança de effetuarse
mi deshonestidad y deseo. Pero
para mi locura ¿no habría Dedalo
que injeniasse dar algun remedio
contra lo que naturaleza tan
firmemente apartó? Con estas
lamentaçiones se aflige la gentil
dama mesando sus dorados
cabellos y amortiguando su bello
rostro, vuscando vengança de sí
mesma por auer enprendido
empresa sin esperança de algun
fin; y Julieta lo mejor que podia se
la consolaua auiendo gran piedad
de su cuyta y lagrimas que
afligian su belleza. Ya se llegaua
la noche y se ponia el sol, y como
las damas no ayan vsado dormir
en la montaña ruega Melisa a
Julieta se vaya con ella á su
çiudad que estaua çerca: lo qual
Julieta açetó por su consolaçion,
y ansi se fueron juntas a la çiudad
y entraron en el gran palaçio,
donde muchas damas y
caualleros la salieron a reçebir; y
considerando Melisa que ningun
prouecho reçibe en[596] tener a su
Julieta en habito de varon la vistio
de muy ricos briales suyos.
Porque gran yerro fuera no
reçibiendo prouecho auenturarse
al peligro de infamia que de alli se
pudiera seguir; y tanbien lo hizo,
porque como en el vestido de
varon la dañó quiere ver si en el
de muger se puede remediar y
curar su dolencia, y ansi
recogiendose anbas en su retrete
lo mas presto que pudo la vistio
muy ricos requamados y joyeles
con que ella se solia adornar, y
ansi la sacó a su padre a la gran
sala diziendo ser hija del duque
de Brauante; que la fortuna del
mar la auia traydo alli saliendose
por él a solazar; y ansi el Rey
encomendó mucho a su hija
Melisa la festejasse por la
consolar y luego se despacharon
mensajeros para auisar al duque
su padre; los duques fueron muy
consolados por auer[597] estado
en gran cuyta por la perdida de su
hija Julieta, y enbiaron a dezir al
Rey que en todo hiziesse a su
voluntad. Aquella noche fue
Julieta muy festejada de damas y
caualleros con vn solene serao,
donde Julieta dançó a contento
de Melisa[598], damas y
caualleros, que todos la juzgauan
por dama de gran gallardia,
hermosura y valor, y sobre todas
contentó a la infanta Melisa; y
siendo llegada la hora de la çena
fueron seruidos con gran
solenidad de manjar, musica y
aparato; la qual acabada, Melisa
combidó a Julieta a dormir; y
recogidas en su camara se
acostaron juntas en vna cama,
pero con gran diferencia en el
reposo de la noche. Porque
Julieta duerme y Melisa sospira
con el deseo que tiene de
satisfazer su apetito, y si acaso vn
momento la vençe el sueño es
breue y con turbadas
ymaginaciones, y luego sueña
que el çielo la ha conçedido que
Julieta sea buelta varon; y como
aconteçe a algun enfermo si de
vna gran calentura cobdiçioso de
agua se ha dormido con gran sed,
en aquel poquito de sueño se le
pareçen quantas fuentes en su
vida vido, ansi estando el spiritu
de Melisa deseoso pareçiale que
via lo que sueña; y ansi
despertando no se confia hasta
que tienta con la mano y ve ser
vanidad su sueño, y con esta
passion comiença la desdichada
a hazer votos de romeria a todas
las partes que ay[599] deuoçion
porque el çielo huuiesse della
piedad. Pero en vano se aflige,
que poco le aprouechan sus
promesas y oraçiones por
semejantes fines; y ansi pasó en
esta congojosa contienda algunos
dias hasta que Julieta la
importuna[600] que quiere boluer
para sus padres, prometiendola
que tomando dellos liçençia[601]
boluera a la visitar lo más breue
que ella pueda. Lo qual por no la
desgraçiar se lo conçedió la
infanta, avnque con gran dificultad
y pasion, confiando que Julieta
cunplirá la[602] palabra que le da
de boluer. Pues como fue
aparejado todo lo neçesario para
la partida la mesma Melisa le
entoldó el vergantin de sus
colores y deuisas lo mas
ricamente que pudo, y a ella[603]
dio muchas donas de joyas y
briales[604] de gran estima y valor;
y como Julieta se despidió del
Rey y Reina la aconpañó Melisa
hasta el mar. La qual como alli
fueron llegadas, llorando muy
amargamente la abraça y bessa
suplicandola con gran cuyta
buelua si la desea que viua, y
ansi Julieta haziendola nueuas
juras y promesas se lançó en el
vergantin; y leuantadas velas y
continuando sus remos se
cometio al mar, el qual en
prospero y breue tiempo se
passó. Quedaua Melisa a la orilla
del mar puestos los ojos y el alma
en las velas del nauio hasta que
de vista se le perdieron, y muy
triste y sospirando se boluio a su
palaçio. Como Julieta llegó a sus
riberas los padres la salieron a
reçebir con grande alegria como
si de muerta resuçitara,
haziendose muchas fiestas y
alegrias en toda su tierra. Muchas
vezes contaua a sus padres la
tenpestad y peligro en que en el
mar se vio conmouiendolos a
muchas lagrimas; y otras vezes
les encareçia el buen tratamiento
que de la infanta Melisa auia
reçebido: su grande hermosura,
graçia, donayre y gran valor,
dando a entender ser digna entre
todas las donzellas del mundo a
ser amada y seruida del cauallero
de más alteza y valor; y como
Julio la oya tantos loores de la
infanta ençendió su coraçon a
emprender el seruiçio de dama de
tan alta guisa. Dezia en su pecho:
¿en qué me podía yo mejor
emplear que estar en su
acatamiento todos los dias de mi
vida, avnque yo no merezca
colocarme en su coraçon? Pero a
lo menos gloriarme he auer
emprendido cosa que me haga
entre caualleros de valor afamar;
y ansi con esta intinçion muchas
vezes estando solo con su
hermana Julieta la importunaua le
contasse muy por estenso y
particular todo lo que auia
passado con Melisa; y por le
complazer le conto, cómo
dormiendo ella en el vergantin
aquella mañana que a Londres
llegó la salteó la infanta Melisa; y
cómo teniendola por varon por
lleuar el vestido y espada ceñida
se enamoró della, y tanto que
junto a vna[605] fuente la abraçó y
bessó dulçemente demandandola
sus amores, y cómo le fue
forçado descubrirle ser muger, por
lo qual no podia satisfazer a su
deseo, y cómo no se satisfizo
hasta que la tuuo consigo en su
cama muchas noches; y la pena y
lagrimas con que della se
despidio prometiendole con
muchas juras de la boluer a
visitar; y luego como su hermana
Julieta contó a Julio su historia
resuçitó en su coraçon vna viua y
çierta esperança de la gozar[606]
por esta via, teniendo por
inposible auerla por otra manera,
y ansi industriado por amor tomó
auiso, que con el vestido y joyas
de su hermana seria por el rostro
tomado por ella. En fin, sin mas
pensar auenturandose a qualquier
suçeso se determinó tentar donde
alcançaua su ventura, y ansi un
dia demandó a Julieta le diesse el
tapete que le dio Melisa para el
vergantin con la deuisa, porque
se queria salir a solazar; y vestido
de vn rico brial que Melisa dio a
Julieta, y cogidos los cabellos con
vn graçioso garbin, adornado su
rostro y cuello de muy
estimadas[607] joyas y perlas de
gran valor se lançó a manera de
solazar por el mar, y quando se
vio dentro en él, mandó a los que
gouernauan guiassen para
Londres, y en breue y con
prospero tiempo llegó al puerto, y
por las señas reconoçió[608] el
lugar donde su señora Melisa
cada dia venia por esperar a su
hermana Julieta; y como la
compañia de la infanta reconoçió
la deuisa y orla del tapete que
lleuaua el vergantin corrian a
Melisa por demandar las albriçias,
y como Melisa le vio, engañada
por el rostro, le juzgó por Julieta
reçibiendole con la posible
alegria: porque çierto se le
representó Julio lo que mas
amaua su corazon, y ansi luego le
aprieta entre sus braços, y mil
vezes le bessa en la boca con
mucha dulçura, nunca pensando
de se satisfazer. Agora pues,
podeis vosotros, señores, pensar
si fue Julio passado con la misma
saeta con que amor hirio a
Melisa, y pensad en quánta
beatitud estaua su anima quando
en este estado se vió. Metiole en
vna camara secreta donde
estando solos con bessos y
abraços muy dulçes se tornó de
nueuo á satisfazer, y luego le
haze traer vn vestido suyo muy
rico a marauilla que le auia
labrado para se le dar si viniesse
a visitarla, o enbiarsele, y vistiole
de nuevo cogiendole los cauellos
con una redeçilla de oro: y ansi
todo lo demas del vestido, y
atauio le dispuso en toda
gentileza y hermosura como mas
agraçiado la pareçiesse; y la boz
que en alguna manera le podia
differençiar trabajó Julio por
excusarla todo lo que pudo; y
luego le llevó a la gran sala,
donde estauan sus padres
con[609] muchas damas y
caualleros[610], los quales todos
las[611] reçibieron con gran
alegria, y todos le mirauan a Julio
contentos de su belleza,
pensando que fuesse muger, y
ansi con senblante amoroso le
hazian señas mostrandole desear
seruir y agradar. Pues siendo ya
passada alguna parte de la noche
en grandes fiestas y despues de
ser acabada la sunptuosa çena y
graçioso serao, llevó la infanta
Melisa consigo a Julio a dormir, y
ansi quedando solos en su
camara y despojados de todos
sus paños quedaron en vna cama
ambos sin compañia ni luz[612], y
como Julio se vió solo y en aquel
estado con su señora, y que de
su habla no tenia testigo le
començó ansi a dezir. No os
marauilleis, señora mia, si tan
presto bueluo a os visitar, avnque
bien creo que pensastes nunca
mas me ver. Si este dia que por
mi buenauentura os vi yo pensara
poder de vos gozar con plazer de
ambos a dos, yo me tuuiera por el
mas bienandante cauallero del
mundo residir para siempre en
vuestra presençia. Pero por sentir
en vos pena y no os poder
satisfazer ni bastar a os consolar
determiné de me partir de vos,
porque gran pena da al muy
sediento la fuente que tiene
delante si de ella por ninguna via
puede beuer; y podeis, señora,
ser muy çierta que no faltaua
dolor en mi coraçon; porque
menos podia yo estar sin vos vn
hora que vos sin mí, porque de la
mesma saeta nos hirio amor a
ambos a dos; y ansi procuré de
me partir de vos con deseo de
vuscar remedio que satisfiziesse
a nuestra llaga y contento. Por lo
qual, señora, vos sabreis que yo
tengo vn[613] abuela la muger
mas hadada y mas sabia que
nunca en el mundo jamas se vió,
que la tienen los honbres en
nuestra tierra por diosa, o ninfa;
tanto es su poder y saber. Haze
que el sol, estrellas, çielos y luna
la obedezcan como yo os
obedezco a vos. En conclusion,
en la tierra, ayre y mar haze lo
que solo Dios puede hazer. A esta
me fue con lagrimas que mouian
a gran compasion demandandola
piedad, porque çierto sino me
remediara façilmente pensara
morir; y ella comouida a lastima
de su Julieta dixome que
demandasse qualquiera don, y yo
contandola[614] la causa de mi
afliçion la demandé que me
conuertiesse varon por solo gozar
de vos y os complazer, y ella con
aquella liberalidad que a vna nieta
tan çercana a la muerte se deuia
tener me lleuó a un lago donde
ella se baña quando sus artes
quiere exerçitar, y alli
començando a inuocar se zapuzó
en el lago tres vezes y
ruçiandome el rostro con el agua
encantada me vi vuelta en varon,
y como tal me conoçi quedé muy
contento y muy marauillado que
criatura tuuiesse tan soberano
poder. Agora pues, señora mia,
pues por vuestro contento yo
impetré este don veysme aqui
subjeto a vuestro mandar: hazed
de mi lo que os pluguiere, pues yo
no vine aqui a otra cosa sino por
os seruir y complazer; y ansi
acabando Julio de la dezir esto
hizo que con su mano toque, y
vea y tiente; y como aconteçe a
alguno que deseando mucho vna
cosa, quanto mas la desea mas
desespera de la alcançar, y si
despues la halla dubda si la
posee, y mirandola y palpandola
avn no cree que la tiene, ansi
aconteçe a Melisa: que avnque
ve, toca y tienta lo que tanto
desea no lo cree hasta que lo
prueba; y ansi dezia: si este es
sueño haga Dios que nunca yo
despierte; y ansi se abraçaron
con bessos de gran dulçura y
amor, y gozandose en gran
suauidad con apazibles juegos
pasaron la noche hasta que
amaneçió. Esta su gloria estubo
secreta mas de vn mes, y como
entre poderosos no se sufre auer