On Social Networks in Plays and Novels

Literary works can be analysed in the framework of network theories, as proposed for instance by the Stanford Literary Laboratory, in some of their experiments. In fact, the plot of a play or a novel can be displayed as a network of interacting characters, where the timeline of the plot is projected on a planar graph. Here we discuss this approach and how it can help in highlighting some features of the literary work.


Introduction
The studies dealing with literature, that is the literary studies, are naturally different from the studies of scientific disciplines because a reader or writer can have a subjective opinion, based on feelings or emotions rather than on facts.However, we can ask ourselves if some "experiments" can be proposed or even "laboratories" on literature can exists.
We can define a "literary laboratory" as a place, real or virtual, where experiencing some researches on literature, researches based on quantitative experiments.A real place can exists for instance as a room where some people can read and discuss about books, or it can be a virtual place on the Web, suitable for interactions on literary subjects.In the academic world, a literary laboratory could be imagined as a sort of modern "scriptorium", where the documents are digitalized and then analyzed by humans and computers.The "scriptorium" was a room in medieval European monasteries devoted to the copying of manuscripts by monastic scribes.Instead of monks we have computers, scanners and optical character recognition systems.
An example of such a modern "scriptorium" is the Stanford Literary Laboratory, founded in 2010 by M. Jockers and F. Moretti.Writing about it, J. Sunyer of the Financial Times [1] noted the following, that for centuries, "the basic task of literary scholarship has been close reading of texts."However, nowadays, to some academic people the "literary study doesn't always require scholars to read books.This new approach to literature depends on computers" to produce new insights.From [1], it seems then that the main goal of such laboratory is a quantitative, and partially automatic, analysis of literature.
Among the aims of the researchers of this laboratory we find the plot analysis based on network theories [2].The network is showing, by means of a graph on a plane, the structure of the plot of a literary work with its timeline projected on this plane.Of course, this approach could be modified in order to have a three-dimensional structure, adding an orthogonal axis, representing the time, to several parallel planes, one plane specifically devoted to an act of a play for instance, or to a novel in a series featuring the same main characters.
In this paper, we will address ourselves to the analysis on the Shakespeare's Hamlet proposed in a publication of the Stanford laboratory [2] and then on the first novel of the Harry Potter's series, Harry Potter and the Philosopher's Stone, written by J.K. Rowling.As we will see, the network of characters can be obtained, or, "abstracted" from some real-life networks, considering for instance models of the real life and imagining them appearing on a stage.As told by J. Stiller et al. in [3], the drama, "at least according to the Aristotelian view, is effective inasmuch as it successfully mirrors real aspects of human behavior.This leads to the hypothesis that successful dramas will portray fictional social networks that have the same properties as those typical of human beings across ages and cultures."Ten of Shakespeare's plays had been analyzed, determining that the groups portrayed in the plays correspond closely to those which have been observed in spontaneous human interaction.Therefore, the networks of the plays exhibit smallworld properties of the type which have been observed in many human-made and natural systems [3].An academic institution, such as that of Stanford, has the possibility of using sophisticated devices and algorithms and support persons; however some simple network analyses are possible by a single user or a few readers.Here, after discussing Shakespeare's Hamlet, we will propose a "literary experiment" on the first novel of Harry Potter's series.We will see the social network of its characters and a part of its plot projected on a graph, followed by a simple analysis of the network.However, before discussing this experiment and the data we can obtain from it, let us shortly talk about the Stanford Literary Laboratory and the plot analysis they are performing.

A Literary Laboratory and its possibilities
The Stanford Literary Laboratory has been founded in 2010 by Matthew Jockers and Franco Moretti.It is pursuing literary research of a digital and quantitative nature [4].The laboratory has a variety of projects, ranging from dissertation chapters to individual and group publications, lectures, courses, conference panels and short books.As told by the Web site, their researches take the form of "experiments", extending over a period of one or two years.The published works of the Lab are on the Web under the heading of "Pamphlets".
One of the available pamphlets is that written by Moretti in 2011 on the plot analysis in the framework of a network theory [2].In the introduction of it, the author writes that "in the last few years, literary studies have experienced what we could call the rise of quantitative evidence.This had happened before of course, without producing lasting effects, but this time it's probably going to be different, because this time we have digital databases, and automated data retrieval… When it comes to phenomena of language and style, we can do things that previous generations could only dream of.But if you work on novels or plays, style is only part of the picture."The publication written by Moretti is then aimed on the plot quantification by means of a network analysis.

