---
title: Ping-Pong Execution Scheme
url: https://www.emergentmind.com/topics/ping-pong-execution-scheme
type: topic
---

# Ping-Pong Execution Scheme

The ping-pong execution scheme refers to a class of alternating, tightly-coupled scheduling or interaction protocols across several fields, including quantum cryptography, memory scheduling in computer architecture, millimeter-wave communications, and robotics. Despite the domain specificity, all such schemes exploit bidirectional or banked alternation to maximize utilization, allow concurrent operations, or enhance security and learning efficacy. This article surveys foundational instances of ping-pong execution mechanisms, their mathematical modeling, key performance trade-offs, and major research contributions within representative technical domains.

## 1. Quantum Cryptography: Ping-Pong Protocol with Mutually Unbiased Bases

The foundational ping-pong protocol in quantum encryption is a direct two-way quantum secure communication scheme comprised of sequential message and control modes. In its extended variant, the protocol integrates $k$ mutually unbiased bases (MUBs) in the control phase to increase eavesdropper detectability.

### Execution Phases

- **Preparation:** Bob creates a maximally entangled $d$-dimensional EPR pair,
  \[
  |\psi_{0, 0}\rangle = \frac{1}{\sqrt{d}} \sum_{k=0}^{d-1} |b_k^{(0)}\rangle_\mathrm{home} \otimes |b_k^{(0)}\rangle_\mathrm{travel}
  \]
  Bob retains the “home” qudit, sending the “travel” qudit to Alice.
- **Mode Assignment:** For each travel qudit, Alice selects between control and message mode.
- **Message Mode:** Alice encodes $2\log_2 d$ bits by unitary transformation $U_{\mu,\nu}$ and returns the qudit. Bob performs a joint Bell-basis measurement to decode.
- **Control Mode:** Alice measures in a randomly chosen $\mathcal{B}^{(m)}$ among the $k$ MUBs, announces outcome $(m, i)$. Bob measures his home qudit in the conjugate basis. A discrepancy indicates eavesdropping.

### Mutually Unbiased Bases and Security Metrics

A set $\{\mathcal{B}^{(0)}, \dots, \mathcal{B}^{(k-1)}\}$ in $\mathbb{C}^d$ is mutually unbiased if $|\langle b^{(m)}_i | b^{(n)}_j \rangle|^2 = 1/d$ for all $m \ne n$. In prime-power dimensions $d = p^r$, $k = d + 1$ complete MUBs exist. Alice and Bob maximize security by choosing uniformly across these MUBs.

Let $P_{\mathrm{nd}}$ be the average probability an eavesdropper’s noncoherent attack goes undetected:
\[
P_\mathrm{nd} = \frac{1}{k} \sum_{m=0}^{k-1} |\langle b_\alpha^{(m)} | a_{\alpha,:} \rangle|^2
\]
This is upper-bounded by
\[
P_\mathrm{nd} \leq \frac{1 + \frac{k-1}{\sqrt{d}}}{k}
\]
Using all $d+1$ MUBs, the bound becomes $P_\mathrm{nd} \leq \frac{1+\sqrt{d}}{d+1}$, and for prime-power $d$, a sharper $P_\mathrm{nd} \leq \frac{3}{d+1}$ is achievable. Excluding the computational basis, $P_\mathrm{nd} \leq \frac{2}{d}$.

### Trade-off Table

| $d$ | $(k=2)$: $(1+1/\sqrt{d})/2$ | $(k=d+1)$: $(1+\sqrt{d})/(d+1)$ | Prime-power: $3/(d+1)$ | No Comp.: $2/d$ |
|-----|-----------------------------|--------------------------|-------------------|----------------|
| 3   | $\approx 0.79$              | $\approx 0.68$           | $0.75$            | $0.67$         |
| 5   | $\approx 0.78$              | $\approx 0.54$           | $0.5$             | $0.40$         |
| 7   | $\approx 0.76$              | $\approx 0.46$           | $0.375$           | $0.29$         |

Increasing $k$ sharply reduces $P_\mathrm{nd}$ (increased eavesdropper detection), at the expense of additional classical coordination and measurement setting complexity. In the limit $d \to \infty$, security approaches perfect ($P_\mathrm{nd} \to 0$) [1201.3230].

## 2. Computer Architecture: Ping-Pong Scheduling in PIM Accelerators

Ping-pong execution is used to pipeline memory rewrites and compute phases in SRAM-based Processing-in-Memory (PIM) accelerators, such as for DNN inference at scale. Traditional “naïve ping-pong” splits compute macros into two banks: one bank computes, the other rewrites weights. However, this introduces idle “bubbles” and underutilizes bandwidth when $T_{\rm PIM} \neq T_{\rm rew}$.

### Generalized Ping-Pong Scheduling

The generalized ping-pong scheme staggers the rewrite start-times across $K$ macros, essentially forming a deep pipeline:
\[
m = \frac{(T_{\rm PIM} + T_{\rm rew})\, B_{\rm peak}}{T_{\rm rew} s}
\]
where $m$ macros concurrently rewrite to saturate bandwidth $B_{\rm peak}$, $s$ is per-macro bandwidth. Macro and bandwidth utilization reach 100%.

#### Throughput and Acceleration

