algorithms-for-packing-number-of-3-token
https://github.com/thealexz/algorithms-for-packing-number-of-3-token
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.8%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: TheAlexz
- License: mit
- Language: Mathematica
- Default Branch: main
- Size: 2.93 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
ALGORITHMS-FOR-COMPUTING-THE-EXACT-VALUE-OF-THE-PACKING-NUMBER-OF-3-TOKEN-GRAPH-OF-PATH-GRAPH.
For computing the exact packing number of 3 token graph of path graph $P_n$ with n $\le 12$ , only three files are needed, which should be run on python and Wolfram Mathematica.
Libraries needed for the python file

The python file ("Generate Pn and F3_Pn files.py")
This file is for generating the $Pn$, $F3(Pn)$ and $F3^2(P_n)$ graphs automatically and then store them both in .gml and .html files
Once you have your libraries correctly installed, you just have to run the python file.
When you run it, the program will ask which $Pn$ and $F3(P_n)$ files do you want to generate? You just have to enter the order $n$ of the path graph as a positive integer and hit Enter (e.g. 12)

Then, once you run it, the program will generate the $Pn, F3(Pn)$ and $F3^2(P_n)$ graphs automatically and then store them both in .gml and .html files

When the program is finished running, you should see $6$ files in the same folder as your python file, that is, the $Pn, F3(Pn)$ and $F3^2(P_n)$ both in .gml and .html files. We recommend storing them on a folder called $Pn$ (where $n$ is a positive integer)

You can open any html file with any web browser and you should see that graph on your window, you are free to move each node with your cursor in a dynamic way

The Wolfram Mathematica file ("Find exact value.nb")
This file is for calculating the exact value for the packing number of the $F3(Pn)$ graph (e.g., the independence number of the $F3^2(Pn)$ graph) and visualize the corresponding vertices of that packing set
The .nb file works with the .gml files generated in the previous step, so you should change the first and fourth lines of the file so that it is your own PC's path to the F3square.gml and F3.gml files, respectively, that you want to calculate the exact packing number for

Once you are done with these two steps, you are ready to run the Wolfram Mathematica file, for that, hit the "Evaluation" button on the program's tab and then hit the "Evaluate notebook" button as shown

Then, once it's completed running, it will show the maximum packing set vertices ID's on the second line of output, as shown, (in the case of P5, as shown, the packing number is 3, so three vertices ID's are shown)

Finally, for a visual representation, the third and fifth output lines will show the $F3^2(Pn)$ and $F3(Pn)$ graphs with its corresponding maximum independent and packing vertices, respectively, highlighted.

ALGORITHMS-FOR-COMPUTING-A-LOWER-BOUND-FOR-THE-PACKING-NUMBER-OF-3-TOKEN-GRAPH-OF-PATH-GRAPH.
For computing a lower bound for the packing number of 3 token graph of path graph $P_n$ with n$ge 13$, only three files are needed, which should be run on python, Wolfram Mathematica and $C++$.
Libraries needed for the python file

The python file ("Generate Pn and F3_Pn files.py")
This file is for generating the $Pn$, $F3(Pn)$ and $F3^2(P_n)$ graphs automatically and then store them both in .gml and .html files
Once you have your libraries correctly installed, you just have to run the python file.
When you run it, the program will ask which $Pn$ and $F3(P_n)$ files do you want to generate? You just have to enter the order $n$ of the path graph as a positive integer and hit Enter (e.g. 12)

Then, once you run it, the program will generate the $Pn, F3(Pn)$ and $F3^2(P_n)$ graphs automatically and then store them both in .gml and .html files

When the program is finished running, you should see $6$ files in the same folder as your python file, that is, the $Pn, F3(Pn)$ and $F3^2(P_n)$ both in .gml and .html files. We recommend storing them on a folder called $Pn$ (where $n$ is a positive integer)

You can open any html file with any web browser and you should see that graph on your window, you are free to move each node with your cursor in a dynamic way

The Wolfram Mathematica file ("Generate CSV.nb")
This file is for calculating the GDM (Graph Distance Matrix) of the $F3(Pn)$ graph and store it on a .csv file
The .nb file works with the .gml files generated in the previous step, so you should change the first line of the file so that it is your own PC's path to the F3.gml file that you want to calculate the GDM for

You should also change the 4th input line, that is, the name of the .csv file you want Wolfram Mathematica to generate, just change the $P12$ number with your current $n$, so that the $C++$ file works.

Once you are done with these two steps, you are ready to run the Wolfram Mathematica file, for that, hit the "Evaluation" button on the program's tab and then hit the "Evaluate notebook" button as shown

Remember to wait until every line is evaluated, that is, until the last output line shows the correct name of the .csv file you are generating

Then, you will have your GDM file ready for the $C++$ file to use it
The C++ file ("Calculatelowerbound.cpp")
This file is for computing a lower bound for packing number of 3 token graph of path graph
For this file to work correctly, you should change the 13th, 16th and 19th lines of the file with your own data, that is, the number of nodes of the $F3(Pn)$ graph you will be using, the ID of the node you want in the second position (we got the best results using $0$, $1$ and $2$) and the $n$ number of the GDM_F3(Pn).csv file you are using

Then you will be ready to run the program, once it's finished, the program will tell you at which row it found the best packing number, the cardinality of it, the ID's of the nodes in it and the time taken by the program to process the whole .csv file to find the best packing set.

Owner
- Name: Joel Alejandro Escareño Fernández
- Login: TheAlexz
- Kind: user
- Location: Zacatecas, Zac.
- Repositories: 1
- Profile: https://github.com/TheAlexz
Ing. Mecatrónica - IPN
Citation (CITATION.cff)
cff-version: 1.0.0 message: "If you use this software, please cite it as below." authors: - family-names: "Escareño Fernández" given-names: "J. A." orcid: "https://orcid.org/0009-0001-2825-231X" - family-names: "Ndjatchi" given-names: "C." orcid: "https://orcid.org/0000-0003-2702-9981" - family-names: "Ríos-Castro" given-names: "L. M." orcid: "https://orcid.org/0009-0008-9326-1854" title: "Algorithms-for-packing-number-of-3-token" version: 1.0.0 date-released: 2024 url: "https://github.com/TheAlexz/Algorithms-for-packing-number-of-3-token"