Skip to content

High-performance parallel engine for discovering pseudocycle patterns in Collatz sequences using Tuple-based Transform methodology.

License

Notifications You must be signed in to change notification settings

hhvvjj/tuple-transform-mr-pairs-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Tuple-Based Transform $m_r$ Pairs Finder

Research C99 OpenMP License

High-performance parallel engine for discovering pseudocycle patterns in Collatz sequences using Tuple-based Transform methodology.

Mathematical Foundation

Tuple-Based Transform

The reversible algorithm which transforms Collatz sequence values using the tuple $[p, f(p), m, q]$. A complete Tuple-based Transform calculator is available here. The complete theoretical framework is detailed in this article

Pseudocycle Detection

As the Tuple-based Transform generates sequence values, repetition of the multiplicity parameter $m$ indicates the existence of pseudocycles. These repeated $m$ values, called $m_r$, characterize different pseudocycle patterns.

This is a high-performance parallel search engine to find $m_r$ pairs. It efficiently detects seudocycles by analyzing the $m$-value repetition and generates detailed JSON output of all discovered $m_r$ pairs in the range of $1$ to $2^{exponent} - 1$.

Research Findings

Analysis of the complete range $1$ to $2^{30} - 1$ (1,073,741,823 numbers) reveals a finite set of 42 distinct $m_r$ values:

0, 1, 2, 3, 6, 7, 8, 9, 12, 16, 19, 25, 45, 53, 60, 79, 91, 121, 125, 141, 166, 188, 205, 243, 250, 324, 333, 432, 444, 487, 576, 592, 649, 667, 683, 865, 889, 1153, 1214, 1821, 2428, 3643

The last distinct $m_r$ value, $3643$, is generated by $n = 7287$ (lower than $2^{13}$). No subsequent values of $n$ produce new $m_r$ patterns within the analyzed range $1$ to $2^{30}$.

This brute-force approach serves as both a verification tool for theoretical bounds and a discovery mechanism for identifying the complete set of possible $m_r$ values across different ranges of starting values of $n$.

Given the isomorphic character of the Tuple-based Transform, these pseudocycles have direct correspondences in the Collatz sequence domain. The $[n_a, n_b]$ values are:

[1, 1], [3, 4], [6, 5], [7, 8], [14, 13], [15, 16], [18, 17], [19, 20], [25, 26], [33, 34], [39, 40], [51, 52], [91, 92], [108, 107], [121, 122], [159, 160], [183, 184], [243, 244], [252, 251], [284, 283], [333, 334], [378, 377], [411, 412], [487, 488], [501, 502], [649, 650], [667, 668], [865, 866], [889, 890], [975, 976], [1153, 1154], [1185, 1186], [1299, 1300], [1335, 1336], [1368, 1367], [1731, 1732], [1779, 1780], [2307, 2308], [2430, 2429], [3643, 3644], [4857, 4858], [7287, 7288]

Installation

System Requirements

  • GCC compiler with OpenMP support
  • C99 standard support
  • Minimum 4GB RAM (8GB+ recommended for large searches)

Package Installation

Red Hat-based Systems (RHEL, CentOS, Fedora, Rocky Linux or AlmaLinux)

# RHEL/CentOS/Rocky/AlmaLinux 8+
sudo dnf groupinstall "Development Tools"

# RHEL/CentOS 7
sudo yum groupinstall "Development Tools"

# Fedora
sudo dnf groupinstall "Development Tools"

# Verify OpenMP support
gcc -fopenmp --version

Debian-based Systems (Ubuntu, Debian or Linux Mint)

# Ubuntu/Debian/Mint
sudo apt update
sudo apt install build-essential manpages-dev

# Verify OpenMP support
gcc -fopenmp --version

Compilation

Obtain the source code

# Clone the repository
git clone https://github.com/hhvvjj/tuple-transform-mr-pairs-finder.git
cd tuple-transform-mr-pairs-finder

Build Commands

