A Python program that maps prime numbers to vowels, generates composites through mathematical operations, and visualizes the relationships using graphs. It also includes utilities for prime factorization.
- Prime-to-Vowel Mapping: Assigns vowels to prime numbers and dynamically maps higher primes using fallback vowels.
- Composite Generation: Creates composite numbers through addition, multiplication, and exponentiation of prime pairs.
- Visualization:
- Static graphs using Matplotlib.
- Interactive graphs using Plotly.
- Prime Factorization: Identifies the prime factors of a given number.
The program requires the following Python packages:
sympy==1.13.3
matplotlib==3.9.2
networkx==3.4.2
plotly==5.24.1To install dependencies, run:
pip install -r requirements.txt-
Clone the repository:
git clone <repository_url> cd PrimeVowelMap
-
Run the program:
python prime_vowel_map.py
-
Follow the on-screen prompts:
- Enter an upper limit for generating primes.
- Enter a number to factorize.
- Choose a visualization method (static or interactive).
Input:
- Upper limit for primes:
20 - Number to factorize:
30 - Visualization:
static
Output:
- A list of primes and their vowel mappings.
- Composite mappings based on mathematical operations.
- Prime factors of the input number.
- A graph visualizing relationships (static or interactive).
-
generate_vowel_mappings(limit):- Generates prime numbers up to the specified limit and maps them to vowels.
-
generate_composite_vowel_mappings(primes, vowel_mappings):- Creates composites using addition, multiplication, and exponentiation.
-
plot_static_graph(primes, vowel_mappings, composites, composite_mappings):- Visualizes relationships using Matplotlib.
-
plot_vowel_graph(primes, vowel_mappings, composites, composite_mappings):- Visualizes relationships interactively using Plotly.
-
find_prime_factors(number):- Finds the prime factors of a given number.
- Large values for prime generation or exponentiation may cause performance issues.
- Requires Python 3.8+ for compatibility.
- Optimize composite generation for larger numbers.
- Add support for distributed computation of primes and composites.
- Improve graph aesthetics for better clarity with large datasets.