[Paper Review] XML Compression via DAGs
This paper introduces the hybrid DAG, a novel data structure that combines unranked tree DAGs and first-child/next-sibling (fcns) binary tree DAGs to achieve superior XML compression. It proves the hybrid DAG is always smaller than or equal to both the unranked and binary DAGs, with theoretical bounds showing the unranked DAG size is at most the square of the hybrid DAG size, and the hybrid DAG is at least half the size of the binary DAG. Experiments confirm hybrid DAGs reduce average size to 76% of unranked DAGs.
Unranked trees can be represented using their minimal dag (directed acyclic graph). For XML this achieves high compression ratios due to their repetitive mark up. Unranked trees are often represented through first child/next sibling (fcns) encoded binary trees. We study the difference in size (= number of edges) of minimal dag versus minimal dag of the fcns encoded binary tree. One main finding is that the size of the dag of the binary tree can never be smaller than the square root of the size of the minimal dag, and that there are examples that match this bound. We introduce a new combined structure, the hybrid dag, which is guaranteed to be smaller than (or equal in size to) both dags. Interestingly, we find through experiments that last child/previous sibling encodings are much better for XML compression via dags, than fcns encodings. We determine the average sizes of unranked and binary dags over a given set of labels (under uniform distribution) in terms of their exact generating functions, and in terms of their asymptotical behavior.
Motivation & Objective
- To analyze the size relationship between minimal DAGs of unranked trees and their first-child/next-sibling (fcns) encoded binary trees in XML compression.
- To address the limitation that existing DAG representations can vary significantly in size, sometimes making one representation exponentially larger than the other.
- To design a new hybrid DAG structure that guarantees compression size no worse than the minimum of the unranked and binary DAGs.
- To derive exact and asymptotic generating functions for average DAG sizes under uniform label distributions.
- To empirically evaluate and compare the performance of fcns versus last-child/previous-sibling encodings in DAG-based XML compression.
Proposed method
- Propose the hybrid DAG as a combined structure: compute the minimal DAG of an unranked tree, convert its grammar rules to fcns-encoded form, and recompute the minimal DAG of the resulting forest.
- Use regular tree grammar representation to model the DAGs, enabling transformation and re-compression via fcns encoding.
- Establish theoretical bounds: the size of the unranked DAG is at most the square of the hybrid DAG size, and the hybrid DAG is at least half the size of the binary DAG.
- Derive exact generating functions for the average number of nodes in unranked and binary DAGs using combinatorial species and analytic combinatorics.
- Apply Rouché’s theorem and asymptotic analysis to prove analyticity and derive the asymptotic behavior of generating functions.
- Conduct experiments on real XML corpora to compare compression ratios of fcns and last-child/previous-sibling encodings.
Experimental results
Research questions
- RQ1How do the sizes of the minimal DAGs of unranked trees and their fcns-encoded binary trees compare in general?
- RQ2Can a new data structure be designed that is guaranteed to be no larger than the smaller of the unranked DAG and the binary DAG?
- RQ3What are the theoretical upper and lower bounds on the size of the unranked DAG relative to the binary DAG?
- RQ4How do the average sizes of unranked and binary DAGs behave asymptotically under uniform label distributions?
- RQ5Which encoding—first-child/next-sibling or last-child/previous-sibling—yields better compression in practice for XML data?
Key findings
- The size of the minimal DAG of an unranked tree is at most the square of the size of the hybrid DAG, and this bound is tight.
- The size of the hybrid DAG is always at least half the size of the binary DAG, and this bound is also tight.
- The hybrid DAG is guaranteed to be no larger than the minimum of the unranked DAG and the binary DAG sizes.
- Experiments show that last-child/previous-sibling encoding produces significantly better compression than first-child/next-sibling encoding in practice.
- For real XML corpora, the average size of the hybrid DAG is 76% of the average size of the unranked DAG.
- The asymptotic average number of nodes in unranked DAGs is ~$ \frac{4^n m^{n+1}}{\sqrt{\pi} n^{3/2}} $ under uniform label distribution, with similar expressions derived for binary and hybrid DAGs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.