PLoS ONE

PLoS One. 13(11): e0207536

On the limit value of compactness of some graph classes

Tatiana Lokot, Conceptualization, Formal analysis, Validation, Writing – review & editing¹, Alexander Mehler, Conceptualization, Funding acquisition, Methodology, Project administration, Supervision, Writing – review & editing², http://orcid.org/0000-0002-6547-1415Olga Abramov, Conceptualization, Methodology, Writing – original draft, Writing – review & editing³*

Siamak Yassemi, Editor

1. Retired, Faculty of Mathematics, Bielefeld University, Bielefeld, Germany

2. Affiliation Faculty of Computer Science and Mathematics, Goethe-University Frankfurt, Frankfurt, Germany

3. Affiliation CITEC/Faculty of Technology, Bielefeld University, Bielefeld, Germany

University of Tehran, ISLAMIC REPUBLIC OF IRAN

Competing Interests: The authors have declared that no competing interests exist.

* E-mail: oabramov@techfak.uni-bielefeld.de

© 2018 Lokot et al

DOI: 10.1371/journal.pone.0207536

Published online: 20 November 2018

Abstract

In this paper, we study the limit of compactness which is a graph index originally introduced for measuring structural characteristics of hypermedia. Applying compactness to large scale small-world graphs (Mehler, 2008) observed its limit behaviour to be equal 1. The striking question concerning this finding was whether this limit behaviour resulted from the specifics of small-world graphs or was simply an artefact. In this paper, we determine the necessary and sufficient conditions for any sequence of connected graphs resulting in a limit value of CB = 1 which can be generalized with some consideration for the case of disconnected graph classes (Theorem 3). This result can be applied to many well-known classes of connected graphs. Here, we illustrate it by considering four examples. In fact, our proof-theoretical approach allows for quickly obtaining the limit value of compactness for many graph classes sparing computational costs.

Introduction

Evidently, a hypertext forms a network of documents mostly linked on the basis of content-related connections. There is a range of studies applying the compactness measure itroduced in [2] in order to answer questions concerning the structure of hypermedia [1–8]. All these studies addressed compactness computing the values of particular graph invariants which implies high computational costs. In this paper, we take a different perspective considering the limit of compactness for different classes of connected graphs proof-theoretically. Our approach allows for omitting the computational step when the conditions below hold.

The paper is organized as follows. Section starts with repeating graph-theoretical notions used throughout the paper. Section outlines our main findings regarding the limit value of compactness. Section illustrates the application of our tool on four selected graph classes. Finally, Section summarizes our mathematical findings and gives an outlook on results obtained which are part of a subsequent publication. More specifically, in Section we give an overview of those graph classes for which compactness can be easily obtained applying our mathemaical tool (in fact, we have studied about 30 well-known graph classes, there are presumably more than those mentioned here for which our tool can be applied).

Preliminaries

In this Section, we recall some definitions from graph theory to be used throughout this paper. Let G be a simple undirected graph with the vertex set V = V(G) and the edge set E = E(G). The order n of G is the number of its vertices (n = |V|). The size of G is the number of its edges.

Definition 1. The degree (or valency) deg(v) of a vertex v of a graph G is the number of edges incident to v in G.

Definition 2. The geodesic distance δ(v, w) of two vertices u and v in graph G is the number of edges of the shortest path in G connecting them.

Definition 3. The diameter D(G) of a graph G is the maximum of geodesic distances in G.

By L(G) we denote the average geodesic distance in graph G = (V, E) [9]:

[Image: pone.0207536.e001.jpg]L(G)=∑{v,w}∈[V]2δ(v,w)n(n-1)(1)

Further, we denote the numerator of the fraction in (1) by Σ(G), that is:

[Image: pone.0207536.e002.jpg]Σ(G)=∑{v,w}∈[V]2δ(v,w)(2)

Thus, (1) can be rewritten as:

[Image: pone.0207536.e003.jpg]L(G)=Σ(G)n(n-1)(3)

Further, for every vertex c ∈ V we denote by Σ(c, G) the sum of n − 1 geodesic distances from c to vertices in V \ {c}. That is:

[Image: pone.0207536.e004.jpg]Σ(c,G)=∑u∈Vδ(c,u)(4)

and using this notation we write

[Image: pone.0207536.e005.jpg]Σ(G)=∑u∈VΣ(u,G)(5)

For example, for the path graph P₂ on two vertices u and v connected by an edge we get

and

We repeat the definition of the compactness CB(G) of a graph G = (V, E), |V| = n > 1, as introduced in [2] in a version obtained from [1]:

