Skip to content

rajesh26k/Two-Row-Arrays

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Two-Row-Arrays

This project implements a recursive transformation of two rows of integers using Java, inspired by mathematical exploration and pattern recognition.

At each step, the array undergoes two operations:

  1. Sorted Merging: Elements from the second row are merged into the first row, preserving order and uniqueness.
  2. Frequency Mapping: A new second row is generated by counting how many times each element appears in the original pair of rows.

This process is repeated for a number of iterations (inputted by the user), revealing emergent cycles that eventually form.


Features

  • Accepts any two rows of integers as input (top and bottom rows).
  • Iteratively transforms the arrays and prints each step.
  • Designed to study convergence or patterns in array behavior.
  • Minimal GUI interface (via Google Colab) to easily run and experiment without downloading software.

Sample Use Case

ArrayMaker m = new ArrayMaker("2 4 5", "3 9 1");
m.Repeat(20);

Background

This project was created as a self-driven exploration in recursive mathematical behavior and algorithmic pattern development. It's useful for visualizing how simple rules can evolve into complex or stable sequences over time, similar to discrete dynamical systems or combinatorial growth models.


Ways To Run

  1. In Java locally
  2. Google Colab (recommended): Open In Colab

Files

  • ArrayMaker.java - Core logic for reading rows, performing transformations, and displaying steps.
  • Two_Row_Array.ipynb - A Colab-friendly interface for entering arrays and controlling iterations
  • LICENSE - MIT
  • README.md - This file

Author's Note

This project was inspired by a math research question about the cyclic nature of iterating these types of two-row arrays. It was built and tested in Google Colab using Java-in-Python shell integrations.

About

Recursive integer array transformation system inspired by mathematical pattern analysis.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published