Skip to content
CoreSource checked

Hammersley Sequence

Generates low-discrepancy points using an index coordinate and radical inverse coordinates.

Quick Facts

Compact metadata for implementation and discovery.

Category
Randomness & Sampling
Difficulty
Intermediate
Family
Low-Discrepancy Sequence
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
4
Code example
Ready
Visualization
Ready

Overview

Hammersley sequences are useful when the final sample count is known, giving evenly distributed quasi-random points.

Core Concepts

radical inversefixed sample countlow discrepancyunit domain

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(dimensions log n)

Average

O(samples * dimensions log n)

Worst

O(samples * dimensions log n)

Space

O(1)

When to Use

  • Use when monte Carlo simulation needs radical inverse.
  • Use when the input matches the assumptions behind low-Discrepancy Sequence.

When Not to Use

  • Avoid when independence, reproducibility, or distribution quality cannot be checked.
  • Avoid when a simpler algorithm gives the required result with less setup.

What It Does

  • Generates low-discrepancy points using an index coordinate and radical inverse coordinates
  • Uses radical inverse and fixed sample count to guide the work.
  • Produces samples.

Use Cases

  • Monte Carlo simulation
  • Randomized algorithms
  • Sampling distributions

Inputs

  • Random source
  • Distribution or weights
  • Sample count

Outputs

  • Samples
  • Estimated statistic
  • Randomized selection

Key Formulas (1)

Hammersley point

pi = (i / N, radicalinverse(i))
p_i = (i / N, radical_inverse(i))

Uses normalized index as one coordinate and radical inverse for another.

Pseudocode

  1. 1.Prepare the inputs and state needed for Hammersley Sequence.
  2. 2.Apply the radical inverse step while the stopping condition has not been met.
  3. 3.Update intermediate state and discard invalid candidates.
  4. 4.Return samples.

Canonical Example

Input
Hammersley Sequence input with a small representative case
Output
Samples
Explanation
Hammersley Sequence applies radical inverse to produce samples.

Implementation Notes

  • Expose seed handling when reproducibility is important.
  • Keep the radical inverse step separate enough to test independently.

Common Pitfalls

  • Using a biased random source can quietly invalidate downstream estimates.
  • Forgetting to check edge cases can make Hammersley Sequence look correct on only ideal inputs.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Plot generated samples against the target distribution or domain.

Hammersley Sequence mechanism walkthrough step 1 of 4x₀x₁x₂x*
Step 1 of 4: Prepare the inputs and state needed for Hammersley Sequence.
randomness-sampling-mechanism

Notes

Hammersley Sequence should be used with the assumptions and tradeoffs of low-Discrepancy Sequence in mind.

Sources (1)

What each reference supports for this entry.

Monte Carlo Statistical Methods

Book

Monte Carlo reference for Hammersley Sequence low-discrepancy point sets and quasi-Monte Carlo sampling.

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Conceptual neighborHalton Sequence

Hammersley sequences use radical inverse structure like Halton sequences.

Alternative toSobol Sequence

Both are deterministic low-discrepancy sample sets.

Tags

Randomness & SamplingLow-DiscrepancyQuasi Monte CarloSampling