Multidimensional Divide-and-Conquer and Weighted Digital Sums

Yun Kuen Cheung, Philippe Flajolet, Mordecai J. Golin, C. Y. James Lee

Abstract

This paper studies three types of functions arising separately in the analysis of algorithms that we analyze exactly using similar Mellin transform techniques. The first is the solution to a Multidimensional Divide-and-Conquer (MDC) recurrence that arises when solving problems on points in $d$-dimensional space. The second involves weighted digital sums. Write $n$ in its binary representation $n=(b_i b_{i-1}... b_1 b_0)_2$ and set $S_M(n) = \sum_{t=0}^i t^{\bar{M}} b_t 2^t$. We analyze the average $TS_M(n) = \frac{1}{n}\sum_{j < n} S_M(j)$. The third involves a different type of weighted digital sum. Write $n$ as a sum of decreasing powers of 2, $n = 2^{i_1} + 2^{i_2} + ...

  • 2^{i_k}$ with $i_1 > i_2 > ... > i_k \geq 0$ and set $W_M(n) = \sum_{t=1}^k t^M 2^{i_t}$. We analyze the average $TW_M(n) = \frac{1}{n}\sum_{j < n} W_M(j)$.

Introduction

In the analysis of algorithms, we often encounter recurrences that describe running times or structural properties. For many "divide-and-conquer" algorithms—especially those dealing with binary representations of numbers—the performance isn't a smooth curve. Instead, it exhibits small, periodic fluctuations (often called "jitter") depending on the specific bits of the input size $n$.

Standard asymptotic analysis (like Big-O notation) usually smooths over these fluctuations to give a first-order estimate (e.g., $O(n \log n)$). However, for precise hardware tuning or deep theoretical understanding, we need the exact solution. This paper tackles three specific cases where such exact solutions were previously unknown or incomplete:

  1. MDC Recurrences: Used in $d$-dimensional computational geometry problems, like finding the rank of points in space.
  2. Weighted Digital Sums (Type 1): Arising in the analysis of binomial queues, where bits are weighted by their position.
  3. Weighted Digital Sums (Type 2): Arising from the worst-case analysis of bottom-up mergesort.

Methodology

The authors employ a unified analytical framework based on Analytic Combinatorics, specifically the Mellin-Perron formula.

The general workflow is:

  1. Dirichlet Generating Functions (DGFs): They represent the sequences of interest as DGFs (series of the form $\sum a_n n^{-s}$).
  2. Mellin-Perron Formula: This powerful tool acts as a bridge, converting the discrete sum of the sequence into a complex line integral.
  3. Singularity Analysis: By identifying the poles (singularities) of the integral's kernel—often involving the Riemann Zeta function—the authors can apply the Cauchy Residue Theorem.
  4. Fourier Series: The residues at these poles naturally sum up to form periodic functions with period one (when plotted against $\log n$), providing the exact "fluctuation" terms of the solution.

Key Insights: Smoothing and Structure

Despite arising from different algorithmic contexts (geometry vs. sorting vs. data structures), all three problems yield solutions with a remarkably similar mathematical structure: a dominant polylogarithmic term plus a series of periodic fluctuations.

The authors note that the raw functions (like $S_M(n)$) are often too "jagged" to analyze directly. By analyzing the smoothed average (the sum of the first $n$ values), they can extract the underlying periodic behavior that governs the algorithm's behavior.

The average behavior of a weighted digital sum, showing both growth and periodic fluctuations.

Key Results

The paper delivers exact formulas for the average values of these functions. The general form of the solutions is: $$\text{Solution} = (\text{Main Term}) + \sum (\text{Lower-order terms}) \times (\text{Periodic Function of } \log n) + \text{Constant}$$

  • MDC: They proved that the running time for $d$-dimensional problems involves a lead term of $\frac{1}{(d-1)!} n \log^{d-1} n$ plus lower-order terms multiplied by periodic Fourier series.
  • Digital Sums: They provided the first exact formulas for generalizations of weighted digital sums, showing that the "average" behavior is surprisingly regular once the periodic fluctuations are accounted for.
  • Mergesort: They refined the analysis of bottom-up mergesort, providing a solution that is continuous and easier to evaluate than previous versions that were discontinuous at certain points.
Periodic fluctuations (jitter) extracted from the exact solution of an algorithmic recurrence.

Conclusion and Future Work

While the formulas are "exact," the constants and Fourier coefficients involve complex evaluations of the Riemann Zeta function and its derivatives at specific complex points. For the digital sums, the paper focuses on the average value $T(n) = \frac{1}{n} \sum_{j<n} f(j)$. While this provides the "smoothed" behavior, the exact value of $f(n)$ for a specific $n$ remains difficult to analyze directly due to its extreme fluctuations.

Future work could involve extending these exact Mellin techniques to general base-$k$ representations or other non-standard numeration systems, as the current work focuses almost exclusively on binary (base 2) representations.

Summary updated

Abstract

This paper studies three types of functions arising separately in the analysis of algorithms that we analyze exactly using similar Mellin transform techniques. The first is the solution to a Multidimensional Divide-and-Conquer (MDC) recurrence that arises when solving problems on points in $d$-dimensional space. The second involves weighted digital sums. Write $n$ in its binary representation $n=(b_i b_{i-1}... b_1 b_0)_2$ and set $S_M(n) = \sum_{t=0}^i t^{\bar{M}} b_t 2^t$. We analyze the average $TS_M(n) = \frac{1}{n}\sum_{j i_2 &gt; ... &gt; i_k\geq 0$ and set $W_M(n) = \sum_{t=1}^k t^M 2^{i_t}$. We analyze the average $TW_M(n) = \frac{1}{n}\sum_{j
BibTeX
@misc{cheung2010multidimensional,
  author = {Yun Kuen Cheung and Philippe Flajolet and Mordecai J. Golin and C. Y. James Lee},
  title = {{Multidimensional Divide-and-Conquer and Weighted Digital Sums}},
  year = {2010},
  eprint = {1003.0150},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1003.0150},
}

Loading related content...

Figure