Character networks
"A network is made of vertices and edges; a plot, of characters and actions: characters will be the vertices of the network, interactions the edges" [2].This is the starting point of Moretti's analysis of networks applied to literary studies.He is proposing for instance the Hamlet network."Two characters are linked if some words have passed between them: an interaction, is a speech act.This is not the only way to do things, the authors of a previous paper on Shakespeare had linked characters if they had speaking parts during the same scene, even if they did not address each other".Moretti uses explicit connections in his network: the graph is prepared by considering each character as a vertex and characters being linked by some specific interactions, for instance "there was at least one time slice of the play in which both were present".Another application of network theory to narrative is in Reference 5, where "two characters are linked when they jointly appear in a significant way in the same comic book".
Moretti is also telling that weight and direction are particularly important in literary networks, because, "whereas the systems studied by network theory have easily thousands or millions of vertices, whose relevance can be directly expressed in the number of connections, plots have usually no more than a few dozen characters; as a consequence, the mere existence of a connection is seldom sufficient to establish a hierarchy, and must be integrated with other measurements".
The approach to literary studies based on the networks has a consequence: "once you make a network of a play, you stop working on the play proper, and work on a model instead: you reduce the text to characters and interactions, abstract them from everything else, and this process of reduction and abstraction makes the model obviously much less than the original object" [2].It's like to have X-ray imagines of plots.
In the analysis of Hamlet's network, visualizing the results in the form of a histogram, Moretti finds the power-law distribution, characteristic of all networks having a few characters with many edges and several characters with just one or two edges.The same results are obtained for Macbeth, Lear and Othello.And therefore, there is an important conclusion: "Why is the protagonist significant here?Not for what is "in" it; not for its essence, but for its function in the stability of the network.And stability has clearly much to do with centrality, but is not identical to it.Take the second most central character of the play: Claudius.In quantitative terms, Claudius is almost as central as Hamlet …; but in structural terms not so, when we remove him from the network what happens is that a handful of peripheral characters are affected, but the network as a whole not much."[2] Other experiments on the Hamlet's network are shown in several graphs in the Reference 2.

A scale-free network
The degree sequence of the characters in Shakespeare's Hamlet is shown in the following Figure 1.Let us remember that the degree of a node is the number of edges incident to the node.The degree distribution is the probability distribution of these degrees over the whole network.A scale-free network is a network whose degree distribution follows a power law, at least asymptotically.That is, the fraction ( ) of nodes in the network having k connections to other nodes goes for large values of k as ( ) , where γ is a parameter whose value is typically in the range 2 < γ < 3, although occasionally it may be outside these bounds [6].The experimental ( ) of a network is defined as the fraction of nodes in the network with degree k.Thus if there are n nodes in total in a network and of them have degree k, we have ( ) .Using all the nodes from Figure 1, we have γ=1.175,after a best-fit obtained by ( ) , where a and γ changes in some ranges.For Figure 1, a=0.39.This network has a low power-law exponent: in fact, for γ <2, the network has a few nodes having a low degree .
As told in Reference 5, despite some differences, "all collaboration networks studied so far present the same basic features: (a) on average, every pair of nodes can be connected through a short path within the network; (b) the probability that two nodes are linked is greater if they share a neighbor; and (c) the fraction of nodes with k neighbors decays roughly as a function of the form , for some positive exponent γ, with perhaps a cutoff for large values of k.A network satisfying properties (a) and (b) is called a small-world [7,8], and if it satisfies (c) then it is called scale-free [9,10]." A feature of a scale-free network is that it is selfsimilar, and in it, there are large hubs but also smaller hubs [11]."Networks that have this distribution are known as scale-free.[12] makes the observation that while random networks resemble highway maps, scale-free networks look more like airline service routes.Unlike random graphs, scale-free graphs have a few nodes of very large degree (hubs).In many social networks a relevant quantity is the average distance between any two nodes.A random graph with N nodes has an average distance that scales as ln N.Not surprisingly, scale-free graphs are smaller (and in fact are maximally small).For example, the average distance on scale-free graphs with 2 < γ < 3 goes like ln ln N. … Not surprisingly, the existence of hubs in scale-free networks informs many of their salient features."[11] After the best-fit of Hamlet's network, we found γ <2.Let us try to add some edges to Hamlet's node, supposing a conversation with other characters.For instance, let us increase Hamlet from 16 to 20, this means than the networks increase of 4 nodes.
Moreover, we imagine these four nodes having a single edge.After a best-fit, we have a=0.46 and γ =1.475.Now, let us suppose that Hamlet had degree 30 and Claudius 20, and that seven of the new nodes incident on Hamlet are interacting with seven of the new nodes incident on Claudius, the rest of new nodes has a single degree: we have a=0.725 and γ =1.875.After this experiment, we have that when γ is high, the number of nodes with high degree is smaller than the number of nodes with low degree."A high value of γ represents a network in which the distribution of edges is fairer" [13].
This analysis means that the Hamlet's network could be composed from nodes and edges of a larger network: we can imagine that he had servants and officers that do not appear in the play.Adding them to him and Claudius we arrive to a network having a larger power.Then, the play is based on a network, modeled on a larger real-life network and abstracted from it.
The publication written by Moretti continues with some conclusions on the plot of the tragedy gained in the framework of the network analysis.Of course, these are linked to some features of the Shakespeare's literature.

