---
title: Random Window Discriminators
url: https://www.emergentmind.com/topics/random-window-discriminators
type: topic
---

# Random Window Discriminators

A random window discriminator, also known as a sliding-window branching program (SWBP), is a class of read-once branching program whose current state depends only on the last $t$ input bits seen, for a fixed window size $t$. The SWBP formalism provides a structure for modeling sliding-window algorithms operating under space constraints, particularly when analyzing the construction and derandomization of low-space randomized algorithms. Pseudorandom generators (PRGs) for SWBPs offer near-optimal seed lengths and error resilience, enabling efficient deterministic simulations of probabilistic models such as sublinear-time cellular automata. These results connect the structural properties of SWBPs, PRG construction techniques, and applications to derandomization in computational complexity [2301.07384].

## 1. Formal Definition and Structural Properties

A sliding-window branching program $S$ of window size $t$, length $n$, and width $w$ is a read-once (unanimity) branching program where, at each layer $i$ $(1 \leq i \leq n)$, the transition function

$$
S_i : Q \times \{0,1\} \rightarrow Q 
$$

depends only on the last $t$ inputs. More precisely, for $i \geq t$ and any states $q, q' \in Q$ and input history $y \in \{0,1\}^t$,

$$
S_i(q, y) = S_i(q', y),
$$

meaning any two runs reading the identical length-$t$ suffix will synchronize in their next transition regardless of the prior state.

Acceptance in an SWBP is defined by unanimity: the SWBP accepts an input if and only if every state visited (across all $n$ steps) is marked accepting.

Structurally, an SWBP can be characterized via de Bruijn graphs of order $t$. After layer $t$, the state progression is determined only by the last $t$ bits, and the number of possible states $w$ is at most $2^t$ (excluding dead states). The state at layer $i$ is a function

$$
\alpha_i(x_{i-t+1} \ldots x_i)
$$

for $i \geq t$ and $\alpha_i(x_1 \ldots x_i)$ for $i < t$ [2301.07384, Theorem 2.1].

## 2. Pseudorandom Generators for SWBPs: Construction and Analysis

Given a base PRG $G_\mathrm{base} : \{0,1\}^{d_\mathrm{base}} \to \{0,1\}^t$ that $\varepsilon_\mathrm{base}$-fools width-$w$, length-$t$ unanimity programs, the objective is to stretch this output to length $n \gg t$, preserving pseudorandomness against all width-$w$, length-$n$, window-$t$ SWBPs.

### Construction $G_1$ (INW-style with extractor):

- **Seed Length:**
  $$
  d_1 = 2 d_\mathrm{base} + O(\log(n/t) \log(1/\varepsilon_\mathrm{base}))
  $$
- **Error:**
  $$
  \varepsilon_1 = \varepsilon_\mathrm{base} \cdot (n/t)^{O(1)}
  $$
- **Technique:** Shatters the SWBP computation into $m = n/t$ blocks of length $t$, separated by dedicated blocks, and uses an extractor (Goldreich–Wigderson) to re-seed the base PRG, allowing simultaneous fooling of $2m$ subprograms. Interleaved construction ensures global sliding-window property.

### Construction $G_2$ (Combinatorial-rectangle PRG):

- **Seed Length:**
  $$
  d_2 = O(d_\mathrm{base} + \log(n/t) + (\log(1/\varepsilon_\mathrm{base}))^{3/2})
  $$
- **Error:**
  $$
  \varepsilon_2 = O(\varepsilon_\mathrm{base} n/t)
  $$
- **Technique:** Concatenates $r = n/t$ independent outputs of the base PRG, using a combinatorial-rectangle PRG (e.g., Lu–Potukuchi or Gopalan–Yehudayoff) to reduce the cumulative seed length while controlling the error blowup.

A further optimized variant of $G_2$ using the Gopalan–Yehudayoff rectangle-PRG achieves

$$
d'_2 = O\left((d_\mathrm{base} + \log\log(n/t) + \log(1/\varepsilon_\mathrm{base})) \log(d_\mathrm{base} + \log(1/\varepsilon_\mathrm{base}))\right)
$$

with $\varepsilon_2 = O(\varepsilon_\mathrm{base} n/t)$.

The table below summarizes the key differences between $G_1$ and $G_2$:

| Generator | Seed Length | Error |
|-----------|-------------|-------|
| $G_1$ (INW + extractor) | $2 d_\mathrm{base} + O(\log(n/t) \log(1/\varepsilon_\mathrm{base}))$ | $\varepsilon_\mathrm{base} (n/t)^{O(1)}$ |
| $G_2$ (Rectangle-PRG) | $O(d_\mathrm{base} + \log(n/t) + (\log(1/\varepsilon_\mathrm{base}))^{3/2})$ | $O(\varepsilon_\mathrm{base} n/t)$ |

## 3. SWBP Derandomization Techniques

The construction of PRGs for SWBPs leverages two techniques:

- **Interleaving plus Extractor:** Block-splits the program, enables low entropy loss via extractor-based re-seeding, and utilizes interleaving to match the sliding-window dependency.
- **Combinatorial Rectangle PRGs:** Allows for compact multi-seeding of the base PRG across program blocks, employing combinatorial-rectangle generators to minimize seed length while maintaining error control.

A key lemma supporting the extractor-based approach states that, given a PRG that $m$-simultaneously $\varepsilon$-fools $t$-block subprograms, extension to $2m$ via extractor-split seeds can $3\varepsilon$-fool $2m$ blocks with marginal additional seed overhead.

Rectangle-PRG techniques asymptotically optimize the seed at the expense of a linear blowup in error by the number of subprograms, which is later controlled by parameter selection.

## 4. Applications to Probabilistic Cellular Automata

A probabilistic cellular automaton (PACA) is a one-dimensional automaton on $n$ cells, each updated stochastically at each timestep using two local rules $\delta_0, \delta_1$. Each cell, per step, selects a rule based on a fair coin and applies it to its 3-neighborhood. The system accepts if, within $T$ steps, all cells reach an accepting state.

Any $T$-step PACA can be simulated by a randomized sliding-window algorithm of window size $O(T^2)$ and space $O(T \log|Q|)$, where $|Q|$ is the cell alphabet size. This simulation, composed with an SWBP PRG, yields deterministic deciders for the PACA's accepted language.

- **One-sided error PACA (analogous to $\mathsf{RP}$):** Any such process of runtime $T(n) \geq (\log n)^{1.01}$ is deterministically decidable in space $O(T)$.
- **Two-sided error PACA (analogous to $\mathsf{BPP}$):** For any $T$, deterministic decision is possible in space $\widetilde{O}(T) + O(\log n)$. This improves prior bounds for $T \ll \sqrt{\log n}$ relative to Armoni-PRG approaches.

Both results are achieved by exhaustive enumeration of PRG seeds, with total simulation space proportional to the requisite seed length.

## 5. Trade-offs and Implications

The two PRG constructions for SWBPs present trade-offs:

- $G_1$ yields superior dependence on $\log(1/\varepsilon)$ in the seed length but incurs worse dependence in $\log(n/t)$.
- $G_2$ achieves better scaling in $\log(n/t)$ but linearly inflates the error by $n/t$.

Seed lengths are nearly optimal in $\log w$, $\log (1/\varepsilon)$, and $\log t$, outperforming general branching-program PRGs when $t \ll n$.

A plausible implication is that, for randomized low-space algorithms with strong sliding-window locality, these PRG constructions provide more efficient deterministic simulation strategies than previously possible for general branching programs. This suggests sliding-window constraints can be exploited to surpass traditional derandomization resource bounds for suitable computational classes [2301.07384].

## 6. Connections to Broader Complexity Theory

Random window discriminators (SWBPs) embody structured memory-limited computation analogous to a class of sliding-window algorithms, allowing direct mapping to models such as probabilistic cellular automata. The overlay of PRGs with optimal seed complexity for SWBPs enables sublinear-space deterministic computation for problems previously tractable only via randomness under tight space budgets.

The explicit connection to de Bruijn graphs highlights the fundamental role of local-historical dependency in state-space growth and influences the analysis of algorithmic complexity within the sliding-window model.

The SWBP framework, as developed by Modanese, expands the toolbox for derandomization in streaming and automata contexts, with consequences for understanding the boundaries between probabilistic and deterministic small-space computation [2301.07384].

Source: https://www.emergentmind.com/topics/random-window-discriminators