For $C$ core-groups, total throughput is
\[
\frac{C K}{T_{\rm PIM} + T_{\rm rew}}
\]
Acceleration over naïve ping-pong is
\[
\text{Speedup}_{\rm gpp/ping} = \frac{K\, \max(T_{\rm PIM}, T_{\rm rew})}{T_{\rm PIM} + T_{\rm rew}}
\]
Multiple empirical evaluations confirm 1.22×–7.71× speedups for generalized ping-pong under realistic bandwidth constraints, maintaining near-ideal macro and bandwidth utilization compared to the rapid collapse observed in naïve and in-situ strategies as $B_{\rm peak}$ drops [2411.13054].

## 3. Adaptive Sensing in Wireless: Ping-Pong Pilots for Beam Alignment

In mmWave MIMO systems, ping-pong execution refers to the sequential alternation of pilot transmissions between transmitter (Agent A) and receiver (Agent B), without explicit feedback, to learn aligned beamformers.

### Alternating Ping-Pong Protocol

- **Ping:** A transmits on beam $\bm w^{\rm A}_{t, \ell}$; B receives and updates its estimate.
- **Pong:** B transmits on beam $\bm w^{\rm B}_{t, \ell}$; A receives and updates.
- Each agent adapts its transmit and receive beams by functions (often parameterized by LSTMs) fed with past pilot observations, recursively updating until $L$ rounds are reached.

After $L$ rounds, both sides form their final data-phase beamformers as functions of all observations, aiming to maximize
\[
|\bm w_{\rm r}^H \bm G^H \bm w_{\rm t}|^2
\]
End-to-end active learning of these functions (e.g., with LSTM and MLP architectures) delivers near-optimal beam alignment using far fewer pilots than non-adaptive methods—achieving gains within 1 dB of perfect-CSI beamforming with $2L=8$ pilots at 0 dB SNR [2305.07130].

Generalization to multi-hop and reconfigurable intelligent surface (RIS) settings is direct—ping-pong pilots and LSTM-parameterized controllers can jointly design both steering/combining and RIS reflection coefficients.

## 4. Robotics: Ping-Pong Execution in Table-Tennis Robot Control

In control pipelines for articulated robots playing table tennis, "ping-pong execution" characterizes a sequential, time-critical information processing chain: perception, aerodynamic trajectory prediction, optimal impact planning (via PSO), and low-level trajectory generation. Each pipeline stage feeds the next in real time to solve for the optimal racket strike parameters—impact time $T$ and velocity vector $\mathbf{v}_r$.

The robot’s strike planner employs particle swarm optimization (PSO) to minimize a cost function (e.g., Euclidean distance to target, combined with speed or spin penalties/bonuses). Each PSO particle encodes one possible set of strike parameters; the swarm evolves to the optimum through velocity-position updates:
\[
\mathbf{v}_i^{k+1} = w\mathbf{v}_i^k + c_1 r_1 (\mathbf{p}_{\rm best, i} - \mathbf{p}_i^k) + c_2 r_2 (\mathbf{g}_{\rm best} - \mathbf{p}_i^k)
\]
Feasible solutions account for racket kinematics, ball dynamics (including Magnus effect and quadratic drag), and collision constraints. Sub-0.1 s planning is achieved with $N=10$ particles and $K=20$ iterations, supporting real-time returns to arbitrary table locations. By changing the cost function, a wide array of shot styles—topspin, slice, loop—can be executed [1211.1335].

## 5. Performance Trade-offs and Limitations

All instances of ping-pong execution are characterized by fundamental trade-offs:

- **Security vs. Overhead (Cryptography):** Increasing the number of MUBs in control mode increases security—detectability of eavesdropping approaches unity for large $k$—but at the cost of more basis coordination and random announcements [1201.3230].
- **Utilization vs. Complexity (Architecture):** Generalized ping-pong pipelining achieves high bandwidth and compute macro utilization, but requires more scheduling complexity, precise interleaving, and deeper pipelines [2411.13054].
- **Sample Efficiency vs. Adaptivity (Communications):** Alternating ping-pong pilots with locally-adaptive sensing functions reach near-optimal alignment rapidly, but introduce the challenge of training and deploying bidirectional active learning agents [2305.07130].
- **Generalization in Robotics:** PSO-based ping-pong pipelines are robust and extensible (enabling various styles and objectives), but depend on accurate physical modeling and careful avoidance of cost function misconfiguration [1211.1335].

## 6. Broader Context and Implications

The ping-pong execution paradigm exemplifies a broader design strategy: maximizing utilization or security by exposing and exploiting alternation—temporal, spatial, or functional—at the protocol or pipeline level. In quantum cryptography, deeper MUB alternation makes attacks more detectable. In memory scheduling, multi-bank alternation eliminates resource idling. In mmWave beam alignment and robotics, alternation supports mutual learning or real-time co-adaptation.

A plausible implication is that further research will continue to generalize and optimize these schemes for domains with strong concurrency/resource contention, uncertainty, or adversarial presence. Cross-domain transfer of ping-pong schemes is likely, evidenced by convergence of adaptive scheduling, learning, and protocol security principles in the literature. Nevertheless, performance bounds and optimality guarantees remain domain-specific and are tightly linked to physical, architectural, or information-theoretic constraints.

Source: https://www.emergentmind.com/topics/ping-pong-execution-scheme