[Image: pone.0207536.e008.jpg]CB(G)=K(n-1)n-(∑{v,w}∈[V]2δ(v,w)+K∑G′∈Com(G)|G′|(|V|-|G′|))(K-1)n(n-1)(6)

where K is “the maximum value an entry in the converted distance matrix [of a graph] can assume” [2, p. 161], Com(G) is the set of connected components of G and |G′| is the order of the graph G′ (connected component of the graph G). In what follows, we set K = n. Here, we consider only connected graphs, so we can obviously write the following:

[Image: pone.0207536.e009.jpg]CB(G)=nn-1-L(G)n-1.(7)

On can easily see that CB(G) ≤ 1. Further, since ∀{v, w} ∈ [V]²: D(G) ≥ δ(v, w), we have:

[Image: pone.0207536.e010.jpg]0≤L(G)≤D(G).(8)

Thus, with (7) and (8) we get for every connected graph G:

[Image: pone.0207536.e011.jpg]1≥CB(G)=nn-1-L(G)n-1=1-L(G)-1n-1≥1-D(G)-1n-1(9)

Definition 4. The path graph Pm, m ≥ 2, is a simple connected undirected graph with two vertices of degree 1 (called terminal vertices) and m − 2 vertices of degree 2 (called internal vertices).

The order n of Pm is equal to m and its diameter D(Pm) = m − 1. The vertices of Pm can be labeled by the consecutive integers {1, 2, …, m} in such a way that the terminal vertices are labeled by 1 and m, respectively, and for every integer i, 1 ≤ i ≤ m − 1, the consecutive vertices with labels i and i + 1 are adjacent.

Further we need the following formula the proof of which one can easily get with the straightforward calculation:

[Image: pone.0207536.e012.jpg]Σ(Pm)=m(m2-1)3(10)

Hence in view of (3) we have

and

[Image: pone.0207536.e014.jpg]CB(Pm)=mm-1-m+13(m-1)=23+13(m-1)(11)

Definition 5. The Cartesian product G₁☐G₂ of two graphs G₁, G₂ is a graph with vertex set V(G₁) × V(G₂ ) such that any two vertices (v, u), (w, z) ∈ V(G₁☐G₂ ) are adjacent iff v = w and u and z are adjacent in G₂ or v and w are adjacent in G₁ and u = z.

Remark 1. If G = G₁☐G₂ is the Cartesian product of two graphs G₁ of order n₁ and G₂ of order n₂, then the following properties (referred to below) hold:

G is connected iff both G₁ and G₂ are connected;

the diameter of G is the sum of the diameters of G₁ and G₂:

the order n of G is the product n₁ n₂ of the order n₁ of G₁ and the order n₂ of G₂.

Example 1. Let us consider the Cartesian product G(m) of two copies of the path graph Pm, that is, G(m) = Pm☐Pm (a so-called square lattice graph whose compactness CB is investigated below). According to Remark 1, G(m) is connected (since Pm is connected), its order is m² and its diameter D(G(m)) is 2(m − 1).

Main results

Throughout the present paper we deal with sequences {G(m)|m = 1, 2, …} of connected graphs that satisfy the following “natural” condition

[Image: pone.0207536.e016.jpg]limm→∞n(m)=∞(12)

where n is the order of the graph G(m).

Theorem 1. Let {G(m)|m = 1, 2, …} be a sequence of simple undirected connected graphs G(m) such that the order n = n(m) → ∞ for m → ∞. Assume that the following holds:

[Image: pone.0207536.e017.jpg]limm→∞D(G(m))n=0,(13)

where D(G(m)) is the diameter of the graph G(m). Then, the compactness CB(G(m)) tends to 1 for m → ∞.

Proof. In view of (9) we have

which implies with our assumptions that

Theorem 2. Let {G(m)|m = 1, 2, …} be a sequence of simple undirected connected graphs G(m) such that the order n = n(m)→∞ for m → ∞. Then, L(G(m))/n →0 for m → ∞ (n → ∞) iff D(G(m))/n → 0 for m → ∞ (n → ∞).

Proof. In view of (8), we can easily see that we only need to prove that if D(G)/n ↛ 0 for m → ∞ then L(G)/n ↛ 0 for m → ∞.

Without loss of generality we assume that

Hence, if we take any number a, 0 < a < c, then for all sufficiently large numbers m we have

which implies that there is a geodesic path (subgraph Pk(n)) in G of length k(n) where k(n) is the integer part of the number an. So we have an = k(n) + εn with εn (0 ≤ εn < 1) being the fractional part of the number an. Therefore, in view of Σ(G) > Σ(Pk(n)) and with (10) we have for all sufficiently large m

Thus, with k(n) = an − εn we get