Harry Potter's social network and discussion
Let us consider here the same approach used for Shakespeare's Hamlet applied to a novel: here it is the "Harry Potter and the Philosopher's Stone" ( or Sorcerer's Stone), where the main character is Harry, a young wizard.Let us suppose the story being well known to the readers.In any case, the plot and a partial list of characters are given in [14].The book, which is J.K. Rowling's debut novel, was published on 26 June 1997.
In [14], it is told that the Harry Potter's series "has also been used as a source of object lessons in educational techniques, sociological analysis and marketing".Let us try then a literary experiment on it http://www.ijSciences.comVolume 2 -October 2013 (10) 23 in the framework of the network analysis too.
Let us find the network of the characters in this novel.The central character is Harry Potter (a hub, or pivot of the novel).Here, I consider all characters: some of them are appearing in explicit connections, for instance a dialog or interaction, others are appearing in implicit connections, such as, for instance, Nicolas Flamel.He is the subject of conversations of Harry and friends, without never occurring as an "on-stage" character.
In the Appendix, the characters (nodes) of the network, their degrees and the details of edges are given.
From this appendix we see that the main character, Harry Potter, has the highest degree, quite larger than those of his friends Ron, Hagrid and Hermione.If we look at the Appendix, we see that Harry is the center of two clusters, one is concerning his life with Dursleys, in the world of the non-magical people, and the other is concerning his life at the Hogwarts School.Then, a graph like that in the Figure 2   From this graph it is clear the role of Hagrid (hub), the person who takes care of Harry before his arrival at the Hogwarts School.In fact, this is the social network of a child (before Facebook, Twitter and other social media, of course), based on parents, relatives and school.In the following Figure 3, the degree sequence of characters is given.Best-fitting ( ) on the data from of Figure 2, we have a=0.22 and γ=0.725.This network has a quite low power-law exponent.However, we can observe the following fact: in the real life a student, a professor or other persons have larger degrees of those we can extrapolate from the novel.For instance, let us consider the Sorting Hat: this character is linked to all the students of the school, therefore its "real" degree is larger than the value we have in the Appendix.A larger degree means the contemporary presence of a larger number of nodes having just two or only one edges insisting on them.
Let us repeat the approach used for parameters of Hamlet's network.Supposing both Harry and Ron have 20 edges more (the pupils of the previous schools) and that these two groups are not linked, the new parameters are a=0.478and γ=1.625.As in the case of Hamlet's network, increasing the degree of a few nodes, and therefore increasing the number of nodes having small degrees, we can move γ towards typical values between 2 and 3. Again, we have that the novel is based on a network, modeled on a larger real-life network.Of course, the nodes and the edges of the proposed network can change and be modified using different rules, therefore the value of γ can be different in a different approach.In any case, the network is scale-free.
Of the Harry Potter's series, it would be interesting to see how this scale-free network changes in the novels of the series, according to the age of the main characters (the hubs) and the age of the readers, shifting from the network of children towards that of adults.
Let us conclude our discussion considering the Aristotelian view on dramas applied to novels too: that is, a novel can be effective when it successfully mirrors the real aspects of human behavior.As told in [2] for dramas, successful novels are portraying fictional social networks which possess the same properties as those typical of human beings.The Rowling's novels demonstrate that the Aristotelian view works well.However, the social network is only a part of the whole literary work and of its eventual success.

Appendix: Edges between Vertices (Characters)
The vertices (nodes) are given in bold letters.For each node the degree and the list of nodes linked to it are given.

Figure 1 :
Figure 1: Degree sequence of the characters in Shakespeare's Hamlet can be given, showing explicitly only a part of the network for the sake of simplicity: this graph is concerning the social network of characters in the novel, before Harry arrives at the Platform 9 ¾ of the King's Cross railway station.

Figure 2 :
Figure 2: A graph representing a part of Harry's network.

Figure 3 :
Figure 3: Degree sequence of the characters in "Harry Potter and the Philosopher's Stone".