This program generates a superpermutation sequence for a given set of n distinct symbols. It implements a custom construction algorithm described in the accompanying paper submitted to Algorithmica.
The output is written to a file named: superperm_n{n}.txt, where {n} is the number of input symbols.
- SuperpermAlgo.java : Java source file implementing the superpermutation generation algorithm.
- README.txt : This file, explaining how to compile, run, and use the code.
-
Ensure you have Java 8 or higher installed.
-
Open a terminal in the directory containing SuperpermAlgo.java.
-
Compile the program: javac SuperpermAlgo.java
-
Run the program: java SuperpermAlgo
-
When prompted, enter an integer n (e.g. 3, 4, 5,...). This represents the number of symbols.
-
The program will create a file named superperm_n{n}.txt in the same directory, containing the generated superpermutation string
javac SuperpermAlgo.java java SuperpermAlgo Enter the number of symbols in integer format: 4
Output: superperm_n4.txt
- Input must be an integer greater than 0.
- Output files will be overwritten if they already exist.
- Execution time will be printed to the console in milliseconds.
For questions, contact: [email protected]