which implies in view of limm→∞ n = ∞ that for all sufficiently large numbers m we have

Hence, L(G)/n ↛ 0.

From these two theorems obviously follows:

Corollary 1. For any sequence of simple undirected connected graphs G(m) for which the order n = n(m) of G(m) tends to ∞ whenever m → ∞, CB(G(m)) → 1 for m → ∞ iff for m → ∞ L(G(m))/n → 0 (D(G(m))/n → 0).

And what about the case of disconnected graphs? It turns out that Corollary 1 can be easily generalized with some consideration for the case of disconnected graph classes. That is, the following statement holds:

Theorem 3. Let {G(m)|m = 1, 2, …} be a sequence of simple undirected not necessarily connected graphs G(m) such that the order n = n(m) → ∞ for m → ∞. Then, the compactness CB of G(m) tends to 1 iff both of the following equalities hold:

L(G(m))/n →0 (or D(G(m))/n → 0) for m → ∞

limm→∞ n₁/n = 1 (equivalently, limm→∞(n − n₁)/n = 0), where n₁ is the order of the largest connected component of G(m).

These results give an answer to the question in which case CB(G(m)) tends to 1 for m → ∞ (n → ∞).

Some simple applications

In this section, we consider four simple classes of undirected connected graphs and examine their compactness CB in the limit of their order (i.e., n → ∞). Sometimes, CB is easily estimated as in the case of complete graphs. In most cases, however, it is difficult to calculate the exact value of CB or to give a good estimation of it. Here, we refer to Corollary 1 in order to do this.

The examples of graphs considered here have the following properties. Their diameter D(G) is either constant or grows slower than its order n in such a way that D(G)/n tends to 0 whenever n tends to ∞.

Complete graphs

A complete graph Kn of order n is a simple undirected graph with n vertices such that each pair of distinct vertices is connected by a unique edge. That is, the average geodesic distance L(Kn) and the diameter D(Kn) both are equal to 1. Using (7), we get the exact value of compactness CB(Kn) of Kn:

It is worth noting that the complete graph Kn is the only graph for which CB(Kn) equals 1. This trivially results in the following equality:

The same result is obtained by directly applying Corollary 1.

Star graphs

A star graph Sm on m vertices (m > 2) is a simple undirected connected graph in which one vertex called central vertex has degree m − 1 and another m − 1 vertices have degree 1.

Consider a sequence {Sm|m = 1, 2, …} of connected star graphs of order n = m where diameter D(Sm) is obviously equal to 2 ∀m ≥ 3. By using Corollary 1 we immediately obtain (seemingly counter-intuitively to what we expect should be measured by compactness):

It is worth noting that for Sm (m > 2) it is easy to calculate the value of L(Sm) and of CB(Sm). Indeed, we have

where Σ(G) is defined by (2). Next, using (3), L(Sm) can be computed as follows:

So with (7) we clearly have

Hence, it follows that CB(Sm) → 1 as m → ∞. Thus, we get the same result as in the case of complete connected graphs by calculating CB(Sm) without Corollary 1.

Lattice graphs

We consider a simple undirected graph G(m) whose vertices can be associated with the points in the plane with the integer x and y coordinates being both in the range 1, 2, …m. Two vertices are connected by an edge if and only if the distance between them is equal to 1. Such a graph is called a lattice graph or a square grid graph and can be viewed as the Cartesian product of two copies of the path graph Pm, that is, G(m) = Pm☐Pm (see Example 1). So, we only repeat that G(m) is connected, has the order n = m² and the diameter D(G(m)) = 2(m − 1).

Let us consider a sequence {G(m)|m = 1, 2, …} of lattice graphs. What is the limit value of CB(G(m))? With n = m² and D(G(m)) = 2(m − 1) we have

and

Hence, with Corollary 1 we immediately have limm→∞ CB(G(m)) = 1.

Hypercube graphs

A hypercube graph Qm is a simple undirected connected graph on 2m vertices labeled by the numbers 0, 1, …, 2m − 1. Two vertices are connected by an edge if and only if the binary representations of their labels differ exactly in one position. Qm can also be defined as the Cartesian product of m copies of the path graph P₂:

In view of Remark 1 of Section, we see that Qm is connected (because P₂ is connected), its diameter D(Qm) equals m and its order n is 2m. We easily see that the fraction D(Qm)/n = m/2m tends to zero for m → ∞, so with Corollary 1 we obtain:

Concluding remarks

We confined us here to providing only four simple examples of the graph classes, for which our tool can be easily applied. Actually, we have found more than 30 well-known graphs classes for which our tool is applicable. So, the compactness of these graphs tends to 1 whenever their order tends to ∞.

