Norsh
HomeNTPNCLAPI
HomeNTPNCLAPI
  1. Published
  • Norsh
    • Usage Guide
      • Cryptographic Identity
    • API
      • Crypto
        • Generates a public and private key pair
        • Generates an address from a public key.
  • NTP - Norsh Technical Paper
    • LICENSE-NCL-11
    • Published
      • NTP-1: Norsh Technical Paper Specification
      • NTP-2: Standards for Encoding, Time and Localization
      • NTP-3: Cryptography and Hash Specification
      • NTP-4: Interchangeable Data Standard
      • NTP-5: Temporal Time-Step Model
      • NTP-6: Modular Prime Fragmentation
      • NTP-7: The End of Mining - PoW
      • NTP-8: The Fallacy of Stake - PoS
      • NTP-9: The Myth of Absolute Non-Censorship
      • NTP-10: Structural Failures of Decentralization
  • NCL - Norsh Commons License
    • NCL-0: Norsh Commons License
    • NCL-1: Attribution Requirement
    • NCL-2: Restricted Commercialization
    • NCL-4: Commercialization with Agreement or Royalties
    • NCL-8: Educational Use Permission
    • NCL-16: Complementary Use and Integration Permission
    • NCL-32: Pre-Approval for Application Publication
    • NCL-64: Restricted or Authorized Derivatives
    • NCL-128: Contribution Terms
  1. Published

NTP-6: Modular Prime Fragmentation

Status: PUBLISHED
Authors: Danthur Lice
Date of Creation: 2025-01-09
Date of Publication: 2025-02-03
License: NCL-11

1. Scope#

This document defines the Modular Prime Fragmentation model: a mathematically deterministic technique for partitioning large datasets using modular arithmetic with prime-number divisors. The model ensures fragment exclusivity, supports fully parallelizable querying, and avoids overlaps or ambiguities in record distribution. It is applicable to systems requiring predictable, scalable, and decentralized data access with no dependency on prior knowledge of dataset size or schema.
This model is adopted as a core standard for fragmentation in the Norsh ecosystem, enabling parallel ledger access, query distribution, and memory segmentation in a mathematically sound manner.

2. Normative Principles#

Fragmentation by modulus is not novel in itself, but traditional modulo-based partitioning often fails to guarantee exclusivity and balance when the divisor is non-prime. This standard formalizes the constraint that only prime numbers may be used as fragment divisors to avoid arithmetic collisions and to ensure the following properties:
Deterministic and reproducible fragment mapping;
Exhaustive, non-overlapping coverage of the dataset;
Collision-free parallel access without indexing.
This guarantees that the model can be applied across distributed systems with full auditability and zero inter-node coordination.

3. Preconditions and Scope Constraints#

This standard assumes the following constraints for implementation:
Fragmentation is driven by a stable and hashable numeric field (identifier), such as an auto-increment ID or a timestamp in milliseconds.
The fragment divisor P must be a prime number strictly greater than 1.
Query engines must support basic modulo arithmetic and remainder filtering.
No centralized index or balancing layer may be assumed for runtime operation.
Non-prime divisors must be rejected at configuration or runtime.

4. Technical Specification#

4.1 Fragment Assignment Logic#

Each record is assigned to a logical fragment based on the remainder of a modular division:
\text{Fragment} = \text{identifier} \mod P
Where:
identifier is a consistent numeric key (e.g., timestamp, recordId);
P is a prime number representing the number of logical fragments;
Fragment is the integer remainder in the interval [0, P−1].

4.2 Fragment Exclusivity and Collision Avoidance#

The exclusivity of fragments depends on the primality of P. If P is non-prime, remainders become non-uniform and overlapping due to shared factors.
Invalid case (mod 4):
Multiples of 2 yield: 0, 2, 0, 2... — overlap on even-numbered identifiers.
Multiples of 4 always yield: 0 — over-concentration on a single fragment.
Valid case (mod 7):
Remainders: 0, 1, 2, 3, 4, 5, 6
Uniform distribution across fragments;
No overlaps, no dependency on external balancing.
Using a non-prime divisor introduces redundancy, fragment imbalance, and ambiguous partitioning, which invalidates the deterministic guarantees of the model.

4.3 Full Dataset Query Strategy#

To extract the entire dataset in a distributed or segmented fashion:
1.
Select a prime value P for the fragmentation base.
2.
For each value R ∈ [0, P−1], execute:
Each resulting query returns a disjoint subset of the full dataset. These can be executed sequentially or concurrently across independent workers.

4.4 Parallel Processing Model#

Modular Prime Fragmentation is inherently compatible with horizontal scaling. It enables stateless workers to execute queries independently, as no fragment shares entries with another.
Example Use Case:
A dataset with 1 billion records is distributed to 97 workers using mod 97.
P = 97 (a prime);
Each worker is assigned a unique R ∈ [0, 96];
Queries:
Full dataset is processed concurrently with no duplication or coordination overhead.
This model scales linearly with the number of fragments and supports distributed computing environments with minimal orchestration.

5. Appendix#

5.1 Comparison Table: Prime vs Non-Prime Modulo#

Modulo BasePrime?DistributionCollision RiskValid?
4✗BiasedHigh✗
6✗CollidingHigh✗
7✓UniformNone✓
97✓UniformNone✓

5.2 Mathematical Justification#

Primes are the only natural numbers that do not share factors with any other number except 1 and themselves. As a consequence:
The set of residues modulo P for any arbitrary n forms a complete and uniform residue system when P is prime.
This ensures that each value of n mod P maps uniquely to one of the P fragments.
Any divisor that is not prime introduces common divisors that cause repetitive or skewed mapping.

6. References#

Fundamental Number Theory on Modulo Residue Systems

7. Conclusion#

Modular Prime Fragmentation is a mathematically rigorous model for deterministic data segmentation using modulo operations constrained to prime divisors. It ensures fragment exclusivity, enables fully parallel querying, and avoids collisions or data repetition. It is applicable to high-volume systems requiring predictable distributed access and scalable parallel processing.

8. Prior Art and Context#

The Modular Prime Fragmentation model is based on fundamental modular arithmetic. Concepts such as hashing, sharding, and modulo-based partitioning exist in many systems, but none formally require the use of prime divisors to guarantee fragment exclusivity and full parallel-safe coverage.
This model explicitly defines:
Mandatory use of prime divisors
Deterministic, non-overlapping fragment logic
Distributed querying without indexing
No prior standard or academic publication is known to describe or require this approach in this form. It is an original contribution by Danthur Lice, documented through the NTP series as part of the formalization of scalable data fragmentation techniques. It may be referenced as a deterministic and mathematically rigorous method for safe, parallelizable partitioning of large datasets.
Modified at 2025-05-29 16:36:50
Previous
NTP-5: Temporal Time-Step Model
Next
NTP-7: The End of Mining - PoW
Built with