Undergraduate Topics in Computer Science
Series Editor
Ian Mackie
University of Sussex, Brighton, UK
Advisory Editors
Samson Abramsky
Department of Computer Science, University of Oxford, Oxford, UK
Chris Hankin
Department of Computing, Imperial College London, London, UK
Mike Hinchey
Lero The Irish Software Research Centre, University of Limerick, Limerick, Ireland
Dexter C. Kozen
Department of Computer Science, Cornell University, Ithaca, NY, USA
Andrew Pitts
Department of Computer Science and Technology, University of Cambridge, Cambridge, UK
Hanne Riis Nielson
Department of Applied Mathematics and Computer Science, Technical University of Denmark, Kongens Lyngby, Denmark
Steven S. Skiena
Department of Computer Science, Stony Brook University, Stony Brook, NY, USA
Iain Stewart
Department of Computer Science, Durham University, Durham, UK
Undergraduate Topics in Computer Science (UTiCS) delivers high-quality instructional content for undergraduates studying in all areas of computing and information science. From core foundational and theoretical material to final-year topics and applications, UTiCS books take a fresh, concise, and modern approach and are ideal for self-study or for a one- or two-semester course. The texts are all authored by established experts in their fields, reviewed by an international advisory board, and contain numerous examples and problems, many of which include fully worked solutions.
The UTiCS concept relies on high-quality, concise books in softback format, and generally a maximum of 275300 pages. For undergraduate textbooks that are likely to be longer, more expository, Springer continues to offer the highly regarded Texts in Computer Science series, to which we refer potential authors.
More information about this series at https://link.springer.com/bookseries/7592
K. Erciyes
Algebraic Graph Algorithms
A Practical Guide Using Python
1st ed. 2021
Logo of the publisher
K. Erciyes
Software Engineering Department, Maltepe University, Maltepe, Istanbul, Turkey
ISSN 1863-7310 e-ISSN 2197-1781
Undergraduate Topics in Computer Science
ISBN 978-3-030-87885-6 e-ISBN 978-3-030-87886-3
https://doi.org/10.1007/978-3-030-87886-3
Springer Nature Switzerland AG 2021
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
To my parents for taking so much effort to raise a large family
Preface
Graphs are discrete structures that find many applications such as modeling computer networks, social networks and biological networks. Graph theory is centered around studying graphs and there has been an unprecedented growth in this branch of mathematics over the last few decades, mainly due to the realization of numerous applications of graphs in real-life.
This book is about the design and analysis of algebraic algorithms to solve graph problems. The algebraic way of analyzing graph problems can be viewed from the angles of group theory and linear algebra. We will mostly use linear algebraic methods which commonly make use of matrices associated with graphs in search of suitable graph algorithms. There are few benefits to be gained by this approach; first of all, many results from matrix algebra theory become readily available, for matrix analysis of graphs. Secondly, various matrix algorithms such as matrix multiplication are readily available, enabling easiness in coding. Moreover, methods for parallel matrix computations are well known and various libraries for this purpose are available which provides a convenient way for parallelizing the algorithms.
The algebraic nature of graphs is a vast theoretical topic with many new and frequent results. For this reason, the level of exposure required careful consideration while forming the detailed topics of the book. At one end; we have rich, resourceful and sometimes quite complicated matrix algebra theory that can be used in the analysis of graphs which does not always result in practical graph algorithms; and at the other extreme, one can frequently devise an algebraic version of a classical graph algorithm by using the matrices that represent graphs. We tried to stay somewhere in between by reviewing main algebraic results that are useful in designing practical graph algorithms and on the other hand, mostly using graph matrices to solve graph problems. The extent of exposure to parallel processing was another decision and after briefly reviewing the basic theory on parallel processing, we provide practical hints for parallel processing associated with algebraic algorithms where possible. Matrix multiplication is at the core of majority of algebraic graph algorithms and any such algorithm may be parallelized conveniently, at least partly, using parallel matrix multiplication methods we describe. Thus, obtaining parallel version of the algorithms reviewed becomes a trivial task in most cases. In summary, the focus of the book is on practical algebraic graph algorithms using results from matrix algebra rather than algebraic study of graphs.
The intended audience for this book is the senior/graduate students of computer science, electrical and electronic engineering, bioinformatics, and any researcher or a person with background in discrete mathematics, basic graph theory and algorithms. There is a Web page for the book to keep errata Python code and other material at: http://ube.ege.edu.tr/~erciyes/AGA/erciyes/AGA/ .
Python Implementation
For almost all algorithms, we provide Python programming language code that can be modified and tested for various inputs. Python is selected for its simplicity, efficiency and rich library routines and hence the name of the book. The code for an algorithm is not optimized and brevity is forsaken for clarity in many cases. In various algorithms, we use different data structures and methods for similar problems to show alternative implementations. The codes are tested for various sample graphs, however; as it frequently happens with any software, errors are possible and I would be happy to know any bugs by e-mail at kayhanerayes@maltepe.edu.tr.