# Standard compilation
gcc -fopenmp -O3 -std=c99 -Wall -Wextra tuple_transform_mr_pairs_finder.c -o tuple_transform_mr_pairs_finder

# Debug build
gcc -fopenmp -O0 -g -std=c99 -Wall -Wextra -DDEBUG tuple_transform_mr_pairs_finder.c -o tuple_transform_mr_pairs_finder_debug

# Optimized build (recommended)
gcc -O3 -march=native -fopenmp tuple_transform_mr_pairs_finder.c -o tuple_transform_mr_pairs_finder

Usage

./tuple_transform_mr_pairs_finder <exponent>

Parameters

  • exponent: Integer between 1 and 64, defines search range as [1, 2^exponent)

Examples

# Quick test - Search range 1 to 2^20 (1,048,575 numbers)
./tuple_transform_mr_pairs_finder 20

# Standard analysis - Search range 1 to  2^25 (33,554,431 numbers)
./tuple_transform_mr_pairs_finder 25

# Large scale - Search range 1 to 2^30 (1,073,741,823 numbers)
./tuple_transform_mr_pairs_finder 30

Output

Console Output

**************************************************************************
* High-performance mr pairs discovery engine using tuple-based transform *
**************************************************************************

[*] ALGORITHM SETUP
	 - Using 2 threads
	 - Range: from 1 to 2^15 = 32767 

[*] SEARCH PROCESS
	 - Progress: (0.0%) | Processed: 0 | Unique values of mr found: 0 | 0.0 nums/sec | ETA: -- min
		 - New unique value of mr = 0 found, generated by n = 1 (total unique mr values: 1)
		 - New unique value of mr = 576 found, generated by n = 16392 (total unique mr values: 2)
		 - New unique value of mr = 1 found, generated by n = 3 (total unique mr values: 3)
		 - New unique value of mr = 2 found, generated by n = 6 (total unique mr values: 4)
		 - New unique value of mr = 432 found, generated by n = 16401 (total unique mr values: 5)
		 - New unique value of mr = 3 found, generated by n = 7 (total unique mr values: 6)
		 - New unique value of mr = 324 found, generated by n = 16406 (total unique mr values: 7)
		 - New unique value of mr = 6 found, generated by n = 9 (total unique mr values: 8)
		 - New unique value of mr = 9 found, generated by n = 16409 (total unique mr values: 9)
		 - New unique value of mr = 243 found, generated by n = 16412 (total unique mr values: 10)
		 - New unique value of mr = 7 found, generated by n = 15 (total unique mr values: 11)
		 - New unique value of mr = 60 found, generated by n = 16420 (total unique mr values: 12)
		 - New unique value of mr = 8 found, generated by n = 18 (total unique mr values: 13)
		 - New unique value of mr = 12 found, generated by n = 25 (total unique mr values: 14)
		 - New unique value of mr = 45 found, generated by n = 16431 (total unique mr values: 15)
		 - New unique value of mr = 16 found, generated by n = 33 (total unique mr values: 16)
		 - New unique value of mr = 19 found, generated by n = 39 (total unique mr values: 17)
		 - New unique value of mr = 25 found, generated by n = 51 (total unique mr values: 18)
		 - New unique value of mr = 53 found, generated by n = 108 (total unique mr values: 19)
		 - New unique value of mr = 79 found, generated by n = 159 (total unique mr values: 20)
		 - New unique value of mr = 91 found, generated by n = 183 (total unique mr values: 21)
		 - New unique value of mr = 141 found, generated by n = 189 (total unique mr values: 22)
		 - New unique value of mr = 121 found, generated by n = 243 (total unique mr values: 23)
		 - New unique value of mr = 125 found, generated by n = 252 (total unique mr values: 24)
		 - New unique value of mr = 166 found, generated by n = 333 (total unique mr values: 25)
		 - New unique value of mr = 188 found, generated by n = 378 (total unique mr values: 26)
		 - New unique value of mr = 205 found, generated by n = 411 (total unique mr values: 27)
		 - New unique value of mr = 333 found, generated by n = 16626 (total unique mr values: 28)
		 - New unique value of mr = 250 found, generated by n = 501 (total unique mr values: 29)
		 - New unique value of mr = 444 found, generated by n = 16857 (total unique mr values: 30)
		 - New unique value of mr = 487 found, generated by n = 975 (total unique mr values: 31)
		 - New unique value of mr = 592 found, generated by n = 1185 (total unique mr values: 32)
		 - New unique value of mr = 649 found, generated by n = 1299 (total unique mr values: 33)
		 - New unique value of mr = 667 found, generated by n = 1335 (total unique mr values: 34)
		 - New unique value of mr = 683 found, generated by n = 1368 (total unique mr values: 35)
		 - New unique value of mr = 865 found, generated by n = 1731 (total unique mr values: 36)
		 - New unique value of mr = 889 found, generated by n = 1779 (total unique mr values: 37)
		 - New unique value of mr = 1153 found, generated by n = 2307 (total unique mr values: 38)
		 - New unique value of mr = 1214 found, generated by n = 2430 (total unique mr values: 39)
		 - New unique value of mr = 1821 found, generated by n = 3643 (total unique mr values: 40)
		 - New unique value of mr = 2428 found, generated by n = 19428 (total unique mr values: 41)
		 - New unique value of mr = 3643 found, generated by n = 7287 (total unique mr values: 42)

