/OEIS-Maximal-Cliques-of-Authors-from-Comments

A graph analysis of the author names parsed from the comments of OEIS sequences, along with an implementation of the Bron-Kerbosch algorithm for finding maximal cliques.

Primary LanguagePythonOtherNOASSERTION

OEIS: Maximal Cliques of Authors from Comments

Author: Paula Mihalcea

Università degli Studi di Firenze


OEIS is the online encyclopaedia of integer sequences. It lists thousands of number sequences in lexicographic order, such as the prime numbers or the Fibonacci sequence, easing the work of countless researchers since 1964, its foundation year.

The OEIS is made of a series of JSON files, one for each integer sequence. Given their regular, human-readable format, these files can be easily manipulated in order to further analyze them. Indeed, each page of the OEIS not only lists the integers of the corresponding sequence, but also a series of information such as formulas, references, links and comments.

This work aims to create, step-by-step, a Python 3 script capable of loading these files and parsing their content in order to build a graph where:

  • nodes represent all unique authors that can be found in each comment of every sequence, and
  • edges link two authors who have commented the same sequence.

Three main algorithms are then implemented in order to find:

  1. a maximal clique;
  2. a list of all maximal cliques;
  3. the maximum clique.

Usage

The complete code for this project is provided as a standalone, fully documented module in the mihalcea.py Python file, which can be executed from the command line as follows:

python mihalcea.py
  • run the script and build the graph from the raw JSON files in data/sequences:
python mihalcea.py --build_graph True

Additional documentation can be found in the Jupyter notebook docs/mihalcea.ipynb, which describes step-by-step the code of the main script and contains references to the resources used for its implementation. This guide is also provided as a PDF in docs/mihalcea.pdf.

Requirements

The following Python packages are needed in order to run this project:

License

This work is licensed under a Creative Commons “Attribution-NonCommercial-ShareAlike 4.0 International” license. More details are available in the LICENSE file.