Weighted graph algorithms with Python

2016
journal article
article
dc.abstract.enPython implementation of selected weighted graph data structures and algorithms is presented. The minimal graph interface is defined together with several classes implementing this interface. Graph nodes can be any hashable Python objects. Directed edges are instances of the Edge class. Graphs are instances of the Graph class. It is based on the adjacency-list representation, but with fast lookup of nodes and neighbors (dict-of-dict structure). Other implementations of this class are also included, for instance, the adjacency matrix representation (list-of-list structure). Multigraphs are instances of the Multigraph class.In this work, many algorithms are implemented using a unified approach. There are separate classes and modules devoted to different algorithms. Three algorithms for finding a minimum spanning tree are implemented: the Boruvka's algorithm, the Prim's algorithm (three implementations), and the Kruskal's algorithm. Three algorithms for solving the single-source shortest path problem are implemented: the dag shortest path algorithm, the Bellman-Ford algorithm, and the Dijkstra's algorithm (two implementations). Two algorithms for solving all-pairs shortest path problem are implemented: the Floyd-Warshall algorithm and the Johnson's algorithm.All algorithms were tested by means of the unittest module, the Python unit testing framework. Additional computer experiments were done in order to compare real and theoretical computational complexity. The source code is available from the public GitHub graphs-dict repository.pl
dc.affiliationWydział Fizyki, Astronomii i Informatyki Stosowanej : Instytut Fizyki im. Mariana Smoluchowskiegopl
dc.contributor.authorKapanowski, Andrzej - 100452 pl
dc.contributor.authorGałuszka, Łukaszpl
dc.date.accession2016-11-14pl
dc.date.accessioned2016-11-23T11:25:18Z
dc.date.available2016-11-23T11:25:18Z
dc.date.issued2016pl
dc.date.openaccess0
dc.description.accesstimew momencie opublikowania
dc.description.publication0,8pl
dc.description.versionostateczna wersja wydawcy
dc.description.volume11pl
dc.identifier.articleid3pl
dc.identifier.eissn1834-3147pl
dc.identifier.urihttp://ruj.uj.edu.pl/xmlui/handle/item/32738
dc.identifier.weblinkhttp://ojs.pythonpapers.org/index.php/tpp/article/view/270/239pl
dc.languageengpl
dc.language.containerengpl
dc.rightsDodaję tylko opis bibliograficzny*
dc.rights.licenceCC-BY-NC-SA
dc.rights.uri*
dc.share.typeotwarte czasopismo
dc.subtypeArticlepl
dc.titleWeighted graph algorithms with Pythonpl
dc.title.journalThe Python Paperspl
dc.typeJournalArticlepl
dspace.entity.typePublication
dc.abstract.enpl
Python implementation of selected weighted graph data structures and algorithms is presented. The minimal graph interface is defined together with several classes implementing this interface. Graph nodes can be any hashable Python objects. Directed edges are instances of the Edge class. Graphs are instances of the Graph class. It is based on the adjacency-list representation, but with fast lookup of nodes and neighbors (dict-of-dict structure). Other implementations of this class are also included, for instance, the adjacency matrix representation (list-of-list structure). Multigraphs are instances of the Multigraph class.In this work, many algorithms are implemented using a unified approach. There are separate classes and modules devoted to different algorithms. Three algorithms for finding a minimum spanning tree are implemented: the Boruvka's algorithm, the Prim's algorithm (three implementations), and the Kruskal's algorithm. Three algorithms for solving the single-source shortest path problem are implemented: the dag shortest path algorithm, the Bellman-Ford algorithm, and the Dijkstra's algorithm (two implementations). Two algorithms for solving all-pairs shortest path problem are implemented: the Floyd-Warshall algorithm and the Johnson's algorithm.All algorithms were tested by means of the unittest module, the Python unit testing framework. Additional computer experiments were done in order to compare real and theoretical computational complexity. The source code is available from the public GitHub graphs-dict repository.
dc.affiliationpl
Wydział Fizyki, Astronomii i Informatyki Stosowanej : Instytut Fizyki im. Mariana Smoluchowskiego
dc.contributor.authorpl
Kapanowski, Andrzej - 100452
dc.contributor.authorpl
Gałuszka, Łukasz
dc.date.accessionpl
2016-11-14
dc.date.accessioned
2016-11-23T11:25:18Z
dc.date.available
2016-11-23T11:25:18Z
dc.date.issuedpl
2016
dc.date.openaccess
0
dc.description.accesstime
w momencie opublikowania
dc.description.publicationpl
0,8
dc.description.version
ostateczna wersja wydawcy
dc.description.volumepl
11
dc.identifier.articleidpl
3
dc.identifier.eissnpl
1834-3147
dc.identifier.uri
http://ruj.uj.edu.pl/xmlui/handle/item/32738
dc.identifier.weblinkpl
http://ojs.pythonpapers.org/index.php/tpp/article/view/270/239
dc.languagepl
eng
dc.language.containerpl
eng
dc.rights*
Dodaję tylko opis bibliograficzny
dc.rights.licence
CC-BY-NC-SA
dc.rights.uri*
dc.share.type
otwarte czasopismo
dc.subtypepl
Article
dc.titlepl
Weighted graph algorithms with Python
dc.title.journalpl
The Python Papers
dc.typepl
JournalArticle
dspace.entity.type
Publication
Affiliations

* The migration of download and view statistics prior to the date of April 8, 2024 is in progress.

Views
15
Views per month
Views per city
Lodz
3
Wroclaw
3
Gdansk
2
Krakow
2
Warsaw
2
Kleosin
1
Lublin
1

No access

No Thumbnail Available