[*] SEARCH RESULTS
	 - Total numbers processed: 32767
	 - Total time: 0.103 seconds
	 - Speed: 318564.41 numbers/second
	 - Numbers with mr found: 32767
	 - Unique mr values found: 42
	 - List of mr values found: 0, 1, 2, 3, 6, 7, 8, 9, 12, 16, 19, 25, 45, 53, 60, 79, 91, 121, 125, 141, 166, 188, 205, 243, 250, 324, 333, 432, 444, 487, 576, 592, 649, 667, 683, 865, 889, 1153, 1214, 1821, 2428, 3643

[*] JSON OUTPUT
	 - File: 'mr_pairs_detected_range_1_to_2pow15.json'
	 - Size: 1551 bytes

JSON Output Format

Results are exported to a JSON file with the naming convention:

mr_pairs_detected_range_1_to_2pow<exponent>.json

{
  "mr": 0,
  "n": 1
},
{
  "mr": 6,
  "n": 65
},

Contributing

Contributions are welcome! Please follow these guidelines:

Code Contributions:

  • Maintain mathematical accuracy against the original article
  • Preserve hash table integrity and parallel processing efficiency
  • Follow existing documentation standards and code style

Research Contributions:

  • Validate theoretical changes against sequence equivalence tests
  • Provide mathematical proofs or references for algorithmic modifications
  • Include performance benchmarks for optimization claims

Citation

If you use this code in your research, please cite:

@software{tuple_transform_mr_pairs_finder,
  title={Tuple Transform mr Pairs Finder},
  author={Javier Hernandez},
  year={2025},
  url={https://github.com/hhvvjj/tuple-transform-mr-pairs-finder},
  note={Implementation based on research DOI: 10.5281/zenodo.15546925}
}

Files

  • tuple_transform_mr_pairs_finder.c - Main implementation
  • README.md - This documentation
  • LICENSE - License file

License

This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

You are free to:

  • Share — copy and redistribute the material
  • Adapt — remix, transform and build upon the material

Under the following terms:

  • Attribution — You must give appropriate credit
  • NonCommercial — You may not use the material for commercial purposes
  • ShareAlike — If you remix, transform or build upon the material, you must distribute your contributions under the same license

See LICENSE for full details.

Contact

For questions about the algorithm implementation, mathematical details or optimization strategies, please contact via email (271314@pm.me).

About

High-performance parallel engine for discovering pseudocycle patterns in Collatz sequences using Tuple-based Transform methodology.

Topics

Resources

License

Stars

Watchers

Forks

Languages