First, among these graph classes there are those whose diameter does not depend on the order n. These are book graphs, complete r-partite graphs, crown graphs, Hadamard graphs, Keller graphs, lating square graphs, Paley graphs, strongly regular graphs, Turán graphs, wheel graphs, windmill graphs and some others.

Next, we found some graph classes for each of which the estimation of its diameter as a function of the order n allows the application of our tool. Among those graph classes are the following: de Bruijn graphs, cube-connected cycles, Fibonacci cube graphs, folded cube graphs, Hamming graphs, Johnson graphs, king’s graphs, Kneser graphs, knight’s graphs, perfect undirected binary trees, self-complementary graphs, Ramanujan graphs and others.

Further, we have seen in Section that the complete graph Km has the largest possible value of compactness which is 1. So we can say that the graph Km is the most compact graph among all the graphs of the same order m. If we try now to get the limit value of compactness of the path graph Pm using our tool, we see that this is not possible because D(Pm)/m ↛ 0 for m → ∞. Indeed,

but with (11) we easily get limm→∞ CB(P(m)) = 2/3. We can prove (to appear) that the path graph Pm is the least compact among all the simple connected undirected graphs of the same order m. That is, for each such graph G of order m the following holds:

This finding defines the range of possible values of compactness for connected graphs. Hence, the limit value of compactness for any sequence of simple connected undirected graphs lies within the interval [2/3; 1]. Moreover, we can prove (to appear) that for any number α in the interval [2/3; 1] a graph family can be constructed for which the limit value is exactly α.

It is worth noting that in the case of not necessarily connected graphs the value of compactness lies within the interval [0, 1]. Our future work will consider, amongst others, an extended set of graph classes and the study of a range of invariants including weighted and unweighted ones.

Acknowledgments

This work has been funded by German Federal Ministry of Education (BMBF) in the framework of the research project Linguistic Networks: Text Technological Representation, Computational Linguistic Synthesis and Physical Modeling and by the Deutsche Forschungsgemeinschaft (DFG) in the framework of the research project EcoGest (https://scs.techfak.uni-bielefeld.de/ecogest/). Financial support by the BMBF and the DFG is gratefully acknowledged.

Articles from PLoS ONE are provided here courtesy of Public Library of Science

PMC Copyright Notice

The articles available from the PMC site are protected by copyright, even though access is free. Copyright is held by the respective authors or publishers who provide these articles to PMC. Users of PMC are responsible for complying with the terms and conditions defined by the copyright holder.

Users should assume that standard copyright protection applies to articles in PMC, unless an article contains an explicit license statement that gives a user additional reuse or redistribution rights. PMC does not allow automated/bulk downloading of articles that have standard copyright protection.

See the copyright notice on the PMC site, https://www.ncbi.nlm.nih.gov/pmc/about/copyright/, for further details and specific exceptions.

References

Mehler A. Structural Similarities of Complex Networks: A Computational Model by Example of Wiki Graphs. Applied Artificial Intelligence. 2008;22(7-8):619–683. 10.1080/08839510802164085

Botafogo RA, Rivlin E, Shneiderman B. Structural Analysis of Hypertexts: Identifying Hierarchies and Useful Metrics. ACM Transactions on Information Systems. 1992;10(2):142–180. 10.1145/146802.146826

Mendes E, Counsell S, Mosley N. Measurement and Effort Prediction for Web Applications In: Web Engineering, Software Engineering and Web Application Development. London, UK, UK: Springer-Verlag; 2001 p. 295–310. Available from: http://dl.acm.org/citation.cfm?id=647063.714744.

Egghe L, Rousseau R. A measure for the cohesion of weighted networks. Journal of the American Society for Information Science and Technology. 2003;54(3):193–202. 10.1002/asi.10155

Smeaton AF, Morrissey PJ. Experiments On The Automatic Construction Of Hypertext From Texts; 1995.

Smeaton AF. Building Hypertexts under the Influence of Topology Metrics In: Fraïssé S, Garzotto F, Isakowitz T, Nanard J, Nanard M, editors. Hypermedia Design. London: Springer London; 1996 p. 105–106.

Abramov O, Mehler A. Automatic Language Classification by Means of Syntactic Dependency Networks. Journal of Quantitative Linguistics. 2011;18(4):291–336. 10.1080/09296174.2011.608602

Mehler A, vor der Brück T, Gleim T Rüdiger und Geelhaar. In: Towards a Network Model of the Coreness of Texts: An Experiment in Classifying Latin Texts using the TTLab Latin Tagger. Springer; 2015. p. 87–112.

Newman MEJ. The structure and function of complex networks. SIAM Review. 2003;45:167–256. 10.1137/S003614450342480