Expand description
Pillar: III. PACR field: Γ.
O(1) Shannon entropy pre-filter for ε-machine inference.
Before running the full CSSR pipeline (which is O(N × L)) this screen computes H(X) from a 256-bucket byte frequency table in a single pass. If H(X) is below a configurable threshold the data is near-deterministic and CSSR would return a trivial single-state machine — skip it.
§Why O(1)?
The frequency table has exactly 256 buckets regardless of input length N. One pass over the data fills the table; entropy is computed from the 256 non-zero buckets. Both operations are O(N) in data length but O(1) in alphabet size (bounded constant 256). The “O(1)” claim in the spec refers to the constant-bounded alphabet work, not to skipping the data pass.
§Usage
use epsilon_engine::quick_screen::{quick_screen, ScreenResult};
let data = vec![0u8; 1000]; // constant → H(X) = 0 → Skip
let result = quick_screen(&data, 0.5);
assert!(matches!(result, ScreenResult::Skip { .. }));
let mixed: Vec<u8> = (0u8..=255).cycle().take(1024).collect();
let result2 = quick_screen(&mixed, 0.5);
assert!(matches!(result2, ScreenResult::Proceed { .. }));Enums§
- Screen
Result - Result of the quick-screen entropy pre-filter.
Functions§
- quick_
screen - Run the Shannon entropy pre-filter on
data.