327 On the Applications of Stratified Number-Theoretic Structures in Computer Engineering
662
0
·
2026/05/24
·
5 mins read
☕
WriterShelf™ is a unique multiple pen name blogging and forum platform. Protect relationships and your privacy. Take your writing in new directions. ** Join WriterShelf**
WriterShelf™ is an open writing platform. The views, information and opinions in this article are those of the author.
Article info
This article is part of:
Categories:
⟩
⟩
Date:
Published: 2026/05/24 - Updated: 2026/11/12
Total: 1136 words
Like
or Dislike
About the Author
I love science as much as art, logic as deeply as emotion.
I write the softest human stories beneath the hardest sci-fi.
May words bridge us to kindred spirits across the world.
More from this author
More to explore
On the Applications of Stratified Number-Theoretic Structures in Computer Engineering
Author: Suhang Zhang (Luoyang, Henan)
Abstract
Built upon the three-tier framework of prime primitives – regular composite numbers – disordered mixed composite numbers established in prior work, together with its isomorphic logic of fractal iteration, this paper presents three concrete engineering application directions: controllable sequence generation, adaptive compression of image textures, and code complexity prediction. For each direction, the matching principle is elaborated, algorithm outlines or workflows are provided, and practical implementation values are outlined. None of the schemes remain conceptual; prototype validation is feasible within a timeframe ranging from one week to one month.
1. Controllable Sequence Generation: From Number-Theoretic Stratification to Deterministic Replay
1.1 Matching Principle
- Regular composite numbers (such as sequences of the form 2^a 3^b) follow deterministic recurrence on the integer axis, with adjacent values exhibiting quasi-random visual fluctuations while being fully reproducible.
- Disordered mixed composite numbers (products of multiple distinct primes selected at random) possess higher combinatorial entropy and distribution complexity.
- Regulation mechanism: by tuning parameters (size of fixed prime set, range of exponents, whether new primes are introduced), continuous adjustment can be achieved between “deterministic reproducibility” and “high-distribution complexity”. This method targets structurally controllable data sampling and is not intended to replace cryptographically secure pseudorandom number generators (CSPRNGs).
1.2 Algorithm Pseudocode
text
Input: seed S (initialises prime list), mode (ordered / mixed / disordered), length L
Output: integer sequence R[1..L]
Initialisation:
Prime table P = first 20 primes [2,3,5,7,11,13,17,19,23,29,...]
If mode == ordered:
Fixed prime set P0 = [2, 3]
Generation rule: for i = 1..L, output exponent combinations of P0 in lexicographic or ascending order (deduplicated and sorted)
Return the first L terms (fast generation via recurrence formulas)
If mode == mixed:
Fixed prime set P0 = [2, 3, 5]
For each generation: randomly select a,b,c ∈ [0..5] (upper bound adjustable), compute N = 2^a * 3^b * 5^c
Deduplicate to obtain L distinct values
If mode == disordered:
Each time randomly pick k (k∈[2..6]) distinct primes from prime table P, with random exponents ∈[1..3]
Compute N as their product, deduplicate to generate L values
Output R
1.3 Engineering Value
- Games and simulation: the ordered mode yields fully reproducible sequences for game drop logic or simulation timesteps, convenient for playback and debugging; the mixed mode balances randomness and system stability.
- Data sampling: compared with traditional linear congruential generators, sequences generated by this method have richer hierarchical structure and more interpretable parameters — the size of the prime set directly corresponds to structural complexity.
2. Image Texture Classification and Adaptive Compression
2.1 Matching Principle
- Regular texture regions in images (sky, walls) resemble regular composite numbers: locally repetitive with concentrated spectral energy, suitable for high compression ratios.
- Cluttered detail regions (grass, leaves, noise) resemble disordered mixed composite numbers: high information entropy with no simple local recurrence, requiring precision preservation.
- This scheme does not map pixel values directly to composite numbers. Instead, it adopts the stratified number-theoretic idea to build a classifier, which automatically applies graded compression according to the “structural regularity” of each image block.
2.2 Algorithm Workflow
text
Input: raw image I, block size B×B (e.g. 16×16)
Output: compressed image file (with compression level tag for each block)
For each block:
1. Compute texture regularity metric (select one):
- Energy concentration of DCT coefficients (fraction carried by leading coefficients)
- Local variance or kurtosis of gradient histogram
- Self-similarity (matching error against translated copy of itself)
2. Classify into three tiers by metric:
- Highly regular (analogous to regular composites) → highest compression level (e.g. JPEG quality 30%)
- Moderately regular → medium compression level (quality 60%)
- Low-regularity / cluttered (analogous to disordered composites) → lowest compression level (quality 90% or lossless)
3. Encode the block at its assigned compression level, and store the compression-level index.
At decoding, select the corresponding decoder using the stored index.
2.3 Engineering Value and Comparison
- Application scenarios: remote sensing imagery and surveillance video (aggressive compression for large sky/road regions while preserving fine details, yielding an overall volume reduction of 30%–50%); medical imaging (low compression ratio for lesions, high compression for background).
- Distinction from traditional approaches: modern image coding already incorporates adaptive quantization (AQ), yet this proposal supplies a criterion for quantisation table selection rooted in the distributional rules of prime factors, furnishing a clearer mathematical justification for adaptive compression.
3. Code Complexity Prediction: A Number-Theoretic Lens for Static Analysis
3.1 Matching Principle
The control-flow structure of a program may be analogised to composite-number structure:
- Single-prime-power structure: simple nested loops → well-ordered, with precisely computable complexity.
- Regular composite structure: a small set of fixed branch patterns → moderately ordered, easy test coverage.
- Disordered composite structure: abundant conditional jumps dependent on randomness, uncertain recursion depth → cluttered, prone to hidden bugs and performance glitches.
3.2 Tool Design Concept
Develop a static-analysis plugin (for Python/JS linters) that scans functions and outputs a structural regularity score (Level 1–3).
- Sample decision rules:
- Sequential statements plus fixed-iteration loops only → Level 1 (regular).
- A small number of conditional branches (≤3) and nesting depth ≤2 → Level 2 (semi-regular).
- Random-dependent conditional jumps, recursive calls, dynamic-type branches → Level 3 (disordered).
- Output hints:
- Level 1 functions: safe for optimisation and inlining.
- Level 2 functions: standard unit testing required.
- Level 3 functions: refactoring or enhanced defensive testing recommended.
3.3 Relation to Existing Tools
Existing complexity metrics such as cyclomatic complexity count linearly independent execution paths (a numerical quantity). This framework delivers qualitative classification of structural type (a structural quantity), complementary to the former. It aligns better with code comprehensibility and testability.
4. Application Priority and Implementation Roadmap
表格
Application Direction Prototype Difficulty Expected Deliverable Recommended Order
Controllable sequence generator Low (2–3 days) Python library + basic test report 1
Code complexity predictor Moderate (1–2 weeks) Linter plugin or script 2
Image classification and compression Moderate (1–2 weeks) algorithm prototype + comparison plots 3
Proposed roadmap: prioritise the controllable sequence generator and static analysis linter plugin, publish a short manuscript hosted on GitHub as the first verifiable engineering outcome of this theory.
5. Summary and Outlook
This paper extracts three implementable directions from the three-tier number-theoretic structure, covering generative problems (sequence generation), perceptual problems (image compression), and structural analysis problems (code complexity).
These schemes validate a core thesis: structural order intrinsic to number theory can be mapped directly onto tuning parameters for computer algorithms to produce meaningful engineering outputs. Follow-up work will follow the roadmap above to complete prototype implementation and performance benchmarking of the underlying code.
References
[1] Zhang, S. Number Theory–Fractal Analogy Series: Axioms and Mathematical Formulation, 2026.
[2] NIST Special Publication 800-22: A Statistical Test Suite for Random Number Generators.
[3] Barnsley, M. F. (1988). Fractal Image Compression.