Skip to content

Releases: Yusheng-Hu/Position-Pure-Algorithm

v1.3.0

22 Feb 02:46

Choose a tag to compare

Official implementation and interactive visualizations of the Position Pure (PP) linear-time ranking/unranking algorithm.
🚀 Full Permutation generation: Iterative Permutation Generation
🚀 Comparison with Python's Built-in itertools
⚡ Dual-Core Parallel Performance (GitHub Actions)
🚀 Liner rank unrank: Position Pure (PP) vs. Myrvold-Ruskey (MR)

## v1.2.0 - Performance Benchmark Update (vs. itertools)

20 Jan 08:22
a84666d

Choose a tag to compare

v1.2.0 - Performance Benchmark Update (vs. itertools)

What's New

In response to requests from the Reddit community, we have added a comprehensive performance comparison between the Position Pro (PP) Algorithm and Python's built-in itertools.permutations.

Key Achievements:

  • Efficiency Milestone: The PP algorithm, implemented in pure Python, has officially surpassed the C-optimized itertools in a PyPy3 environment.
  • Data-Backed Leads:
    • Achieved a consistent 1.4x speed-up for large-scale permutations (N=12).
    • Peak performance reached 2.37x speed-up under optimal JIT conditions.
  • Benchmark Script: The comparison logic is now integrated into python/pp_iter.py for public verification.

Why this matters:

This release proves that the PP algorithm's logic is more streamlined than the traditional methods used in standard libraries, even when those libraries are implemented in C.

v1.1.1

11 Jan 13:49
9feba4f

Choose a tag to compare

Because permutation pro is used, change to permutation pure.

provide Algorithm cpp file

08 Jan 11:12
a04c55e

Choose a tag to compare

Heap's Algorithm is available and supports standalone execution. For comparation.

Initial Release: Position Method Algorithm (O(n) Linear-Time)

07 Jan 08:17
144e1de

Choose a tag to compare

🚀 Initial Release: Position Method (O(n) Linear-Time)

This is the first official release and the reference implementation of the paper:
"Position Method: A Linear-Time Generation Algorithm for Permutations".

🧠 Core Breakthrough

This algorithm shatters the traditional understanding of permutation mapping by establishing a bidirectional one-to-one correspondence between the Factorial Number System and Permutations in strict O(n) time and space complexity.

📊 Key Highlights

  • Mathematical Efficiency: Achieves $O(n)$ for both Ranking and Unranking.
  • Superior Performance: Outperforms the classical Myrvold-Ruskey [1] algorithm in large-scale tests (longer N).
  • Parallel Ready: Stateless mapping enables massive parallelization of permutation generation.