Analyzing Narratives in Social Networks: Taking Turing to the Arts [1 ed.] 3030682986, 9783030682989

This book uses literature as a wrench to pry open social networks and to ask different questions than have been asked ab

422 62 20MB

English Pages 414 Year 2021

Report DMCA / Copyright

DOWNLOAD FILE

Polecaj historie

Analyzing Narratives in Social Networks: Taking Turing to the Arts [1 ed.]
 3030682986, 9783030682989

  • Commentary
  • Vector PDF

Table of contents :
Preface
Introduction
How to Read This Book
Download Materials
Overview
Synopsis
Acknowledgements
Words of Thanks
Contents
1 Overview of the Book
1.1 Introduction
1.2 Brief Notes on Notation and Definitions
1.3 The Role of Interpretation in Literature and Math
1.4 Social Clocks
1.5 Psychology-Driven Algorithms
1.6 Looking Ahead
Part I Static Literature Networks
2 Graphs in Dramas
2.1 Introduction
2.1.1 Chapter Overview
2.2 Related Work
2.2.1 Natural Language Processing (NLP)
2.2.2 Literature and Graphs
2.2.3 Markov Chains and Metric Space
2.3 Definitions
2.3.1 Scripts
2.4 Graphs for Dramas
2.4.1 Frequency Graphs
2.5 Construction of the WW,AB,ABA Graphs
2.5.1 WW Graph
2.5.2 The AB Graph
2.5.3 The ABA Graph
2.5.4 ABA Subgraph of AB
2.5.5 Single Edge Changes in Social Networks
2.6 Transforming Literature Graphs
2.6.1 Markov Chains
2.6.2 Metric Space
2.6.3 From Frequency Graph G(V,E) to Metric Space (V,dis)
2.7 Applications of Frequency Graphs
2.8 Conclusion
2.9 Exercises
3 Partition in Social Network
3.1 Introduction
3.2 Partition and Conflict
3.2.1 Graph Partition
3.2.2 Partitions as Functions
3.2.3 Party Member Vectors and Functions
3.2.4 Conflict in Literature and Social Networks
3.2.5 Partition as Incidence Matrix
3.3 Related Work
3.4 Community Detection Algorithms
3.4.1 Vertex Moving Algorithm
3.4.2 Spectral Algorithm
3.4.3 Modularity Maximization
3.4.4 Edge Centrality Partition
3.4.5 Clique Percolation Method
3.4.6 Hierarchical Clustering
3.5 Experimenting with Community Detection Algorithms
3.6 Community Detection Algorithms and Literature Networks
3.7 Conflict Search Space
3.8 Conclusion
3.9 Exercises
4 Taking the Road Less Traveled: Decision Matrices
4.1 Introduction
4.2 Related Work
4.2.1 Option Analysis
4.3 Conflict Dynamics
4.3.1 Sequence of Partitions
4.3.2 Fixed Points and Conflict Dynamics
4.4 Example: Election in Gridland
4.4.1 Summary of Gridland Election
4.4.2 Community Detection Algorithms and Narrative
4.5 Infusing Logic into the Model: Decision Matrix
4.6 Decision Functions
4.7 Decision Matrix Example: Influence Functions
4.8 Conclusion
4.9 Exercises
5 Social Rationality and Networks
5.1 Introduction
5.2 Related Work: Social Rationality
5.3 Freedom of Interpretation and Anchors
5.3.1 Direction of Total Order
5.4 Utility Anchors
5.5 Rationality in Social Networks
5.6 Partition Functions
5.6.1 Personal Partition Function
5.7 Conflict Functions
5.7.1 Narrative Interpretation and Conflict Functions
5.7.2 Community Detection Algorithms and Conflict Functions
5.8 Rationality as Narrative
5.9 Conclusion
5.10 Exercises
6 Sun Tzu Says: Direct Attack
6.1 Introduction
6.2 Related Work: Voronoi Partitions
6.3 Direct Attack as Metric Space
6.3.1 Example: Euclidean Voronoi Partitions
6.4 Voronoi Option Analysisi
6.4.1 Voronoi: Optimization Description
6.4.2 Example: Voronoi War
6.4.3 Gridland Becomes Cycleland
6.4.4 Cycleland
6.4.5 Voronoi: Algorithmic Description
6.4.6 ``Speed is the Essence of War''
6.5 Rationality of Voronoi Option Analysis
6.6 Voronoi Partition as a Greedy Algorithm
6.7 Conclusion
6.8 Exercises
7 Indirect Attack
7.1 Introduction
7.2 Related Work
7.3 Voting Option Analysis
7.3.1 Voting: Kirchhoff Description
7.3.2 Voting: Markov Chain Description
7.3.3 Voting Optimization Description: Divide and Conquer
7.3.4 Voting and Nas Equilibrium
7.3.5 Voting: Algorithmic Description
7.4 Solving the Voting System
7.5 Rationality of the Voting Algorithm
7.6 Conclusion
7.7 Exercises
8 1812: Social Networks Capture Napoleon
8.1 Introduction
8.2 Capturing Nodes in Consecutive Conflicts
8.3 Winning and Losing
8.3.1 Battle of Borodino (1812)
8.3.2 US Presidential Elections
8.4 Incorporating Narrative into War
8.4.1 Example
8.5 Party Power Base
8.6 Total War: Elimination of a Party
8.7 Conclusion
8.8 Exercises
9 The Search for Conflict
9.1 Introduction
9.2 Algorithm Complexity of Conflict
9.2.1 Computing Conflicts in Narratives
9.2.2 Measuring Conflict in Decision Matrices
9.3 Literary Analysis
9.4 Conclusion
9.5 Exercises
10 Ego Networks in Dramas
10.1 Introduction
10.2 Related Work
10.3 Definition of Ego Networks
10.4 Ego Networks in Dramas
10.5 Conclusion
10.6 Exercises
Part II Evolution and Time in Literature Networks
11 Introduction to Evolving Social Networks
11.1 Introduction
11.2 Notation
11.2.1 Modeling Time
11.2.2 Modeling Space
11.3 Related Work
11.4 Evolving Social Networks: The Model
11.5 Evolving Social Networks: Example
11.5.1 Link Streams as Evolving Social Networks
11.5.2 Weighted Link Streams
11.6 From Performance Text to Link Stream
11.7 Link Streams with a Codomain of Matrices
11.8 Integration of Link Streams
11.8.1 Link Stream Integration over Graph Space
11.8.2 Differentiable
11.9 Sub-evolving Social Network
11.10 Conclusion
11.11 Exercises
12 Clocks
12.1 Introduction
12.2 Related Work
12.2.1 Subjective, Retrospective, and Prospective Time
12.3 The Relationship Between Prospective Clocks and Retrospective Clocks
12.4 General Clocks
12.5 Discrete Clocks
12.6 Continuous Clocks
12.6.1 Moving from Discrete Clocks to Continuous Clocks
12.7 Event Clocks and Weighted Clocks
12.8 Equivalent Clocks
12.9 Normalizing Clocks
12.10 Sub-graph Clocks
12.10.1 Dialog, or Edge, Clocks
12.10.2 Examples of Sub-graph Clocks
12.11 Link Streams and Clocks
12.12 Conclusion
12.13 Exercises
13 M-Diagrams
13.1 Introduction
13.2 Time Diagrams
13.3 M-Diagram Example: The Case of Felix Baumgartner
13.4 M-Diagrams for General Functions
13.5 Conclusion
13.6 Exercises
14 The Tale of Two Clocks
14.1 Introduction
14.2 Related Work
14.3 Framework of Two Clocks
14.3.1 Framework of Two Clocks in Performance Texts
14.4 Time Perception
14.5 Clocks
14.6 Comparing Clocks
14.6.1 Correlation Between Two Clocks
14.7 Single Clock Drift
14.8 The Gap Algorithm of Two Clocks
14.8.1 Comparing Different Clocks in Dramas
14.9 The Law of Two Clocks
14.10 Predicting Using the Clock Drift Algorithm
14.11 Conclusion
14.12 Exercises
15 Real Functions
15.1 Introduction
15.2 Related Work
15.3 Definitions
15.4 Normalized Functions and Correlation
15.5 Example: Degree Centrality
15.6 Degree Centrality in Dramas
15.7 Normalized Degree Centrality in Discrete Time
15.8 Normalized Degree Centrality in Continuous Time
15.9 Application to Dramas
15.9.1 Macbeth and Centrality Measures
15.9.2 The Godfather and Centrality Measures
15.10 Conclusion
15.11 Exercises
16 Evolving Social Network High Dimensions and Time Frames
16.1 Introduction
16.2 Related Work
16.3 High-Dimensional Evolving Social Network
16.4 High-Dimensional Real Function Spaces
16.5 Two-Dimensional Surfaces
16.5.1 The Three Witches in Macbeth
16.6 Examples in Dramas
16.6.1 Evolving Centrality in Death of a Salesman
16.6.2 Evolving Centrality in The Godfather
16.7 Conclusion
16.8 Exercises
Part III Case Studies
17 Introduction to Case Studies
17.1 Introduction to Case Studies
18 Machine Narrative
18.1 Introduction
18.1.1 AI: Utopia or Dystopia?
18.2 Did the Author Ever Live?
18.3 Turing Machines
18.4 Turing Machines and Literature
18.4.1 Duality Between Machines and Narrative
18.4.2 The Judge and Interpretation
18.5 Definition of Narrative
18.5.1 Relationship Between M Functions
18.6 Drama Narrative
18.7 Example of a Drama Machine
18.7.1 Deterministic Caesar: Locus of Control Through the Lens of Julius Caesar
18.8 Conclusion
18.9 Exercises
19 Evolving Point of View
19.1 Introduction
19.2 Definition of Point of View
19.3 Methodology
19.4 Point of View
19.5 Point of View Examples
19.5.1 Dialogue Point of View
19.5.2 Egocentric Point of View
19.5.3 Gossip Point of View
19.6 Conclusion
19.7 Exercises
20 Search in Social Networks: The Science of Deduction
20.1 Introduction
20.2 Related Works
20.3 The Concept of Power Couples
20.4 Power Couple General Algorithm
20.5 Finding Power Couples Using a Space Approach
20.5.1 Simple Example
20.5.2 Finding Couples Using Dynamics
20.6 Case Study: Couples in Literature
20.6.1 Macbeth
20.6.2 Romeo and Juliet
20.7 Conclusion
20.8 Exercises
21 Evil in Social Networks
21.1 Introduction
21.2 Related Work
21.3 Evil as the Destruction of Social Fabric
21.4 Evil in Richard III
21.5 Representation of Evil in Dramas Viewed Through Space
21.6 Representation of Evil in Dramas Viewed Through Time
21.7 Conclusion
21.8 Exercises
22 Rise and Fall in Social Networks
22.1 Introduction
22.2 Related Work
22.3 Life and Death in Evolving Social Networks
22.4 Life and Death of Nodes
22.5 Life After Death, or An for An
22.5.1 Heaven and Hell
22.5.2 Macbeth Example
22.6 Universal Bounds on Degree Centrality
22.7 Literary Case Study: Julius Caesar
22.8 Conclusion
22.9 Exercises
Appendix A Script Sources and Structure
A.1 Introduction
A.2 Scripts and .srt Files
A.3 Performance Text Sources
A.4 Conclusion
Appendix B Mathematical Background for Literature Networks
B.1 Introduction
B.2 Notation Conventions
B.3 Numbers and Sets
B.3.1 Numbers
B.3.2 Sets
B.3.3 Multisets
B.3.4 Vectors and Matrices
B.3.5 Functions
B.4 Graphs and Social Networks
B.5 Graph Representation
B.5.1 Transforming Networks and Matrices
B.5.2 Metric Space
B.5.3 Special Graphs
B.5.4 Subgraphs and Neighborhoods
B.5.5 Vertex Properties
B.5.6 Centrality
B.5.7 Cartesian Products and Grids
Appendix C Introduction to Stochastic Processes
C.1 Probability Space
C.2 Random Variables
C.2.1 Expectation, Variance, and Co-Variance
C.2.2 Correlation
C.3 Simple Random Walks: An Informal Description
C.4 Markov Chains
C.5 Network Centrality: PageRank
C.6 Algorithms: Asymptotic
Appendix D Turing Machines
References
Index

Citation preview

Zvi Lotker

Analyzing Narratives in Social Networks Taking Turing to the Arts

Analyzing Narratives in Social Networks

Zvi Lotker

Analyzing Narratives in Social Networks Taking Turing to the Arts

Prof. Zvi Lotker Faculty of Engineering Bar-Ilan University Ramat-Gan, Israel

ISBN 978-3-030-68298-9 ISBN 978-3-030-68299-6 (eBook) https://doi.org/10.1007/978-3-030-68299-6 © 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

Preface

Introduction Narrative is a central theme in human life. The relationship between humans and machines permeates all aspects of modern life. These two parallel themes need to be bridged. There is a demand for the incorporation of narrative into social networks, and a need for machines to be able to understand narrative. This book grows out of this need, and generates an exciting and practical toolbox for connecting the disparate fields of social network analysis, computer science, literature, and psychology. Humans have a need and a drive to tell and analyze stories. In order to understand ourselves, we must understand our canonical stories, and learn how to analyze these stories. These stories serve as beacons in our lives, to warn us and guide us. The wise can learn from the mistakes of others in these stories. However, questions of narrative within social networks have long been neglected. Issues of motivation, ethics, psychology, time perception, and intention, which are central to narrative (and therefore, humanity) have been beyond the scope of social networks. This book uses literature as a wrench to pry open social networks, and to ask questions of a different order of magnitude than have previously been asked about social networks. Literary concepts are then transformed into quantifiable terms so that these concepts can be analyzed in social networks. The tools used in this book are natural language processing (NLP), machine learning, graph theory, literary analysis, psychology, probability, and random processes.

How to Read This Book The chapters in this book are layered and can be read in multiple ways, providing accessibility to different levels of interest and knowledge. Readers who are only interested in the book’s philosophical concepts can choose to just read the introduction and conclusion of each chapter. For a more complete picture of the resulting v

vi

Preface

algorithms and social networks, the core of the chapters contain their mathematical breakdowns. Those who wish to can then practice the relevant skills with the exercises at the end of each chapter. Readers who are not fluent in the mathematics within are encouraged to first read the beginning and the conclusion of each chapter, and pursue deeper content for the parts that catch their attention.

Download Materials Some of the code, and data, from the book is hosted on GitHub at https://github.com/ zvilo/analyzing-narratives-in-social-networks. In case there’s an update to the code, it will be updated on the existing GitHub repository.

Overview The book is divided into three main parts. After introducing the text and the concepts (Chaps. 1–10), Part I analyzes narratives in static social networks. Questions are asked such as how to use algorithms to locate conflicts in drama scripts and social networks; how to partition a network into communities based on narrative; what constitutes a static point of view of an individual in a social network. After an analysis of narrative in static social networks, in Part II (Chaps. 11–16), time is incorporated, and narrative in dynamic social networks is investigated. The question of how best to incorporate time into social networks is analyzed, and the relationship between time and narrative is considered. Additionally, Part II explores what can be understood from varying perceptions of time by individuals in social networks, or characters in dramas. In the process, several different clocks within a social network or a literature network are introduced. We also explore questions such as how a collective narrative is created from many personal narratives, and how social network narratives emerge. Part III (Chaps. 17–22) examines how to combine time and space dimensions together in social networks. In social networks and dramas, how do time and space interact with one another? What does it mean when the two agree or when they disagree?

Synopsis Chapter 1: This chapter presents the book’s methodology and scope while discussing its main assumptions and terminology. We develop analytical tools that create a bridge between the left and right hemispheres of the brain, mediated by machines. We

Preface

vii

refer to narrative processing as a skill dominated by the right hemisphere, whereas mathematical analysis of social networks is perceived as a skill dominated by the left hemisphere. The chapter discusses the tension between the role of objective truth in mathematics and the literature. In mathematics, objective truth is a primary attraction; however, in the literature, objective truth is undesirable. This book provides methods to conquer this divide by providing a mathematical language that allows multiple interpretations to live in harmony across disciplines. Chapter 2: This chapter lays the foundation for modeling narrative and conflict in social networks and literature networks. We demonstrate how to mechanically construct graphs from literary scripts. We explain how to engage machines in the process of literary analysis. We illustrate how a computer can recognize plot and conflict in literature networks using graphs which capture the geometry of the narrative. Chapter 3: This chapter defines the dynamics of conflict as the basis of narrative. Conflict is defined in the language of social networks. Depicting the conflict as a partition of the nodes, the chapter offers a new perspective where the conflict in the graph is divided into disjoint sets representing the different parties in the conflict. We also discuss various ways to describe partitions, using the language of functions, sets, relations, etc. We discuss freedom of interpretation in narrative processing, while exemplifying why community detection algorithms are not the appropriate tool for narrative interpretation. Chapter 4: In this chapter, the decision matrix concept is borrowed from economics. In economics, the concept is used to explain the behavior of individuals. Here, we translate it into social networks and narrative processing. Additionally, the concept of anchors is introduced. Anchors are crucial since we insist that a narrative has some inherent stability, which takes the form of an “anchor” with a fixed opinion, which serves as an interface between man and machine. The decision matrix of the anchors is extended to the complete social network analysis, using information from the social network. We define this object as the decision function. Chapter 5: This chapter introduces two major concepts: social rationality and conflict function. Social rationality is based on evaluating the distance between decision vectors of different individuals. Conflict function is a central tool used to describe the dynamic evolution between the beginning and ending of a narrative. Chapter 6: In this chapter, we use Sun Tzu’s “The Art of War” as a guideline to study various conflict functions. “The Art of War” can be used as a sort of a textbook of conflict management as war is an extreme condition of conflict. We translate Sun Tzu’s concept of direct attack into a Voronoi conflict function. This serves as an example of a social rationality conflict function.

viii

Preface

Chapter 7: Building upon the previous chapter, this chapter introduces the Voting conflict function, based on the concept of indirect attack, as defined by Sun Tzu in “The Art of War.” The voting conflict function is based on the heat equation, which is central in many disciplines. We examine some of these metamorphosis of the heat equation, such as resistance networks in physics, Nash equilibrium in game theory, optimization in mathematics, and Markov chains in random processes. Using the resistance network description, we show yet another example of a social rationality conflict function. Chapter 8: This chapter provides tools to translate warfare tactics from Sun Tzu’s “The Art of War” into the mathematical language of social networks. Chapter 9: This chapter discusses conflict functions and option analysis. We show how to measure conflicts in order to enable a machine to compare different conflicts and pinpoint the main conflict in a narrative. Chapter 10: This chapter introduces the Ego network and explains how to use it in narrative interpretation. This chapter concludes the book’s first part which focuses on static literature networks. Chapter 11: This chapter studies the perception of time in narrative. We model the narrative of a reader’s experience of time as an evolving social network. This chapter takes the function analysis approach which uses function as the main mathematical object. Therefore, the evolving social network is a function of time. Chapter 12: This chapter introduces the notion of subjective and objective clocks. We model subjective time in narrative, and introduce a subjective clock to allow machines to measure subjective time. We define clocks as an increasing monotonic function. This definition deviates from the traditional definition of clocks as oscillators. The advantage of the monotonic definition is that is inclusive of both psychological/subjective clocks and objective clocks. Chapter 13: This chapter explains how to compare clocks. Following the stochastic process definition of Martingales, the basic idea is to remove all Euclidean symmetries (such as translation and rotation) from the two clocks. This is equivalent to removing the linear part of those clocks. We introduce M diagram, which allows for representation of the two clocks as a function of each other after canceling the Euclidean symmetry.

Preface

ix

We compare clocks by finding the point at which clocks begin to deviate from one another. Chapter 14: This chapter uses the relationships between clocks to identify critical events in the evolution of a social network. We use the drift between the weighted clock and the event clock to identify critical events in weighted social networks. This chapter defines the law of two clocks, which we can implement in narrative processing. Chapter 15: This chapter provides techniques to transform evolving social networks into a real function. This helps us simplify the analysis of social networks. We use these techniques in narrative processing. Chapter 16: This chapter defines higher orders of social networks and gives some explanation of evolving social network surface. We related social network surfaces to sub-stories within a larger overarching narrative. Chapter 17: This chapter serves as an introduction to our case studies, where we show how to use both time and space to get a comprehensive narrative processing. This part of the book touches on fundamental problems in philosophy, such as good and evil, the definition of narrative for machines, how to compute a point of view, the representation of evil in social network narratives, how to deal with death in evolving social networks, and how to model the afterlife in narrative processing. Chapter 18: This chapter provides a general definition of machine narrative and discusses the relationship between narrative and machines. We introduce a definition of narrative in the language of Turing machines. Chapter 19: This chapter shows how to compute a point of view in an evolving social network. This chapter shows how to dive into a substructure of a narrative. We introduce and study central points of view, such as the dialogue point of view, the Ego point of view, and the gossip point of view. We use those points of view to illuminate our interpretation of The Godfather. We uncover a surprising feminist interpretation of The Godfather trilogy. Chapter 20: The chapter shows how to build a complex analysis using Space and Time, separately and together. We focus on the canonical example of finding a spouse in social networks, examining it via the interconnection between Space and Time. Chapter 21: The chapter studies the presentation of evil, exemplified in the play Richard III by Shakespeare. Following Shakespeare, we define evil as a destruction of the social fabric. The chapter presents two representations through Time and Space which

x

Preface

follow the definition of evil. Equipped with these tools, we examine moral dilemmas such as the Atomic bomb and Eichmann’s trial. Chapter 22: The last chapter discusses death in social network. As in life, there are several perceptions of death, mostly relying on religious beliefs. The chapter offers 4 models— secular, Jewish, Christian Orthodox, and Liberal—referring to afterlife, resurrection, heaven, and hell. We use these models to analyze social networks in literary narrative processing. In order to define these concepts, we use complex numbers. Tel Aviv-Yafo, Israel June 2019

Zvi Lotker

Acknowledgements

This book was born out of two loves and one limitation. Even as a child, I loved literature and math. At the same time, I suffered from learning disabilities and was diagnosed with Dyslexia. I remember writing in my diary that I want to have a machine that can write for me and read all the stories in the world. In 2014, I went on a sabbatical and decided to fulfill this old dream. This book is the result of this decision.

Words of Thanks First and foremost, I would like to thank my wife Tsila Hassine, my kids Hillel and Daniel for their endless support and patience. Second, I would like to thank Alivia Zappas for editing this book. Without her help and commitment, I could not have finished the book. I would also like to thank Prof. David Peleg from Weizmann Institute of Science and Prof. Boaz Patt Shamir from Tel Aviv University for their enlightening comments, as well as Hagar Raanan, Maya Sharon, and Gaya Golan for editing parts of this book. Finally, I would like to thank the Wolfram Mathematica team for the program that created most of the mathematical figures and algorithms in this book. This book is dedicated to my parents Mick Lotker and Oded Lotker. Tel Aviv-Yafo, Israel August 2021

Zvi Lotker

xi

Contents

1

Overview of the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Brief Notes on Notation and Definitions . . . . . . . . . . . . . . . . . . . . 1.3 The Role of Interpretation in Literature and Math . . . . . . . . . . . . 1.4 Social Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.5 Psychology-Driven Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6 Looking Ahead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Part I 2

1 1 2 3 4 4 5

Static Literature Networks

Graphs in Dramas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.1 Chapter Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 Natural Language Processing (NLP) . . . . . . . . . . . . . . . 2.2.2 Literature and Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.3 Markov Chains and Metric Space . . . . . . . . . . . . . . . . . 2.3 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Graphs for Dramas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.1 Frequency Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5 Construction of the W W, AB, AB A Graphs . . . . . . . . . . . . . . . . 2.5.1 W W Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.2 The AB Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.3 The AB A Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.4 AB A Subgraph of AB . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.5 Single Edge Changes in Social Networks . . . . . . . . . . 2.6 Transforming Literature Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.6.1 Markov Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9 9 12 12 12 14 15 15 15 17 18 20 20 21 22 24 26 27 27

xiii

xiv

Contents

2.6.2 2.6.3

2.7 2.8 2.9 3

4

Metric Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . From Frequency Graph G(V, E) to Metric Space (V, dis) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Applications of Frequency Graphs . . . . . . . . . . . . . . . . . . . . . . . . . Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28 30 31 34 34

Partition in Social Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Partition and Conflict . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 Graph Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.2 Partitions as Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.3 Party Member Vectors and Functions . . . . . . . . . . . . . . 3.2.4 Conflict in Literature and Social Networks . . . . . . . . . 3.2.5 Partition as Incidence Matrix . . . . . . . . . . . . . . . . . . . . . 3.3 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 Community Detection Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.1 Vertex Moving Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 3.4.2 Spectral Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.3 Modularity Maximization . . . . . . . . . . . . . . . . . . . . . . . . 3.4.4 Edge Centrality Partition . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.5 Clique Percolation Method . . . . . . . . . . . . . . . . . . . . . . . 3.4.6 Hierarchical Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 Experimenting with Community Detection Algorithms . . . . . . . 3.6 Community Detection Algorithms and Literature Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.7 Conflict Search Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41 41 41 42 44 45 46 46 47 48 49 50 50 50 50 51 51

Taking the Road Less Traveled: Decision Matrices . . . . . . . . . . . . . . . 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 Option Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Conflict Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 Sequence of Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.2 Fixed Points and Conflict Dynamics . . . . . . . . . . . . . . . 4.4 Example: Election in Gridland . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.1 Summary of Gridland Election . . . . . . . . . . . . . . . . . . . 4.4.2 Community Detection Algorithms and Narrative . . . . 4.5 Infusing Logic into the Model: Decision Matrix . . . . . . . . . . . . . 4.6 Decision Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7 Decision Matrix Example: Influence Functions . . . . . . . . . . . . . . 4.8 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61 61 62 62 63 63 63 65 66 67 69 71 73 75 76

54 55 56 57

Contents

xv

5

Social Rationality and Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Related Work: Social Rationality . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 Freedom of Interpretation and Anchors . . . . . . . . . . . . . . . . . . . . . 5.3.1 Direction of Total Order . . . . . . . . . . . . . . . . . . . . . . . . . 5.4 Utility Anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5 Rationality in Social Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6 Partition Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6.1 Personal Partition Function . . . . . . . . . . . . . . . . . . . . . . 5.7 Conflict Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.7.1 Narrative Interpretation and Conflict Functions . . . . . 5.7.2 Community Detection Algorithms and Conflict Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.8 Rationality as Narrative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.9 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.10 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

79 79 80 80 81 82 84 86 88 88 90

6

Sun Tzu Says: Direct Attack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Related Work: Voronoi Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3 Direct Attack as Metric Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3.1 Example: Euclidean Voronoi Partitions . . . . . . . . . . . . 6.4 Voronoi Option Analysisi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.1 Voronoi: Optimization Description . . . . . . . . . . . . . . . . 6.4.2 Example: Voronoi War . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.3 Gridland Becomes Cycleland . . . . . . . . . . . . . . . . . . . . . 6.4.4 Cycleland . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.5 Voronoi: Algorithmic Description . . . . . . . . . . . . . . . . . 6.4.6 “Speed is the Essence of War” . . . . . . . . . . . . . . . . . . . . 6.5 Rationality of Voronoi Option Analysis . . . . . . . . . . . . . . . . . . . . . 6.6 Voronoi Partition as a Greedy Algorithm . . . . . . . . . . . . . . . . . . . . 6.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99 99 101 101 102 102 103 105 105 106 108 109 110 111 114 114

7

Indirect Attack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3 Voting Option Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.1 Voting: Kirchhoff Description . . . . . . . . . . . . . . . . . . . . 7.3.2 Voting: Markov Chain Description . . . . . . . . . . . . . . . . 7.3.3 Voting Optimization Description: Divide and Conquer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.4 Voting and Nas Equilibrium . . . . . . . . . . . . . . . . . . . . . . 7.3.5 Voting: Algorithmic Description . . . . . . . . . . . . . . . . . . 7.4 Solving the Voting System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117 117 118 119 120 121

91 92 93 93

124 125 127 130

xvi

Contents

7.5 7.6 7.7

Rationality of the Voting Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 131 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

8

1812: Social Networks Capture Napoleon . . . . . . . . . . . . . . . . . . . . . . . . 8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 Capturing Nodes in Consecutive Conflicts . . . . . . . . . . . . . . . . . . 8.3 Winning and Losing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.1 Battle of Borodino (1812) . . . . . . . . . . . . . . . . . . . . . . . . 8.3.2 US Presidential Elections . . . . . . . . . . . . . . . . . . . . . . . . 8.4 Incorporating Narrative into War . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4.1 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5 Party Power Base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.6 Total War: Elimination of a Party . . . . . . . . . . . . . . . . . . . . . . . . . . 8.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

139 139 140 141 142 143 143 144 144 145 145 146

9

The Search for Conflict . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.2 Algorithm Complexity of Conflict . . . . . . . . . . . . . . . . . . . . . . . . . 9.2.1 Computing Conflicts in Narratives . . . . . . . . . . . . . . . . 9.2.2 Measuring Conflict in Decision Matrices . . . . . . . . . . . 9.3 Literary Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

149 149 151 151 152 154 154 155

10 Ego Networks in Dramas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.3 Definition of Ego Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.4 Ego Networks in Dramas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

159 159 160 160 161 162 163

Part II

Evolution and Time in Literature Networks

11 Introduction to Evolving Social Networks . . . . . . . . . . . . . . . . . . . . . . . 11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2.1 Modeling Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2.2 Modeling Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.4 Evolving Social Networks: The Model . . . . . . . . . . . . . . . . . . . . . 11.5 Evolving Social Networks: Example . . . . . . . . . . . . . . . . . . . . . . .

167 167 168 169 169 170 171 171

Contents

xvii

11.5.1 Link Streams as Evolving Social Networks . . . . . . . . . 11.5.2 Weighted Link Streams . . . . . . . . . . . . . . . . . . . . . . . . . . 11.6 From Performance Text to Link Stream . . . . . . . . . . . . . . . . . . . . . 11.7 Link Streams with a Codomain of Matrices . . . . . . . . . . . . . . . . . 11.8 Integration of Link Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.8.1 Link Stream Integration over Graph Space . . . . . . . . . 11.8.2 Differentiable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.9 Sub-evolving Social Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.10 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

172 173 175 177 178 179 179 182 183 184

12 Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.2.1 Subjective, Retrospective, and Prospective Time . . . . 12.3 The Relationship Between Prospective Clocks and Retrospective Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.4 General Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.5 Discrete Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.6 Continuous Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.6.1 Moving from Discrete Clocks to Continuous Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.7 Event Clocks and Weighted Clocks . . . . . . . . . . . . . . . . . . . . . . . . 12.8 Equivalent Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.9 Normalizing Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.10 Sub-graph Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.10.1 Dialog, or Edge, Clocks . . . . . . . . . . . . . . . . . . . . . . . . . 12.10.2 Examples of Sub-graph Clocks . . . . . . . . . . . . . . . . . . . 12.11 Link Streams and Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.12 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.13 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

187 187 189 189

13

190 190 192 194 194 196 198 201 204 204 207 208 210 211

M-Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.2 Time Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.3 M-Diagram Example: The Case of Felix Baumgartner . . . . . . . . 13.4 M-Diagrams for General Functions . . . . . . . . . . . . . . . . . . . . . . . . 13.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

215 215 215 217 219 219 220

14 The Tale of Two Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14.3 Framework of Two Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

223 223 223 224

xviii

Contents

14.3.1 Framework of Two Clocks in Performance Texts . . . . Time Perception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Comparing Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14.6.1 Correlation Between Two Clocks . . . . . . . . . . . . . . . . . 14.7 Single Clock Drift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14.8 The Gap Algorithm of Two Clocks . . . . . . . . . . . . . . . . . . . . . . . . 14.8.1 Comparing Different Clocks in Dramas . . . . . . . . . . . . 14.9 The Law of Two Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14.10 Predicting Using the Clock Drift Algorithm . . . . . . . . . . . . . . . . . 14.11 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14.12 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

225 225 226 227 227 231 233 234 238 238 240 242

15 Real Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.3 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.4 Normalized Functions and Correlation . . . . . . . . . . . . . . . . . . . . . 15.5 Example: Degree Centrality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.6 Degree Centrality in Dramas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.7 Normalized Degree Centrality in Discrete Time . . . . . . . . . . . . . . 15.8 Normalized Degree Centrality in Continuous Time . . . . . . . . . . . 15.9 Application to Dramas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.9.1 Macbeth and Centrality Measures . . . . . . . . . . . . . . . . . 15.9.2 The Godfather and Centrality Measures . . . . . . . . . . . . 15.10 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

245 245 245 246 247 251 252 252 254 257 257 260 261 262

16 Evolving Social Network High Dimensions and Time Frames . . . . . . 16.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.3 High-Dimensional Evolving Social Network . . . . . . . . . . . . . . . . 16.4 High-Dimensional Real Function Spaces . . . . . . . . . . . . . . . . . . . 16.5 Two-Dimensional Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.5.1 The Three Witches in Macbeth . . . . . . . . . . . . . . . . . . . 16.6 Examples in Dramas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.6.1 Evolving Centrality in Death of a Salesman . . . . . . . . 16.6.2 Evolving Centrality in The Godfather . . . . . . . . . . . . . 16.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

265 265 266 267 269 269 272 274 275 276 276 277

14.4 14.5 14.6

Contents

xix

Part III Case Studies 17 Introduction to Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 17.1 Introduction to Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 18 Machine Narrative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.1.1 AI: Utopia or Dystopia? . . . . . . . . . . . . . . . . . . . . . . . . . 18.2 Did the Author Ever Live? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.3 Turing Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.4 Turing Machines and Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.4.1 Duality Between Machines and Narrative . . . . . . . . . . 18.4.2 The Judge and Interpretation . . . . . . . . . . . . . . . . . . . . . 18.5 Definition of Narrative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.5.1 Relationship Between Mw and Mr . . . . . . . . . . . . . . . . 18.6 Drama Narrative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.7 Example of a Drama Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.7.1 Deterministic Caesar: Locus of Control Through the Lens of Julius Caesar . . . . . . . . . . . . . . . . 18.8 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

283 283 284 285 287 288 289 289 290 290 291 292

19 Evolving Point of View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.2 Definition of Point of View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.3 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.4 Point of View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.5 Point of View Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.5.1 Dialogue Point of View . . . . . . . . . . . . . . . . . . . . . . . . . . 19.5.2 Egocentric Point of View . . . . . . . . . . . . . . . . . . . . . . . . 19.5.3 Gossip Point of View . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

299 299 300 301 301 302 303 306 309 311 312

20 Search in Social Networks: The Science of Deduction . . . . . . . . . . . . . 20.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.2 Related Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.3 The Concept of Power Couples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.4 Power Couple General Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 20.5 Finding Power Couples Using a Space Approach . . . . . . . . . . . . 20.5.1 Simple Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.5.2 Finding Couples Using Dynamics . . . . . . . . . . . . . . . . . 20.6 Case Study: Couples in Literature . . . . . . . . . . . . . . . . . . . . . . . . . 20.6.1 Macbeth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.6.2 Romeo and Juliet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

315 315 317 317 319 320 322 323 325 326 329 329 330

293 296 297

xx

Contents

21 Evil in Social Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Evil as the Destruction of Social Fabric . . . . . . . . . . . . . . . . . . . . . 21.4 Evil in Richard III . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.5 Representation of Evil in Dramas Viewed Through Space . . . . . 21.6 Representation of Evil in Dramas Viewed Through Time . . . . . . 21.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

333 333 334 335 337 339 340 341 343

22 Rise and Fall in Social Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.3 Life and Death in Evolving Social Networks . . . . . . . . . . . . . . . . 22.4 Life and Death of Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.5 Life After Death, or An ı for An ı . . . . . . . . . . . . . . . . . . . . . . . . . 22.5.1 Heaven and Hell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.5.2 Macbeth Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.6 Universal Bounds on Degree Centrality . . . . . . . . . . . . . . . . . . . . . 22.7 Literary Case Study: Julius Caesar . . . . . . . . . . . . . . . . . . . . . . . . 22.8 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

345 345 346 347 347 350 351 353 354 357 360 361

Appendix A: Script Sources and Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 Appendix B: Mathematical Background for Literature Networks . . . . . . 369 Appendix C: Introduction to Stochastic Processes . . . . . . . . . . . . . . . . . . . . 385 Appendix D: Turing Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407

Chapter 1

Overview of the Book

1.1 Introduction Figures such as the Golem, Frankenstein, and HAL 9000 have fascinated the public for centuries. As robots and intelligent machines have advanced, they have invaded our private spaces. Thus, the need for intelligent machines to understand our personal and cultural narratives is more imperative than ever. Utilizing the structure of the text instead of the textual content, we present simple algorithms, most of which are accessible to a wide range of readers in order to reveal the rhythm and structure of dialogues in films, theater, television, and radio scripts. Most of these algorithms can be implemented using spreadsheets, such as Microsoft Excel. We open an epistemological window to shed light on the dialogue between man and machine using tools from digital humanities and social networks. The fields of digital humanities, social networks, artificial intelligence (AI), and complex systems are central to modern culture and technology. These fields permeate our lives in ways ranging from issues of privacy to our quality of life. By integrating ideas from classical fields, such as physics and mathematics, these newer fields have developed rapidly. The literature and literary analysis, twinned classical fields with vast and highly influential knowledge bases, have not been previously integrated into these younger, emerging fields. Our intention is to pave a new path in the incorporation of the literature into complex systems and social networks. To test the soundness of the algorithms presented, we use dramas. The term “drama” is used as a catch-all phrase for any performance-based text, including plays, film scripts, radio plays, and other performative media. This classification comes from the Ancient Greeks, who defined dramas as any text in which the author is hidden from the audience, and the characters speak for themselves [66]. In great dramas, characters are independent entities who represent their own psychological states of mind, and provide paradigms for society to discuss and teach emotions such as love, hate, and envy. Canonical texts, including dramas, serve as educational tools and mental maps for society to navigate these complex feelings.

© Springer Nature Switzerland AG 2021 Z. Lotker, Analyzing Narratives in Social Networks, https://doi.org/10.1007/978-3-030-68299-6_1

1

2

1 Overview of the Book

Fig. 1.1 Can machines read?

As machines become more perceptive, they will edge their way into the dimension of emotions. We can begin inviting machines to participate in the discussion of complex emotions and concepts by transforming texts into mathematical objects. To accomplish this, we use mathematical representations (or “literature networks”) to represent dialogues in dramas in a way machines can understand. Once we have a representation of the text, it is possible to analyze dramas using mathematical tools. This is equivalent to the invention of the pixel, which allowed machines to see and understand images. Typically, in literature networks, characters in dramas are represented by nodes, and edges represent social connections between these individuals or characters.

1.2 Brief Notes on Notation and Definitions We assume an elementary knowledge of several disciplines such as graph theory, linear algebra, and probability (for a rough overview of these topics, see Appendices B and C). In this book, in general, we use graphs and networks, which we denote by G(V, E). Note that the set that contains all social networks is equal to Mn,n G ∈ Mn,n .

(1.1)

We assume that the nodes V = (v1 , v2 , ...vn ) are sorted alphabetically, and that this order corresponds with the adjacency matrix or weighted adjacency matrix A.

1.2 Brief Notes on Notation and Definitions

3

This means that the first row of A corresponds to first node v1 , and the last row of A corresponds to vn . Therefore, the number of nodes in G is n. Although graph notation is standard when discussing social networks, since we move frequently between matrices to social networks, here we use matrix notation when speaking about social networks in general. This means there is no gatekeeper between matrices and social networks, and it is possible to move freely between these two different objects. Additionally, note that when we discuss social networks, we are considering positive matrices. Matrices, networks, and graphs share many common features. All three describe relationships between pairs of objects. Each of these complex objects emphasizes specific properties of the relationships between pairs. However, it is at times useful to discuss these complex objects in general. Therefore, in this book, we use the notion of complex objects/complex object to refer to any of these three in general. For further definitions of these three complex objects, see Appendix B.

1.3 The Role of Interpretation in Literature and Math Many argue that dramas behave like mathematical “formulas,” some books going as far as providing formulas for writing good scripts (see [152, 201] for examples). In these formulas, the events and the characters are variables, and the formulas are the connections between characters and events, which guide the reader. This book takes this claim one step further, by writing these “formulas” in the rich and native language of formulas themselves: mathematics and algorithms. Once the variables are identified, and the interpretation process begins, the main question, thus, is whether or not the different interpretations are meaningful and valid. This raises the following issue. When translating the literature for use in mathematics, a common trap is the dictatorship of truth present in mathematics. While this is one of the primary attractions of mathematics, objective truth is undesirable in the literature. In fact, if a text has only one interpretation, it is more akin to a shopping list or a program than to Romeo and Juliet; it will never be considered great literature, rich with thick veins of conflict. Thus, there must always be space for multiple interpretations of a text, even when transforming the text into a mathematical object. This book provides methods to avoid this trap. Note that in mathematics as well, a polyphony of interpretations makes a theory stand out, since it can then be applied to many different situations. For example, consider linear algebra. This is a branch of mathematics which explores arranging numbers in a table. It turns out that this order is very useful and suits essentially all scientific disciplines. While the above paragraph may seem contradictory to the classification of math as an exact science, the trick is that the proofs of a theorem have a single interpretation according to the definition of the object in the theorem. However, the definitions typically have multiple interpretations. For example, a matrix is a table of numbers.

4

1 Overview of the Book

However, the numbers themselves enjoy the freedom of interpretation, i.e., they can be apples, oranges, people, etc. Conflict is equivalent to multiple interpretations. When we have more than one interpretation, there is inherently a conflict between the two (or more). Conversely, if we have a conflict, this means that we have at least two interpretations. Conflict serves as a motor in a drama or a narrative, and propels the plot along through time. The way in which humans perceive and organize time is through narrative; think of the phrase “story of your life.” Therefore, to understand time in social networks, narrative is an essential tool (as defined as a “Mini-Turing Test” in [176]). Time serves as an ambassador between social networks and the literature, bringing trade and cooperation between the fields of digital humanities, computer science, artificial intelligence, literature, and literary theory. This opening of borders allows both machines and humans to participate in dialogues about the literature.

1.4 Social Clocks Time and narrative are interwoven concepts. Since time is conceptually slippery, we concentrate on clocks instead of time. Clocks are concrete objects and are more straightforward. We explore the meaning and role of time by using clocks in social networks. In moving from time to clocks, we are able to set aside more philosophical questions of time, and instead primarily examine psychological and social aspects of time from an engineering perspective. One drawback of modeling social networks is that the models are fixed and do not change over time. We develop and present natural mathematical algorithms that use the notion of clocks, which are incorporated into dynamic social networks. A primary goal of AI is the ability of machines to imitate humans. One of the key aspects of humanity is the ability to have differing perceptions of time differently. These disagreeing perceptions of time are highly contingent upon the level of interest, feeling, age, etc. These differences in perception generate varying causality relationships in personal narratives. In order for machines to experience similar varying, asynchronous perceptions of time, psychology must be integrated into AI.

1.5 Psychology-Driven Algorithms When reading, watching, or listening to a drama unfold, we often focus on understanding the psychological states of mind of the characters in the piece. The information divulging the psychological states of the individual characters is part of the texts themselves. If we want machines to have the ability to understand dramas, machines must be able to, on some level, understand these psychological variables. Moreover, it turns out that algorithms which imitate human psychology can be simple and extremely effective in analyzing dramas, as will be demonstrated.

1.6 Looking Ahead

5

1.6 Looking Ahead In recent years, there has been a dramatic improvement in the ability of machines to understand images through deep learning. Perhaps, the next goal is for machines to understand texts (see Fig. 1.1). There has been much written on this subject (see [109, 184] for some recent examples), concentrated on machine comprehension of language [176, 177]. This book takes a different approach and defines the “pixels” of the text. Instead of concentrating on language, the primary concern is instead on the hidden structure of narratives in scripts. We claim that typically zero cognitive understanding of the language of a text is needed in order to reveal who the main characters of a drama are, when the important plot points occur in a drama, who the criminals are in Sherlock Holmes, etc. In summary, we follow humanity’s desire to explore, as embodied by Star Trek Enterprise’s credo “To boldly go where no man has gone before.” The question of “what is narrative?” is a central question in human thought, and has been grappled by many thinkers, such as Aristotle, Labov, Hemingway, Derrida, Reinhart, and numerous others. This book contributes to this tradition, and reveals a mechanical and mathematical method to enlighten our understanding of the source and structure of narrative itself.

Part I

Static Literature Networks

Chapter 2

Graphs in Dramas

2.1 Introduction We now lay the foundation to model narrative and conflict in social and literature networks. This chapter demonstrates how to mechanically construct graphs from scripts. In doing so, we invite machines to participate in the reading process. In order to make it possible for a computer to understand narrative, it is essential that a computer can recognize how conflict and plot manifest themselves in literature networks. Over the course of the next several chapters, we demonstrate how to partition a network into two or more parts along conflict lines derived from a narrative in order to model conflict and narrative in social and literature networks. To illustrate the impact narrative has on social networks, we ask the reader to refer to the left side of Fig. 2.2. Viewing the graph, mathematicians will call this a multigraph, and define a multigraph as Multigraph Definition 2.1 A multigraph G = (V, E, μG ) is a graph or a directed graph where V is the set of nodes, E ⊆ V × V is the set of edges, and μG : E → N is a weighted function which permits multiple edges (also called parallel edges). We use e = (v, u) = v → u to denote the directed edge that connected the node v to u. The head of the edge e is u and the tail of the edge e is v. Formally v → u = (v, u).

(2.1)

In the same way, we denote the undirected edge that connects the node v to the node u by e = v ◦−◦ u formally as © Springer Nature Switzerland AG 2021 Z. Lotker, Analyzing Narratives in Social Networks, https://doi.org/10.1007/978-3-030-68299-6_2

9

10

2 Graphs in Dramas

Fig. 2.1 Do machines dream of reading?

v ◦−◦ u = {(v, u), (u, v)}.

(2.2)

The degree dv of a node v ∈ V is one of the most straightforward and powerful notions in graph theory formally. Degree Definition 2.2 A degree of a node v ∈ V isa dv =



μG ((v, u)).

(2.3)

(v,u)∈E a

v is fixed; the sum is only over u.

The mathematician will describe the multigraph from Fig. 2.2 as having five nodes and 67 edges (Fig. 2.1). Another mathematician may respond to the figure by saying that this is a weighted graph, and then define a weighted graph to be

2.1 Introduction

11

Fig. 2.2 This figure shows a graph without narrative

Weighted Graph Definition 2.3 A graph (or a directed graph) G = (V, E, W ) is called a weighted graph (or weighted directed graph) when V is the set of nodes, E ⊆ V × V is the set of edges, and W : E → R is a weighted function. This mathematician, always concerned with notation, will explain to us that we denote V (G) := V to be the set of nodes of G, E(G) := E to be the edges of graph G, and W (G) := W to be the weighted adjacency matrix of the graph G. Note that when we give a vector u which has the dimension dim(u) = n 2 , we use the notation [u] = [u i, j ]

(2.4)

to transform the vector u = (u 1 , ...., vn 2 ) into a square matrix by u i, j = u i(n−1)+ j .

(2.5)

The two graph descriptions made by the two mathematicians above show a small difference in perception. The first mathematician describes the graph more discretely,

12

2 Graphs in Dramas

while the second mathematician simplifies and moves from natural numbers to real numbers. Regardless, for the majority of us, the graph on the left side of Fig. 2.2 is not terribly exciting; there is no narrative, only mathematical definitions. We now move to the right side of Fig. 2.3. Suddenly, we see that the central node of the graph is Juliet, one of the main heroes of Western literature, fighting with her family, and desperately in love. Although the two graphs are, in fact, the same graph, the meaning has been enriched from the first to the second. The first is without narrative, while the second exists within our collective imagination. Revealing the source of the graph to be Act III, Scene 5 of William Shakespeare’s play Romeo and Juliet, and labeling the nodes as the respective characters in the play, we suddenly gain a complete understanding of the story behind the graph. We see the arc of the story emerging out of the graph. We see Romeo and Juliet declaring their love for one another, we see Juliet arguing with her parents, the tragedy that closes the play, and so on. The graph on the left is forgettable. The graph on the right engages us and will remain in our memory.

2.1.1 Chapter Overview Section 2.2 begins by contextualizing the chapter, and points to material which is outside the scope of this book but is valuable and relevant. We then move to some necessary definitions in Sect. 2.3, such as those of scripts, frequency graphs, and metric space. Sections 2.4 and 2.5 demonstrate how to construct graphs which represent narratives from dramas. There are three different graphs presented in these sections: the W W graph, the AB graph, and the AB A graph. Next, Sect. 2.6 discusses how to transform the different representations of literature graphs. Finally, Sect. 2.7 describes applications of frequency graphs, leading into some concluding remarks in Sect. 2.8.

2.2 Related Work 2.2.1 Natural Language Processing (NLP) Both neuroscientists and literary theorists have worked to discover how humans understand and construct narratives [119, 198, 221]. In the context of AI and computer science, our understanding is still in its infancy. However, it is clear that computers require the use of standard data structures such as numbers, link lists, strings, graphs, matrices, images, functions, and so on (for more on data structures, see [61]). Thus, if we wish for computers to understand dramas, our task is to transform the information from the drama into a simple data structure which the computer can “understand” and manipulate. Moreover, we would like to accomplish this mechanically. While this process can be completed manually by humans, it is too timeconsuming and expensive to be practical. The question of how machines can accom-

2.2 Related Work

13

plish this task holds its own interest for the future of AI as well. This chapter presents a surprisingly simple and automatic method to create structures for information generated from dramas that computers can then work with. This automatic method can help to reveal hidden structures within dramas, such as time dilation (see Chap. 14) and network partitions (see Chaps. 3,4, and 9). Natural Language Processing (NLP) algorithms which identify the subject of a sentence already exist. An example of this is the Mathematica command TextStructure [217]. Additionally, there is a vast sea of the linguistic literature on syntax (see [52] for a pivotal work on this subject). However, when analyzing dialogues in dramas, the NLP algorithms should not look at individual sentences, but at the response or paragraph dimension, perhaps even complete scenes. Therefore, while NLP algorithms may produce the correct grammatical subject on the level of a sentence (see [15, 16]), when scaling to a response or paragraph dimension, the algorithms fall short, and cannot identify the semantic subject of the response or paragraph dimension. For example, while poison may be the grammatical subject of a sentence, the death of Romeo may be the semantic and philosophical subject of the response or paragraph. The poison is of secondary importance, while the tragic death of Romeo is of primary importance [222]. This can be seen in Fig. 2.4. The parts of speech in this sentence were computed by Mathematica. The “drugs” or poison are the grammatical subject in this sentence. Note that “thy” is a pronoun, and not a proper noun as shown in the figure. While drugs are the grammatical subject, these are Romeo’s last words, and the semantic subject is clearly his death. Without hesitating, we mentally substitute the drugs with his death. When describing this scene, we would note that these are the words with which Romeo takes his life, and not “how Romeo talks about poison.” While grammar and NLP algorithms may point to the same grammatical subject of a sentence, this may not be the most pertinent information in a dialogue when that dialogue is analyzed by humans. A thorough analysis of a response or paragraph may show that the grammatical subject of a sentence in Lord of the Rings is the One Ring. In fact, the One Ring is a metaphor for our desire. What we really care about is what the One Ring is doing to Gollum, Frodo, Bilbo, and what our desires do to ourselves. The semantic subject is not the One Ring, but, in fact, it is us. In the context of dramas, the audience must be drawn in and create connections to the text through personification. Any object with a will or desire becomes a character [222]. Following the tradition of the Enlightenment and Kant and Hegel, the semantic subject in the response or paragraph dimension is always a character, or a personified non-human [103, 186]. Take, for example, Chekhov’s famous statement, “One must never place a loaded rifle on the stage if it isn’t going to go off. It’s wrong to make promises you don’t mean to keep” [98]. As noted, the rifle is not the semantic subject. In fact, Chekhov is presenting a formula which contains two variables: the character who uses the gun, and the character that the bullet is meant for. This could be the same character or several different characters. What is important in this scenario is not the presence of the gun, but the relationship between the variables/characters.

14

2 Graphs in Dramas

Fig. 2.3 This figure represents Act III, Scene 5 of Romeo and Juliet, a graph with a narrative. Compare this to Fig. 2.2 that shows the same graph without narrative

Fig. 2.4 This figure shows Romeo’s last words labeled with their respective parts of speech. This figure was generated by Mathematica

Thy Proper Noun

drugs are Noun

Noun Phrase

Verb

quick

.

Adjective

Punctuation

Adjective Phrase Verb Phrase Sentence

2.2.2 Literature and Graphs The “Who spoke to whom” graph presented in this chapter is a popular model, though it is difficult to compute. Various papers, particularly in the field of digital humanities, have used this graph; for example, see [189, 204]. When analyzing human communication, including dramas, there are many different factors at play. In this book, we touch on primarily who is speaking, and who is spoken to. From a social network perspective, it is not important who is speaking and who is spoken to, but what is important is that there is a relationship. Additionally, how do we model these relationships? The question of “to whom” a character is speaking can create further complexity. Consider Tartuffe, where Elmire speaks simultaneously to either Oragon or Tartuffe. Moreover, the meaning of her utterances holds completely different meanings to both Oragon and Tartuffe. In this chapter, we provide a simple data structure which shows the social relationships between

2.2 Related Work

15

characters in dramas. We provide several simple heuristics that approximate these graphs.

2.2.3 Markov Chains and Metric Space In Sect. 2.6, we use some advanced mathematics such as Markov chains and metric space. Both of these topics could fill several books. In this chapter, we provide formal definitions for both Markov chains and metric space. For readers who need or want more background on those mathematical objects, we encourage them to refer to [170] for Markov chains, and [172] for metric space (for a general overview, Wikipedia articles on each are of value). We now move to some definitions, most importantly that of scripts.

2.3 Definitions In order to harness the information found in drama scripts, it is necessary to have a way to organize the information so that it is accessible to machines. This chapter presents a simple way to mathematically and graphically organize and present information from dialogues and scripts.

2.3.1 Scripts According to the Oxford English Dictionary, a script is “the written text of a play, film, television or radio programme, etc., typically including acting instructions, scene directions, and the like.” [3]. An example scene from a script is presented in Table 2.5. The response number, i, the character who speaks, ci , and the response, ri , are listed in columns 3, 5, and 7, respectively. In this book, we take the minimum information needed to “understand” the narrative, i.e., who is speaking and what is being said. This means that all acting instructions and scene descriptions are ignored. We represent a script formally as Script Definition 2.4 A script Sc consists of a sequence of pairs Sc = (sc1 , ..., scτ ).

(2.6)

16

2 Graphs in Dramas

Fig. 2.5 This table shows Act II, Scene 1 of Romeo and Juliet. The columns indicate the act number, the scene number, the response number, who is being spoken about, the speaker, who is spoken to, and the text of the response itself

2.3 Definitions

17

Hence, sci = (ci , ri ), where i is the response index, ci is the character who speaks in the ith response, and ri is the text of the response itself . We denote the j-letter of the i-responses by ri, j . Let the number of characters in r j be |r j |.a The total number of responses in the script is denoted by τ . Usually, ci , ri is represented as a finite string. However, this can also be considered as an integer since the number of finite strings is equivalent to the number of natural numbers.

a

Graphs which are derived from the literature and represent the relationships between characters are called literature graphs or drama graphs. Literature graphs can have either the image of frequency graphs or metric graphs. We conclude this section with a simple exercise: Exercise 1.

2.4 Graphs for Dramas We now define some elementaric mathematical objects which are useful in analyzing scripts as mathematical objects themselves. We assume that the reader is familiar with basic set theory. Some formal definitions can be found in Appendix B. For more on set theory, [133] is an excellent resource for readers with a mathematical background. Reference [105] is a more introductory text which provides a solid grounding in set theory. Totally Ordered Set Definition 2.5 A totally ordered set or well-ordered set (S, ) is a set with a relation ⊆ S × S on the set which satisfies the conditions such that for any x, y, z ∈ S, the following hold: 1. Reflexivity: x  x. 2. Antisymmetry: x  y and y  x is x = y. 3. Transitivity: x  z and y  z, then x  y. 4. Comparability: x  y or y  x. There are two natural examples for totally ordered sets. The first is x ≤ y which states that x is less than or equal to y. The second natural example is the reverse x ≥ y which states that x is greater than or equal to y. Note that we sometimes refer to this at total order. For more on totally ordered sets, see [4, 133] or [160]. A strictly ordered set, (S, disi, j + dis j,k then 9: disi,k = disi, j + dis j,k 10: end if 11: end for 12: end for 13: end for 14: return [disi, j ] 15: end procedure

 G is a graph with dis positive

 The distance matrix.

Sometimes, we denote the metric space of the Frequency graph G(V, E, W f ) by M S(G(V, E, W f ) or in short M S(G). For more details on the above process, see Exercise 20.

2.7 Applications of Frequency Graphs Determining the main characters of a drama can be challenging, even for humans. For an example, consider Tarantino’s film Django Unchained. Despite Django being the titular character, the “supporting” character of Schultz is considered by many academics and moviegoers to be the main character in the film (see [76]). We will return to this example later in this section. 3

Note that we sometimes use the notation F W for Floyd–Warshall.

32

2 Graphs in Dramas

In order to determine the main character mechanically, we can leverage established social network algorithms to locate the central node in a network on the AB graph. In this section, we define both degree centrality and PageRank centrality function. These two algorithms were chosen since they are the most simple and useful of the centrality algorithms. The two algorithms coincide on undirected graphs, and PageRank is usually more effective on directed graphs. Here, we describe these two centrality functions and apply degree centrality to dramas. Since we have translated the scripts into formats which machines can understand, we can use the degree centrality and PageRank algorithms in dramas in the same way that they are used in social networks. These algorithms are used here to calculate who the main character (or hero) in a drama is, and who the supporting characters are. The idea is that the highest centrality node is the “hero,” and the second and third highest nodes are the supporting characters. For more on different centrality measures, see Exercise 25, and to practice determining the main and supporting characters in a drama, see Exercise 26. We begin this process by defining degree centrality. Degree centrality Definition 2.13 The degree centrality is χdG : V → R.

(2.33)

For a node v ∈ V in a social network G = (V, E, μG ), the degree centrality is χdG (v) = 

dv u∈V

du

.

(2.34)

Note that the degree of node v in a weighted graph is dG (v) =



μG ((v, u)).

(2.35)

(v,u)∈E

We next formally define PageRank centrality. First, we require some notation. Let G = (V, E, μG ) be an undirected/directed multigraph with n vertices. Denote the transition matrix of a simple random walk running on the multigraph G = (V, E, μG ) by M (see Sect. 2.6.3). Let u = (1, ..., 1) n1 ∈ Rn be the vector of all 1 and U = 1 [1] ∈ Mn,n [R]. Finally, let 0 ≤ α ≤ 1 be a parameter of the PageRank centrality n function which measures the probability of the simple random walk. Let Mα = αM + (1 − α)U be the transition matrix of the PageRank Markov process. Denote the stationary distribution of Mα to be π(α) ∈ Rn .

2.7 Applications of Frequency Graphs

33

PageRank Centrality Definition 2.14 Let α ∈ [0, 1] be a real number. The PageRank centrality function is Pr : V → [0, 1]. χG,α

(2.36)

For a node vi ∈ V in a social network G(V, E), the PageRank centrality function is pr

χG (vi , α) = π(α)i .

(2.37)

In order to determine the main character in a drama, we compute the centrality for each character in that drama. The node which maximizes the centrality function is the main character in most cases. Consider the example of Shakespeare’s Hamlet (the script of which can be found by clicking here). Using the degree centrality, which basically boils down to counting, it turns out that Hamlet is, in fact, the main character of Hamlet. While this may not seem surprising, this provides common sense evidence that the main character can be determined mechanically in this way. This is further bolstered by the fact that other centrality measures, such as PageRank, also point to Hamlet as the main character. Skeptics may solve Exercise 26 to convince themselves of the effectiveness of these algorithms, and compare the characters found by both degree centrality and PageRank. Serious doubters can use that exercise to come up with their own favorite example. A more controversial example is that of Tarantino’s Django Unchained. As noted, it is not clear immediately who the main character of the film is, as is reflected in the related academic literature and film reviews. When running degree centrality and PageRank centrality on the film, first it appears they support the argument that Schultz is the main character instead of Django. In fact, supporting this position, Will Smith turned down the role of Django since he believed it ”was not the lead” [168]. An additional more subtle but decisive piece of evidence is the number of quotations in IMDB (using the “Find” command on a web browser, we found 127 quotations for Schultz and 71 for Django) and Wikiquotes (using the “Find” command on a web browser, we found 51 quotations for Schultz and 40 for Django) by the two characters. On IMDB, there are more of Schultz’s quotations by nearly a factor of two. This indicates that the majority of movie viewers felt that Schultz was the main character. Of note is the fact that the centrality measures of Django and Schultz are very close. This supports the existence of conflict concerning the main character of the film. We close this chapter by noting that we prefer not to say that the algorithm is correct, but to say that the algorithm points to the fact that there exists a space

34

2 Graphs in Dramas

Fig. 2.9 This figure is referred to in Exercise 1. These panels show frequency graphs and metric space

for both interpretations. This space makes the film much more enjoyable as there is content to argue over. Perhaps that is the main point that Tarantino is trying to tell us.

2.8 Conclusion This chapter began our journey into the uncharted territory of literature networks and social networks. Before venturing into the uncharted territory, it is wise to be equipped with lightweight but strong tools. We introduce the concept of multigraphs, weighted graphs, scripts, frequency graphs, literature or drama graphs (such as W W , AB, and AB A), subgraphs, Markov chains, and metric space. We then demonstrated how these concepts can be applied to script analysis. We finished this chapter with the surprisingly challenging task of determining the hero of a narrative.

2.9 Exercises Drama Graphs 1. The following exercise deals with metric space and its connection to frequency graphs. Consider the following undirected frequency graph (see Fig. 2.9): a. Refer to Panels A, B, and C in Fig. 2.9. Which panel(s) represents metric space? Which panel(s) represents frequency graphs? b. Can a graph be both frequency graph and metric space simultaneously? Are any of the panels in the figure both frequency graphs and metric space?

2.9 Exercises

35

c. In your favorite programming language, write a program that recognizes a metric space (i.e., where the input is a weighted graph, and the output is yes if a graph represents a metric space, and no if it does not)? Note that the graph of a metric space is a complete graph with a weight function which satisfies the three axioms of metric space (identity of indiscernibles, symmetry, and triangle inequality). d. Which of the panels in the above figure shows a frequency graph? e. In your favorite programming language, write a program that recognizes a frequency graph (i.e., where the input is a weighted graph, and the output is yes if a graph represents a frequency graph, and no if it does not)?

From Scripts to Frequency Graph 2. In how many ways can one define the graph AB AB? Is it possible for AB A to have the same number of edges as AB AB? 3. Let Sc = (Sc1 , ..., Scτ ) be two scripts Sc−i = (Sc1 , ..sci−1 , sci+1 , ..., Scτ ). We delete a single line i = 1, ..., τ from SC1 to get Sc2 . Under what conditions are the graphs AB(Sc), AB(Sc−i a single edge change? 4. One can define the edges of the graph a. AB A as E=

n−2

{(ci+1 , ci+2 ) : ci = ci+2 )}.

(2.38)

i=2

Is this definition equivalent to the one in Sect. 2.5.3? b. E=

n−2 i=2

{(ci+1 , ci+2 ) : ci = ci+2 )} ∪

n−2

{(ci , ci+1 ) : ci = ci+2 )}. (2.39)

i=2

Is this definition equivalent to the one in Sect. 2.5.3? 5. Is it possible for the graphs AB and AB A to have the same number of edges? 6. Sort the following frequency graphs by the number of edges: a. AB b. AB A c. AB AB 7. Sort the following graphs by the number of self-loops: a. AB b. AB A c. AB AB

36

2 Graphs in Dramas

8. Let G(V, E) be a graph. Two nodes x, y ∈ V are connected if there exists a path (see Sect. B.5.3) between x and y. A connected component is an undirected subgraph G (V , E ) where any two nodes x, y ∈ V are connected. Sort the following graphs by connected components: a. AB b. AB A c. AB AB 9. Prove that the graph AB is not always connected. Show that AB ◦ is always connected. 10. Compute the number of connected components in graph AB A using your favorite drama. 11. Find a scene in Macbeth where the graph AB A of the scene contains 0 edges. 12. Use Fig. 2.5 generated from Romeo and Juliet to generate the graph of “Who spoke about whom.” Denote this graph by G h . Use the same table to generate the following “Who spoke after whom” graphs: AB and AB A. Which of these three graphs best describes the social network of Romeo and Juliet? Explain your answer. 13. Use Fig. 2.5 to generate a simple undirected version of the W W graph, the AB graph, and the AB A graph. Note that all of these graphs have the same vertices. Compute their respective adjacency matrices, and the Euclidean distance between those matrices as a vector space. Use this to evaluate which of the graphs best approximates the W W graph. 14. Repeat the previous exercise, but use simple and undirected graphs instead of the multigraphs above. Do the graphs from the previous exercise or the graphs from this exercise better describe the social network of Romeo and Juliet?

From Frequency Graphs to Markov Chains 15. The following exercise deals with weighted adjacency matrices and their connection to frequency graphs. a. Use the AB graph of Romeo and Juliet computed in Exercise 12 and transform the weighted adjacency matrix W (AB) of AB into a transition Markov chain matrix M of the simple random walk on the graph AB. b. Write a function in your favorite programming language where the input is a weighted adjacency matrix W (G) = [ f i, j ] of the weighted multigraph G = (V, E, W ), which measures frequencies and computes the transition matrix of the simple random walk of the graph G(V, E). c. Prove that the multigraph G(V, E, μG ) is a frequency graph (see Definitions (2.6) and (2.1).

2.9 Exercises

37

16. Write the algorithm that receives a weighted directed graph G(V, E) and computes the transition matrix of a simple random walk traveling on the graph. 17. Write the Markov chain transition matrix of Panels A, B, C of Fig. 2.9. 18. Absorbing state refers to a node that allows edges to go in, but not out. Given a multi-dgraph, G, the transformation of a node v ∈ V (G) into an absorbing state is denoted by Ob(G, v). This is equivalent to removing all outgoing edges from v in the multi-dgraph G. If there are two different nodes, u, v ∈ V , both can undergo the process. This operation is denoted by Ob(G, u, v). a. Use the transition matrix M of the simple random walk on the graph AB that was computed in Exercise 15 for Romeo and Juliet, and transform Romeo and Juliet into absorbing states. b. Assume you are given a transition Markov chain matrix M ∈ Mn,n [R] of the simple random walk on the graph AB. Write a program in your favorite programming language which receives M as an input, and a subset of A ⊂ {1, 2, ..., n}, then transform all the states of A into absorbing states. 19. The following exercise deals with ergodic Markov chains. a. Define an ergodic Markov chain. b. Show that for any λ ∈ Δn , the Markov chain M(AB ◦ − G, λ) is ergodic.

From Frequency Graph to Metric Space 20. The following exercise deals with metric space and its connection to frequency graphs. a. Use the frequency graph AB of Romeo and Juliet computed in Exercise 15 and transform it into an unbounded positive weighted graph G = (V, E, dis ). b. Use the graph G = (V, E, dis ) computed above to transform it into a metric space. c. Write a function in your favorite programming language where the input is a frequency graph AB of the weighted multigraph, and transform it into a metric space (V, dis). d. Prove that the weighted graph G(V, E, dis ) is an unbounded positive weighted graph (or a quasi-metric space) (see Definition (2.12) for comparison and the following discussion). Note that this means that the quasi-metric space does not satisfy the final axiom of the Triangle Inequality. 21. Explain how to transform a metric space into a frequency graph.

38

2 Graphs in Dramas

22. Write the distance functions [dis A ], [dis B ], [disC ] as matrices of Panels A, B, C of Fig. 2.9 using Eq. (2.30). 23. Next, run the Floyd–Warshall algorithm (Algorithm (1)), FloydW ar shall Algorithm(G A , dis A ) on Panels A, B and FloydW ar shall Algorithm(G B , dis B ) on Panel B, where G A , G B correspond to Panels A, B of Fig. 2.9.

Applications of Frequency Graphs 24. Compute the six main characters of Romeo and Juliet using the degree centrality and the PageRank centrality using the following graphs: W W graph, AB graph, and AB A graphs. Do you agree with the lists generated by degree centrality and PageRank centrality? 25. As discussed, there are many centrality functions. This exercise deals with two centrality functions which are related to frequency graphs and metric space: closeness centrality and harmonic centrality. Wikipedia is an excellent and accessible source for more details on both of these centrality functions. a. Define closeness centrality. b. Define harmonic centrality. c. Find a graph where the most central node is different in closeness centrality, harmonic centrality, degree centrality, and PageRank centrality. d. Assume that G = (V, E, F) is a frequency graph, and that (M, dis) is its corresponding metric space (see Sect. 2.6.3). Now compute the closeness centrality on the graph G = (V = M, M × M, dis). Compare this to the degree centrality of the graph G = (V, E, F). Explain why the two are different. 26. Use your favorite programming language and a frequency graph AB − G(V, E, μG ) in order to determine the three most important characters in Romeo and Juliet. a. b. c. d. e.

Find the main characters using the degree centrality. Find the main characters using the PageRank centrality function. Find the supporting characters using the degree centrality. Find the supporting characters using the PageRank centrality function. On what value of α in the PageRank centrality do both PageRank centrality and degree centrality agree?

2.9 Exercises

39

Literature Graphs The following exercises deal with literature and social networks. In particular, we utilize the scripts of William Shakespeare, as well as other more contemporary works. The spreadsheet file of the texts can be found by clicking here. To access the Excel files, click on either the respective figure or title of the play. For each piece, we provide an independent exercise. 27. Consider Shakespeare’s Richard III. a. We encourage the reader to read or listen to Richard III or watch a dramatization of the play (or the play itself!). The Excel file linked above contains the text of the whole play. b. Generate the AB graph of the play. Note that King Richard III begins the play as Gloucester. His name changes at line 739 in the file linked above. First, generate the AB graph with Gloucester and King Richard III not merged. c. Generate the AB graph of the play, this time merging the characters of Gloucester and King Richard III. d. Use these two graphs to find the main characters and the main supporting characters of the play. Do these results support what you know of the narrative of the play? e. Determine the response number of the time of death of Edward. f. Determine the response number of the time of death of the two princes. 28. Consider Shakespeare’s Romeo and Juliet. a. We encourage the reader to read or listen to Romeo and Juliet or watch a dramatization of the play (or the play itself!). The Excel file linked above contains the text of the whole play. b. Generate the AB graph of the play. c. Generate the AB A graph of the play. d. Use this graph to find the main characters and the main supporting characters of the play. Do these results support what you know of the narrative of the play? e. Determine the response number of the time of death of Romeo. f. What is the purpose of the character of The Prince? Is he a peacemaker or pot-stirrer? 28. Consider Shakespeare’s Julius Caesar. a. We encourage the reader to read or listen to Julius Caesar or watch a dramatization of the play (or the play itself!). The Excel file linked above contains the text of the whole play. b. Generate the AB graph of the play. c. Generate the AB A graph of the play.

40

2 Graphs in Dramas

d. Use this graph to find the main characters and the main supporting characters of the play. Do these results support what you know of the narrative of the play? e. Determine the response number of the time of death of Julius Caesar. f. Generate the graph of just Act IV of the play. Divide the characters into two camps: one led by Antony and Octavius, and the other led by Brutus and Cassius. g. Consider Act IV versus Act V. In both Acts, there are soldiers. Are these soldiers the same characters or different? Explain your answer. 29. Consider Shakespeare’s Hamlet. a. We encourage the reader to read or listen to Hamlet or watch a dramatization of the play (or the play itself!). The Excel file linked above contains the text of the whole play. b. Generate the AB graph of the play. c. Generate the AB A graph of the play. d. Use this graph to find the main characters and the main supporting characters of the play. Do these results support what you know of the narrative of the play? e. Who is the first character to die during the course of the play? Think about an algorithm that finds the time of death. f. What is the main conflict in the play? Suppose that the main conflict is between Hamlet and Ophelia. Do you have a theory to support this claim?

Chapter 3

Partition in Social Network

3.1 Introduction Conflict is infused in life. Shrewd politicians use conflict in order to split society, and exert control over citizens. In Caesar’s terms, conflict is used to “divide and conquer” [130]. Conflict also appears as an essential element of a good story (see [17]). In science and engineering, there is frequently the need or desire to partition a space or a network into two parts. In computer science, this is called the divide and conquer algorithm, in reference to Caesar [70]. We harness this notion of partitions, to split social networks along conflict lines. Over the course of the next several chapters, we demonstrate how to partition a network into at least two parts along conflict lines derived from the narrative in order to model conflict and narrative in social networks and literature networks. We utilize conflict and partition as tools to generate multiple interpretations; more conflicts produce more interpretations (see Sect. 1.3). A canonical example of such a scenario would be Shakespeare’s Hamlet, where Hamlet has a conflict with essentially every other character in the play, which provides evidence for the richness and complexity of the play and subsequent analysis. This chapter will show how to mine these narrative conflicts and use them as guidelines for generating partitions. Conflict-based interpretations are critical to AI literature analysis because humans tend to put blind belief in their machines. Instead of blind belief, it is better to have a dialogue with the machine, with the end goal being to understand the machine and whether it makes sense or not (Fig. 3.1).

3.2 Partition and Conflict We assume that there are at most k ≤ n parties.1 We denote the set of all possible parties to be (3.1) P = { p1 , p2 , ..., pk }.

1

n is the number of nodes in the graph G. © Springer Nature Switzerland AG 2021 Z. Lotker, Analyzing Narratives in Social Networks, https://doi.org/10.1007/978-3-030-68299-6_3

41

42

3 Partition in Social Network

Fig. 3.1 This figure demonstrates the blind belief of humans in AI

In many cases, we assume the name of the party to be the natural number, i.e., pi = i. Assume that each node on the graph G = (V, E, W f ) supports a specific party. This generates a partition on the network and divides the nodes according to their preferred parties. Formally, a partition is defined as follows. Partition Definition 3.1 Let S be a set. Assume that S1 , ..., Sk ⊂ S. We say that ρ = {S1 , ..., Sk } is a partition which splits the set S into k parts if the following three conditions are satisfied: • The set ρ does not contain the empty set. • Disjointness: for all i = j ∈ {1, 2, ..., k}, Si ∩ S j = ∅. k Si . • Covering: S = ∪i=1 Any partition ρ = {S1 , ..., Sk } of the set S can naturally be induced to a partition on any subset A ⊂ S by (3.2) ρ A = {S1 ∩ A, ..., Sk ∩ A}. Partition is an important concept in elementary mathematics and has several representations. We describe several of these representations, beginning with graph partition.

3.2.1 Graph Partition A partition is transformed into a general graph by connecting all the characters who belong to the same partition, i.e., those who prefer the same party. This can be seen in Fig. 3.2 which contains two partitions. Panel A represents the partition

3.2 Partition and Conflict

43

A 3

2

B 6

6

1

5

4

3

1

4

5

2

Fig. 3.2 This figure shows two graphs representing the two partitions. The red nodes are the first subset, the blue nodes are the second subset, and the green nodes are the third subset. Panel A represents the partition {{1, 2, 3}, {4, 5}, {6}}, and Panel B represents the partition {{1, 4, 6}, {2, 5}, {3}}

ρ1 = {{1, 2, 3}, {4, 5}, {6}} and Panel B represents the partition ρ2 = {{1, 4, 6}, {5, 2}, {2}} (see Exercise 2.9). Each connected component (see Exercise 2.9 for a definition) in Fig. 3.2 is a clique. A clique is a graph where all nodes n are connected to one another. We denote a clique by K n , where n is the number of nodes in the clique. Note that there are n(n − 1)/2 number of edges in K n . A graph partition is defined as follows. Graph Partition Definition 3.2 The graph G = (V, E) is a graph partition if the following three conditions are satisfied for all x, y, z ∈ V : • Reflexive: (x, x) ∈ E • Symmetry: If (x, y) ∈ E, then (y, x) ∈ E • Transitive: If (x, y), (y, z) ∈ E, then (x, z) ∈ E We next present a simple algorithm which transforms a partition in a social network into a graph partition. Different representations of partitions point to subtle issues in the differences between partitions with party names as opposed to partitions without party names. To highlight these differences, we move to a discussion of partitions as functions.

44

3 Partition in Social Network

Algorithm 2 From Social Network to Graph Partition INPUT: ρ is the partition of the set {1, ..., n} OUTPUT: G(V, E) is the partition graph 1: procedure FromPartitionToGraph(ρ = {ρ1 , ...ρk }) 2: V ← [n] 3: E ←∅ 4: for l ∈ [k] do 5: for i, j ∈ ρl do 6: E ← E ∪ {(i, j), ( j, i)} 7: end for 8: end for 9: return G(V, E) 10: end procedure

3.2.2 Partitions as Functions Sometimes, particularly in social networks, specific names for partitions are important in order to understand the structure of the social networks. This is akin to how party names are necessary to understand narrative, i.e., the conspirators against Caesar versus the supporters of Caesar in Julius Caesar. Another example is that of conservatives versus liberals. In both cases, both parties define not only themselves but their opposing parties as well. Names carry meaning in social networks, particularly in literature networks. This means that for each character in the network, we know the name of the party each character prefers. In other words, this function goes from the nodes to the parties. Therefore, the mathematical object of a “named” partition is a function. Once we know the names of the parties, we can ask each character or node which party they support. This defines the function. We now show how to generate a partition from a function. Lemma 3.1 If Pm : V → P is a function, then ρ = { pm −1 ( p) ⊂ V : p ∈ P}

(3.3)

is a partition. Proof By definition of the inverse function, it follows that V =



Pm −1 ( p).

(3.4)

p∈P

The subset of ρ is disjoint. This follows from the fact that Pm is a function. Next, we show that if we are given a partition ρ = {s1 , ..., sk }, we can construct a function σ :V →P (3.5)

3.2 Partition and Conflict

45

from the partition ρ. Assume that the name of the party is P = { p1 , p2 , ..., pk }. For all v ∈ si , (3.6) σ (v) := pi . In order to describe the evolution of a partition, we need a set that contains all the partition functions. V The set LP

Definition 3.3 Let V to be the set of all nodes. Let P be the set of all parties. The set of all V . functions from V to P is LP Finally, we define cases where a node is a member of a party. Party Members Definition 3.4 Let Pm : V → P be the party member function that says that node vi ∈ V is a member of party p j ∈ P if pm(vi ) = p j .

(3.7)

Note that we sometimes use the party member function to describe partitions (see Lemma 3.1).

3.2.3 Party Member Vectors and Functions In general, we can easily convert vector sets which are partitions into functions. We consider these to be equivalent. For example, the vector set (S1 , ..., Sk ) can be k Si when it satisfies the interpreted as a party member function Pm for all s ∈ ∪i=1 following equation by definition: Pm(s) = j If s ∈ S j .

(3.8)

If the vector set is not a partition, i.e., some elements x appear twice in x ∈ S j1 , S j2 , then this would not be a function. Since we assume that the set {S1 , ..., Sk } is a partition, then this does not occur, and the party member function Pm is well-defined. Therefore, to simplify the notation, we use vectors instead of functions.

46

3 Partition in Social Network

3.2.4 Conflict in Literature and Social Networks In the spirit of Heraclitus, we argue that conflict or “war is father of all and king of all...” [100]. Conflict allows us to break the world into digestible pieces. We can analyze the pieces separately, then use superposition and other tools in order to combine them to achieve a complete understanding of the conflict. Conflict in a drama is frequently characterized by the division of characters along the axis of narrative conflict. One way to interpret the Heraclitus quote above is that conflict is necessary to understand life. In fact, war is the extreme expression of conflict, and is typically the last resort when attempting to eliminate a conflict. We define a conflict in a social network as follows. Conflict in a Social or Literature Network Definition 3.5 Let P be a set of parties. A conflict in the set V is a non-constant function. σ : V → P.

(3.9)

To emphasize the importance of partition in our analysis of narrative, we repeat that

Conflict is partition. V . Denote the set of all conflicts to be  LP Note that a conflict in a social or literature network is a non-constant function since for a conflict to exist, there must be at least two opposing beliefs. If σ is not constant, then the graph partition of σ −1 is a collection of disjoint camps. For example, this definition coincides with the literature network of Act IV of Shakespeare’s Julius Caesar (see Fig. 3.3). We next discuss a partition as a sequence, which is a specific type of function.

3.2.5 Partition as Incidence Matrix One way to view the partition sequence ρ = (ρ1 , ..., ρk ) of the set S is as an incidence matrix between the parts 1, ..., k of a partition and the elements of the set S = {s1 , ..., sn }. Formally, for all i ∈ {1, ..., n}, j ∈ {1, ..., k}, the incidence matrix of the partition

3.2 Partition and Conflict Fig. 3.3 This figure shows Act IV of Julius Caesar. The red stars are the conspirators’ camp, and the blue diamonds are the supporters

47

TTITINIUS MESSALA

GHOSTT

Third i Soldier

PINDARUS DA A CLAUDIUS

CASSIUS C Second Soldier First SSoldier l

VARRO LUCIUS OCTAVIUS

LUCILIUS LEPIDUS

ANTONY inc[ρ] = [inci, j ] ∈ Mn,k [R] 

of the set S is inci, j =

1 0

if si ∈ ρ j . if si ∈ / ρj

(3.10)

(3.11)

3.3 Related Work There are many important works on community detection algorithms in social networks (for a few examples, see [89, 95, 135, 166] among many others). One way to generate partitions is through community detection algorithms. These algorithms are not used frequently in this book since they do not allow for sufficient freedom of interpretation for our purposes. It is important to note that although these algorithms were not designed for use on narratives, each of these algorithms produces a single partition, which sometimes points to an interesting conflict in the narrative. The main purpose of community detection algorithms is to break a network into subgroups which are well-connected inside the community, and less connected outside the community. Later in this chapter, we present brief descriptions of several community detection algorithms and experiment with them. In general, the primary drawback of community detection algorithms in the context of narrative is that the protagonist and antagonist of a drama often speak frequently to one another. This means that in dramas, an edge appears many times in a dialogue between characters, i.e., when there are long dialogues between a set of characters, then these edges indicate a strong narrative connection between the two characters.

48

3 Partition in Social Network

Therefore, when using community detection algorithms, the pair may be placed in the same community, whether their relationship is antagonistic or not. To work around the issue of protagonists and antagonists being placed in the same community by community detection algorithms, we exercise our authority, and tell the computer that two characters are opponents, and thus are not in the same community (for examples, consider James Bond and his adversaries, or Forrest Gump and Jenny). These pairs of characters do not necessarily need to agree or disagree. However, often the key to understanding a narrative is to understand the relationships between the main characters. We begin with some necessary definitions which we use for modeling narrative and conflict.

3.4 Community Detection Algorithms In general, most community detection algorithms take a graph and produce partitions. There are many community detection algorithms. Most of these algorithms generate some type of partition. Others allow for nodes to belong to more than one community, and therefore do not insist on being partitions. In general, according to [64], there are six different kinds of community detection algorithms: 1. Overlapping, 2. Percolation, 3. Random Walk, 4. Modularity, 5. Clustering, and 6. Miscellaneous.

In short, we call community detection algorithms which insist that each node belongs only to a single community, partition community detection algorithms. To summarize the complexity of the situation: As in real life, individuals belong to multiple communities. No individual belongs to a single community. People have multiple identities (some might even be hidden from society, like Superman, or even from themselves, like Psycho). Reference [89] claims that Community detection in networks, also called graph or network clustering, is an ill-defined problem though. There is no universal definition of the objects that one should be looking for. Consequently, there are no clear-cut guidelines on how to assess the performance of different algorithms and how to compare them with each other.

If we restrict ourselves only to partition, defining community detection in networks is an easier task. Another source of confusion is the question of judging the quality of a community algorithm. If there is no separation of the judicial and legislative branches for community detection algorithms, then the problem of defining a community detection

3.4 Community Detection Algorithms

49

algorithm is much harder. If judgment and definition are taken as one, it is impossible to either judge a community detection algorithm or define one properly. The role of narrative can help us both judge and define community detection algorithms. If the role of narrative in social networks is ignored, then there is no lexicon for talking about narrative. Because of this, it is difficult to define what a “good” community detection algorithm looks like. Freedom of interpretation is an essential aspect of narrative and the prosperity of social networks. When we separate the judicial branch from the legislative branch in the relationship to community detection algorithms which are restricted to partitions where each node belongs to a single community, it is possible to come with a simple and inclusive definition of community detection algorithms. This definition is one which describes what partition community detection algorithms do: generate a partition on a graph. Now, we can define community detection functions. Community Detection Function Definition 3.6 We say that a cd function is a community detection function if V . cd : Mn,n → LP

(3.12)

The language of functions is useful since it allows us to decompose functions. In the next chapter, we use the same lexicon here to define a function. This definition is a crucial first step to incorporate narrative into social networks. We now provide brief descriptions of several community detection algorithms. These algorithms are all implemented in Mathematica, and some are implemented in Python and MatLab as well. We do not discuss the technical details of these algorithms, since, as noted, there are many good sources explaining these algorithms, such as [165] and [58]. Another excellent source is [89], and the MatLab User Guide (which can be found here) and the Python Community API (which can be found here). The algorithms briefly presented here are vertex moving [43, 58], spectral [60], modularity maximization [59], edge centrality [56], clique percolation [57], and hierarchical clustering [58].

3.4.1 Vertex Moving Algorithm The Kernighan–Lin Algorithm, or “Vertex moving” algorithm [43], is a simple and effective approach to community detection. For this algorithm, begin from any partition. Next, select the best pair to “switch” from one partition to another, in order to minimize the cut. Repeat this process with the remaining nodes until there are

50

3 Partition in Social Network

no more nodes to trade during that round. Next, select the best partition generated from this round, and begin a new round. Continue this process until there are no improvements to be made from one round to the next. The biggest disadvantage to this method is that it is quite slow: O((n 3 )) for each round.

3.4.2 Spectral Algorithm The next algorithm discussed is the spectral algorithm. This algorithm looks at a Laplacian matrix L of the graph, and then looks at the smallest Eigenvalue λ1 which is not 0 and its Eigenvector x1 = (x1,1 , x1,2 , ..., x1,n ). The partition is generated according to the sign of the element of the Eigenvector x1 , i.e., if the element of the Eigenvector is positive x1,i ≥ 0, then the vertex vi belongs to the positive partition vi ∈ π1 ; if the element of the Eigenvector is negative xi < 0, then the vertex vi belongs to the negative partition vi ∈ π2 .

3.4.3 Modularity Maximization Modularity maximization is similar to the spectral algorithms described above. However, instead of using Laplacian matrices, it uses another matrix which measures how far the adjacency matrix is from random uniform graphs with the same degree sequence (Sect. 11.8 of [165] provides further details, as well as Wikipedia).

3.4.4 Edge Centrality Partition The idea behind the edge centrality partition is to compute the centrality for each edge, and remove the edge with the maximum edge centrality. Next, repeat until the graph is split into the desired number of groups or sets in the partition.

3.4.5 Clique Percolation Method The clique percolation method builds communities from k-cliques. These cliques correspond to the fully connected subgraphs of k nodes. We consider two k-cliques to be adjacent if they share k − 1 nodes. The maximal union of k-cliques which can be reached from one another through a series of adjacent k-cliques is defined as a community. Reference [175] provides further details on the clique percolation method.

3.4 Community Detection Algorithms

51

3.4.6 Hierarchical Clustering Hierarchical clustering is a “bottom-up” method. The algorithm looks at all vertices and finds the pair of groups which have the highest degree of similarity to one another. The process is then repeated until the number of desired communities or groups is reached. For more details on this method, see [63, 124, 163]. Now that various representations of partitions have been formally defined, we apply these to a discussion of the dynamics of conflict and freedom of interpretation.

3.5 Experimenting with Community Detection Algorithms As discussed in Chap. 2, there are two ways to represent social relationships in networks. The first is using frequency graphs, and the second is using distance. These tools are used in disciplines such as physics, engineering, and data science. However, community detection algorithms are sensitive to whether their inputs are in the form

6

6

6

1

5

1

5

1

5

2

4

2

4

2

4

3

3

Modularity

3

Centrality

6

CliquePercolation

6

6

1

5

1

5

1

5

2

4

2

4

2

4

3

Hierarchical

3

Spectral

3

VertexMoving

Fig. 3.4 This figure shows six different community detection algorithms operating on a path with six nodes. The names of the respective community algorithms appear below each graph. The different communities are represented in different colors, i.e., each community is represented by a different color

52

3 Partition in Social Network 6

6

6

1

5

1

5

1

5

2

4

2

4

2

4

3

3

Modularity

3

Centrality

6

CliquePercolation

6

6

1

5

1

5

1

5

2

4

2

4

2

4

3

Hierarchical

3

Spectral

3

VertexMoving

Fig. 3.5 This figure shows six different community detection algorithms operating on a path with six nodes. The names of the respective community algorithms appear below each graph. The different communities are represented in different colors, i.e., each community is represented by a different color

of distance or frequency graphs. Typically, community detection algorithms are used on graphs. In the case of graphs, when the measures of distance and frequency are equivalent, then there is no issue with the different forms of input. However, when working with weighted graphs where not all weights are equal, we run into issues with community detection algorithms. We demonstrate this sensitivity in three figures. Figure 3.4 shows six algorithms operating on a path with six nodes where the frequency and the distance are equivalent. To see the influence of frequency versus distance in Fig. 3.4, we add an edge between node 3 and node 4. We interpret this as a frequency graph. This means that the distance between nodes 3 and 4 is 0.5, while the rest of the distances in the graph are 1. Figure 3.5 again shows six different community detection algorithms operating on a path with six nodes. Here, nodes 3 and 4 speak twice as frequently to one another as other nodes. The only community detection algorithms which respond to that change are Centrality and VertexMoving. Note that these two algorithms agree in both figures.

3.5 Experimenting with Community Detection Algorithms 6

53

6

6

1

5

1

5

1

5

2

4

2

4

2

4

3

3

Modularity

3

Centrality

6

CliquePercolation

6

6

1

5

1

5

1

5

2

4

2

4

2

4

3

Hierarchical

3

Spectral

3

VertexMoving

Fig. 3.6 This figure shows six different community detection algorithms operating on a path with six nodes. The names of the respective community algorithms appear below each graph. The different communities are represented in different colors, i.e., each community is represented by a different color

In Fig. 3.6, we now look at the same graph, but we transform the frequency to distances, and scale the distances such that the minimum distance will be 1, and therefore, the rest of the nodes are distance 2 . Looking at Fig. 3.6, we can see that the only three community detection algorithms which did not change when comparing distances instead of frequency were Hierarchical, CliquePercolation, and Spectral. However, the Hierarchical graph is only a single partition; The CliquePercolation is extreme in the opposite direction, where each community is its own island and its own partition; The Spectral algorithm splits the communities into two equally alike sets. As the three figures illustrate, it is extremely important to understand if we are discussing frequency or distance, since the dimensionality of the numbers will impact the algorithms. This is the scene of computer science where we eliminate constants and care about the infinite. This could be blamed on ignoring constants and units of measure.

54

3 Partition in Social Network

3.6 Community Detection Algorithms and Literature Networks It can be an interesting experiment to apply different community detection algorithms to different narrative scenarios and see if those algorithms produce meaningful outcomes related to the narrative. These algorithms were not designed for this purpose; however, some of the algorithms still capture part of the narrative. We provide two examples here to emphasize that this is a complex situation. We first refer to Fig. 3.7. This figure shows Antony’s eulogy in Act III, Scene 2 of Julius Caesar. Antony “wins” the votes. The modularity algorithm works fairly well, but as can be seen, none of the community detection algorithms match up with the narrative. Over the course of the next several chapters, we will introduce some algorithms which invite input from the user, and therefore are able to be truer to the narrative. Figure 3.8 shows six different community detection algorithms applied to Act IV of Julius Caesar. In Act IV, the social network is divided as preparations for battle are underway. Again, the voting algorithm is the most accurate in relationship to the text. The VertexMoving algorithm performs perhaps the best of the community detection algorithms. It is worth noting that all of the community detection algorithms perform reasonably well on Act IV (see Exercise 3.9). Both examples point to the complex situation with community detection algorithms in the context of literature analysis. Here, we use community detection algorithms as a first step toward the interpretation of a narrative.

Citizens All

Citizens

Citizens Servant

All

All

Servant

Servant

Second Citizen

Several Citizens

Second Citizen

Several Citizens

Second Citizen

Several Citizens

Third Citizen

ANTONY

Third Citizen

ANTONY

Third Citizen

ANTONY

Fourth Citizen

Fourth Citizen

BRUTUS

Fourth Citizen

Citizens

CliquePercolation

Citizens Servant

Citizens Servant

All

BRUTUS First Citizen

Centrality

Modularity

All

BRUTUS First Citizen

First Citizen

All

Servant

Second Citizen

Several Citizens

Second Citizen

Several Citizens

Second Citizen

Several Citizens

Third Citizen

ANTONY

Third Citizen

ANTONY

Third Citizen

ANTONY

Fourth Citizen

BRUTUS First Citizen

Hierarchical

Fourth Citizen

BRUTUS First Citizen

Spectral

Fourth Citizen

BRUTUS First Citizen

VertexMoving

Fig. 3.7 This figure shows six different community detection algorithms applied to Antony’s eulogy (Act III, Scene 2) for Caesar in Shakespeare’s Julius Caesar

3.7 Conflict Search Space

55

TITINIUS MESSALA LUCILIUS Poet PINDARUS CASSIUS Third Soldier BRUTUS GHOST First Soldier Second Soldier CLAUDIUS VARRO LUCIUS

TITINIUS MESSALA LUCILIUS Poet PINDARUS CASSIUS Third Soldier BRUTUS GHOST First Soldier Second Soldier CLAUDIUS VARRO LUCIUS

TITINIUS MESSALA LUCILIUS Poet PINDARUS CASSIUS Third Soldier BRUTUS GHOST First Soldier Second Soldier CLAUDIUS VARRO LUCIUS

LEPIDUSOCTAVIUS

LEPIDUSOCTAVIUS

LEPIDUSOCTAVIUS

ANTONY

ANTONY

Modularity

Centrality

ANTONY

CliquePercolation

TITINIUS MESSALA LUCILIUS Poet PINDARUS CASSIUS Third Soldier BRUTUS GHOST First Soldier Second Soldier CLAUDIUS VARRO LUCIUS

TITINIUS MESSALA LUCILIUS Poet PINDARUS CASSIUS Third Soldier BRUTUS GHOST First Soldier Second Soldier CLAUDIUS VARRO LUCIUS

TITINIUS MESSALA LUCILIUS Poet PINDARUS CASSIUS Third Soldier BRUTUS GHOST First Soldier Second Soldier CLAUDIUS VARRO LUCIUS

LEPIDUSOCTAVIUS

LEPIDUSOCTAVIUS

LEPIDUSOCTAVIUS

ANTONY

ANTONY

Hierarchical

Spectral

ANTONY

VertexMoving

Fig. 3.8 This figure shows six different community detection algorithms applied to Act IV in Shakespeare’s Julius Caesar

3.7 Conflict Search Space Perhaps one reason why we have so many community detection algorithms is due to freedom of interpretation. According to [149, 150], exponential search space is equivalent to the illusion of freedom of choice. Exponential search space can be utilized by machines to imitate free will in a lifetime in such a way that the imitation and the “real deal” are indistinguishable (assuming free will exists). We adopt this notion, and insist upon an exponential search space for the interpretation of narrative in social networks. It is well-known that the number of partitions is exponential in reference to the number of characters in a drama. Therefore, equating conflict and partition is beneficial since this gives us an exponential number of conflicts. In turn, this allows us to generate an exponential number of interpretations. These interpretations are the search space for conflict. A multiplicity of interpretations is a necessary condition for great literature. This is one reason why great literature persists and remains relevant across centuries.

56

3 Partition in Social Network

3.8 Conclusion In this chapter, we discussed partitions which are essential building blocks in understanding narrative. We talked about community detection algorithms with respect to literature and synthetic graph examples. We provided a simple definition of community detection algorithms through the language of functions. We will continue to use this language extensively while discussing narrative. Although it is a structural definition, we believe that this is the appropriate definition since it captures the structure of the narrative instead of the content of the narrative. Returning to the question of judgment and definition, it is necessary to maintain the freedom of interpretation. This is essential so that we can define without a definition getting muddled with questions of quality, in the same way in which democracy wants to promote the separation of the judicial and legislative branches. In the next chapter, we will see that it is possible to generate interpretations of narratives through partition. Therefore, community detection algorithms can be understood as interpretations of the narrative of the network. There are several drawbacks of standard community detection algorithms in regards to narrative. The first is perhaps the most serious limitation. We wish to maintain freedom of interpretation when discussing narrative. However, most community detection algorithms are deterministic, which does not allow for multiple interpretations. The social network research community understands this limitation, and have responded by producing hundreds of different community detection algorithms. Unfortunately, this has the negative effect of being too buried in community detection algorithms to find a suitable one. As we will see in the next few chapters, it is preferable to have a small number of algorithms that can produce many different partitions/interpretations. The algorithms we demonstrate, in some sense, unify these various algorithms. The price is that the user must understand the narrative or have some opinion of the narrative before implementation. Chapter 9 discusses cases where the user has no knowledge of the narrative or opinion. Narrative is a complex task, and one which humans excel at understanding. Therefore, when we ask machines to interpret narrative, it is helpful to have a dialogue between man and machine. Community detection algorithms are not built to be tweaked by humans in order to incorporate narrative. For our purposes, inflexibility is a crucial barrier to the use of community detection algorithms on dramas. The next few chapters will explain how to tackle this quandary.

3.9 Exercises

57

3.9 Exercises Partition and Conflicts 1. Use Algorithm 2 to compute a. Fr om PartitionT oGraph({{1, 2, 3}, {4, 5}, {6}}) b. Fr om PartitionT oGraph({{1, 4, 6}, {2, 5}, {3}}) 2. In this exercise, you are asked to count the number of possible partitions. a. Show that there are 15 different partitions for the set {1, 2, 3, 4}. b. Use Bell numbers to compute the different partitions for the set {1, 2, 3, 4}. c. Use Stirling numbers of the second kind to compute the different partitions for the set {1, 2, 3, 4}. d. How many graph partitions exist with 4 nodes? 3. The current exercise deals with Partition as a Function. a. How many different functions exist with the domain and codomain set equal to {1, 2, 3, 4}. b. Give a general formula for the number of functions, i.e., |LVV |.

(3.13)

c. Give a general formula for the number of conflict functions, i.e., V |. | LP

(3.14)

4. Read the text of Act IV of Shakespeare’s Julius Caesar. The text of the play can be found by clicking here. For a visual representation of Act IV, see Fig. 3.3. a. Explain the conflict in Julius Caesar. b. Compute the AB graph of Julius Caesar for Act IV. Compute the natural partition. c. Compute the AB A graph of Julius Caesar for Act IV. Compute the natural partition. d. At the end of Julius Caesar, the conspirators against Caesar, led by Brutus, are defeated. Brutus’ servant, Lucius, is given his freedom as a reward for his bravery. The rest of the conspirators are executed. Model this in the narrative of conflict dynamics. e. In the language of conflict dynamics, how would you describe the end of the conflict? 5. Section 4.4 describes the conflict dynamics in the election in Gridland. Determine the partition anchors in Gridland. 6. Describe the conflict dynamics in Fig. 3.2, and compute the partition anchors.

58

3 Partition in Social Network

7. Using Sect. 4.4, determine the incidence matrix for each Panel in Figs. 4.3 and 3.2. 8. In Sect. 3.2.1, we show how to transform a partition into a graph. This allows us to compute the distance between two partitions ρ1 , ρ2 on the same set of vertices V as follows. First, transform the partitions ρ1 , ρ2 into the graphs G 1 (V, E 1 ), G 1 (V, E 2 ], respectively. Then, compute the adjacency matrix of G 1 (V, E 1 ), G 2 (V, E 2 ],

(3.15)

A, B, respectively. Then use any standard distance dis that is defined on the metric space. For example, Hamming distance dish can be used. dish (A1 , A2 ) =

n  n 

H am(ai, j , bi, j )

(3.16)

i=1 j=1

where ham(ai, j , bi, j ) = 0 if the numbers are equal; otherwise, they are equal to 1. a. Compute the distance dis between the two partitions appearing in Fig. 3.2 in Sect. 3.2.1. b. Show that the distance dish satisfies the triangle inequality. c. Replace the Hamming distance H am(ai, j , bi, j ) in Algorithm with Hadamard matrix distance had (see [8]). Compute the Hadamard distance between the two partitions in Fig. 3.2. d. Sometimes, it is useful to normalize the distance between two points to be between 0 and 1. Normalize the Hamming distance H am(a, b) between two matrices a, b ∈ Mn,n [{0, 1}] in such a way that the distance will be between 0 and 1. Explain how to normalize the distance between the partitions ρ1 , ρ2 to be 0 and 1. Compute the normalized distance between the two partitions in Fig. 3.2.

Community Detection Algorithms 9. This exercise explains how to define community detection algorithms in general. a. Assume that each person can belong to one or two communities. Use all pairs of parties together with a single party to extend the definition in this case. Explain how you can define community detection algorithms in this case. b. Assume that in general, each person can either belong or not belong to any or as many parties as they wish. Use the set of all subsets 2P to define community detection algorithms in this case.

3.9 Exercises

59

Community Detection Algorithms and Literature Networks 10. Explain why the community detection algorithms work better on Act IV of Julius Caesar than Act III, Scene 2 of the same play. 11. In your opinion, which of the community detection algorithms work best on Act IV? 12. Choose your favorite scene or entire act in any drama and compare the community detection algorithms outlined in this chapter. Which ones reveal the most information about the scene/act? Is there one which is not at all relevant? 13. Explain the difficulty of developing a community detection algorithm which works reasonably well on all dramas. Use standard concepts from the literature such as protagonists and antagonists.

Chapter 4

Taking the Road Less Traveled: Decision Matrices

4.1 Introduction In this chapter, we concentrate on the structure of stories abandoning the context of scripts. We will return to the scripts and the graphs related to them, such as graph AB, in Chap. 5. We currently assume that the social network is given and is connected to the narrative by human intelligence and not computed using the AB graph. Robert Frost’s canonical poem “The Road Not Taken” (see Fig. 4.1) inadvertently focuses on the concept of the decision matrix. We make decisions countless times a day. Machines imitate the human decision-making process. Decision matrices formalize this need, and this is the common way to organize many alternatives in social networks in such a way that machines can read, understand, and act upon these decisions. The previous chapter introduced the concept of partition and conflict, and discussed the importance of freedom of interpretation when studying narrative. Now that various representations of partitions have been formally defined, we apply these to a discussion of the dynamics of conflict and freedom of interpretation. We lay the foundation to model narrative and conflict in social networks and literature networks. In order to make it possible for a computer to understand narrative, it is essential that a computer can recognize how conflict and plot manifest themselves in literature networks. An essential ingredient of narrative is that there are at least two events which are organized in a temporal relationship. We point to [17]’s assertion that ”narrative is the principal way in which our species organizes its understanding of time.” Abbot asserts that Simply put, narrative is the representation of an event or a series of events. “Event” is the key word here, though some people prefer the word “action.” Without an event or an action, you may have a “description,” an “exposition,” an “argument,” a “lyric,” some combination of these or something else altogether, but you won’t have a narrative.[17]

Since we are working with conflict in narrative, we interpret the above as the way in which a conflict evolves over time. Over the course of the next several chapters, © Springer Nature Switzerland AG 2021 Z. Lotker, Analyzing Narratives in Social Networks, https://doi.org/10.1007/978-3-030-68299-6_4

61

62

4 Taking the Road Less Traveled: Decision Matrices

Fig. 4.1 This figure illustrates the decision matrix of Robert Frost in the poem “The Road Not Taken”

we demonstrate how to partition a network into two or more parts along conflict lines derived from the narrative in order to model conflict as well as narrative. In short, we model the process of partitioning the network into two steps. The first step is option analysis or a decision-making process. In this step, each individual or node analyzes the options available to them, which are presented in a decision matrix. This step imitates an election, which will be covered in the upcoming chapters. Each individual analyzes their options, and, in the second step, selects an option, and the“votes” are aggregated which leads to a decision (see Sect. 4.5). A decision matrix shows what all the individuals think about all the different options.

4.2 Related Work 4.2.1 Option Analysis Decision-making or option analysis has been well-studied in economics and management, game theory, psychology, and operations research (see sources such as [50, 129, 190, 223] among many others). A major issue with these theories is that there is an underlying assumption that people act rationally, an assumption which was heavily critiqued by [126]. Here, since we are interested in understanding narrative, questions of rationality are not crucial. Instead, we define and focus on the dynamic of the narrative and the internal logic of the story. In a decision-making process, typically, individuals must select one option from many choices. When they analyze their options, they usually consider the impact various options may have on their future. Generally, the simplest models attempt to measure each option by assigning a single numerical value. This approach uses the linear order on real numbers, which says that we can compare real numbers, and

4.2 Related Work

63

that we have a maximum and minimum. We want to either maximize our utility or minimize our cost, etc. The current option analysis literature concentrates on the utility of individuals. Conflict is central to the option analysis process when applied to the narrative. For example, consider the case of Othello. Othello has an infinite number of options to verify Iago’s claim that Desdemona has cheated on him, and in a flash, dissolves any hint of conflict (and the story). To demonstrate the irrelevance of rationality, does the reader hope for rational behavior by Othello, or instead focus on the conflict and the plot? To summarize, the purpose of the story is the conflict and the subsequent waves. If Othello had solved the problem quickly, there would be no story. There are countless other literary examples of such instances. The next section develops the language to describe how conflicts evolve.

4.3 Conflict Dynamics We return to Heraclitus (see Sect. 3.2.4). Heraclitus argued that everything flows and changes [99]. We confront change, and define the dynamics of conflict in literature networks and social networks. Note that we demand some stability in the social network. In this model, at least one node must be a consistent supporter of their party in the narrative. We call these nodes fixed points. We exclude cases where all characters in a drama change their party allegiance. Aristotle argues that the mythos or plot must follow a logical chain of events [34]; we do not classify cases where all characters change their loyalties to be a logical progression of events. Before showing how we enforce stability in a social network, we look at sequences in general.

4.3.1 Sequence of Partitions t We use the party member function sequence (see Definition 3.4) ( pm i )i=1 , which represents a sequence of partitions, where t ∈ N describes the evolution of a conflict. While functions generate names for different parts of partitions, partitions which are not functions eliminate names, so that only the structure of the partition remains.

4.3.2 Fixed Points and Conflict Dynamics Consider the following story about two characters, A and B. At the start of the story, A supports the Red Party, and B supports the Blue Party. Their relationship is defined

64

4 Taking the Road Less Traveled: Decision Matrices

by A always disagreeing with B (sound familiar?). At some point, B begins to support the Red Party. Immediately, A changes opinions and supports the Blue Party instead of the Red Party. This is because A does not, in fact, have an opinion; A merely is always in opposition to B. According to our restrictions (see Sect. 4.3), this would not be a logical narrative, and thus would be excluded here. However, this may point to the fact that we have defined the conflict incorrectly. The conflict is not between the Red and Blue Parties but is actually between the characters A and B. Therefore, this conflict would not be excluded from our metrics when defined correctly. In the contrarian spirit of A, we formally define a fixed point in a narrative. Fixed Points in Narratives Definition 4.1 Let pm 1 , pm 2 be a pair of party member functions which both have the same domain V . A character v ∈ V is a fixed point of pm 1 , pm 2 if pm 1 (v) = pm 2 (v).

(4.1)

Denote the set of all fixed points to be F . Clearly, the set F separates the fixed points from their original parties, and groups all the fixed points together in their own set of fixed points. For example, this process would group Winston Churchill and Adolf Hitler together, as a group of state leaders in World War II, instead of having each aligned with their respective countries. Next, we define how the conflict evolves over the course of the narrative. We call this the conflict dynamics. We define the conflict dynamics using two “consecutive” points in the narrative. These two points can be any two points which occur one after the other in the narrative, though the time interval can vary. We typically conceive of one point as being near the beginning of the narrative, and the other point as being near the end of the narrative. Conflict Dynamics Definition 4.2 The conflict dynamic δ is a function: V V → LP δ : LP

(4.2)

V , there exists a fixed point v ∈ V , which may depend such that for each f ∈ LP on f in the sequence of conflicts ( f, δ( f )), i.e.,

f (v) = δ( f )(v).

(4.3)

4.3 Conflict Dynamics

65

It is possible to extend the above definition to be a sequence of points in the narrative. We leave this for the reader in Exercise 1. To illustrate the power of a conflict dynamic, and how it can capture a narrative, we now provide a narrative example.

4.4 Example: Election in Gridland To illustrate conflict dynamics, we now follow a hypothetical election in an imaginary “country” of a 3 by 3 grid: Gridland, G 3,3 . The social network of Gridland coincides with the topography of the country. Therefore, node 1 lives at node 1, etc. (see Fig. 4.2). We will Change the social network of Gridland according to the narrative, manually based on human intelligence. The main topic of the election is where to put a nuclear plant in Gridland (see Fig. 4.2). At the outset of the election, there are two options: to put the nuclear plant close to the home of node 1 or close to the home of node 9. At the start of the election, there are two parties: the Blue Party (which supports putting the nuclear plant at node 1) and the Red Party (which supports putting the nuclear plant at node 9). Gridland has nine voters, each represented by a node in the graph.

Fig. 4.2 This figure shows the social network and geography of Gridland with the two proposed locations for the nuclear plants. The Blue Party proposes a nuclear plant at node 1, and the Red Party proposes a nuclear plant at node 9

66

4 Taking the Road Less Traveled: Decision Matrices A

C

B

D

3

6

9

3

6

9

3

2

5

8

2

5

8

2

5

8

2

5

8

1

4

7

1

4

7

1

4

7

1

4

7

6

9

3

6

9

Fig. 4.3 This figure shows the evolution of the election in Gridland. The red diamonds represent the supporters of the Red Party; the blue stars represent the supporters of the Blue Party; the green leaves represent the supporters of the Green Party; and the orange slices represent the supporters of the Orange Party. The gray nodes are undecided. The leaders of the Red and Blue Parties are the darker shaded diamonds and stars. Panel A shows the first stage of the election; Panel B shows the second stage of the election; Panel C shows the third stage; and Panel D shows the final outcome of the election

4.4.1 Summary of Gridland Election We provide a brief summary of the election process in Gridland. There are three primary events or actions (see quote in Sect. 4.1) which take place during the four stages of the campaign and election. These can be seen in Fig. 4.3. The first event is the switch from a geographic approach to one based on strong and weak ties in the social network of Gridland (see Panel A of Fig. 4.3). This stage can also be interpreted as the wind flowing from node 9 not symmetrically to nodes 6 and 8, and influencing the voters of Gridland. The rest of Gridland is windless. The second event is the resignation of the leader of the Red Party (see Panel B of Fig. 4.3). This is followed by the fractionalization of the Red Party into two new parties: the Orange Party and the Green Party. The third event is the reunification of the Orange and Green Parties once again into the New Red Party (see C of Fig. 4.3). Following in the tradition of the Republic of Rome, the New Red Party has two leaders as opposed to a single leader, which paves the path to victory for the New Red Party. The final outcome of the political situation can be seen in Panel D of Fig. 4.3. We show how conflict dynamics allows us to capture the narrative of Gridland in a sequence of conflicts, i.e., (δ1 , δ2 , δ3 ). Note that we treat each δi as a single story. This is relevant for the definition of fixed points. As will be shown, node 9 remains a fixed point throughout the whole election across δi . However, when looking at a specific δi , the set of fixed points is larger and more accurately describes the narrative. We will return to this concept later. To describe the narrative, we define the set of all the parties to be P = {R, B, U, G, O}

(4.4)

4.4 Example: Election in Gridland

67

where R is the Red Party, B is the Blue Party, U is the party of undecided voters, G is the Green Party, and O is the Orange Party. We now define four functions which describe the four stages in the evolution of the election in Gridland. Below is the party member function pm t which describes the conflict evolution, where t = 0, 1, 2, 3. The parties are denoted by their starting letters, respectively. ⎧ ⎪ ⎨ R, pm 0 (x) = U, ⎪ ⎩ B,  R, pm 3 (x) = B,



x ∈ {1, 2, 4} x ∈ {3, 5, 7}

, pm 1 (x) =

x ∈ {9, 8, 6} x ∈ {1, 2, ..., 7} x ∈ {6, 8, 9}

R, x ∈ {1, 2, 4} B, x ∈ {3, 4, ..., 9}

⎧ ⎪ U, x ∈ {1, 5} ⎪ ⎪ ⎪ ⎨ O, x ∈ {2, 3} , pm 2 (x) = ⎪ G, x ∈ {4, 7} ⎪ ⎪ ⎪ ⎩ B, x ∈ {6, 8, 9}

,

.

(4.5) To compute the partition at stage t = 0, ..., 3, we compute the inverse party member function pm −1 t . We can now describe the dynamic of the narrative simply by defining (δt )3t=1 as follows: (4.6) δt ( pm t−1 ) = pm t . See Exercise 2. Using the conflict dynamic function and the party member function, we can transform the story of an election in Gridland into a mathematical description where the partition of Gridland changes with the narrative. This is a powerful tool which allows us to merge narrative and social networks. The advantage of working with functions is that we can compose functions, and we can see the different stages in the story through that composition. Continuing with our example of Gridland, we next examine how community detection algorithms perform on narrative.

4.4.2 Community Detection Algorithms and Narrative It is interesting to examine what community detection algorithms tell us about narrative. Here, we look specifically at what community detection algorithms tell us about the Gridland elections. We implemented the community detection algorithms using Wolfram Mathematica version 12. The community detection algorithms failed to recognize the narrative. The nuclear plant is not in the graph and therefore is not recognized by the community detection algorithms. The social network of Panel A of Fig. 4.3 can be seen in Fig. 4.4. The network in Panel A has a lot of symmetry. However, the community detection algorithms are oblivious to this symmetry, and thus the implementation of the community detection algorithms breaks the symmetry. The fact that community detection algorithms break the symmetry means that they use some kind of order on the names of the nodes.

68

4 Taking the Road Less Traveled: Decision Matrices 7

8

4

5

6

2

3

1

9

7

8

4

5

6

2

3

1

Modularity

Centrality

7

8

4

5

6

2

3

1

Hierarchical

9

9

7

4

5

6

2

3

Spectral

8

4

5

6

2

3

1

9

CliquePercolation

8

1

7

9

7

8

4

5

6

2

3

1

9

VertexMoving

Fig. 4.4 This figure shows six community detection algorithms analyzing the social network in Panel A of Fig. 4.3

Otherwise, they would not be able to break the symmetry deterministically. This is a difficult property to use and understand. For an example, refer to Fig. 4.4. Consider modularity, centrality, and vertex moving. It is not clear why node 7 is in the same component as node 5 and why node 3 is not included in that component. In spectral, it is not clear why nodes 1 and 2 are in the same component, but node 4 is not in their component. The social network changes from Panel A to Panels B, C, D in Fig. 4.3, and the community detection algorithms are tested in Figs. 4.4 and 4.5 for Panels A, and B, C, D, respectively. Again, the community detection algorithms fail to capture the narrative. Again, this is expected since the networks are lacking the location of the nuclear plant, the location of the leaders, etc. The narrative develops from Panel B to C, D with the additions of new parties and new leaders, but for the community detection algorithms, the graph is the same. The community detection algorithms are oblivious to these changes. Applying different community detection algorithms can help, but it is difficult for the user to know which community detection algorithm to select. We develop several unified algorithms which respond dynamically to narrative (see Chaps. 6 and 7). To test community detection algorithms on Gridland, see Exercise 3. After seeing that community detection algorithms cannot capture narrative, we develop tools to infuse the logic of narrative into social networks.

4.5 Infusing Logic into the Model: Decision Matrix 7

8

4

5

6

2

3

1

9

7

8

4

5

6

2

3

1

Modularity 7

4

5

6

2

3

Hierarchical

9

Centrality

8

1

69

9

7

4

5

6

2

3

Spectral

8

4

5

6

2

3

1

9

CliquePercolation

8

1

7

9

7

8

4

5

6

2

3

1

9

VertexMoving

Fig. 4.5 This figure shows six community detection algorithms analyzing the social network in Panels B, C, D of Fig. 4.3

4.5 Infusing Logic into the Model: Decision Matrix As Aristotle points out, “good” logic is necessary for narrative to be coherent. We now finally listen to Aristotle, and infuse logic. Note that since we are building a model to allow machines to “read” a narrative, we insert logic in a very primitive way. We model the logic of a narrative through the social structure, i.e., m ∈ Mn,n [R+ ]. We typically use either frequency graphs or distances. Sometimes, when the matrix is obvious, we eliminate m. We return to Gridland in Fig. 4.3. Using the Floyd–Warshall Algorithm (see Algorithm 1), we transform the distances between nodes in Gridland into metric space (see below Eq. (4.7)). The metric space of this example is m A for Panel A of Fig. 4.3, and m B for Panels B, C, D.

70

4 Taking the Road Less Traveled: Decision Matrices

⎞ 3 3.5 2 2.5 ⎟ ⎟ 2 1.5 ⎟ ⎟ 2 2.5 ⎟ ⎟ 1 1.5 ⎟ ⎟. 1 0.5 ⎟ ⎟ 1 1.5 ⎟ ⎟ 0 0.5 ⎠ 0.5 0 (4.7) Usually, in elections, whether in Gridland or not, people look at the various alternatives and “grade” or “rate” the options. These grades correspond to the utility or cost of the different options; these options can be organized as a decision matrix Ψ . Note that the decision matrix can be a function of the social network and other factors. This will be more thoroughly explored later. For now, we only consider the structure of the decision matrix which is a group of real numbers with total order . Note that the total order is usually ≥ or ≤. Formally: ⎛

0 ⎜1 ⎜ ⎜2 ⎜ ⎜1 ⎜ mA = ⎜ ⎜2 ⎜3 ⎜ ⎜2 ⎜ ⎝3 4

1 0 1 2 1 2 3 2 3

2 1 0 3 2 1 4 3 2

1 2 3 0 1 2 1 2 3

232 123 214 121 012 103 230 121 212

3 2 3 2 1 2 1 0 1

⎞ ⎛ 4 0 1 ⎜ 1 0 3⎟ ⎟ ⎜ ⎜ 2 1 2⎟ ⎟ ⎜ ⎟ ⎜ 1 2 3⎟ ⎜ ⎟ 2 ⎟ ; mB = ⎜ ⎜ 2 1 ⎜ 3 2 1⎟ ⎟ ⎜ ⎟ ⎜ 2 3 2⎟ ⎜ ⎠ ⎝ 3 2 1 0 3.5 2.5

2 1 0 3 2 1 3 2 1.5

1 2 3 0 1 2 1 2 2.5

2 1 2 1 0 1 2 1 1.5

3 2 1 2 1 0 2 1 0.5

2 3 3 1 2 2 0 1 1.5

Decision Matrices and Decision Vectors Definition 4.3 The matrix Ψ ∈ Mn,k [R] is called a decision matrix when the rows are the decision vectors which “grade” or “rate” the various options available to the node according to the total order  (see Definition 2.5). In the context of our Gridland example, the decision matrix represents the distances to the proposed nuclear plants. In Gridland, the nodes prefer the larger values, i.e., they want to live farther from the nuclear plant which coincides with the distance to the leaders of the respective parties. The decision matrices for Gridland are summarized below in Eq. (4.8). ⎞ ⎞ ⎛ 3.5 1 3.5 ⎜ 0 2.5 ⎟ 2.5 ⎟ ⎟ ⎟ ⎜ ⎜ 1 1.5 ⎟ 1.5 ⎟ ⎟ ⎟ ⎜ ⎜ 0 2.5 ⎟ 2.5 ⎟ ⎟ ⎟ ⎜ ⎟ ⎜ 1.5 ⎟ ⎟ , Ψ D = ⎜ 1 1.5 ⎟ . ⎜ 2 0.5 ⎟ 0.5 ⎟ ⎟ ⎟ ⎜ ⎜ 1 1.5 ⎟ 1.5 ⎟ ⎟ ⎟ ⎜ ⎝ 2 0.5 ⎠ 0.5 ⎠ 0 2.5 0 (4.8) The main advantage of a decision matrix is that it can be used to explain how decisions were made, and allows us to examine the decision process more carefully. We do exactly this in Chap. 5. ⎛

0 ⎜1 ⎜ ⎜2 ⎜ ⎜1 ⎜ ΨA = ⎜ ⎜2 ⎜3 ⎜ ⎜2 ⎜ ⎝3 4

⎞ ⎞ ⎛ ⎛ 4 0 3.5 1 1 ⎜ 1 2.5 ⎟ ⎜ 0 2 3⎟ ⎟ ⎟ ⎜ ⎜ ⎜ 2 1.5 ⎟ ⎜ 1 3 2⎟ ⎟ ⎟ ⎜ ⎜ ⎜ 1 2.5 ⎟ ⎜ 2 0 3⎟ ⎟ ⎟ ⎜ ⎜ ⎟ ⎜ ⎜ 2⎟ 2 1.5 , Ψ , Ψ = = ⎟ B ⎜ ⎟ C ⎜ 1 1 ⎜ 3 0.5 ⎟ ⎜ 2 2 1⎟ ⎟ ⎟ ⎜ ⎜ ⎜ 2 1.5 ⎟ ⎜ 3 1 2⎟ ⎟ ⎟ ⎜ ⎜ ⎝ 3 0.5 ⎠ ⎝ 2 2 1⎠ 0 3.5 0 2.5 2.5

4.5 Infusing Logic into the Model: Decision Matrix

71

Up until now, it has not been clear how one generates decision matrices. We use the decision function to bring in some information from the narrative together with the social network in order to generate a decision matrix. In real life as in narrative, some characters loudly and frequently share their opinions. For example, it is well-known by everyone how party leaders vote. In a narrative, we typically know what the conflict between the protagonist and antagonist is. As a result, we can know what the decision vectors of some characters look like before we compute the decision matrix. These characters are called anchors. Formally: Anchors Definition 4.4 A node vi ∈ V is an anchor if we know Ψi before we compute the decision matrix Ψ . We denote the set of all anchors by A ⊂ V .a a

Anchors will be used to compute the decision matrix Ψ .

Returning to our Gridland election, we can now list the anchors in each of the panels of Fig. 4.3 as follows. The set of leaders in Panels A, B are A1 = {1, 9}.

(4.9)

The set of anchors in Panels C, D are A2 = {2, 4, 9}.

(4.10)

We will now describe the process of decision functions more thoroughly.

4.6 Decision Functions We now introduce the decision function, which is the primary tool we use to compute the decision matrix. For example, we can use the AB graph to compute the social network, and we can select the protagonist and antagonist as the anchors. Each node in the graph then measures its distance from the anchors. The decision function is a universal mechanism which takes this information and transforms it into a decision matrix. We can now define the decision function. The decision function takes a party member function pm together with a social network which represents the logic of the narrative, and generates a decision matrix. This generates a decision vector for each node. The decision vector provides a “grade” for each option available to that

72

4 Taking the Road Less Traveled: Decision Matrices

node (see Definition 4.3). The “grade” is given according to the total order  with a direction (see Definition 2.5). Formally: Decision Functions Definition 4.5 Let n be the number of nodes in the social network G. Let k be the number of parties. Let A ⊂ V be the set of known party leaders or anchors. The decision function is (4.11) Ψ : LA P × Mn,n [R] → Mn,k [R]. Returning to the election in Gridland, according to the narrative, nodes wish to be farther away from the nuclear plant. They therefore prefer to minimize the distance to the opposing party’s nucleus. The narrative provides us with the party leaders or anchors. Anchors and party leaders are a central concept throughout the rest of this book. Anchors are used as an interface between man and machine, allowing dialogue to emerge between the two. According to Definition 4.4, anchors are nodes with known opinions, and we can use them to construct the decision matrix. Therefore, it is possible to construct the partition or a party member function pm (see Definition 3.4) for the anchors or party leaders, since we know their party allegiance and thus their party member function pm. Note that we know pm only on the anchors and not on the rest of the nodes, since we know the party allegiance of the anchors. This means that we partially know the function. A restrict function on a set is a well-known operation in mathematics. Formally, for any function f : X → Y and any X  ⊂ X , we denote the restrict function of f on X  as f | X  : X  → Y such that for all x ∈ X  f | X  (x) := f (x).

(4.12)

Applying the restrict function to the party member function pm, according to the narrative of Gridland, we get the following:  pm 1 |A 1 (x) =  pm 4 |A (x) =

R, x ∈ {1} B, x ∈ {9}

R, x ∈ {2, 4} B, x ∈ {9}

 , pm 2 |A 1 (x) =

R, x ∈ {1} B, x ∈ {9}

⎧ ⎪ ⎨ O, x ∈ {2} , pm 3 |A 2 (x) = G x ∈ {4} ⎪ ⎩ B, x ∈ {9}

,

.

(4.13) We can now give a formula for the decision function which generates the decision matrices which appear in Eq. (4.8).

4.6 Decision Functions

73

Note that pm|−1 A t ( p j ) is a set. Therefore, for t = 1, 2, 3, 4 we can generate the decision matrix using the following formula: Ψt ( pm|A t , m)i, j =

min

x∈ pm|−1 A t (pj)

m i,x .

(4.14)

We close this section by pointing to Exercise 5. In the next section, we will see an example which uses the influence function to compute a decision matrix if the options in the decision matrix are nodes. In the decision function, we take the party member function pm together with the social network m and generate the decision matrix Ψ . Since opinions in social networks are generated using influence, we provide two examples (one using frequency graphs, and one using distance) of how to generate the influence function in f from a social network m.

4.7 Decision Matrix Example: Influence Functions Consider an AB graph (see Chap. 2). According to the definition of AB graphs, the frequency weighted adjacency matrix W f can be interpreted as the amount of influence nodes have on one another. We use the influence function in f to compute the influence of nodes on one another in a social network m. This is equivalent to the utility function in economics. Formally, (4.15) I n f m : V × V → R+ is used to measure the amount of influence I n f m (vi , v j ) that elements vi ∈ V have on elements v j ∈ V . 1 As the value of I n f m (vi , v j ) increases, then the amount of influence that vi has on v j increases as well. For example, if I n f m (vi , v j ) > I n f m (vi  , v j ),

(4.16)

then vi has a greater influence over v j than vi  . If the social network is clear from the text, we remove the index of the social network m and use the function I n f instead of I n f m . Note that wi, j in the AB graph is proportional to the frequency of conversation between two characters or nodes. The frequency of conversation can be interpreted as the amount of influence a character or node vi has on a character or node v j . In general for frequency graphs, G(V, E, W f = [wi, j ]). We define the influence for frequency graphs as follows:

We can use matrix notation for I n f m = [in f i, j ], i.e., in f i, j is the influence that node vi has on node v j . For more on this notation, see Sect. 2.4.

1

74

4 Taking the Road Less Traveled: Decision Matrices

Fig. 4.6 This figure shows the narrative of David Bowie’s “Major Tom.” At first, Major Tom lives happily with his wife (on the left). On the right side, Major Tom is floating far away from her in a tin can above the Earth. On the right side, due to the distance between the pair, the couple does not influence one another. On the left side, the pair lives together and their opinions converge

I n f G (vi , v j ) = wi, j .

(4.17)

Note that a frequency of zero means that there is no influence of the nodes on one another. Influence is defined on the social network m, and it is a relationship between nodes. The influence function affects the perspective of nodes, and two nodes with high influence on one another should have a close decision vector. For another example, consider a metric space (V, dis), where the distance can be used to define the influence according to the following formula: I n f (vi , v j ) =

1 . dis(vi , v j )

(4.18)

The above equation can be used to indicate the influence of node vi on node v j . To summarize, in frequency graphs, influence monotonically increases as the weights increase, and in metric space, the reverse is true, and influence monotonically increases as distances decrease. To see the connection between influence and single edge changes, see Exercise 8. In a narrative, if two characters are geographically close to one another, they influence each other. Conversely, when two characters are far apart and oblivious to one another, they do not impact the other. A moving example is David Bowie’s song “Space Oddity” which portrays the story of Major Tom. In his last moments, Major Tom says “Tell my wife I love her very much, she knows,” expressing an extreme condition of distance between two lovers where one is drifting into space. (see Fig. 4.6). This is mirrored in our daily lives, in the context of distance. Returning to our example of Gridland (see Sect. 4.4), when comparing Panel A to Panel B of Fig. 4.3, the frequency of the edges e = {6, 9}, {8, 9} changes from we = 1 in Panel A to we = 2 in Panel B. Therefore, node 9’s influence on nodes 6 and 8 increases, since node 9 is an anchor and thus has an unyielding opinion: node 9 does not want the nuclear plant at its house. Nodes 6 and 8 become more sensitive to

4.7 Decision Matrix Example: Influence Functions

75

the idea of having a nuclear plant near the home of node 9. Thus, they can convince nodes 3, 5, and 7 to join the Red Party and oppose the location of the nuclear plant.

4.8 Conclusion As this chapter showed, in option analysis or a decision-making process, each individual appraises their options and describes these options as decision vectors. We then aggregate these decision vectors into a decision matrix. The social network then can be split along conflict lines, according to the decision matrix. The conflict then changes, according to the decision matrix. In the next chapter, we provide examples of how to accomplish this task (see Sects. 5.6.1 and 5.7). We also described a general mechanism to compute decision matrices using the general structure of the decision function, which allows us to compute a decision matrix using social structure together with a party member function. It is a challenge to build a mechanism which makes sense for all sets of social networks, for all sets of anchors, etc. We will see several mechanisms in Chaps. 6 and 7. Conflict dynamics are used to summarize narratives in social networks and literature networks. We use a matrix structure as a replacement for background textual information and narrative logic. The concept of anchors was introduced in this chapter. These serve several functions. Anchors allow us to insert outside knowledge into the model of social networks and conflict dynamics. Anchors are also crucial since we insist that a narrative has some stability in it, which takes the form of an “anchor” with a fixed opinion. Finally, anchors serve as an interface between man and machine, allowing dialogue. We will further explore this in Chaps. 6 and 7. This chapter also studied community detection algorithms in the context of a narrative, and concluded that they are not well suited to model conflict dynamics in networks, particularly in cases where the network does not have enough information to capture the evolution of the conflict or opinions of the characters. We closed this chapter with the definition of influence function. This will be an important component in the definition of social rationality in the next chapter. There, we develop the concept of conflict function to describe how conflicts evolve in social networks. Using the conflict function, together with the influence function, we can define social rationality. We use the concepts of evolution and dynamics in a narrative to define social rationality.

76

4 Taking the Road Less Traveled: Decision Matrices

4.9 Exercises Conflict Dynamics 1. The following deals with the extension of the definition of conflict dynamics (see Definition 4.2). Hint: replace δ with the finite sequence of (δi )it with the same domain, i.e., V V → LP . (4.19) δi . : LP a. Do all the sequences contain a single shared anchor? Or should every pair have at least one fixed anchor of their own? Hint: compare the characters of the Star Wars series to the Harry Potter series. b. Use your answer from Exercise 1a to extend Definition 4.2 to maintain a sequence of conflicts, i.e., points in the narrative.

Election in Gridland 2. The following exercise deals with the election in Gridland (see Sect. 4.4). a. Explicitly compute δt for t = 1, 2, 3 (see Eq. 4.6). b. Compute the partition pm −1 t for t = 0, 1, ..., 4 and compare it to Fig. 4.3. c. Compute the set of all anchors in Gridland when considering the party member functions pm t , pm t+1 for t = 0, 1, ..., 3.

Community Detection Algorithms and Gridland 3. Run your favorite community detection algorithm on the narrative of Gridland. Compare your result to Fig. 4.3. Judge the performance of the community detection algorithm.

Infusing Logic into the Model: Decision Matrix 4. Determine which of the following matrices is a decision matrix in the Gridland narrative (see Sect. 4.4). If a Ψ matrix is a decision matrix, determine during which stage in the election it applies to.

4.9 Exercises

a. b. c. d. e.

Ψ Ψ Ψ Ψ Ψ

77

∈ M9,9 ; ∈ M9,3 ; ∈ M5,3 ; ∈ M5,9 ; ∈ M9,2 .

5. Use Eq. (4.14) to compute the decision matrices in the narrative of Gridland according to the matrices in Eq. (4.7) and the anchors in Eqs. (4.9), (4.10).

Influence Function 6. The following exercise deals with the Gridland election (see Sect. 4.4). a. Compute the influence function from the social network in Panels A and B in Fig. 4.3, according to the distance matrix given in Eq. (4.7). b. Compute the option analysis for 6a using the influence function when the options are node 1 and node 9. Compare your answer to Eq. (4.8) Ψ A , Ψ B . c. Compute the frequency matrix for the Gridland election from the distance matrices m A , m B given in Eq. (4.7). Compute the influence function from the social network in Panels A and B in Fig. 4.3, according to the frequency graph. d. Compute the option analysis for 6c using the influence function when the options are node 1 and node 9. e. Compare your answers from Exercise 6a and 6c. 7. The following exercises apply the influence function to the literature. The spreadsheet files of the drama texts can be found by clicking here). a. Refer to Act I of Shakespeare’s Julius Caesar. Compute the frequency as an influence function to determine who the most influential character in Act I is. b. Compute which character has the most influence on Caesar. c. Compute the decision matrix on the frequency graph for Caesar and Cassius in Act I. d. Refer to Shakespeare’s Othello. Which character has the most influence on Othello? e. Refer to Molière’s Tartuffe. Which character has the most influence on Tartuffe? 8. Let G 1 = (V, E 1 , W1 ) and G 2 = (V, E 2 , W1 ). These graphs differ by a single edge change (see Definition 2.11). Assume that a > 0, W1 = W2 + a[{i, j}].

78

4 Taking the Road Less Traveled: Decision Matrices

a. Show that if W1 , W2 are frequency graphs (see Eq. (4.17), then I n f G 2 (vi , v j ) ≥ I n f G 1 (vi , v j ).

(4.20)

b. Assume that W1 , W2 are distance graphs, i.e., wi, j is the distance between node vi , and node v j . You can use Eq. (4.18) for the connection between influence and distance. Show that I n f G 1 (vi , v j ) ≥ I n f G 2 (vi , v j ).

(4.21)

Chapter 5

Social Rationality and Networks

5.1 Introduction In social networks, narrative concerns the evolution of partitions over time. To study this phenomena, we borrow the notion of rationality from economics and game theory, and extend it to social networks (see Sect. 5.5). We do this because narrative has its own internal logic, as Aristotle argued [34]. Hand in hand with the text, the interpretation of a text must also have its own logic, The liveliness of the institution of literary study depends on the twin facts that (1) such arguments are never settled, and (2) arguments have to be made about how particular scenes or combinations of lines support any particular hypothesis. You can’t make a work mean just anything: it resists, and you have to labor to convince others of the pertinence of your reading. [66]

Rationality is a key ingredient in economic decision-making theory. Usually, the assumption is that there is a utility which is used to measure which decision or option is best. Rationality is used in economics in order to predict the economic behavior of humans. We use influence (see Sect. 4.7) to measure rationality in social networks. Thus, for each character in a social network, we replace utility by an aggregation of influence related to the character’s position in a social network. We assume that when considering which party to support in an election, each character considers their position in the social network (see Fig. 5.2). We call this social rationality. Since society tends to be more rational than individuals, we use social rationality in the context of social networks instead of individual rationality (Fig. 5.1). In the previous chapter, we showed that community detection algorithms are not suitable for studying conflict dynamics in narrative. To overcome this difficulty, we develop a mathematical framework of conflict functions Ξ (see Sect. 5.7). In general, a conflict function Ξ takes a party member function Pm 1 , which can be used to encode conflict Pm −1 1 , together with a social network m ∈ Mn,n , and produces a new party member function Pm 2 . The new party member function Pm 2 can then © Springer Nature Switzerland AG 2021 Z. Lotker, Analyzing Narratives in Social Networks, https://doi.org/10.1007/978-3-030-68299-6_5

79

80

5 Social Rationality and Networks

Fig. 5.1 This figure shows a statistician and a politician discussing election results and wondering what the meaning of social rationality is

be used to encode conflict Pm −1 2 . These two conflicts describe the evolution of the narrative. A crucial element which is hidden from the above description is the decision matrix Ψ (see Definition 4.3), which transforms the logic of the narrative described through the social network into the new party member function Pm 2 .

5.2 Related Work: Social Rationality Note that the phrase “social rationality” has a different definition in the behavioral sciences (see [11, 110]). We define social rationality in a mathematical framework, which clearly differs from the behavioral sciences approach to the term. In the behavioral sciences definition, social rationality is mentioned in the context of game theory and bounded rationality. It is typically used in a way to claim that there is some level of uncertainty in terms of the accessible information in a decision, i.e., in the alternatives or consequences to a decision. For us, social rationality is how individuals measure their choices in a conflict situation in the social network, with respect to the influence of the social neighborhood on that individual. We later provide a mathematical definition to this end, using the influence function.

5.3 Freedom of Interpretation and Anchors As noted in Chap. 4, anchors (see Definition 4.4) can be used as a common language or buffer between man and machine. Moreover, as will be shown in Chaps. 6 and 7, anchors allow us to generate universal community detection algorithms.

5.3 Freedom of Interpretation and Anchors

81

Both man and machine can understand the simple statement that anchors cannot change parties or partitions, and that the opinions of the anchors are known. If we look only at partitions, we ignore the information about the social structure that social networks provide. Anchors allow us to enjoy the benefits of both worlds. The choice of different anchors is what generates an exponential search space (see Sect. 3.7). In turn, this provides us with freedom of interpretation since there are exponential ways to choose different anchors. Selecting two different nodes as anchors for two different parties can be interpreted as a query about the conflict between two different characters. To paraphrase Cicero, the Bible, and George Orwell, the question is “are you with us or against us?” (or, in our terms, “are you with Red or with Blue?”). In the same way, pitting two subsets R, B of opposing characters against one another can be interpreted as a query about a conflict between the subsets R, B. Since the number of subsets is exponential, we get an exponential number of queries that we can ask. For example, consider a simple case where we have only two parties. Therefore, the number of potential anchors is n−i   n−1   n i=1 j=1

i

  n−i × = 3n − 2n+1 + 1. j

(5.1)

Note that if we are dealing only with partitions which are not party member functions Pm (i.e., are parties without names), then the above equation must be divided by two. Clearly, if there were more parties in our example, then the number of potential interpretations would be even larger. After collecting the opinions of the nodes in the social network who are deciding between R and B, and transforming the results into real numbers, we still need to answer our question of “are you with us or against us?” For example, does the value of 1 for R and 3 for B mean a node is with R or with B? (see Ψ A in the second row in Eq. (4.8) for an example.) We next tackle this technical issue.

5.3.1 Direction of Total Order The simplest model for a decision-making process (such as selecting a party to vote for) uses the total order  (see Definition 2.5). However, the total order  can measure either utilities or cost. In the case of utility, we want to maximize the utility, and in the case of cost, we wish to minimize the cost. This means that it is not enough to only have total order (see Definition 2.5); we also need a direction of the total order. In general, even when we are given a total order  over the real number with units (i.e., distance or probability), it is not always clear if the decision maker wants to minimize or maximize the total order . For example, consider a teenager deciding where to go to university. The total order describes the distance between the teenager and their parents. This is the only

82

5 Social Rationality and Networks

factor that the teenager is considering for their college search. We assume that they want to be as far away as possible from their parents. Perhaps another teenager (or the same teenager in a different mood) wishes to be as close as possible to their parents. To overcome this problem, we use dir ection to determine if the decision maker wants to minimize or maximize . Formally, we say that if a decision maker wishes to maximize , then dir ection = max, and if the decision maker wishes to minimize , then dir ection = min. Note that in general, we, unlike the first teenager, wish to minimize distance and cost, and maximize probabilities and utilities. We do this for the sake of simplicity. In all cases of total order, we assume that there is an optimal option ∗ , according to direction. This means that  max if dir ection = max ∗ = . (5.2) min if dir ection = min We say that the decision matrix Ψ (see Definition 4.5) is unique if the optimal option ∗ appears at most once in any decision vector; we cannot have two different options which are both optimal. We say that a decision vector Ψi is unique if the optimal decision appears at most once in Ψi . For example, when we measure the total order  in distance, and the total order minimizes distance over a metric space, then ∗ = 0.

(5.3)

On the other hand, if we are talking about an election, for example, and  measures the probability that a node will vote for a party, then ∗ = 1.

(5.4)

We give a simple algorithm that finds the optimal option, using the total order . The input of the algorithm is a vector of numbers, the total order , and the direction of the total order dir ection. The output of the algorithm is the optimal option. Again, in cases, where the direction is clear, we ignore direction. For example, as mentioned, when the values measure either distance or cost, we minimize, and when the numbers measure probabilities or utilities, we maximize.

5.4 Utility Anchors We now return to anchors, or nodes whose opinions we know before we compute the decision matrix (see Definition 4.4). Now, when considering utility, if a node has maximum utility as an option in the decision matrix Ψ and if that option is unique, then we can predict the decision of that node. Therefore, that node is an anchor. We

5.4 Utility Anchors

83

Algorithm 3 This algorithm produces the optimal option. INPUT: a vector ψ, the total order , and the direction of total order dir ection. OUTPUT: (o, j), where o is the value of the optimal option for an individual in ψ according to  and the direction dir ection, where j is the indices of the position on ψ. 1: procedure OptimalOption(ψ, , dir ection) 2: if dir ection = max then 3: o ← max ψ 4: j ← arg max ψ 5: else 6: o ← min ψ 7: j ← arg min ψ 8: end if 9: return (o, j)  o is the value of the optimal option, and j is the index of that option. 10: end procedure

call these unique types of anchors with the best possible values and therefore known opinions, utility anchors. Again, we note that when the context is clear, we use the general term anchor instead of the more specific term utility anchor. Formally: Utility Anchors Definition 5.1 Let Ψi be a decision vector where ψi, j measures the degree to which individual vi supports party p j according to the total order . The node vi ∈ V is a utility anchor of party p j if (5.5) ψ(i, j) =∗ .

Utility Anchors: Gridland Example We return to Gridland to illustrate utility anchors. Looking at the decision matrices in Eq. (4.8), the utility anchors in the Gridland narrative in Panels A, B of Fig. 4.3 are A1 = {1, 9}. The set of anchors in Panels C, D are A2 = {2, 4, 9}. Is it possible to separate the anchors in A1 , A2 according to their parties? Our next goal is to define social rationality. Social rationality builds upon the influence function, denoted in Eq. (4.15).

84

5 Social Rationality and Networks

5.5 Rationality in Social Networks Up until now we have had two independent but related concepts. The first is that of the degree of influence in f (see Sect. 4.7) of nodes on one another. The second is the decision vectors ψi given by the decision function Ψ which evaluate options in the decision matrix Ψ according to the perspective of node vi . Clearly, we would like to have a correlation between influence and decision. If the influence of node vi on node v j increases, then the social decisions made by these two nodes should become more similar. We formalize this property, which we call social rationality. Social rationality is a property of decision function. Note that any function with the right domain and codomain is a decision function Ψ (see Definition 4.5). Decision functions do not need to be rational or even “make sense;” however, it is preferable that they do. Before formally defining social rationality, we discuss what is necessary for a decision function to have the property of social rationality. According to Definition 4.11, a decision function takes a set of anchors A ⊂ V , a party member function Pm|A ∈ LA P , and a social network m ∈ Mn,n , and transforms them into a decision matrix Ψ (Pm|A , m) ∈ Mn,k .

(5.6)

Social rationality points to the degree to which nodes agree. We first define a disagreement vector, where we measure the level of disagreement between two nodes vi , v j ∈ V . We treat Ψ (Pm|A , m)i , Ψ (Pm|A , m) j ∈ Rk

(5.7)

as two different vectors, and compute the difference between the vectors, which we denote by Δ(Ψ (Pm|A , m))i, j . Since Ψ (Pm|A , m)i and Ψ (Pm|A , m) j measure the decision vector of two nodes vi and (v j ), we can use them to compare the two node points of view. Formally: Disagreement Vectors Definition 5.2 The disagreement vector of the decision matrix Ψ between nodes vi ∈ V and v j ∈ V is Δ(Ψ (Pm|A , m))i, j = Ψ (Pm|A , m)i − Ψ (Pm|A , m) j .

(5.8)

Following the idea of the Nash equilibrium [146, 171], we next compare the decision vectors of nodes vi , v j in two different social networks m 1 , m 2 ∈ Mn,n [R+ ]. These two social networks differ by a single edge change (see Definition 2.11). This means that the influence of all nodes on all edges that are not {i, j} remain the same.

5.5 Rationality in Social Networks

85

According to the definition of single edge change, we assume that m 1 − m 2 = a[{i, j}]

(5.9)

where a ∈ R. Therefore, the only change from social network m 1 to social network m 2 is either an increase or decrease of the influence I n f (vi , v j ) whose nodes vi , v j have on one another. Exercise 8 showed that in cases of frequency graphs and distances, influence changes monotonically with the frequency of the social network. Thus, we can ignore influence, and instead talk about frequency. We do this to simplify the definition. We say that the influence of nodes vi , v j is social rational in relationship to one another in the decision function Ψ if as their influence on one another increases then their opinions become closer. The problem is that there are many ways to make the opinions of the nodes vi , v j closer together. To ensure that nodes vi , v j are the nodes which are responding to the changes in opinion in the networks, then we restrict the change from the social network m 1 to the social network m 2 to act only on the single relevant edge {vi , v j }. Formally, this condition can be written as a disagreement inequality for nodes vi , v j ∈ V , for all 0 < a ∈ R ||Δ(Ψ (Pm|A , m))i, j || ≥ ||Δ(Ψ (Pm|A , m + a[{i, j}]))i, j ||

(5.10)

where m + [{i, j} is the weighted adjacency matrix after adding a new edge {vi , v j } connecting nodes vi , v j (see Eq. (2.8) in Sect. 2.4). The disagreement inequality allows us to define cases where a decision function Ψ is social rational by demanding that all nodes be social rational with respect to one another, i.e., if for all nodes their influence on one another increases, then their opinions become closer together. The formal definition of social rational decision functions follows. Social Rational Decision Functions Definition 5.3 The decision function Ψ is a social rational decision function if the disagreement inequality ||Δ(Ψ (Pm|A , m))i, j || ≥ ||Δ(Ψ (Pm|A , m + a[{i, j}]))i, j || holds for all A ⊂ V , for all + (Pm|A , m) ∈ LA P × Mn,n [R ],

for all a ∈ R+ , for all i, j ∈ {1, . . . , n}.

(5.11)

86

5 Social Rationality and Networks

Simple Examples: Social Rationality We next provide two simple examples, the first of which is a social rational decision function, and the second is not a social rational decision function. We begin with an example in the positive case. Dictator games are well-studied in economic game theory [84]. Here, we adopt this model to describe the social rational decision function where all nodes imitate the dictator node. Clearly, this is a rational decision for those nodes. To fill in the details, see Exercise 1. One of the most studied properties in graph theory is coloring [36, 38, 73]. In coloring problems, each vertex vi is assigned a color ci . Two nodes which share an edge are forbidden to have the same color. Typically in graph theory, there is an effort to minimize the number of colors. Coloring can be transformed into the language of social rational decision functions, where each node decides its own color, as long as it is legal coloring. Clearly, this function is not social rational (see Exercise 3). We next explain how to transform decision matrices into party member functions using partition functions.

5.6 Partition Functions We begin with describing the domain and codomain of partition functions. We call any function that maps decision matrices into party member functions Pm partition functions. In summary, the input of a partition function is a decision matrix Ψ , and the output is a party member function Pm. Note that some partition functions are social rational, and some are not. Additionally, party member vectors are also considered party member functions (see Sect. 3.2.3). Formally: Partition Functions Definition 5.4 The function V Λ : Mn,k → LP

(5.12)

is a partition function. Next we define social rational partition functions according to the total order . In the following definition, we assume that we wish to maximize the value of the total order . Moreover, we assume that the party names are P = {1, 2, . . . , k}, and the party member function Pm is given as follows to simplify notation. Therefore, the codomain of any party member function is Pm(vi ) ∈ {1, 2, . . . , k}. Thus, we can use party member functions as indices for decision matrices.

5.6 Partition Functions

87

Social Rational Partition Functions Definition 5.5 Let  be a linear order on the real number. The function V Λ : Mn,k → LP

(5.13)

is a social rational partition function if for all m ∈ Mn,k and for all i ∈ {1, . . . , n}, j ∈ {1, . . . , k} m i,Λ(m)(vi ) = OptimalOption(m i , , dir ection)

(5.14)

(see Algorithm 3). V is a party member function, and therefore Λ(m)(vi ) ∈ Note that Λ(m) ∈ LP {1, 2, . . . , k} can be used to compute the indices for m since we assume that P = {1, . . . , k}. For readers who are upset about this abuse of notation, Exercise 8 is for you to fix this abuse. We conclude this section with a general procedure which takes a collection of subsets {S1 , . . . , Sk } together with the set V . We assume that for all i ∈ {1, 2, . . . , k}, the subset satisfies Si ⊂ V . Our goal is to compute a partition ρ out of Si . According to the definition of a graph partition (see Definition 3.1), there are two conditions which must be satisfied when moving from a collection of a subsets to a graph partition. The first condition is that of disjointness, and the second is covering. There is a simple way to satisfy both conditions. If we add one additional set into the new partition, this set will include all swing votes, i.e., the nodes which belong to several subsets, as well as the nodes which do not belong to any subsets. The input for the following algorithm is the set V together with the subsets S1 , . . . , Sk ⊂ V . The output is the partition which is given by ρ = (ρ1 , . . . , ρk+1 ).

Algorithm 4 From Subset To Party Member Vector INPUT: A set V and k subsets S1 , S2 , . . . , Sk of V OUTPUT: Party member function Pm which is a partition of V to k + 1 parts 1: procedure FromSubsetToPartyMemberVector((V, (S1 , S2 , . . . , Sk ))) 2: for i ∈ {1, 2, . . . , k} do 3: ρi ← Si \ ∪ j =i S j 4: end for k ρ 5: ρk+1 ← V \ ∪i=1 i 6: return Pm = (ρ1 , . . . , ρk+1 )  Pm is the output partition. 7: end procedure

We refer the reader to Exercises 5, 6, and 7.

88

5 Social Rationality and Networks

5.6.1 Personal Partition Function We now provide an example of partition functions: the personal partition function. Personal partition functions imitate an election. As shown in the algorithm below, each node first selects their preferred party according to their decision matrix Ψ that describes their utilities. The personal partition function takes a decision matrix Ψ and transforms it into a party member vector, which is a party member function which is described as a vector set, as outlined in Sect. 3.2.3. Algorithm 5 Computing the Personal Partition Function INPUT: Ψ is a decision matrix, together with total order  OUTPUT: ρout is the partition of V to k parts 1: procedure PersonalPartition(Ψ, >) 2: n ← Dimension(Ψ )1  n is the number of nodes in the social network 3: for i ∈ {1, 2, . . . , n} do 4: m ← min ψi 5: index ← { j : ψi, j = m} 6: for j ∈ index do 7: ρ j ← ρ j ∪ {i} 8: end for 9: end for 10: ρ ← Fr om Subset T oPar t y Member V ector ({1, . . . , n}, (ρ1 , . . . ρk )) 11: return ρ  The Personal Partition ρ 12: end procedure

To verify the reader’s understanding of this Algorithm, see Exercises 4 and 5. We next define a conflict function. Conflict functions will be used to study how conflicts evolve in literature and social networks.

5.7 Conflict Functions History is the story of communities, which can be modeled by social networks. The essence of a static social network is the partition, which is comprised of communities. In fact, community detection algorithms aim to generate these partitions; perhaps a more accurate name for community detection algorithms is partition detection algorithms. In community detection algorithms, communities do not interact with one another within the partitions. In fact, the main purpose of community detection algorithms is to break the network into separate communities. This, however, is not reflective of narratives. For example, the American revolution does not exist without the British to rebel against. What is a battle if not an interaction between communities? These

5.7 Conflict Functions

89

interactions between communities, which are at the heart of stories, are lost in community detection analysis. As shown, history and narrative are not static, and evolution is inherent. In contrast to community detection algorithms, conflict functions focus on the dynamics of the communities within the partition. Conflict functions are a tool to force communities in a social network to evolve and interact, by splitting and merging society. They accomplish this by composing functions. Conflict functions can infuse dynamism into party member functions and partitions, and highlight social mobility. As shown in Chap. 4, conflict dynamics (see Definition 4.2) are missing one key element: narrative logic. In the previous chapter, we demonstrated how to infuse logic into that model, and generate a polyphony of interpretations for the text. Different partitions of a network can be perceived as different interpretations of the narratives which they represent. A plurality of interpretations is characteristic of great literature, which encourages dialogue between interpretations. Narrative logic (see Chap. 4) is a necessary ingredient which provides explanation to the evolution of the conflict. Consider Homer’s The Illiad. It is a fact that Troy lost the war, but this is not a narrative. There is no “how” or “why.” The logic of the narrative is modeled as a matrix or a graph showing the relationships between and influences of the characters. The narrative logic together with the conflict and partition describes the outcome of the evolution of the conflict, which is itself a new step in the evolution of the conflict. Conflict functions address the evolution of conflict and are defined below. Conflict Functions Definition 5.6 Let A ⊂ V be a subset of V . The function V Ξ : LA P × Mn,n → LP

(5.15)

is a conflict function if there exists a social rational decision function Ψ , and a social rational partition function Λ such that Ξ = Λ(Ψ ),

(5.16)

we then say that Ξ is a social rational conflict function. The following diagram explains the connection between a conflict function Ξ , a social rational decision function Ψ , and a social rational partition function Λ.

90

5 Social Rationality and Networks

LA P × Mn,n

Ψ

Mn,k

Ξ

Λ

(5.17)

V LP

One way to think about the party member function Pm|A is as a seed of knowledge which allows us to spread knowledge in a network. This technique is sometimes called reinforcement in machine learning, induction in mathematics, or background in psychology and linguistics. Standard techniques such as nearest neighbor or hitting equations allowed us to extend the function Pm|A to the complete function Pm. General mechanisms which are well-known to work will be discussed over the next couple chapters. Returning to conflict function, we provide an example. Suppose we have an AB graph (see Chap. 2) of Superman (1978). We can dictate that a conflict function places Superman and Lex Luthor in opposing camps, i.e., the anchors set is A = {Superman, Lex Luthor}.

(5.18)

Pm|A (Superman) = good Pm|A (Luthor) = evil . The conflict function partitions the nodes V into two camps: one which supports Superman, i.e.,    (5.19) Ξ Pm|A , AB(Ssuper man ) (good)−1 , and the other which supports Lex Luthor, i.e.,    Ξ Pm|A , AB(Ssuper man (evil)−1 .

(5.20)

The narrative logic is the social network AB(Ssuper man ) of the Superman script. Those two elements together with the conflict function Ξ will generate the outcome of the conflict at whatever is selected as the ending point.

5.7.1 Narrative Interpretation and Conflict Functions It is due to narrative and emotional involvement in a story that the conflict function does not try to ease the burden on the user, as community detection algorithms do. The user cares about and identifies with Romeo and Juliet, and thus has an opinion

5.7 Conflict Functions

91

(or multiple opinions!) about the outcome of the partitions. Thus, we want to allow the user to express complex interpretations or complex relationships in a simple way, while still maintaining freedom of choice in an exponential search space. In mathematical terms, this directly translates into an exponential number of input options. We remark that the query size (see Sect. 5.3) is polynomial in the network size. Moreover, the space of all the queries should be exponential in the network size. It is not clear how to construct a common language between man and machine to discuss narrative. This leaves us unable to ask questions and get answers from a machine. In a dialogue, there are questions (input) and answers (output). In conflict, we model questions as reduced party member functions Pm in |A . Each of these parties p j can have many anchors Pm in |A ( p j )− 1. Therefore, the input for the conflict function Ξ is Pm in |A together with social logic, which is modeled as a social network m ∈ Mn,n . The output for the conflict function Ξ are answers, which are party members Pmout which is an extension of the party member function Pm in |A . In summary, the conflict function Ξ eliminates the unknown opinions U from the input party member functions Pm in |A when moving to the output party member function Pmout. As noted, we sometimes use party member vectors instead of party member functions (see Sect. 3.2.3).

5.7.2 Community Detection Algorithms and Conflict Functions Conflict functions are born out of conflict dynamics. As noted, we achieve a polyphony of interpretations by partitioning networks into two or more “opposing” camps. While community detection algorithms also partition networks, there are several differences between conflict functions and community detection algorithms. Conflict functions try to study conflict dynamics, while community detection algorithms only generate partitions, and do not follow conflicts through time. Conflict functions can imitate any community detection algorithm by selecting anchors according to the output of community detection algorithms. Since we know the opinions of anchors, it forces conflict functions to coincide with community detection algorithms. Typically, since community detection algorithms prioritize easing the burden on the user, the user cannot provide any additional polynomial information or queries. Community detection algorithms also shift the burden of selecting a partition onto the computer instead of the user. Conflict functions take the opposite approach, by expanding the search space to be exponential. Therefore, there is an exponential number of options from which the user selects the polynomial input or query (see Sect. 5.3).

92

5 Social Rationality and Networks

Example of Community Detection Algorithms and Conflict Functions Since there is an exponential number of ways to choose the set A , the size of the search space LA P is exponential. To illustrate, consider a simple scenario in which we would like to partition a graph AB − G(V, E, W f ) into two subsets: Good and Evil. The input for the conflict function is the graph AB − G(V, E, W f ) along with the party member function Pmin|A . The number of ways to choose A is equal to Eq. (5.1). The anchors for the Good Party are denoted by A g ⊂ V , and the anchors for the Evil Party are denoted by Ab ⊂ V . Adopting the Judeo-Christian philosophy of Good versus Evil, these sets are disjoint. Note that for the conflict function to be meaningful, the number of anchors k must be less than n since if U is empty, then we do not have a narrative (see Definition 4.2).

5.8 Rationality as Narrative We conclude this chapter with a discussion of social rationality as narrative. Consider the following interpretation. At the beginning of a narrative, there is a social network m begin together with a party member function Pm begin . Using m begin and Pm begin , we can compute the decision matrix at the beginning of the narrative Ψ begin as well as the influence in f begin of the nodes on one another. Denote the decision vector of begin begin , (Ψ j ), respectively, at the beginning of the narrative. nodes vi , v j by Ψi Moving to the end of the narrative, again we have a social network m end , which is the same as the social network m end except for one pair of nodes vi , v j ∈ V . These nodes increase their influence in f end on one another at the end of the narrative, i.e., in f begin (vi , v j ) < in f end (vi , v j ).

(5.21)

There is also a party member function Pm end := Pm begin which does not change from the beginning of the narrative to the end. Again, we can compute the decision matrix Ψ end . Denote the decision vector of nodes vi , v j to be Ψiend , (Ψ jend ) at the end of the narrative, respectively. Since the pair of nodes increases their influence on one another, and the rest of the social network is the same, we expect that the decisions of the nodes will become closer as their influence on one another increases. Formally: begin

||Ψi

begin

− Ψj

|| ≥ ||Ψiend − Ψ jend ||.

(5.22)

We use the language of decision functions to define rationality in a narrative framework. This interpretation emphasizes that rationality itself is a narrative. Rationality is a narrative which tries to predict different paths that the future could take, and

5.8 Rationality as Narrative

93

attempts to determine which one is preferable, and reshape the future to be the most suitable one. This has not previously been defined in social networks, unsurprisingly, since it necessitates a degree of understanding of the role of narrative in social networks.

5.9 Conclusion Narrative is a central and recurring theme in human thought and history. Within narrative, conflict is both heart and motor: history is a narrative of how conflicts evolve over time. We have presented partition as a manifestation of conflict. We presented definitions of social rationality and conflict functions. Conflict functions are a tool to describe how narrative and conflict evolve over time. Social rationality is actually an example of conflict functions, and a property of some conflict functions, since a degree of “making sense” is desirable in a conflict function. A major feature of the literature is freedom of interpretation. In the language of computer science, we insist that the search space of interpretation be exponential. This is accomplished by adopting the notion of party member functions and partitions. We discussed the advantages of an exponential search space, and how to achieve such a search space. We next move to study extreme conflict, which is a typical characteristic of great literature. We provide examples of conflict function through the metaphors of war and capture. Chapters 6, 7, and 8 provide important examples of conflict functions and more elaborate proofs on the social rationality of conflict functions.

5.10 Exercises Freedom of Interpretation and Anchors Rationality in Social Networks 1. Let A = [ai, j ] ∈ Mn,n [R]+ be a weighted adjacency matrix. The elements on the diagonals of A can represent the opinions of the nodes in V . Assume that the social network of A has a special node called The Dictator vi ∈ V . That is, the opinion of The Dictator vi is (5.23) ai,i All other nodes copy the opinion of The Dictator. Using the opinion of The Dictator vi , let The Dictatorship decision function be Ψ Dic(i) : Mn,n → Rn .

(5.24)

94

5 Social Rationality and Networks

For all A ∈ Mn,n , we define the decision function Ψ Dic(i) to be Ψ Dic(i) (A) = (Ai,i , . . . , Ai,i ).

(5.25)

Show that The Dictatorship decision function is a rational decision process. 2. Let A = [ai, j ] ∈ Mn,n [R]+ be a weighted adjacency matrix. The elements on the diagonals of A can represent the opinions of the nodes in V . Assume that the social network of A has two special nodes called Consuls vi , v j ∈ V . The opinions of the two Consuls are ai,i /(a j, j ), respectively. Denote the two Consul incidence matrix to be Con(i, j) ∈ Mn,2 and it is defined by Con(i, j) = [(i, 1)] + [( j, 2)]

(5.26)

(for more, see Eq. (2.7) in Sect. 2.4). We can now define the decision process of the two Consuls (5.27) Ψ Consuls(i, j) : Mn,n → Mn,2 to be Ψ Consuls(i, j) (A) = A × Con(i, j).

(5.28)

All other nodes are influenced by the opinions of the two Consuls. Show that the two Consul decision function is a rational decision process. 3. Let G(V, E) be an undirected simple graph with n nodes. A proper coloring of G is a function Color : V → {1, 2, . . . , n} (5.29) such that for all {Vi , V j } ∈ E Color (vi ) = Color (v j ).

(5.30)

Show that proper coloring is not a rational decision function. 4. Let G(V, E, W f ) be a weighted graph. Assume that you are given a partition ρin = (A1 , . . . , Ak ) of V . Write an algorithm using a centrality function χ to generate a partition ρ = (ρ1 , . . . , ρk+1 ) of V such that for all i = 1, . . . , k, ρi ⊂ Ai . 5. Assume we are given k parties. a. Assume that the anchors of these parties are determined by the remainder of their division to k, i.e., let Ψi = δi mod k, j be the decision vector of node i. Give a partition process that collects all the anchors A j for party 1 ≤ j ≤ k from ρout, j . b. Assume that node i prefers Party i mod k and it is half as likely to vote for Party i + 1 mod k, i.e., Ψi = δi,i mod k + δi,i+1 mod k . Define and compute the swing vote.

5.8 Rationality as Narrative

95

6. Let 1 < k ∈ N be an integer. Let S be a set. Let Si ⊂ S be a subset of S for i = 1, . . . , k. Let ρ = Fr om Subset T oPar tition(V, (S1 , S2 , . . . , Sk )). a. Prove that ρ is always a partition of S. b. Give a necessary and sufficient condition for the partition ρ to have k parts. c. Give a necessary and sufficient condition for the partition ρ to have k + 1 parts. 7. Assume you are given a bipartite complete graph G(R, B, E) (see Sect. B.5.3) where the vertices are R = {r1 , . . . , rn }, where R represents girls, and B = {b1 , . . . , bn } represents boys. The edges between the two are the preferences, where high wbi ,r j > wbi ,r j means that boy bi prefers girl r j over girl r j . The same holds true for the girls, i.e., wbi ,r j > wbi ,r j . There are two natural partitions in this case. The first is homophily, i.e., boys with boys, and girls with girls. The second is couples. In the first partition, we have two parties, and in the second, we have n parties. a. Write a conflict function algorithm which produces a decision matrix together with a partition process such that it generates the homophily partition. b. Write a conflict function algorithm which produces a decision matrix together with a partition process such that it generates the couples partition with n parties which maximizes the preferences of the individuals. c. In Aristophanes’ speech in Plato’s Symposium, there are three sexes: all male, all female, and half male/half female. Formalize a question in the language of hypergraphs, and develop a conflict function algorithm for this story. 8. This exercise removes the assumption from the definition of social rational partition functions (see Definition 5.5) that the party name set is P = {1, . . . , k}. Assume that the party set is arbitrary. Let f : P → {1, . . . , k} be a function that goes from the set of party names P to the set {1, . . . , k}. Use f to fix the definition of social rational partition functions. 9. Use path and cycle graphs to show that community detection algorithms are not rational.

Partition Functions Conflict Function 10. The main difference between community detection algorithms and conflict function algorithms is that community detection algorithms do not have a search space.

96

5 Social Rationality and Networks

a. Explain how to transform a community detection algorithm into a conflict function algorithm. Note that in this case, we do not follow the conflict function schema, i.e., there are not psychological and sociological dimensions. Instead, for this exercise use a black box community detection algorithm. Hint: let G(V, E) be a directed weighted graph with weight function W : E → R+ . Let Del = [deli, j ] ∈ Mn,n [{0, 1}] be the delete matrix which can be interpreted as follows: if deli, j = 1, then we delete the directed edge (vi , v j ). Use this matrix to transform any community detection algorithm into a conflict function algorithm. b. How many different delete matrices do we get when transforming a community detection algorithm into a conflict function algorithm? Is the search space exponential? For more details, see Sect. 5.3 Eq. (5.1) and Sect. 5.7.2. c. Explain how to use a community detection algorithm as the input in the conflict function schema. 11. The following table see shows five types of standard community detection algorithms as computed by Wolfram Mathematica 12.1: Modularity, Centrality, Hierarchical, Spectral, and VertexMoving (see Fig. 5.2). Take these graphs, and repeat the calculations yourself using your favorite program. Show that five of these standard community detection algorithms are not rational. In each of these exam-

Modularity

Centrality

Hierarchical

Spectral

VertexMoving

5

2

3 3 1 6

1

1

5

6

5

3

5

2

4

7

7 4

6 3

2

4

5

7

4

2

7

1

1

6

3

4

6

2

5

2

3 3 1 6

1

5

1 5

3 2

2

4

7

7 4

6 3

2 5

6

4

7

5

4 7

1

1

6

3

4

6

2

Fig. 5.2 This figure shows six standard community algorithms and their graphs. The algorithm names are listed on top; the first row of graphs is the original algorithm before adding an edge, and the bottom row of graphs shows the graphs after adding an edge. The colors of the nodes represent their communities which are interpreted as their opinions

5.8 Rationality as Narrative

97

ples, by adding an edge, nodes switch communities and therefore disagree on the nodes which belong to the edges. 12. Clique Percolation was discussed in Sect. 3.4.5. Show that Clique Percolation is rational using the following guidelines. We begin with the contradictory assumption that Clique Percolation is not rational. What we need to prove is that there exists a graph G(V, E), two nodes v, u, and an edge v ◦−◦ u, such that the graph G = G(V, E ∪ {v ◦−◦ u}). Therefore, we assume that the opinions of the nodes v, u in G(V, E) are the same according to Clique Percolation, while their opinions in the graph G are not the same, i.e., they belong to different communities in G . According to the Clique Percolation algorithm, the nodes share k − 1 cliques. Adding the edge v ◦−◦ u, we close the clique. Therefore, these two nodes remain in the same community.

Chapter 6

Sun Tzu Says: Direct Attack

6.1 Introduction In this chapter, we look at the extreme condition of conflict: war [211]. Now that we have modeled conflict as partition (see Chaps. 3, 4, 5), we move to a canonical text of war: Sun Tzu’s The Art of War. In this chapter, we translate Sun Tzu into the language of social networks. The metaphorical nature of Sun Tzu’s text has allowed it to endure through time, and across cultures and disciplines. The metaphor laden nature of the text makes The Art of War applicable to many contexts, and both fun and challenging to read. This is particularly pertinent in contemporary times. Sun Tzu begins his treatise The Art of War by saying that The art of war... is governed by five constant factors, to be taken into account in one’s deliberations, when seeking to determine the conditions obtaining in the field. These are: (1) The Moral Law; (2) Heaven; (3) Earth; (4) The Commander; (5) Method and discipline. [5]

These categories naturally divide into two groups: social convention (The Moral Law, The Commander, Method, and Discipline) and the natural environment (Heaven and Earth). We choose to concentrate on the natural environment. To better understand the metaphors that Sun Tzu employs when invoking the environments of Heaven and Earth, he states that Heaven signifies night and day, cold and heat, times and seasons... Earth comprises distances, great and small; danger and security; open ground and narrow passes; the chances of life and death. [5]

Environmental topography is a determining factor for the outcome of a war. When Sun Tzu speaks about attacks, he advises the general to know the topography of the battlefield. Following Sun Tzu’s advice, we interpret the network as a metric space (V, dis) (see Definition 2.12) since it can be modeled with paths, shortcuts, and other “geographic” features.

© Springer Nature Switzerland AG 2021 Z. Lotker, Analyzing Narratives in Social Networks, https://doi.org/10.1007/978-3-030-68299-6_6

99

100

6 Sun Tzu Says: Direct Attack

Fig. 6.1 This Figure demonstrates that direct attacks are related to hunting plans, a knowledge of topography, and communication

When studying partitions in metric spaces, Voronoi partitions are a natural data structure for dividing those metric spaces. This chapter demonstrates this through our continued investigation of conflict. Sun Tzu notes that there are two types of attacks: direct attacks and indirect attacks. To ensure that your whole host may withstand the brunt of the enemy’s attack and remain unshaken—this is effected by manoeuvres direct and indirect. [5]

We follow this classification. In this chapter and the next, we explore the meaning of “direct” and “indirect”, respectively, in social networks. In its adverbial form, Merriam–Webster defines direct as. “from point to point without deviation : by the shortest way” [2]. The above dictionary definition is close to Sun Tzu’s definition of direct. The word “direct” appears several times in Lionel Giles’ translation of The Art of War. In his final mention of the word, Sun Tzu notes that the “difficulty of tactical maneuvering consists in turning the devious into the direct, and misfortune into gain” [5]. In mathematical terms, we interpret this to mean that “direct” is only one parameter. This is to say, the property of an attack being direct simplifies a maneuver into one parameter: distance. In summary, we model the environment of the direct attack using metric space (Fig. 6.1). The outcome of a conflict or war is determined according to distances. Looking forward, the next chapter will model indirect attacks using Markov chains. That model is more subtle and mathematically advanced than the one in

6.1 Introduction

101

this chapter, but typically gives a more consistent result. We cannot avoid either the direct or indirect attack; according to Sun Tzu, In all fighting, the direct method may be used for joining battle, but indirect methods will be needed in order to secure victory. [5]

We now move to discuss Voronoi partitions.

6.2 Related Work: Voronoi Partitions For an introduction to the graph theory used in this chapter, see [61]. Voronoi diagrams or Voronoi partitions are named for the Russian mathematician Georgy Voronoy. Voronoi partitions have practical and theoretical applications in a wide range of fields. In Sect. 6.3, we provide a formal mathematical definition of Voronoi partitions. Many sources provide more robust explorations of Voronoi partitions. Good surveys can be found in [25, 104]. For a solid introduction, see [85] and the relevant chapter in [69]. Note that all of these sources treat Voronoi partitions in Euclidean distances. In artificial intelligence, a structure similar to Voronoi partitions is called “nearest neighbor.” Many sources deal with this concept; a few good examples are [35, 127, 178].

6.3 Direct Attack as Metric Space We provide a brief mathematical definition of Voronoi partitions here. More detailed explanations can be found in any of the references in the above Sect. 6.2. For beginners, we recommend [69]. Voronoi Partitions Definition 6.1 Voronoi partitions contain sites (also called anchors in our context) which are a set of k points in some metric space (V, d), i.e., Q = ( p1 , p2 , . . . pk ) where pi ∈ V for all i = 1, . . . , k. The Voronoi partition divides the metric space V into k + 1 parts. For each of the points pi , the points receive the set ρi ⊂ M of all nearest points x to pi . Formally ρi = {x ∈ M : dis( pi , x) < dis( p j , x), j = i}

(6.1)

102

6 Sun Tzu Says: Direct Attack

The remaining points which are at minimum equal distance to more than one point are (6.2) ρk+1 = V \ ∪kj=1 ρ j The Voronoi partition can be considered as a special case of Algorithm 4.

6.3.1 Example: Euclidean Voronoi Partitions In this example, we consider the metric space to be the d-dimensional Euclidean metric space (6.3) V = Rd for all x, y ∈ Rd . Therefore, the metric space is defined as follows: dis E (x, y) =

 (x j − y j )2

(6.4)

j

In Voronoi partitions, the sites are a set of pi points in a Euclidean metric space. Formally (6.5) ρi = {x ∈ Rd : dise (x, pi ) < dise (x, p j ) for all j = i} i.e., Q = ( p1 , p2 , . . . pk ) where pi ∈ Rd for all i = 1, . . . , k. The final part of the Voronoi partition contains the rest of the points in Rd k ρk+1 = Rd − ∪i=1 ρi

The reader can refer to Exercise 1 to verify their understanding of Voronoi partitions.

6.4 Voronoi Option Analysisi We now present the details of the geometric example of Voronoi option analysis. This builds upon option analysis (see Chap. 4) and the standard implementation of Voronoi partitions (see Sect. 6.3). We provide both an optimization description of Voronoi option analysis and an algorithmic description. The former is a brief description, and the latter is better suited for implementation (coupled with the related Exercises), particularly for engineering. We conclude by deriving the algorithm from the first principle of war.

6.4 Voronoi Option Analysisi

103

6.4.1 Voronoi: Optimization Description We now provide an overview of the steps involved in computing Voronoi option analysis. The main tool we use is a shortest distance mechanism to generate multiple partitions/interpretations (see Chap. 3). Therefore, we assume that the input for Voronoi option analysis is a metric space (V, dis) together with the set of all anchors A and the party member function Pm|A . Note that for each party p j ∈ P, we can compute the party anchors using Pm|A A j = Pm|A ( p j )−1

(6.6)

The next step is to compute the Voronoi option analysis using the decision matrix Ψ V or onoi . After accomplishing this, we apply the personal partition function (see Algorithm 4 in Sect. 5.6.1). We can now compute the partition ρ using Algorithm FromSubsetToPartyMemberVector (FSTPMV) (see Algorithm 4). Since there are k parties, then the party member vector (which can be interpreted as a party member function, see Sect. 3.2.3) is, therefore (6.7) ρ = F ST P M V (V, (ρ1 , ρ2 , . . . , ρk )) Note that the set ρk+1 does not contain anchors and contains nodes which are “swing votes” which have more than one best option of which party to select, i.e., we cannot predict the opinions of these nodes. These swing votes are the key to winning elections. We have two ways to think about finite metric space. First, we can think of speed as constant (with a value of 1, for example), and distance as variable. The other way is to reverse these and say distance is constant, and speed is variable. For any model with speed or distance as constant, we can construct a one-to-one mapping which reverses the constant and variable using the motion with constant velocity equation x = vt

(6.8)

Like the speed of light, the speed of travel is constant in metric space, and assumed to have a value of 1. In metric space, the definition of distance provides us with a source of freedom of interpretation. Note that in a frequency graph G(V, E, W f ), such as AB − G (see Sect. 2.6.3), the frequency of communication W f is variable, while distance is constant. In contrast, in metric space (V, dis), distance is variable and speed is constant. Therefore, the output of Voronoi option analysis is represented in a decision matrix where the meanings of the values are distances. Thus, the direction of the total order (see Sect. 5.3.1) is dir ection = min. As is standard in topology, we define the distance between a node v ∈ V to a set X ⊂ V as the minimum distance between all the elements a ∈ X of the set and the point v. Finally:

104

6 Sun Tzu Says: Direct Attack

Distance Between a Set and a Point

dis(X, v) = min dis(x, v) x∈X

(6.9)

Note the similarity of Eq. (6.9) to Eq. (4.14). We can now define the Voronoi decision matrix for the node vi ∈ V as follows: Voronoi Decision Matrix Definition 6.2 ψivor onoi = (dis(A1 , vi ), dis(A2 , vi ), . . . , dis(Ak , vi )) We can now formally define direct attacks as follows: Direct Attack Definition 6.3 A conflict function Ξ describes a direct attack if for all metric space (V, dis) there exists a set of anchors A = {A1 , . . . , Ak } ⊂ V

(6.10)

and a party member function Pm|A such that Ξ (Pm|A , [disi, j ]) is the outcome of the direct conflict which is determined by the distances between the anchor sets A and the non-anchor sets V \ ∪ A j ∈A A j . We denote the outcome of direct attack conflict functions as Ξ (Pm|A , [disi, j ]) D AC F = P P F(ΨiV or onoi , >)

(6.11)

This1 concludes2 the formal optimization description of Voronoi option analysis. The next section presents a more detailed algorithmic description for implementation of the algorithm.

1 2

Direct Attack Conflict Function. Personal Partition Function see Algorithm 5.

6.4 Voronoi Option Analysisi

105

A

1. 2

1.

1. 2. 2. 2. 2. 2.

1

1.

5

5

5 1.

C

B

4 1. 3

1

1.5 4 1.25 0.75 1. 1.5 0.755 0.25 2

1.

0.5 1.5 4 1.25 0.75 1.5 0.755 0.25

0.5

0.5

3

1 1. 2

0.5

3

Fig. 6.2 This Figure shows the result of the Voronoi partition on the graph together with anchors represented in the Voronoi War. The numbers on the edges represent the distances dis between the endpoints, as computed by Algorithm 1. Exercise 3 refers to this Figure

6.4.2 Example: Voronoi War We now return to our Gridland narrative (See Sect. 4.4). We change the Gridland topography to a cycle (Cycleland) here (see Fig. 4.2 for Gridland topography and Panel A of Fig. 6.2 for Cycleland topography) since it is simpler, more suitable for matrices, and Sun Tzu’s direct attack metaphors. For those interested in narrative, we present a brief story of the change from Gridland to Cycleland. Those not interested can skip this Subsection. As can be seen in Fig. 6.2, there are now 5 nodes instead of 9 nodes, and nodes 1, 5 are connected.

6.4.3 Gridland Becomes Cycleland After the victory of the Red Party and the defeat of the Blue Party, the nuclear power plant was constructed near node number nine. During the early days of the nuclear power plant, everything went according to plan: electricity was cheap, and the economy flourished. Over time, the nuclear power plant has aged poorly since it was not properly maintained. One tragic day, an earthquake strikes Gridland, and nodes 5, 6, 7, 8 sink into the ocean together with the nuclear plant. Following the tradition practiced in the Gridland, the nodes changed their names to a sequence of numbers. This means that the surviving citizens/nodes of Gridland are now nodes 1, 2, 3, 4, 5. The remaining nodes decided to connect nodes 1, 5 by highway, so Gridland’s new topology is a five node cycle graph. Following the construction of the new highway, the citizens change the name of the country to Cycleland. After all these events comes election day. Once again, (shockingly) some residents wish to build a new nuclear power plant. Some residents of Gridland oppose this

106

6 Sun Tzu Says: Direct Attack

new nuclear power plant, based on their previous bitter experience. In opposition, some optimistic residents remember the prosperity which during the Golden Age of Gridland. Instead of staging an election, this fractured society descends into civil war between the nuclear plant’s supporters and opponents. To honor the famous mathematician who predicted this partitioning of society, this war is called the Great Voronoi War.

6.4.4 Cycleland We now describe two different topologies of Cycleland. At the beginning of the transformation into Cycleland (see Panel A of Fig. 6.2), we have a cycle with 5 nodes in a metric space, i.e., V = {1, 2, 3, 4, 5}. There are two anchors: nodes 1 and 5 for the Red and Blue Parties, respectively. Our second metric space can be seen in Panel B of the Figure. For those still invested in the narrative of Cycleland, another earthquake strikes. The distances in Panel B between nodes 2, 3, 4, and 5 decrease as compared to Panel A. The greatest change occurs between nodes 3 and 4. The distance between nodes 4 and 5 shrinks to 0.5; the distance between nodes 3 and 4 shrinks to 0.25; and the distance between nodes 2 and 3 shrinks to 0.5. The rest of the distances are computed using Algorithm 1 (see Fig. 6.2 for exact distances). The anchors in Panel B do not change. The topography of Panel C is the same as Panel B, except for the fact the Red Party now has two anchors: nodes 1 and 2. The evolution of the partitions in the Voronoi War (or Fig. 6.2) can be described using the following three party member functions i = 1, 2, 3: Pm i : V → {R, B, U }, where R is the Red Party, B is the Blue Party, and U is undecided voters. ⎧   ⎪ ⎨R x ∈ {1, 2} R x ∈ {1, 2} R x ∈ {1, 2, 3} Pm 1 (x) = B x ∈ {4, 5} , Pm 2 (x) = , Pm 3 (x) = ; ⎪ B x ∈ {3, 4, 5} B x ∈ {4, 5} ⎩ U x ∈ {3}

(6.12)

We can describe the conflict dynamic in the Voronoi War as follows: δ1 (Pm 1 ) = Pm 2 , δ2 (Pm 2 ) = Pm 3

(6.13)

The above description does not contain any narrative from Sect. 6.4.3. The earthquake, and the anchors are absent from the conflict dynamic above. To infuse narrative, we incorporate the conflict function Ξ (see Definition 5.6), which takes a partition together with a social network, and generates a partition function. In this case

6.4 Voronoi Option Analysisi



0 ⎜1 ⎜ m1 = ⎜ ⎜2 ⎝2 1

1 0 1 2 2

2 1 0 1 2

2 2 1 0 1

107

⎞ ⎛ 1 0 1 ⎜ 1 0 2⎟ ⎟ ⎜ ⎜ 2⎟ ⎟ , m 2 = ⎜ 1.5 0.5 ⎠ ⎝ 1.5 0.75 1 0 1 1.25

1.5 1 0 0.25 0.75

1.5 0.75 0.25 0 0.5

⎞ 1 1.25 ⎟ ⎟ 0.75 ⎟ ⎟ , m3 = m2 0.5 ⎠ 0

(6.14)

We also need three partitions ρ1 , ρ2 , ρ3 . In this case ρ1 = ({1}, {5}, {2, 3, 4})

(6.15)

ρ2 = ({1}, {5}, {2, 3, 4}) ρ3 = ({1, 2}, {5}, {3, 4})

(6.16) (6.17)

For an example, for each i = 1, 2, 3, the Voronoi conflict functions generate Ξ V or onoi (m i , ρi ) = Pm i

(6.18)

Ξ V or onoi := ΛV or onoi (Ψ V or onoi )

(6.19)

According to Eq. (5.17)

We can use the personal partition algorithm (see Algorithm 5) to compute ΛV or onoi ΛV or onoi = Personal Partition

(6.20)

Once we have the functions ΛV or onoi , Ψ V or onoi , we can compute the conflict function Ξ V or onoi . Since we have already described the function ΛV or onoi , we next need to specify the Voronoi decision function Ψ V or onoi . For a formal description, see the below algorithm Note that when using the conflict function Ξ , the narrative is present since the metric space has evolved from m 1 to m 2 = 3. In the context of our Cycleland narrative, this means that the earthquake now features in the description, and the leaders have evolved from ρ1 = ρ1 to ρ3 . The information from the narrative is now encoded using mathematical language. The specific example of the evolution of conflict in the Voronoi War is complete. However, we want to describe this dynamic more generally, and describe the general mechanism which allows us to move from a metric space together a partition into a partition function. We now concentrate on a general example using Voronoi partitions and the metaphor of direct attack. In the next chapter, we provide another general example using frequency graphs and the metaphor of indirect attacks.

108

6 Sun Tzu Says: Direct Attack

6.4.5 Voronoi: Algorithmic Description The main difference between Voronoi option analysis and the standard implementation of the Voronoi partitions (see Sect. 6.3) is that in standard Voronoi partitions, each cell contains a single site, while in the Voronoi option analysis implementation, we allow multiple sites or anchors per cell (see Eq. (6.9) and Panel C of Fig. 6.2). There are two ways to implement Voronoi option analysis. It is possible to either merge the anchors before computing dis  , or to merge the anchors after computing dis  . Here, we use Formula (6.9). The reader can compare the results of merging anchors before and after computing dis  in Exercises 4 and 6. To overcome the issue of multiple anchors in each Voronoi cell, we follow Eq. (6.9). We compute the distance dis(vi , a p, j ) to the set of all anchors a p, j ∈ A p of a specific party p = 1, . . . , k, j = 1, . . . , |A p | for each node vi ∈ V . Each node selects the party anchor closest to them. The distance to that party anchor is denoted by ψi, p . The algorithm for this process is below. Algorithm 6 Voronoi option analysis algorithm INPUT: A weighted undirected graph G(V, E, Wdis ), and party member function Pm|A . OUTPUT: Ψ V or onoi which is the Voronoi matrix, where the rows represent the voters and the columns represent the parties 1: procedure Voronoi partition([G(V, E, Wdis )], Pm|A ) 2: [disi, j ] ← F W [Wdis ] 3: n ← |V | 4: for i ∈ {1, 2, . . . , n} do 5: for p ∈ P do 6: ψi, p ← mina∈ pm( p)|−1 disi,a A 7: end for 8: end for The Voronoi option analysis 9: return Ψ = [ψi,k ] 10: end procedure

Note that there is an issue if the graph is not connected, since then not all nodes are reachable from a given node. In directed graphs, the distance function dis is not symmetric, and therefore, there is no metric space (see [85] for further details). To avoid any technical problems such as reachability, we concentrate on undirected graphs AB ◦ − G(V, E), primarily since they are well-connected. Following Algorithm 6, based on the distances in Panels A, B, C of Fig. 6.2, we get that the Voronoi decision matrices, respectively, of each Panel are  ΨA =

01221 12210

t

 , ΨB =

0 1 1.5 1.5 1 1 1.25 0.75 0.5 0

t

 , ΨC =

t 0 0 0.5 0.75 1 1 1.25 0.75 0.5 0 (6.21)

6.4 Voronoi Option Analysisi

109

6.4.6 “Speed is the Essence of War” To understand the importance of speed, we return to Sun Tzu. In The Art of War, Sun Tzu notes “[s]peed is the essence of war. Take advantage of the enemy’s unpreparedness; travel by unexpected routes and strike him where he has taken no precautions” [5]. Here, to explore this concept mathematically, we assume that all individuals participate in a vast web of rumors which can be modeled by a social network which follows our daily lives and experiences. In a social network, which is modeled by the frequency graph G(V, E, W f ), rumors travel at different speeds, as discussed in Sect. 6.4.1. Our opinions are influenced by the speed at which rumors reach us. In short, we tend to believe the rumors which reach us first. Moreover, according to the echo chamber and homophily, this is a chicken and egg phenomena. Our beliefs influence the way in which we view rumors. In tandem, we continuously construct our own personal web of rumors in such a way that our own opinions are favored, i.e., rumors which support our own affiliations travel faster and reinforce one another. In conclusion, rephrasing Sun Tzu, the speed of rumors is the essence of option analysis. To model Voronoi option analysis, we assume that rumors begin in the party anchors Ai , i = 1, 2, . . . , k (see Definition 5.1). The rumors then spread across the network according to the frequency graph G(V, E, W f = [ f i, j ]). In frequency graphs, we compute the speed speedi, j by which rumors arrive to each node vi ∈ V starting from the anchor A j of the party p j , and arriving at node vi . Following Sun Tzu’s principle, people will choose the party whose propaganda is more efficient for them, i.e., it arrives first. According to elementary mathematics v=

x t

(6.22)

We assume that t = 1, i.e., a single unit of time, and the simple path on which a rumor travels is path = (e1 , . . . , el ). We remind the reader that a simple path is a connected subgraph that does not contain cycles, and where each node has a degree of either 1 or 2. Note that, in fact, only two nodes have degree 1: the node at beginning of the path e1,1 , and the node el,2 at the end of the path. Moreover, from connectivity, ei,2 = ei+1,1 for all i = 1, . . . , l − 1. We assume that once a node vi ∈ V hears about a new rumor, the node immediately sends the rumor to all its neighbors who are not source of the rumor. Using x = f1i, j , it follows that the time it takes for the rumor to arrive to the other side of the network is f1i, j . Note that nodes do not repeat themselves; this means that nodes forward any rumor only once, i.e., if a node hears an old rumor it does not forward it again. Therefore, the time it will take a rumor to traverse the shortest path path is l  1 f ei i=i

(6.23)

110

6 Sun Tzu Says: Direct Attack

It is important to note that nodes hear new rumors for the first time through the shortest path possible. To find the shortest path for each rumor, it is better to change our vantage point from frequency graph to metric space. In metric space, distance is variable and speed is constant. Therefore, the way to find the path of a rumor is through the metric space (V, dis) (see Sect. 2.6.3). Thus, the speed speedi, j in the frequency graph G(V, E, W f = [ f i, j ]) is related to the distance in the metric space (V, dis) as follows: speedi, j = dis(vi , v j )

(6.24)

There are several reasons why we insist specifically on metric space as an input for Voronoi option analysis, as opposed to any weighted metric. The algorithm and the speed interpretation of the algorithm would not yield the same results if a metric space was not utilized (see Exercise 10). Additionally, the Voronoi cell is connected when considering a metric space (see Exercise 6). These two properties disappear when we move from a metric space to general unweighted metric space. Thus, the outcome of the algorithm concerning The Art of War no longer holds. To verify your understanding of Voronoi option analysis, refer to Exercises 3 and 4.

6.5 Rationality of Voronoi Option Analysis The logic behind social rationality (see Sect. 5.5) is that if the influence of any two of nodes or individuals on one another increases, then their opinions become closer. Therefore, the key is to understand how to define influence in metric space. If we look only at distance and ignore other parameters such as kinship (as we do here), it is well-known that influence and proximity are proportional to one another. For example, an individual cares more about their neighbors than people who live on the other side of the world. To summarize, the influence of two points on one another increases if their distance from one another decreases. We remind the reader that our assumption is that this is a symmetric relationship (see Exercise 8b). When we try to measure this relationship, we immediately run into an issue. Making two points closer may destroy the Triangle Inequality. However, Algorithm 6 takes this into account, and transforms the weighted graph into a metric space before doing anything else. This is accomplished using the Floyd–Warshall Algorithm (see Algorithm 1) which comes to our rescue by using a positive weighted graph and transforming it again to a metric space. This is exactly what we do here. Formally, denote a general metric space as represented by a matrix distance by [disi, j ]. Assume we examine two different nodes vx , v y ∈ V. According to our metric space, the distance between these two nodes is disx,y > 0. Assume that the influence of x on y increases, and that this is symmetric. If the influence increases, then the

6.5 Rationality of Voronoi Option Analysis

111

distance decreases. Assume the new distance is disx,y − ε > 0. This allows us to define the new matrix distance as W = [disi, j ] − ε[x, y]

(6.25)

We can now apply the Voronoi decision matrix on these two metric spaces. Denote the Voronoi decision matrix applied to the first metric space by Ψ V or onoi = V D([disi, j ], ρ)

(6.26)

For the second metric space, we denote the Voronoi decision matrix as follows: 

Ψ V or onoi = V D([disi, j ], ρ)

(6.27)

We now must prove that 

V or onoi V or onoi || ≥ ||ΔΨx,y || ||ΔΨx,y

(6.28)

To see that this is true, we examine the structure of short distances on the metric space [disi, j ]. When considering the short distances from node x to z ∈ V (which are equivalent  to those beginning from y), there are two possibilities. In the first case, disx,z = disx,z and there are no changes in distance. The “shortcut” does not change the short  . We remark that in the metric space, distances. In the second case, disx,z > disx,z [disi, j ] only decreases and does not increase. In this case, the distance decreases because the shortest path goes from x to y and then to z. This means that the distance from   < disx,z < disx,z (6.29) dis y,z = dis y,z To conclude, the distance between x and z becomes closer to the distance between y and z. Thus, the disagreement inequality (see Eq. (5.10)) is satisfied. Plugging the anchors Ai of Party r hoi into Eq. (6.29) instead of plugging in z proves that Voronoi option analysis is a social rational decision algorithm. This is due to the fact that we prove it on all metric spaces and all pairs. This proves the following theorem. Theorem 6.1 Voronoi option analysis algorithm is a social rational decision process.

6.6 Voronoi Partition as a Greedy Algorithm As the phrase direct attack suggests, there is an inherent element of greediness, i.e., you see a juicy red apple, and you take that juicy red apple. It turns out that there is a connection between Voronoi partitions and greediness. In particular, it is possible to compute Voronoi partitions using minimum spanning trees.

112

6 Sun Tzu Says: Direct Attack

Minimum spanning trees are a canonical problem in graph theory. Here we provide a brief description; for a more complete discussion see the relevant chapter on minimum spanning trees in [61]. Minimum spanning trees give an undirected weighted graph. There are several algorithms which compute the minimum spanning tree. Here, we describe Prim’s algorithm (see Algorithm 7). Prim’s algorithm begins with an arbitrary node u 0 ∈ V , which is a tree T1 = u 0 . In our description, u 0 = v1 (see line 3 in Algorithm 7). At the i iteration, among all the outgoing edges of the tree Ti , i.e., edges ei = u i ◦−◦ vi

(6.30)

that connect nodes which belong to the tree Ti with edges which do not belong to the tree Ti , find the minimal outgoing edge ei+1 . Add edge ei+1 to the tree. Note that the edge ei+1 has one node which belongs to the tree and one node which does not belong to the tree. Denote the node which does not belong to the tree as u i . To generate the new tree, add the outgoing vertex u i+1 to the tree Ti vertices, and the edge vi+1 ◦−◦ u i+1 to the edges of the tree. Stop after n − 1 iterations, when all nodes are connected to the tree without a cycle (see Chap. 2). Prim’s algorithm is considered to be a classic example of a greedy algorithm . Algorithm 7 The Prim’s Algorithm Algorithm for computing the minimum spanning tree INPUT: a weighted undirected graph G = (V, E, W ) OUTPUT: Minimum spanning tree T

1: procedure PrimAlgorithm(G(V, E, W )) G is a graph with W positive weights on G. 2: T ←∅ 3: U ← {v1 } 4: for i ∈ {1, . . . , n − 1} do 5: Find edge ei = vi ◦−◦ u i s.t. u i ∈ U, vi ∈ Vi \ U and W (vi , u i ) = min{wv,u : u ∈ U, v ∈ V \ U} 6: U ← U ∪ {v} 7: T ← T ∪ {v ◦−◦ u} 8: end for 9: return T The distance matrix. 10: end procedure

We describe an algorithm which demonstrates how to compute the Voronoi partition in a finite metric space using Prim’s algorithm for finding a minimum spanning tree. We are given a metric space M = (V, dis). Denote δ as the minimum distance between all different points in the metric space M, with a set of anchors for each party P = ( p1 , . . . , pk , pk+1 ), A = (a1 , . . . , ak , ∅). We assume that each party has only a single anchor except for the party pk+1 does not have an anchor since it is the party of undecided voters. For a scenario with multiple anchors per party, see Exercise 11.

6.6 Voronoi Partition as a Greedy Algorithm

113

We construct the graph and explain Algorithm 8. From the metric space M = (V, dis), we compute the weighted graph G(V, E, W ) (see Algorithm 8). According to Algorithm 8, all anchors of different parties have the weights δ/2. The other nodes are connected only to the anchors by their distance in the metric space. Denote the outcome of this algorithm by the graph G(V, E, W ). We compute the minimum spanning tree of the graph G(V, E, W ). Denote this tree by T min. Note that T min is a weighted tree with the natural weights borrowed from G(V, E, W ). To get the Voronoi partition, we delete all edges with the weights δ/2. We get that the number of maximal connected components is equal to the number of parties and that each of the connected components contain a single anchor. For a definition of a connected component, see Exercise 8. A maximal connected component is a connected maximal subgraph with respect to inclusion. The connected component is the Voronoi cell of the party that contains the anchor. Although the algorithm described here deals only with a single anchor per party, it can easily be extended as follows. If there exist more than one anchor per party, we briefly describe the construction of the weighted graph G(V, E, M  ). Note that Algorithm 8 assumes that this does not happen in this example. To see a case where there is more than one anchor per party, see Exercise 11. In the case with one anchor per party, first we change the distance of all anchors which belong to the same party to be 2/3δ. Algorithm 8 From Metric Space to Voronoi Graph 1: procedure VoronoiGraph([disi, j ]) 2: δ = min{disi, j : i, j ∈ {1, . . . , n}, i = j} 3: for i, j ∈ {1, . . . , n} do 4: if i = j then Wi, j ← 0 5: else Wi, j ← ∞ 6: end if 7: end for 8: for i ∈ {1, . . . , k} do 9: for j ∈ {i + 1, . . . , k} do 10: E ← E ∪ {i ◦−◦ j} 11: wi, j ← δ/2 12: w j,i ← δ/2 13: end for 14: end for 15: for j ∈ {1, . . . , k} do 16: for i ∈ {k + 1, . . . , n} do 17: E ← E ∩ {i ◦−◦ j} 18: wi, j ← disi, j 19: w j,i ← dis j,i 20: end for 21: end for 22: return(G(V, E, W )) 23: end procedure

114

6 Sun Tzu Says: Direct Attack

6.7 Conclusion This chapter adapted Sun Tzu’s concept of direct attacks for use in social networks and literature networks. To model this concept, we transformed networks into metric space. We then computed the decision function, which we used to eliminate the presence of one party (the “undecided” voters) and disperse the members of the undecided voter party among the other parties. Each node in the eliminated undecided party joins the party which is closest to them, according to the anchors of the respective parties. We then showed that this process is social rational. We end this chapter by showing the connection to minimum spanning trees. The structures of Chaps. 4 and 5 are very abstract. This chapter provided the first concrete example of how to use this structure. This example is important since it is general and, in some sense, elementaric. In the next chapter, we will provide a different but still essential and elementaric example. We believe that the structure represented in Chaps. 4 and 5 are still useful and more general. We hope that this chapter and the next provide guidance on using these structures. We insist on the general structure due to the tension between freedom of interpretation and the desire for the dictatorship of truth in the exact sciences. The structure is kept separate from the examples so as to maintain the flexibility necessary in analyzing literature and dramas. Another general dichotomy in engineering, signal processing, and physics is time domain versus frequency domain. In this chapter, we use metric space, which is the model for time domain. We show that speed is one factor which determines the outcome of Voronoi partitions. This means that the analysis in this chapter has the flavor of time domains. In the next chapter, we discuss indirect attacks, which are in the realm of frequency domain.

6.8 Exercises Direct Attack as Metric Space 1. The following exercise deals with Voronoi partitions in Euclidean metric space. Compute the Voronoi partition of the set of points Q (defined below) a. Q = {(0, −1), (0, 1)}. b. Q = {(0, −1), (0, 1), (0, 1)}. c. Above, each Voronoi cell contains a single seed or anchor. Here, the first Voronoi cell contains two seeds. For the definition of distance between a single a point and several seeds, see Definition 6.9. Q = {{(0, −1), (0, 1)}, (0, 1)}. What is the connection between this exercise and your answers to the above exercises? 2. Let G(V, E) be a network. Let (A1 , A2 ) be anchor sets for the parties p1 , p2 .

6.8 Exercises

115

a. Explain what will happen to the Voronoi option analysis if the A1 , A2 are not disjoint. b. Explain what will happen to the Voronoi option analysis if A1 is empty, and A2 is not.

Voronoi Option Analysis 3. The purpose of this exercise is to verify your understanding of the technical details of Voronoi option analysis (see Algorithm 6) and personal partition (see Algorithm 5). We follow the steps of the Voronoi conflict function Schema (see Sect. 6.4.5). For each step, there is a single corresponding question below. a. Compute the Voronoi decision matrix and compare your answer to Eq. (6.21). b. Compute the partition using Algorithm (5, and the thrashing value of x = 0.5 for all three panels A, B, C. c. Explain why node 3 joins the Blue Party in panel B of Fig. 6.2, and why node 3 joins the Red Party in panel C of Fig. 6.2. d. Determine the minimum threshold in each of the panels of Fig. 7.2 if we know that node 3 is always a swing vote. 4. In this exercise, we consider the implementation of the Voronoi option analysis. We compare the options of merging the anchors before and after computing dis  .

Rationality of Voronoi Voronoi Partition 5. Explain why two different Voronoi conflict function tuples do not have the same decision matrix. 6. Consider a general metric space, with one anchor for each party, and all other nodes are undecided. Show that the Voronoi partition of the Red Party is connected, i.e., when moving from one node belonging to the Red Party to another Red node through a short distance, no Blue Party nodes will be passed through. Does this hold true if we assume that each party has more than one anchor? 7. This question discuss the algorithm PivotPartition (see Sect. 3.1). Each of the following sub-questions work through changing the algorithm PivotPartition. a. Modify the PivotPartition algorithm in such a way that it will petition the network to two equal parts, i.e., |ρ1 | = |ρ2 |. You may assume that the n is even. b. Modify the PivotPartition algorithm in such a way that a specific node will become a swing vote.

116

6 Sun Tzu Says: Direct Attack

c. Explain how to modify the algorithm in such a way so that the three parties have the same size. 8. Let Ψ vor be a decision matrix computed by the Voronoi option analysis algorithm. Explain how to transform the decision matrix Ψ vor into a probability decision matrix. Hint: close distance need to be transformed into high probability. 9. Sun Tzu says that “[a]ll armies prefer high ground to low and sunny places to dark” [5]. As noted earlier, in daily life, this sentence is easily and literally interpreted. However, in social networks, many of the terms are unclear. To clarify, we suggest the following mechanism. Assume that we have two points vi , V j ∈ V , and we want to measure their relative heights. Compute the Voronoi partition

“Speed is the Essence of War” 10. Find an example where rumors travel faster than the distance in a positive weighted graph which does not satisfy the Triangle Inequality and where the weights represent distances.

Voronoi Partition as a Greedy Algorithm 11. This exercise deals with removing the assumption that each party has a single anchor. There are at least two ways to accomplish this. We explain two of these ways in the following exercises. a. One way to deal with several anchors in a single party is to change the metric space. Write an algorithm in your favorite language gets an input which is a metric space M = (V, dis) and a partition ρ = (ρ1 , . . . ρk , ρk+1 ) and an output which is a metric space M  = (V  , dis  ) where all anchors of the i = 1, . . . , k party are replaced by a single anchor. Note that the number of points in V  is k  |ρi | + k (6.31) n− i=1

b. Another way to deal with several anchors of a single party is to change the graph constructed in Algorithm 8. Explain how to accomplish this. You may also need to change the set of edges which are deleted from the minimum spanning tree.

Voronoi in Literature Networks

Chapter 7

Indirect Attack

7.1 Introduction We continue our discussion of narrative conflict through the lens of war. We employ the metaphor of war as a Platonic ideal of conflict. In the previous chapter, we looked at direct attacks and modeled the network distances as metric space. In the Art of War, Sun Tzu contrasts the concept of direct attacks with indirect attacks. As would be expected, Sun Tzu’s language when describing indirect attacks is less concrete and more vague than his language regarding direct attacks. For a more clear cut explanation, we move from Sun Tzu to Sir B. H. Liddell Hart and his book Strategy. Liddell Hart notes that Throughout the ages, effective results in war have rarely been attained unless the approach has had such indirectness as to ensure the opponent”s unreadiness to meet it In strategy, the longest way round is often the shortest way home. [107]

The above quotation implies that indirect attacks are characterized by hiding intentions from the enemy by generating “many ways home.” If the enemy does not know which way you are traveling home, they cannot attack you, and must divide their forces. In this chapter, we try to clarify the meaning of the metaphorical “many ways home” and uncertainty of action in battle. When considering alternate paths of action in an indirect attack, the option with the most diversity and flexibility is preferable to the most narrow path, which would represent the direct attack. These two contrasting states of mind and action are in opposition to one another. Direct attacks take the shortest and most obvious path. Indirect attacks capitalize on uncertainty and an ocean of options. Military history frequently claims the victors of a battle triumphed due to savviness, sophisticated technology, or cruelty. Recently, however, historians and other scholars have pointed to the possibility of epidemics and disease as a major force in shaping history. An early example is H. G. Wells’s War of the Worlds. This theory was notably popularized by Jared Diamond’s Guns, Germs, and Steel. The argument can be applied to many crucial moments in history such as World War I (see © Springer Nature Switzerland AG 2021 Z. Lotker, Analyzing Narratives in Social Networks, https://doi.org/10.1007/978-3-030-68299-6_7

117

118

7 Indirect Attack

Fig. 7.1 Frequently indirect attacks determine the outcome of a war. As H. G. Wells and Jared Diamond have shown us, germs are a major indirect factor in the events of human history [71, 215]. The Spanish Flu heavily impacted the outcome of World War I, perhaps more than any other factor. The virus was the true victor of the war: if this war had not occurred, the Spanish Flu likely would not have spread as viciously as it did [173]

Fig. 7.1), the Spanish and British conquests of the Americas, the Black Plague, and the Peloponnesian War (as described by Thucydides [106], who contracted such a disease himself). Since disease during war features in Thucydides’ book, we know that the connection between war and disease has been noticed from the beginning of recorded history. In fact, Sun Tzu describes this connection as well: If you are careful of your men, and camp on hard ground, the army will be free from disease of every kind, and this will spell victory. [5]

Clearly, the role of small “insignificant” creatures like bacteria and viruses in warfare played a major role in human evolution pre-dating written accounts. The question has even been raised regarding the role of disease in the disappearance of some of our ancestors as well, such as Homo Erectus and the Neanderthals [148]. We model indirect attacks using the network as a frequency graph and employ Markov chains, hitting probabilities, and simple random walks on the frequency graphs. These mathematical tools drown the direct options by highlighting other reasonable alternatives. Alternatives are good, but not the “best” (i.e., the most direct). This follows Liddell Hart’s advice not to select the most obvious choice since it is the most obvious to the enemy as well.

7.2 Related Work Indirect attacks combine many different areas of mathematical techniques: Markov chains, electricity networks, and mathematical optimization.

7.2 Related Work

119

Markov chains were discussed in Chap. 2. Reference [170] serves as a good source for details on Markov chains, particularly Chap. 4, Sect. 3 of the text, which discusses electrical networks. We use a description of simple random walks as convex optimization. Optimization are also described in Chap. 4, Sect. 3 of [170]. Reference [75] is an excellent book on the connection between Markov chains and electrical networks. We use Thévenin’s theorem to show the social rationality of the voting option analysis. For more on Thévenin’s theorem, see [74]. For a canonical text on electronics, including Thévenin’s theorem (in Chap. 1 of the text), see [116]. We next discuss the “divide and conquer” mechanism. As noted above, when using an indirect method of attack, the enemy must split their forces. The following section mathematically describes the strategy of divide and conquer.

7.3 Voting Option Analysis As in the previous chapter, we provide an example of conflict function (see Definition 5.6). Whereas the previous chapter discussed direct attacks in the context of conflict functions, this chapter describes indirect attacks in the context of conflict functions. This chapter uses the same partition process as in Chap. 6, which is essentially the personal partition process (see Algorithm (5)). However, the difference here is that we apply a different option analysis. In the previous chapter, we concentrated on only the distance parameter. Here, we use random bits imported from “outside” sources, and prioritize uncertainty and a variety of options. Therefore, the outcome is influenced by factors “outside” the narrative. The voting algorithm (or voting option analysis) is an example of such a decision process. The voting algorithm presented here is based on [140]. We use this algorithm extensively throughout this book. For modeling indirect attacks, there are other algorithms which can be used in a similar fashion to the voting algorithm; see Exercise 1. We present four descriptions of the voting algorithm with different mathematical and physics-based flavors in order to enrich the reader’s understanding of the multifaceted nature of the algorithm. Additionally, we provide simple examples in each of the descriptions to clarify the algorithm. Section 7.3.1 provides the briefest description is the Kirchhoff resistance network description of the algorithm (see Chap. 22 of [88]). This description uses basic electronic circuit analysis. In Sect. 7.3.2, we move to a Markov chain description. We utilize the famous relationship between random walks, social networks, and electric circuits (See [75, 162, 167]). Despite the brevity of the description, Sect. 7.3.2 provides deep insight into the algorithm. However, a knowledge of Markov chains is necessary to understand this description.

120

7 Indirect Attack

Section 7.3.3 presents a description based on optimization. It is necessary to understand advanced calculus for this description. The advantage of this description is that it is general and can lead to many other option analysis algorithms, once the optimization function is changed. We provide two different optimization descriptions: one based on Markov chains, and one based on Kirchhoff. A similar description appears in [170] for a general Markov process. The final description is an algorithmic description in Sect. 7.3.5. This description is slightly longer and provides less general insight than the Markov chain description; it is only trees, no forest. It can also be used for computation, with a bit of algebraic work. The advantage of this description is that it focuses on the technical details of the algorithm by providing a numerical example. If the reader wishes to implement the voting algorithm, the algorithmic description will be the most useful. Another advantage of the algorithmic and the Markov chain approaches is that they work on weighted directed graphs. In the same way, they work on undirected graphs, and are, therefore, more general. We end the description of the voting algorithm by exploring what is necessary for the algorithm to generate a single solution in Sect. 7.4. Note that the Markov chain description is necessary for this section. The input of the voting option analysis is the frequency graph G = (V, E, W f ) together with a party member function Pm|A . The first subsets A ⊂ V are the voting anchors, or, in short, anchors. Note that voting anchors are utility anchors (see Definition 5.1 in Sect. 5.4). The set V \ A are the nodes with unknown opinions; these are nodes which are not anchors. The whole purpose of the voting algorithm is to determine the opinion of the non-anchors nodes. The voting algorithm achieves this goal by using the heat equation, or indifferent towards it average on all are down neighbors notes of each note. According to the conflict function, we wish to divide U = V \ A into (M p|A ( p1 )−1 , . . . , M p|A ( pk )−1 ). Before this is possible, we need to construct the decision matrix. Therefore, the output for voting option analysis is the decision matrix Ψ V ote which allows us to divide the nodes of unknown opinion Ak+1 according to the partition process (A1 , . . . , Ak ).

7.3.1 Voting: Kirchhoff Description In this description, we have two parties (as is the most typical case in literature): the Red Party R p and the Blue Party B p . We partition the nodes of the graph into ρ = (R p , B p , U = V − R p ∪ B p ). The idea behind this description is straightforward. We replace every edge of the graph with 1-ω Ohm resistor. We insert a battery of 1 volt. We connect all the anchors of the Red Party R p to the positive side of the battery. We connect all the Blue Party B p anchors to the negative side of the battery. We then compute the voltage voli for all nodes vi ∈ V using Kirchhoff’s law with the voltage in each of the nodes. We

7.3 Voting Option Analysis

121

interpret the voltage voli as the probability to vote for the Red Party R p . Note that the voltage voli is always between 0 and 1, and could be interpreted as a probability. The probability for voting for the Blue Party is defined as 1 − voli . Formally, the decision vector in this case is Ψi = (voli , 1 − voli )

(7.1)

We refer the reader to Exercise 2 to verify their understanding of the Kirchhoff inspired description. The next subsection presents a random walk description of the voting option analysis.

7.3.2 Voting: Markov Chain Description We compute Ψ V oting as follows. First, we use the anchors A1 , . . . , Ak to transform k Ai and transthe transition matrix M into M(ρ1k ) by taking all the characters in ∪i=1 k forming their states into absorbing states in M(ρ1 ) (see Sect. 2.6.1 and Exercise 18). To compute the option analysis of node vi ∈ V , we begin a simple random walk use the Kronecker delta to define from node vi on the process M(ρ1k ). Formally,  we  k   n  the initial distribution of the Markov chain M ρ1 , δi, j j=1  δi, j =

1 0

if i = j if i = j

(7.2) Ap

For each party p ∈{1, 2, . . . , k}, we now compute the hitting probability of h i  k   n  j on the Markov chain M ρ1 , δi, j j=1 . Formally, we define h i to be: Hitting Probability Definition 7.1 Ap

hi

=

   n   t  δi, j j=1 lim M ρ k l∈A p

t→∞

(7.3)

l

A

To verify the above formula, see Exercise 4. To see how to compute h i j , the optimization description in Sect. 7.3.3, or the algorithm description in Sect. 7.3.5. Additionally, we refer you to Chap. 1 of [170]. The probability of hitting the anchors of party A p before hitting the anchors of all other parties is ∪i= p Ai . The decision matrix (or output) of the voting option analysis is

122

7 Indirect Attack

Voting Decision Vector Definition 7.2 voting The voting decision vector Ψi is voting

Ψi

= (h iA1 , h iA2 , . . . , h iAk ) V oting

and the voting decision matrix is Ψ voting = [Ψi, j V oting

Ψi, j

(7.4)

] is

Aj

= hi

(7.6)

It1 is also possible to write the above equation in matrix form. Let k Ai Anc = ∪i=1

(7.7)

be the set of all anchors. Consider the partition of the anchors according to their parties to be Ak1 = (A1 , . . . Ak ). Denote the incidence matrix of this partition to be I nc[Ak1 ]. Formally, for all i ∈ {1, . . . , n} and j ∈ {1, . . . , k} Let  I nc[Ak1 ]i, j

=

1 i ∈ Aj 0 i∈ / Aj

(7.8)

Using I nc[Ak1 ] notation, it follows that the voting decision matrix is    t  I nc[Ak1 ] Ψ voting = lim M ρ k t→∞

(7.9)

We end this Subsection with our running illustrative example of the voting algorithm in a two party election in Fig. 7.2, which shows that the number of anchors and the topology of the graph can influence the partition (see Exercise 5). The relevant Markov transition matrix M(ρ A ), M(ρ B ), M(ρC ) can be seen in the Equation below. The reader can verify their understanding using Exercise 3.

1

Using the Pm notation V oting

Ψi, j

V oting

= Ψi, j

Pm|A ( p j )−1

(Pm|A , m) = h i

.

(7.6)

7.3 Voting Option Analysis

123



⎛ ⎞ 10000 1 ⎜ 1 0 1 0 0⎟ ⎜1 ⎜2 1 2 1 ⎟ ⎜3 ⎜ ⎟ M(ρ A ) = ⎜ ⎜ 0 2 01 2 01 ⎟ , M(ρ B ) = ⎜ 0 ⎝0 0 0 ⎠ ⎝0 2 2 00001 0

⎛ ⎞ 0 1 ⎜1 0⎟ ⎜3 ⎟ , M(ρC ) = ⎜ 0⎟ ⎜0 ⎟ 1⎠ ⎝0 3 0 1

⎞ 0000 0 23 0 0 ⎟ ⎟ 0 1 0 0⎟ ⎟ 0 23 0 13 ⎠ 0001 (7.10) Using the eigenvalues and the eigenvectors we can compute the power of the matrices M(ρ A )t , M(ρ B )t , M(ρC )t (see any general book on linear algebra, for example [115]). We can now use these formulas to compute the limits of these matrices ⎛

1 0 ⎜3 0 ⎜ 41 lim M(ρ A )t = ⎜ ⎜2 0 t→∞ ⎝1 0 4 0 0

0 0 0 0 0

000 0 23 0 1 0 23 3 0 23 0 000

⎛ ⎞ 1 0 0 1 ⎟ ⎜5 0 4⎟ ⎜ 91 t ⎜ 0 21 ⎟ ⎟ , lim M(ρ B ) = ⎜ 3 3 ⎠ t→∞ ⎝2 0 4 9 0 1 0

0 0 0 0 0

0 0 0 0 0

⎞ ⎛ 0 0 1 0 4 ⎟ ⎜0 1 0 9⎟ ⎜ 1 t ⎜ 0 23 ⎟ ⎟ , lim M(ρC ) = ⎜ 0 3 7 ⎠ t→∞ ⎝0 0 0 9 0 0 0 1

⎞ 0 0 0 0 0 0⎟ ⎟ 0 23 0 ⎟ ⎟ 2 1 ⎠ 0 3

3

0 0 1

(7.11) The incidence matrices of the partition of I nc(ρ A ), I nc(ρ B ), I nc(ρC ) are ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ 10 10 10 ⎜0 0⎟ ⎜0 0⎟ ⎜1 0⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎟ (7.12) I nc(ρ A ) = ⎜ 0 0 ⎟ , I nc(ρ B ) = ⎜ 0 0 ⎟ , I nc(ρC ) = ⎜ ⎜0 0⎟ ⎝0 0⎠ ⎝0 0⎠ ⎝0 0⎠ 01 01 01 Now we can compute the Ψ A = lim M(ρ A )t I nc(ρ A ), t→∞

Ψ B = lim M(ρ B )t I nc(ρ B ), t→∞

ΨC = lim M(ρC )t I nc(ρC ). t→∞

By multiplying these matrices. We get ⎞ ⎛ ⎛ ⎛ ⎞ ⎞ 10 10 10 ⎜3 1⎟ ⎜5 4⎟ ⎜1 0⎟ ⎜ 41 41 ⎟ ⎜ 91 29 ⎟ ⎜3 2⎟ V oting V oting V oting ⎟ ⎜ ⎜ ⎟ ⎟ ΨA = ⎜ 2 2 ⎟ , ΨB = ⎜ 3 3 ⎟ , ΨC =⎜ ⎜ 25 35 ⎟ 1 3 7 2 ⎠ ⎝ ⎝ ⎝ ⎠ ⎠ 5 5 4 4 9 9 01 01 01

(7.13)

124

7 Indirect Attack

7.3.3 Voting Optimization Description: Divide and Conquer The voting algorithm follows the King of Macedon, Philip II’s, advice to “divide and conquer,” which was famously utilized by Julius Caesar [7]. According to Philip’s advice, in order to conquer, we must first divide. Looking at elections, we see this advice followed zealously. This is achieved by amplifying existing and unbridgeable conflicts; in short, the more conflicts, the merrier. Therefore, citizens should also follow Philip II’s advice, and try to minimize the conflict in order to avoid being conquered. The voting algorithm does exactly this. Each party has its own anchors which have known opinions. The opinions of the nodes drive conflict in the network. All other nodes Ak+1 try to minimize the conflicts. Formally, the opinion of each node vi ∈ V is summarized in the distribution Ψi ∈ Δk , where Δk is the set of all discrete probability vector distributions of dimension k. Formally Δk =

⎧ ⎨ ⎩

ψ ∈ Rk : ψi ≥ 0 and

k  j=1

⎫ ⎬ ψj = 1 ⎭

(7.14)

In an election, if vi ∈ A p is a politician for party p ∈ {1, 2, . . . , k}, then we know the opinion of vi ∈ A p , and πi is equal to 0 everywhere except for coordinate p. Formally, using the Kronecker delta function (see Eq. (7.2)) for all i ∈ A p and for any j ∈ {1, 2, . . . , k}, then V oting = δ j, p (7.15) Ψi, j Therefore, we do not need to compute the opinion of nodes in vi ∈ ∪kj=1 A j

(7.16)

We only compute the opinion of nodes in vi ∈ Ak+1 . Denote these variables by voting Ψ Ak+1 . Social disagreement is a function that takes the social decision matrix and maps it into a real number. (7.17) Sd : Mn,n × Mn,k → R+ Assume we measure the social disagreement Sd to be the sum of all disagreements over the edge of the graph in L 2 norm || • ||22 . We assume that the social network m ∈ Mn,n [R] is fixed unless otherwise noted. Formally Sd([ f i, j ], Ψ ) =



f i, j ||Ψi − Ψ j ||22

(7.18)

vi ◦−◦v j ∈E k Ai , we need to substitute the Since we know the opinions of all nodes in ∪i=1 variables since they are fixed

7.3 Voting Option Analysis

125

Sd([m i, j ], Ψ Ak+1 ) =



f i, j ||Ψi − Ψ j ||22

(7.19)

vi ◦−◦v j ∈E

Since m is fixed, and the number of variables in Sd([m i, j ], Ψ Ak+1 ) is k|Ak+1 |, we can simplify the notation. (7.20) Sd : Δ|Ak+1 | :→ R Following Philip II’s advice, the non-politicians wish to minimize the conflict in society. They accomplish this by adhering to the following equations: voting

Ψ Ak+1

= arg

min

Ψ Ak+1 ∈(Δk )

|Ak+1 |

Sd(Ψ Ak+1 )

(7.21)

By taking the derivative of all variables in Ak+1 × {1, 2, . . . , k}, we can compute the decision vectors of the nodes of unknown opinion. Therefore, the transition matrix is the solution to the following linear system, where for all i ∈ Ak+1 , and for all j ∈ {1, 2, . . . , k}. Formally the linear system is ∂C(Ψ Ak+1 ) |Ψ A =Ψ voting = 0 Ak+1 k+1 ∂ψi, j

(7.22)

This is a linear system that minimizes conflict for society, and maximizes conflict for the anchors. This linear system follows Philip II’s advice.

7.3.4 Voting and Nas Equilibrium We consider the following game. Each node in the social network has to decide if it supports a party p j or not. Since anchors support their party with probability 1, the answer of the anchors is always 1 or 0. Next, we discussed the strategy each of the player vi can choose to act. In the disagreement game, each node must determines if, and to what extent, he supports party p j . In the disagreement game, each node has the selecting number ψi, j between zero and one that represents the probability for voting to party p j , therefore, the probability of not voting to party p j is 1 − ψi, j Next we consider the price each now the non-anchors individual vi ∈ V \ A has to pay for his disagreement to be according to the following formula Cost (vi ) =



(ψi, j − ψi , j )2

(7.23)

u i ∈N (Vi )

In game theory, we assume that each node is selfish. Therefore, it follows that each node tries to minimize its cost.

126

7 Indirect Attack

Next, we define the Nas equilibrium. In terms of game theory, if each player has chosen a strategy, and no player can benefit by changing strategies. In contrast, the other players keep theirs unchanged, then the current set of strategy choices and their corresponding payoffs constitutes a Nash equilibrium. Now looking at Eq. (7.23) one can see that it equivalent minimized the total social disagreement function Sd. Therefore, the voting algorithm is the Nas Equilibrium for the argument game. Note that the social disagreement function Sd can have another interpretation. Since each node independently sees only their neighborhood, then the node is contrarian in regards to Philip’s advice and tries to minimize the node’s own argument in the neighborhood. This can be interpreted as solving the node’s own optimization problem, instead of the global optimization problem. Here, the node assumes that the node knows the opinion of the neighborhood, or uses them as variables. However, the node takes the derivative based only on the opinion of the node. Therefore, instead of trying to minimize the social disagreement function Sd, we try to minimize the social disagreement function in each neighborhood locally for each vi ∈ V . The optimization for each vi ∈ V is Sdi = min Ψi



m i, j ||Ψi − Ψ j ||22

(7.24)

v j ∈N (vi )

It turns out that both the local and global optimization problems point to the same solution. In fact, this can be used as an explanation for why people tend to vote similarly to their close social “neighbors” (i.e., friends and family). Theorem 7.1 The voting algorithm is a Nash equilibrium for the disagreement game. We continue with our illustrative example of the voting algorithm in a two party election in Fig. 7.2. The social disagreement function Sdi , i = 2, 3, 4 in the optimization problem of Panel A of Fig. 7.2 is    ⎞  ⎛ min x2,1 21 x2,1 − 1 2 + 21 x2,1 − x3,1 2 1 1 2 2 (7.25) Sd(Ψ Ak+1 ) = ⎝ min x3,1 2 x3,1 − x2,1 + 2 x3,1 − x4,1 ⎠ 2   x4,1 1 2 min x4,1 + 2 x4,1 − x3,1 2 The social disagreement function Sdi , i = 2, 3, 4 in the optimization problem for Panel B of the same Figure is    ⎞  ⎛ min x2,1 13 x2,1 − 1 2 + 23 x2,1 − x3,1 2 1 2 2 2 (7.26) Sd(Ψ Ak+1 ) = ⎝ min x3,1 3 x3,1 − x2,1 + 3 x3,1 − x4,1 ⎠ 2   x4,1 2 2 min x4,1 + 3 x4,1 − x3,1 3 Finally, the social disagreement function Sdi , i = 3, 4 of the optimization problem for Panel C of the same Figure is

7.3 Voting Option Analysis

127

 Sd(Ψ Ak+1 ) =

min x3,1 min x4,1

1 3



    x3,1 − 1 2 + 23 x3,1 − x4,1 2 2   x4,1 + 23 x4,1 − x3,1 2 3

(7.27)

We can now solve Exercise 5. Note that since we have both the voting algorithm and Kirchoff’s law, we can use the language of Kirchoff to derive the voting algorithm as follows (see 4.3 of [170]): The target is to minimize the total power consumed by the circuit. We remind the reader that the formula for the power between nodes vi , v j , which are connected by resistance Ri, j , is (vi − v j )2 (7.28) power (vi , v j ) = Ri, j We compute the object of the optimization problem as follows: power (V ) = min

 (vi − v j )2 Ri, j (i, j)∈E

(7.29)

We can now solve Exercise 6.

7.3.5 Voting: Algorithmic Description We now give an algorithmic description for the voting decision matrix. We firs transform a weighted graph into a transition matrix of a Markov process. For more details, see Sect. 2.6.1. In the algorithm, description of the voting, we use the party member vector A = (A1 , . . . , Ak ), instead of the party member function Pm|A , this mean that the anchors for the party p j are A j or Pm|A (x) = p j iff x ∈ A j

(7.30)

For more on the connection between party member vector and party member function see Sect. 3.2.3 To simplify, we first compute the voting option analysis in cases where the input partition has three parts: ρin = (A1 , A2 , A3 = U ). To distinguish this from the general case, we denote A1 to be R p for the Red Party, A2 to be B p for the Blue Party, and A3 to be U for nodes with unknown opinions. We first compute the probability vector for each individual node to vote for the Red Party Ψrvot . Since we have two parties, we can compute the probability of a node voting for the Blue Party from the probability of voting for the Red Party using the following equation (see Exercise 13): Ψbvot = 1 − Ψrvot

(7.31)

128

7 Indirect Attack

We write the linear system of the probability of voting for the Red Party ψrvot , and then solve it. The solution is the probability of each individual node voting for the Red Party. To compute the probability of a node to vote for the Blue Party, the formula is as follows: ψbvot = 1 − ψrvot . The voting algorithm for two party elections is summarized below (see Exercise 13). Algorithm 9 Voting Algorithm for Two Party Elections INPUT: a graph G(V, E, W f ), party member (R, B) OUTPUT: the voting matrix Ψ voting where the rows represent the voters and the columns represent the parties 1: procedure Voting2Parties(G, (R, B)) G is a graph, (R, B) is a vector party members. The set R is the set of all anchors of red party. The set B is the set of all anchors of blue party 2: [M] ← Fr omGraphT oT ransition Matri x(G) See Exercise 16 3: for i ∈ {1, . . . , n} do 4: if i ∈ R then Verify if the index for i belongs to R. 5: eqi ← {xi = 1} 6: end if 7: if i ∈ B then Verify if the index for i belongs to B. 8: eqi ← {xi = 0} 9: end if 10: if i ∈ / R and i ∈ / B then Verify if the index of i belongs to V \ A . 11: eqi ← {xi = nj=1 m i, j x j } 12: end if 13: end for voting 14: Ψr ← Solve[{eqi : i = 1, . . . , n}] voting voting 15: Ψb = 1 − Ψr   voting t Ψr 16: return In the decision matrix, the rows represent the voters and the columns voting Ψb represent the parties. 17: end procedure

For another view of the problem, run Algorithm 9 using the input from Fig. 7.2. See if it produces the same system as Exercise 5. After solving the system of panels A, B, C of Fig. 7.2, the decision matrices Ψ A , Ψ B , ΨC are as follows. We now can complete Exercises 7.  ΨA =

1 0.75 0.5 0.25 0 0 0.25 0.5 0.75 1

t

 , ΨB =

1 0.56 0.33 0.22 0 0 0.44 0.67 0.78 1

t

 , ΨC =

1 1 0.6 0.4 0 0 0 0.4 0.6 1

t

(7.32) We now build upon the two party voting algorithm in order to describe multiparty elections. The algorithm for multiparty elections can be seen below in Algorithm 10. The main idea is to use the superposition principle. When considering voting for party pi , first aggregate all other parties to be against party pi (see below). All other anchors are united against party pi . This looks like a paranoid perspective, which

7.3 Voting Option Analysis

129

Fig. 7.2 This Figure shows three graphs illustrating Cycleland for the running example. This Figure shows a weighted undirected graph for use in Exercises 2 and 3 to show the reader’s understanding of the technical details of the Voting option analysis. The Red Party is shown as red diamonds, the Blue Party is shown as blue stars, and the anchors are denoted by anchor symbols. The size of the nodes is proportional to party support. Gray circles represent swing votes

Fig. 7.3 This Figure transforms Fig. 7.2 into a model of an electricity network. The equivalence of the resistance is written next to the resistors. This was computed using Ohm/Kirchhoff’s Law. The voltage of the positive anchors (Blue Party) is +1, and the voltage of the negative anchors (Red Party) is 0. This Figure is used in Exercise 2

Fig. 7.4 This Figure shows the linear system of Fig. 7.2 when the linear system is computed by Algorithm 9. This is for use in Exercise 7

130

7 Indirect Attack

works out to be the case, since all parties accept this paranoid perspective. The voting algorithm for multiparty elections is described below. Algorithm 10 Algorithm for Multiparty Voting INPUT: a graph G(V, E, W f ), vector party members (A1 , . . . , Ak ). Ai are anchors of party Pi , OUTPUT: the voting matrix Ψ voting , where the rows represent the voters and the columns represent the parties 1: procedure VotingMultiparty(G, Pm = (A1 , . . . , Ak )) G is a graph, Pm is a vector party. The set Ai is the set of all anchors of pi party. The set B is the set of all anchors of blue party 2: for i ∈ {1, . . . , k} do 3: R← Ai 4: B ← kj=1 A j \ Ai − → 5: ψi ← V oting2Par ties(G, (R, B)) Take the first row 6: end for   t − → 7: [Ψ ] ← Ψ t , ψi 8: return [Ψ ] In the voting matrix, the rows are the voters and the columns are the parties. 9: end procedure

We now move to study when the voting system has a unique solution, and when it does not. In fact, in machine learning, these kinds of algorithms are called embedding algorithms.

7.4 Solving the Voting System This chapter raises the following questions: what are the instances in which the Voting Algorithm gives a single solution; which are the instances in which there are infinite solutions; which are the instances in which there are no solutions; etc. The answers to these questions rely heavily on the random walk interpretation of the voting algorithm (for more on random walks, see Appendix C and [170]). This section is relevant to those readers who are interested in the mathematics behind the voting algorithm. Those who are not interested can skip this section without impacting their understanding of the chapter as a whole. Instead, readers can move straight to the next section which describes the rationality of the voting option analysis. Here, we give a simple version of the Markov chain interpretation of the voting algorithm. For the full description, see [140]. For simplicity, we assume there is a single anchor for each party. Moreover, the anchor for the i party is the i node. Clearly, we remove the outgoing edges from the anchors. In doing so, we transform the nodes into absorbing states (see Exercise 18 for a definition). We can interpret the three different equations (the equations appearing in lines 5, 8, and 11 of Algorithm 9) as computing the hitting probability of node vi where i =, k + 1, . . . , n to hit the anchor l where l = 1, . . . , k (see Algorithm 10).

7.4 Solving the Voting System

131

This means that we begin a random walk from each non-anchor node vi , such that i ∈ {k + 1, . . . , n}. We compute the hitting probability for a simple random walk beginning at vi to hit j for all j = 1, . . . , k. Therefore, it follows that the linear system of equations generated from the voting algorithm will always have a solution (see Theorem 1.3.5 of [170]). Moreover, if the original directed or undirected multigraph is ergodic without an absorbing state, the voting vector for each node will be a probability distribution. Lastly, if there exists a node u ∈ V such that if a walk begins at u, it will not reach any of the anchors in the multigraph, despite the length of the walk, then the system will have infinitely many solutions (see Chap. 1 of [170]). This occurs when all anchors of all parties are in different connected components than u. Informally, u can have any opinion about the election, since it is not connected. We can now solve the Exercises ranging from Exercises 8 to 17.

7.5 Rationality of the Voting Algorithm We now show that the voting decision process is a rational social decision process (see Sect. 5.5). Note that here we consider only scenarios with two parties. We can work through a situation with many parties in Exercise 18. The input for the voting algorithm is a frequency graph. In order to examine the rationality of the voting algorithm, we must look on the arbitrary frequency graph G(V, E, W f ). We then choose two different vertices vi , v j ∈ V , and increase the influence function in f i, j (see Sect. 5.5) that these two vertices have on one another. In the case of the frequency graph G(V, E, W f ), we must increase the frequency of wi, j = wi, j + ε. Let be G (V, E , W f ) be a new frequency graph where W f = [wi, j ] + ε[{i, j}]. Now the voting algorithm transforms the frequency graph G or G

in to a network of resistance. In the resistance network, increasing the influence is equivalent to reducing the resistance. According to our description of the voting algorithm using a resistance network, the voltage V oli on the node corresponds to the probability of a node vi voting for the first party. Since there are only two parties, the probability for a node to vote for the second party is 1 − V oli . Therefore, the difference in the opinion between node vi and node v j is the proportional to the difference in the voltage. Proving rationality of the voting algorithm means that we need to prove that if the resistance is reduced, then the difference in voltage is reduced as well. The advantage to using resistance networks is that we have a general theorem about the behavior of resistance networks. In particular, we have Thévenin’s theorem. An example of Thevenin’s theorem is demonstrated in Fig. 7.5. Reference [116] provides further details on Thevenin’s theorem. This theorem states that Theorem 7.2 Any resistance network which contains only voltage sources, current sources, and resistance can be replaced at any two points by an equivalent combination of the voltage source V olth in a series connection with a resistance Rth .

132

7 Indirect Attack

Fig. 7.5 This Figure illustrates Thevenin’s theorem. The left side shows a general network, which has a voltage source and resistors. On the right is the simplification when source voltages are replaced by a single source, and all resistors are replaced by a single equivalent resistor. Note that the gray areas are equivalent

Therefore, it follows that V oli − V ol j = V ol T h

Ri, j Ri, j + RT h

(7.33)

Therefore, we see that the voltage V oli − V ol j is monotonic with respect to the resistance between Ri, j . This proves the theorem. Theorem 7.3 The voting decision process is a social rational decision process.

7.6 Conclusion We conclude our investigation of conflict through war. This was accomplished using the guidelines from great military leaders and theorists about war, such as Sun Tzu, Caesar, Philip II of Macedon, and Liddell Hart. Following in the footsteps on Sun Tzu, we concentrate on direct (see Chap. 6) and indirect attacks. We model indirect attacks using a Markov chain stochastic process, which favors the options of many alternatives over a single greedy option. In essence, while direct attacks were modeled through a space domain and geometry, indirect attacks were born out of a time domain and stochastic processes. We introduce the voting decision process, which also incorporates a flavor of indirect attacks. The voting algorithm was presented using several scientific tools such as electricity networks, Markov chains, optimization, and algorithmic perspective. We prove that the voting algorithm is a social rational decision process.

7.6 Conclusion

133

In the next chapter, we examine the interplay between leaders and society. Using the famous question of who shapes history, leaders or society, here we question how leaders and conflict interact with each other in social networks. The main reason there are so many schemes to describe the voting algorithm is based on two ideas. The first is that anchors do not change their opinion, and therefore, we can have so many different outcomes. The second reason is the non-anchors use the heat equation to compute their decision.

7.7 Exercises Option Analysis: Voting 1. Let G(V, E, W f ) be a frequency graph. The expected time that it takes a simple random walk that starts at node vi ∈ V j to visit for the first time node v j ∈ V is denoted by K i (for an exact definition, see [170]). Denote disi,Kj = K i, j + K j,i to be the expected time it takes a simple random walk to go from node vi to node v j for first trip there and back again. It is well-known that (V, [disi,Kj ] is a metric space. Consider the following decision process Ψ H ittingT ime . The input for Ψ H ittingT ime is a frequency graph and a partition. Ψ H ittingT ime computes the metric space (V, [disi,Kj ]) and uses this metric space as an input for the Voronoi decision process. a. Write a program using your favorite programming language which implements this decision process. b. Compare Ψ H ittingT ime to Ψ V oting . Is there a graph where they are different? c. As Sun Tzu said, there are infinite ways to combine direct and indirect attacks. Is Ψ H ittingT ime a direct attack or an indirect attack? The following exercises refer to a running example of an election taking place in Cycleland. The relevant Figures are noted in the individual exercises.

Voting: Electrical Circuits 2. For this exercise, refer to Fig. 7.2, Panels A, B, and C. a. Transform Fig. 7.2 into an electricity circuit (represented in Fig. 7.3) where there is a battery with positive voltage of +1 which connects the path to the anchors of the Red Party (diamonds in the Figure), and a negative voltage 0 which connects the path to the anchors of the Blue Party (stars in the Figure). b. Compute the voltage of each of the nodes in each of the electricity circuits constructed in the above question.

134

7 Indirect Attack

c. Perform the above exercise, however this time connect the Red Party anchors (diamonds in the Figure) to the negative voltage 0, and the anchors of the Blue Party (stars in the Figure) to the positive voltage +1.

Voting: Simple Random Walks 3. The following problem analyzes Fig. 7.2 from using Markov chains. a. Compute the transition matrix M(ρ A ), M(ρ B ), M(ρC ) of Fig. 7.2 and compute the following limits and compare your answer to (7.13) lim M(ρ A )t lim M(ρ B )t lim M(ρC )t

t→∞

t→∞

t→∞

(7.34)

b. Compute the decision matrix using Definition 7.3.2. c. Compare your result to the voltage in the resistance network. d. Show that the voltage in the resistance network (see Sect. 7.3.1) is always equivalent to the hitting probability in a two party election (see Sect. 7.3.2). 4. Determine the dimension of each of the following objects.     k t   n a. δ M Q1 lim i, j t→∞ l∈A p j=1 l   k t b. limt→∞ M Q 1  n c. δi, j j=1

Voting: Optimization 5. The following problem analyzes all three panels of Fig. 7.2 from an optimization perspective. Use the distributed version of the optimization problem, which describes each node of the undecided opinions vi ∈ U as single optimization problems. Solve all of these simultaneously. a. Compute the optimization problems of Fig. 7.2 and compare your answer to Eqs. (7.25), (7.26), and (7.27). b. Take the derivative of the above functions and write the solution of the optimization problems as a linear. c. Solve the linear system from the above and compare it to your answer from Exercise 3 and Eq. (7.13). 6. The following problem analyzes all three panels of Fig. 7.2 from a classical optimization perspective.

7.7 Exercises

135

a. Compute the single optimization problem of Fig. 7.2 using Eq. 7.29. Compare your answer to Eq. (7.32). b. Take the derivative of the above functions and write the solution of the single optimization problem as a linear. c. Solve the linear system from the above and compare it to your answer from Exercise 3.

Voting Algorithm 7. Use the algorithm description to analyze Fig. 7.2. Generate the linear systems of Panels A, B, and C. Solve them and compare them to the previous exercises.

Solving the Voting System 8. Generate a scenario where the voting algorithm has an infinite number of solutions. 9. Find the graph where how voting of the non-anchor nodes depends only on the number of anchors for each Party, and not on the location of the anchors. 10. Find a graph G(V, E, W f ) and a partition ρ = (A1 = {v1 }, A2 = {v2 }, A3 = V \ {v1 , v2 }) where non-anchor nodes v3 ∈ A2 ⊂ V has a decision vector Ψ3 = (1, 0). 11. Find an example where two voting conflict function tuples have the same decision matrix. 12. Suppose the following line was written by mistake in the voting algorithm (see Algorithm (9) at line 5): (7.35) eqi ← {xi = 0.9} Explain what will happen. 13. Let G(V, E) be a network. Let (A1 , A2 , A3 = U ) be anchor sets for the parties p1 , p2 and the unknown nodes A3 . a. Consider Algorithm (9). Let Ψ11 = V oting2Par ties(G, (R, B, U )),

(7.36)

Ψ22 = V oting2Par ties(G, (B, R, U ))

(7.37)

Show that Ψ11 = Ψ22

136

7 Indirect Attack

b. Explain what will happen to the voting algorithm if the A1 , A2 , A3 are not disjoint. c. Explain what will happen to the voting algorithm if A1 is empty, and A2 is not. a. Extend the voting algorithm in such a way that it accounts for nodes v with known opinions πv ∈ Rk , as well as anchors. A node v with a known opinion is a node which we know the voting πv distribution of that node. The main idea is to duplicate each node v with known opinions into k original copies v1 , . . . vk , with a copy for each Party. The probability for node u to perform a walk to node v j is equal to pu,v πv, j . b. Explain why the above algorithm is a generalization of the voting algorithm. 14. Assume the following axioms. a. For each node v ∈ V , a vote opinion of node v is a probability distribution on each of the parties πv . b. For all nodes v, u ∈ V , the vote opinion πv , πu of v, u are independent random variables. c. For non-anchors v, the vote opinion is the average of its neighborhood, i.e., pv =



pv,u pu

u∈N (v)

15. Prove that the Voting Algorithm is the only algorithm which satisfies the above three axioms. 16. Evaluate whether the following claims are true or false. a. The voting algorithm tries to minimize the amount of conflict for each undecided node with their respective neighborhoods. b. The conflict in the voting algorithm arises from the anchors. c. The conflict in the voting algorithm arises from the undecided nodes. d. The conflict in the Voronoi algorithm arises from the anchors. e. The conflict in the Voronoi algorithm arises from the undecided nodes. 17. In the PageRank algorithm (see Sect. C.5), there exists a damping factor 1 > α ≥ 0. α is the probability that the random walk will continue its walk or will start its walk at an arbitrary node, at any step,. a. Explain how to add the damping factor α to the Voting Algorithm. b. Suppose a node v is disconnected from all anchors. Explain who node v will vote for.

7.7 Exercises

137

Rationality in the Voting Algorithm 18. Equation (7.13) describes the decision matrix Ψ vot of Figs. 7.2, 7.3. In each of the panels of Fig. 7.3, the influence of nodes 3 and 4 on one another increases by reducing the resistance between them by 0.5. This means that the resistance between nodes 3 and 4 is 0.5, 0.125, and 0.125 in Panels A, B, C, respectively. Compute in all those cases the new decision matrix. Show that the opinions of nodes 3 and 4 become closer. 19. Using Thevenin’s theorem, prove that voting algorithm for k > 2 parties is rational. 20. Use Norton’s theorem [9] to prove the rationality of the voting algorithm. 21. Prove Thevenin’s theorem for the specific case of Fig. 7.5 using Kirchhoff’s Law.

Chapter 8

1812: Social Networks Capture Napoleon

8.1 Introduction What does Sun Tzu mean when he writes “[a]ll armies prefer high ground to low and sunny places to dark” [5]? Where is the high ground in social networks? Does technology change the concept of a “high ground”? Are celebrities the high ground in the network, with Trump as Everest of Twitter? Where is it sunny in social networks? Is it in California? Sun Tzu’s The Art of War is essentially a cookbook for warfare. It provides the recipes for planning, fighting, and winning a war. However, Sun Tzu assumes that the reader already knows the ingredients. For instance, our example of “high ground” is no longer (literally) concrete; it has become an abstract notion. As in Fig. 8.1, high ground can evolve from a castle turret to an airplane with the infusion of technology. Over the next three chapters, we provide essential interpretations for some ingredients, such as capture, direct attacks, and indirect attacks. In this chapter, we discuss what Sun Tzu’s notion of “capture” means in social networks. Sun Tzu said: In the practical art of war, the best thing of all is to take the enemys country whole and intact; to shatter and destroy it is not so good. So, too, it is better to recapture an army entire than to destroy it, to capture a regiment, a detachment or a company entire than to destroy them. [5]

Elections provide a good example of capture in social networks. When modeling elections with k parties, it is useful to include a “party” which contains all undecided voters. When election day occurs, this party is subsumed into the other parties. In modeling this, the members of the other parties “win” the votes of some former members of this undecided party, and thus some of these previously undecided voters are “captured” by the other parties and become members of that party (see Definition 4.1 in Sect. 4.3.2). Note that in this case, the undecided party does not have anchors (see Definition 4.1). In the rare case that all members of the undecided party are subsumed by the other parties, this is an annihilation of the undecided party. © Springer Nature Switzerland AG 2021 Z. Lotker, Analyzing Narratives in Social Networks, https://doi.org/10.1007/978-3-030-68299-6_8

139

140

8 1812: Social Networks Capture Napoleon

Fig. 8.1 This Figure illustrates the metaphoric nature of heights. We use social networks to analyze social conventions. But how do we study metaphors of natural phenomena in the context of social networks or narrative?

To illustrates the difficulty of interpreting Sun Tzu in a social network, consider games of go and chess. The reader can fill in the details of this example in Exercise 6. In chess and go, one whole party is captured intact and swallowed whole by its opposing party. In linear algebra, this event is sometimes called (less dramatically) a projection.

8.2 Capturing Nodes in Consecutive Conflicts We begin with the notion of capture in scenarios of two consecutive conflicts. We start locally with an individual node. For an example of the capture of an individual node, we look at US elections. Due to the nature of the Electoral College, the US elections are typically determined by only a few swing states. Many states do not change their allegiances across decades. We can ask what is the mechanism behind the outsized power of swing states to influence the outcome of an election? This is because swing states allow themselves to be “captured” or to be persuaded by a candidate/party. To model this phenomena, we say that a state is captured in an election if it changes alliances during two consecutive elections. For a specific example, there is the case of the state of Florida over the course of four presidential elections in the US (2000–2016). Looking at the data from Wikipedia (see [12]), Florida was captured three times during this period: once in

8.2 Capturing Nodes in Consecutive Conflicts

141

2000, by the Republicans, once is 2008, by the Democrats, and once in 2016, by the Republicans. Essentially, it switches sides every other election. Formally, in the language of conflict, this is defined as follows: Capture of a Node in a Social Network Definition 8.1 Let (σ1 , σ2 ) be two consecutive conflicts with the same domain V . Node vi ∈ V is captured if it is not an anchor. Clearly, if a node vi is captured, its captor is party is σ2 (vi ), and the defeated party is σ1 (vi ).

8.3 Winning and Losing Game theory models competition between players. In game theory, there is a difference between a zero sum game (such as in a presidential election; there is only one president) and cooperative games (such as in UK elections where a coalition is formed to govern). In cooperative games, some level of compromise is typically the outcome of the election. In the same spirit, we model winning and losing in a social environment. Each party p j ∈ P has its own definition of winning. Let win j ⊂ 2V be a collection of subsets of winning nodes. We say that a party wins if it achieves at least one of its goals. Otherwise, the party loses. Clearly, the collection of sets which describe the winning condition W in j for party j is monotonic increasing. (8.1) If A ∈ W in j and A ⊂ B then B ∈ W in j Wining in a Conflict Definition 8.2 Party p j is a winning party in the conflict σ according to the winning condition W in j if (8.2) σ −1 ( p j ) ∈ W in j By the same way, we define a losing condition as follows: Let Los j ⊂ 2V be a collection of subsets of losing nodes. We say that a party loses if it fails to achieve at least one of its goals. Clearly, the Los j for party j is monotonic decreasing. If B ∈ Los j and A ⊂ B then A ∈ Los j

(8.3)

142

8 1812: Social Networks Capture Napoleon

Losing in a Conflict Definition 8.3 Party p j is a losing party in the conflict σ according to the losing condition Los j if (8.4) σ −1 ( p j ) ∈ Los j Note that the intersection of winning and losing for any party is an empty set. Formally (8.5) W in j ∩ Los j = ∅ If we have two parties P = ( p1 , p2 ) in a zero sum game, then if one party wins, the other loses. W in 1 = Los2 Los1 = W in 2

8.3.1 Battle of Borodino (1812) Our first example is the Battle of Borodino (1812) [13]. We consider this battle as an example of a zero sum game since one side wins and the other loses. Clearly, the French lost the Battle since almost the entire French army was destroyed. However, Napoleon and Kutuzov had differing definitions of winning and losing. Napoleon believed that once he conquered Moscow, he would win the war. We assume that before the war, he would consider his army being almost entirely annihilated to be a defeat. On the Russian side, Kutuzov would consider winning to be the French army being destroyed, and subsequently retreating to France. Losing would obviously be Napoleon conquering all of Russia. According to Eq. (8.6), the Equation is not satisfied by capturing Moscow. The French and Russian armies do not agree on what it means to win or lose. According to our definition, winning would be conquering all of Russia, and losing would be destroying the French army. Thus, Kutuzov’s perception of winning and losing was the correct one. Therefore, he is victorious. Although Kutuzov lost the Battle, Napoleon lost the war.

8.3 Winning and Losing

143

8.3.2 US Presidential Elections For a second example, again consider a US election, with electoral votes coming from the 50 states in the US (see [12] for an explanation of the Electoral College system). (8.6) S = {s1 , . . . , s50 }. Each state si ∈ S has a specified number of electoral votes. Denote the number of electoral votes a state si has by El(si ). For a president to win the election, they must reach 270 votes out of the 538 votes possible. Therefore, this can be modeled as a zero sum game where the winning condition for both parties are equal, and the set of winning states is comprised of all the states who combined add up to 270 (or more) electoral votes. ⎫ ⎧ ⎬ ⎨  El(s j ) ≥ 270 (8.7) W in = s ∈ 2 S : ⎭ ⎩ s j ∈S

In the outcome of an election, if a state does not support the candidate who wins, then the state is in the losing set. Thus, we can define the losing condition to be as follows: ⎧ ⎫ ⎨ ⎬  Los = s ∈ 2 S : El(s j ) < 270 (8.8) ⎩ ⎭ s j ∈S

Party pi wins the election, according to the conflict function σ , if σ ( pi )−1 ∈ W in

(8.9)

Party pi loses the election, according to the conflict function σ , if σ ( pi )−1 ∈ Los

(8.10)

See Exercise 4 to work more with US elections.

8.4 Incorporating Narrative into War In the previous section, we discussed winning and losing without the structure of the social network. In this section, we answer the natural question of how to introduce the social network structure into the concept of winning and losing. The previous chapter defined the conflict function. We will use this tool (see Eq. (5.17)) to import the structure of the social network into the landscape of winning and losing.

144

8 1812: Social Networks Capture Napoleon

8.4.1 Example The narrative of Shakespeare’s Julius Caesar is, in brief, that once upon a time, Caesar wanted to be king of Rome. The people of Rome revolted, and a civil war followed his assassination. The assassins lost the war, and the Republic fell. In Chap. 2, we defined several graphs that can be used to model narrative. However, while the graphs capture the social structure of a drama, they cannot represent the death of a character or the destruction of a party. Nevertheless, we can use conflict function in order to model death or destruction. For an example (see Chap. 22), we can take the social network generated by an AB graph of Julius Caesar, and delete the edges going in or out from those characters who have died (i.e., Julius Caesar together with the conspirators).

8.5 Party Power Base In the same way that a river has a water catchment area, then a party has a party power base. The party power base Power j ⊂ V is the set of all members (see Definition 3.4) of the party p j in the social network. The party power base of party p j in the partition function σ is Power j = σ ( p j )−1

(8.11)

A conflict function Ξ can change the party power base. In fact, if there is no change in the power base, the narrative is trivial. We now define what it means for a party power base to expand. In war, an increase in territory can be an indication of victory (for a contrasting in politics, see Exercise 5). Therefore, this directly translates into the condition that f ( pi )−1 ⊂ Ξ ( f, m)−1 ( pi )

(8.12)

This condition does not allow a party to lose any of the party’s supporters, or “territory.” A good example which illustrates the relationship between winning and increasing a power base is the War of 1812 between the United States and Great Britain (in Canada). This war ended in a military stalemate, and the Treaty of Ghent reverted all territory gained on both sides back to the original owners. Therefore, no one won the war. See Exercises 2 and 3 to explore the narrative of the War of 1812.

8.6 Total War: Elimination of a Party

145

8.6 Total War: Elimination of a Party As Quotation notes (Sect. 8.1), it is better to capture an army whole than to shatter it. What, then, does this mean in the context of social networks and narrative? We now provide a simple interpretation. As noted in Chaps. 3, 4, 5, war is a narrative. This means that war is modeled as a conflict function Ξ (see Definition 5.6). Consider the linear algebraic approach to social networks. This means that the network is a matrix m ∈ Mn,n . Each character in the network has its own dimension, and therefore, the dimension of the matrix is the total number n of characters in the drama or network. According to the definition of a conflict function Ξ , we transform a party member function pm 1 : V → P. and a social network m into a new party member function pm 2 : V → P. We say that a part p ∈ P is eliminated during the conflict function Ξ if pm 1 ( p)−1 = ∅, (Ξ ( pm 1 , m)( p))−1 = pm 2 ( p)−1 =∅

8.7 Conclusion The relationship between the metaphorical language in Sun Tzu’s The Art of War and social networks is sometimes not clear, and requires a method for interpretation. Understanding the metaphors in The Art of War in the context of social networks points to the complexity of modern warfare and conflict. Our basic metaphors sometimes fall short in contemporary life. For example, looking at the quotation which opens this chapter in Sect. 8.1, what does “sunny” mean in the context of social networks? This chapter provided examples of three concepts borrowed from Sun Tzu: capture, winning and losing, and elimination. Our interpretations maintain the language of Sun Tzu’s metaphors, by not providing exact definitions, and leaving some space for creativity. In this chapter, we looked at extreme conflict. Clausewitz argues that “War is the continuation of politics by other means’ [211]. War was used in this chapter as an example of extreme conflict. In conclusion, we provide a brief remark on the title of this chapter. When writing this chapter, the year 1812 popped up again and again. The year 1812 turns out to

146

8 1812: Social Networks Capture Napoleon

embody Clausewitz’s quote above. It was a year of turmoil, and to riff on Charles Dickens, it was an educational time, and “it was the worst of times” [72]. In the next chapter, we continue our discussion of Sun Tzu by looking at the concept of a direct attack.

8.8 Exercises Capturing Nodes in Consecutive Conflicts 1. Explain how to change the definition of the capture of an individual node (see Definition 8.1) to be in the context of conflict function Ξ (•, m) where m ∈ Mn,n is a specific social network.

Winning and Losing 2. During the War of 1812 (1812–1815) between Great Britain (in Canada) and the United States, the US won the battle in the sea, but lost the battle on land. This led to a military stalemate, where neither side could win the war. According to the Treaty of Ghent which ended the War, all territories gained in the War reverted to their pre-war owners. a. Explain how to interpret the war as a social network where cities are the nodes. What are the edges? b. If we consider the War together with the Treaty, there is a no narrative. This suggests that there are multiple narratives instead of one, supporting Clausewitz’s opinion in On War [211]: “War is the continuation of politics by other means.” Is there a narrative or not? If there is, how do we overcome the fact that looking at the War and the Treaty together mean nothing has changed? 3. Look closely at Definitions 8.2 and 8.3. Using this definition, define what it means to lose a war in a social network. 4. This exercise discusses a US election. a. Show that if we have two parties in a US election, that if one party wins, then the other party loses. b. Is it possible that neither party will win or lose? c. Is it possible to eliminate that possibility by assigning electoral votes differently? d. Compute the number of sets in win, i.e., |win| e. Add data exe.

8.8 Exercises

147

Party Power Base 5. This exercise follows the trajectory of Brexit. The EU Membership Referendum (“Brexit”) in 2016 is, like all UK referendums, not legally binding. This means that Parliament can ignore the results of any referendum if Parliament wishes. In 2019, the UK Prime Minister Boris Johnson tried to force a No Deal Brexit by suspending Parliament. This act can be interpreted as prioritizing the results of the referendum over Parliament. The Prime Minister suffered defeat by the UK Supreme Court, who ruled that suspending Parliament was unlawful. Boris Johnson’s act was paradoxical as it raised the non-binding referendum above the sovereignty of Parliament. a. Compute the social network of the British Parliament before June 2016 Brexit Referendum. b. Compute the social network of the British Parliament after June 2016 Brexit Referendum. c. Compute the social network of the British Parliament after Theresa May becomes Prime Minister in July 2016 election. d. Compute the social network of the British Parliament after the general election of June 2017. Note that this is a case where the power base of the Conservative party shrinks, but they do not lose power. e. Compute the social network of the British Parliament after Boris Johnson becomes Prime Minister in July 2019. f. Can you explain why Boris Johnson’s government insists on prioritizing a non-binding referendum over the sovereignty of Parliament?

Capture in Social Networks 6. In this exercise, we consider a game of chess. a. In the beginning of the game, each side contains 16 pieces, and the board size is 64. Determine the size of the social network that describes the beginning of the game of chess. b. How would you model a captured piece, i.e., a piece which is no longer in play on the board? c. Determine the number of parties in a game of chess (hint: which party do unoccupied spaces in the board belong to?) d. How many possible outcomes are there at the end of the game of chess? e. Let m 1 be the social network describing the beginning of the chess game. Let m 2 be the social network describing the end of the game. Denote the conflict function of Ξ to be the function that describes the chess game. What is the meaning of Ξ (P, m 2 ).

Chapter 9

The Search for Conflict

9.1 Introduction As can be seen in Fig. 9.1, conflict serves as a lens in order to clearly see reality. In this chapter, we use the lens of the conflict function to mechanically locate and compare conflicts, and pinpoint critical conflicts in a drama. Note that we do not look at conflicts between concepts or other abstractions; only conflicts between individuals or characters. This is possible since characters frequently act as metaphors and mouthpieces for specific sides of a conflict. In Chaps. 8, 6, and 7, we study conflict through in its extreme expression: war. To best understand the progression of conflict, we conceive of the narrative of war as having three stages. Each of these stages of war have a different social network structure. Before the war, the structure is of two well-separated camps; during the war, the structure is of two distinct camps which communicate with one another (with sentences carried in bullets); and after the war, where the graph varies, depending on outcome of the war. When is conflict at its peak during these three stages? The conflict is maximized, in fact, at the end of the first stage of war. This stage contains the breakdown of negotiations before the war, and the division of the network into two isolated camps. The war itself (the second stage) is a means to dissolve the conflict. During a war, inevitably, one side will lose, and one will win. The winner will determine the outcome of the conflict during the final stage of the war. To analyze World War II, using this schema, see Exercise 1. A natural question arises here: how does war manifest itself in social networks and literature? Shakespeare’s Julius Caesar provides an ideal example. During preparations for battle in the play (Act IV; Act V is the battle itself), the disconnected graph represents the Platonic ideal of the first stage war in a social network (see the Red and Blue camps/cliques in Fig. 3.3). When we apply the voting algorithm to Fig. 3.3, and select the anchors according to the conflict (i.e., where the Red Party has only red anchors, and the Blue Party has only blue anchors), then the decision matrix Ψ V oting ∈ Mn,2 [{0, 1}] has the property of being only 0, 1. The voting algorithm (see © Springer Nature Switzerland AG 2021 Z. Lotker, Analyzing Narratives in Social Networks, https://doi.org/10.1007/978-3-030-68299-6_9

149

150

9 The Search for Conflict

Fig. 9.1 This figure shows the universal search for conflict (and glasses). For humanity, conflict serves as the lens to view reality, as Emmanuel Levinas claims

Algorithm 10) also works well on Act V during the battle; however, this is not where the conflict is at its peak. At the end of the play, the conflict is dissolved: there is no longer Brutus or democracy, but there is a Caesar. Thus, if we want to find the most central conflict, Act IV is the most relevant. If war is polarization, peace must be a union. The Platonic ideal of peace in social networks means that all edges exist and there is a single clique (see Sect. 3.2.1 or Wikipedia for a definition of a clique) where all nodes are connected to all other nodes. If we pick any two random anchors for the two parties in this case, the voting algorithm assigns the same number of anchors for each party, i.e., Ψ V oting ∈ Mn,2 [{0, 1/2, 1}]. Therefore, the structure for Ψ V oting is that all the anchors are 0, 1, and thus deterministic coin, and non-anchors are stochastic fair coin. Deterministic coin can be interpreted as a node losing their freedom to connect with the opposing camp. Stochastic fair coin came be interpreted here to mean that a node maintains their freedom to connect to any node in the opposing camp. In fact, this freedom of communication dissolves the tension between the opposing camps. The examples of war and peace allow us to develop a way to measure the quality of the decision matrix Ψ V oting in the language of conflict. This means that a deterministic decision matrix represents the pinnacle of conflict, i.e., a war, in a narrative. A stochastic fair coin thus represents a lack of central conflict. Summary: Decision Matrices and Randomness In summary, the quality of the decision matrix Ψ V oting with respect to a conflict is the degree to which the random variables are deterministic.

9.2 Algorithm Complexity of Conflict

151

9.2 Algorithm Complexity of Conflict We are still left with a complexity problem: in scenarios of war, there are too many ways to select the leaders for the camps/partitions. In fact, using the voting algorithm, there is the additional issue that if we select one main character and one minor character, then clearly all characters will vote for the main character Thus, while a scenario with the partitions of a primary character versus a minor character would appear to be a great partition, it does not reveal anything new about the text. All we learn from that partition is that one is a main character and the other is a minor character. In other words, simple citizens cannot typically fight Caesar. Here, we solve this complexity problem by concentrating only on O(log(n)) main characters. This allows us to reduce the number of conflicts/partitions from exponential to polynomial. This is a crucial step for AI. Following the conflict function (see Definition 5.7), the decision matrix is the source of the partitions. Another way to overcome the complexity is to insist that there are only two parties, and one anchor per party. The complexity of this heuristic boils down to O(n 2 ). The advantage of this approach is that it is possible to pit a pair characters against one another. This is the method we use in this chapter. Typically, canonical dramas house multiple conflicts. When analyzing dramas, there is usually a primary conflict in the story. The challenge here then is finding the “primary” conflict to use as a way to partition the characters into camps. This is accomplished by considering all possible anchors and partitions, then comparing this exponential number of partitions, and finally selecting the most central from this range. For this to be manageable, we wish to reduce the possible number of conflicts in a sophisticated manner. Next, we delve into the technical details of a schema for how to compare conflict in a narrative or social network.

9.2.1 Computing Conflicts in Narratives As shown in Chaps. 4, 5, 6, and 7, conflict function algorithms invite a knowledge of narrative in order to select the anchors for the opposing camps. This section demonstrates one algorithm to mechanically overcome this challenging task. Since our measurement of central conflict is based on deterministic versus stochastic properties of a decision matrix, it is important that the decision matrix describes the probability of a node to vote for a particular party. This is discussed in Exercise 3. Many option analysis or decision making algorithms can be used here; it is only necessary to know what constitutes a good partition versus a bad one. We provide a simple heuristic in the next subsection for the voting algorithm, but this can be carried into the Voronoi option analysis or any other meaningful conflict function algorithm.

152

9 The Search for Conflict

9.2.2 Measuring Conflict in Decision Matrices There are many ways to measure stochastic versus deterministic properties in random variables (see Exercise 4). For the sake of demonstration, we denote our function of randomness by qc. Conflict Centrality Function Definition 9.1 qc will be used as a measure of conflict centrality. Formally: qc : Δk → R

(9.1)

Let X, Y be two random variables in X, Y ∈ Δk . X has more randomness than Y if and only if qc(Y ) < qc(X ) (9.2) Clearly, this definition depends upon the function qc. Moreover, sometimes, different functions can yield different relationships between X and Y . These methods are well-established, and will not solve this problem; usually, the relationship does not change. If the relationship does change when using meaningful functions, this typically means that both values have the same amount of randomness. We can now work through Exercise 2. In summary, a small value means that qc(X ) is deterministic, and a large value means that qc(X ) is stochastic. Next, we wish to compute which of the partitions can be interpreted as the main conflict. Here, we use the assumption that each character in the drama has a strong opinion on the main conflict. Each character sheds a different light on the main conflict, while selecting which camp they themselves belong to. In other words, this means that in the voting decision matrix, the random variable associated with a character is less stochastic and more deterministic in nature. Our next step is to extend the definition of a measure of conflict from two random variables to a stochastic decision matrix. Stochastic Decision Matrix Definition 9.2 The matrix Ψ = [ψi, j ] is a stochastic decision matrix if the vector Ψi = (ψi,1 , ..., ψi,k ) is a distribution.

9.2 Algorithm Complexity of Conflict

153

In fact, the stochastic decision matrix represents several random variables. Therefore, if we wish to measure the amount of the conflict or randomness in the stochastic decision matrix, we can use the following extension Conflict of Stochastic Decision Matrix Definition 9.3 The measure of conflict cq(Ψ ) of a stochastic decision matrix Ψ is cq(Ψ ) =



cq(Ψi )

(9.3)

vi ∈V

Note that now that the domain of the conflict centrality function qc is no longer n Δk but Δk . To summarize, by the same way in which we compare two random variables, we can compare two decision matrices. Assume we have two stochastic decision matrices, Ψ and Φ. The conflict described by Ψ is more central than that of Φ if Ψ is more deterministic than Φ. Formally qc(Φ) > qc(Ψ )

(9.4)

Once we know how to compare stochastic decision matrices, we can determine which conflict is more central. At first, this appears to be very trivial; however, once this is determined, this, along with the flexibility of the anchors, boils down to an algorithm which finds central conflicts. This is exactly what is accomplished by the following algorithm, used here as an example Algorithm 11 Finding Conflict Algorithm 1: procedure FindingConflict(G(V, E)) 2: for i, j ∈ [n] do 3: Ψ ← V oting2Par ties(G, ({i}, { j}, V \ {vi , v j })) 4: i, j ← cq(Ψ ) 5: end for 6: {i, j} ← arg mini, j qc(i, j ) 7: return {i, j} 8: end procedure

 where G is a graph  see Algorithm 9

 The best Conflict

We now provide several examples of finding central conflicts and their consequences in literature.

154

9 The Search for Conflict

9.3 Literary Analysis Following the above heuristic, when considering the last Act in Julius Caesar, Algorithm 11 suggests that the anchors should be Octavius and Antony on one side, and Brutus and Messala on the other. This selection of anchors takes Cassius’ death in Act V, Scene 3 into account, by selecting Messala over Cassius.

9.4 Conclusion For conflict to be a universal currency, there must be two sides of the coin: both psychological and sociological elements. Individuals must be able to relate to a conflict in a narrative in order for it to be compelling, and the conflict must occur in society at large for it to be universal. Each individual must connect with the conflict on some level. This chapter builds upon the previous chapters which discuss the conflict function and option analysis. The algorithm developed here takes many stochastic decision matrices and harvests out of them the main conflict in a narrative social network or drama. The finding conflict algorithm is born out of the voting algorithm, and the idea that the decision process can be interpreted as a probability distribution to select an alternative. However, this algorithm could easily be applied to other option analysis processes, such as Voronoi option analysis. The key question which must be answered when using other option analysis processes is how to measure “good” conflict versus “bad” conflict with respect to the decision matrices. In the voting algorithm, this measure is deterministic versus stochastic. In Voronoi, there are two options: either to transform the decision matrices back to a probability distribution instead of measures of distance, and then to use deterministic versus stochastic measures, or measures of distance of near versus far, and develop an alternative theory for the conflict centrality function qc when applied to distances. There are many ways to interpret this illuminating chapter. First, it can be used for increasing freedom of interpretation in literature by uncovering hidden layers of conflicts. Second, since the finding conflict algorithm is so straightforward, it invites the reader to engage with the algorithm, and improve it (or criticize it!) to satisfy their own curiosity. Third, this chapter can be used as a guiding light for verification of other algorithms used to study narrative or social networks.

9.5 Exercises

155

9.5 Exercises Conflict 1. Consider World War II. a. What was the philosophical conflict of World War II, according to your opinion? In your answer consider human rights and the definition of humanity. b. Draw graphs of the international community for the three stages of war using World War II. Use the United States, the UK, France, Germany, Italy, Japan, and Russia. Determine when the graphs cease to be connected, and when they are reconnected. c. When is the conflict at its peak? Measuring Conflict in Decision Matrices 2. Assume that x is a distribution with Pr[x = i] = pi for i = 1, 2, ...k. a. The entropy x measures how random x is. Its formula is given below H (x) =

k 

pi log(1/ pi )

(9.5)

i=1

According to the formula, when x has high entropy, then x contains a lot of randomness. When x is 0, x is deterministic. Explain how to transform the entropy function into qc. b. Variance x measures the second how random x. When x is deterministic, the variance is 0. When x has high entropy, the variance is maximized. Explain how to transform the variance into qc. Computing Conflicts in Narratives 3. This question deals with Voronoi option analysis. For transforming a Voronoi decision matrix into a voting decision matrix, see Exercise 8. a. In this chapter, we explained the criteria for selecting a central conflict using deterministic versus stochastic in the decision matrix. Use Exercise 8 to devise criteria in the language of Voronoi. Explain how to evaluate conflict using the Voronoi decision matrix. b. Test your answer on Act IV of Julius Caesar (see Fig. 3.3). Measuring Conflict in Decision Matrices 4. Consider a Bernoulli random variable.

156

9 The Search for Conflict

0 ≤ Pr[X = 0] = q ≤ 1 0 ≤ Pr[x = 1] = 1 − q a. Let H (X ) = −q log(q) + −(1 − q) log(1 − q) be the entropy of X . Draw the function H (X ) as function of q and compute the maximum and minimum of this function when 0 ≥ q ≤ 1 is between 0. Conclude that the function H (X ) can be used as the function of the measure of randomness qc(X ). b. Define the variance of V (X ). Draw the function V (X ) as function of q and compute the maximum and minimum of this function when 0 ≥ q ≤ 1 is between 0. Compare this to the above. Conclude that the function V (X ) can be used as the function of the measure of randomness qc(X ). c. Let E1(X ) = −|q − 1/2| − |1/2 − q|. Draw the function E1(X ) as function of q and compute the maximum and minimum of this function when 0 ≥ q ≤ 1 is between 0. Compare this to the above answers. Conclude that the function E1(X ) can be used as the function of the measure of randomness qc(X ). d. Come up with your own measure of randomness. Conclude that the function H (X ) can be used as the function of the measure of randomness qc(X ). Computing Conflicts 5. Write an algorithm which computes all the conflicts between the five most central characters in a play. Assume that we examine all subsets. 6. In Julius Caesar, the characters are split into two camps: the supporters of Caesar and the conspirators against Caesar. a. First, according to the narrative, divide the main characters into these two opposing camps. b. Shakespeare gives a heavy hint for the previous item, which can be found in Act IV (scenes 1, 2, 3). Compare this partition to your answer to the previous item. c. Select a single anchor for each camp, and run the voting algorithm using the text from Act IV. d. Using the same anchors as above, use Act V to run the voting algorithm. How can you explain Octavius’ position in Act V? e. To remedy the situation above, select two anchors for each camp, and run the voting algorithm using the text from Act V. f. Which camp is Lucius now in? Is this reasonable? g. Use a modularity algorithm to partition the network into two camps. h. Use centrality algorithm to partition the network into two camps. i. Use a spectral algorithm to partition the network into two camps. j. Use the partition distance to compare these three algorithms. 7. In Romeo and Juliet, there are three camps: the Montagues, the Capulets, and the State, represented by the Prince.

9.5 Exercises

157

a. First, according to the narrative, divide the main characters into these three opposing camps. b. Select a single anchor for each camp, and run the voting algorithm using the text from Act III, Scene 1. c. Use the voting algorithm to compute this partition. d. Use a modularity algorithm to partition the network into three camps. e. Use centrality algorithm to partition the network into three camps. f. Use a spectral algorithm to partition the network into three camps. g. Use the partition distance to compare these three algorithms. h. Use partition to explain the differences between these algorithms. 8. Dramas with four camps are less common. In Shakespeare’s Antony and Cleopatra, there are four camps: Antony’s camp, Cleopatra’s camp, Pompey’s camp, and Octavius Caesar’s camp. a. Select a single anchor for each camp, and run the voting algorithm using the text of the full play. b. Use the voting algorithm to compute this partition. c. Use a modularity algorithm to partition the network into four camps. d. Use centrality algorithm to partition the network into four camps. e. Use a spectral algorithm to partition the network into four camps. f. Use the partition distance to compare these three algorithms. g. Use partition to explain the differences between these algorithms. 9. Repeat the same computation as in Sect. 9.2.1 on the Act V of Julius Caesar, assume the quality of conflict qc to be  (9.6) qc(Π ) = πi2 Assume we have two voting matrices, Π1 and Π2 . Π1 describes a better conflict if (9.7) qc(Π1 ) > qc(Π2 )

Chapter 10

Ego Networks in Dramas

10.1 Introduction Until now, we have looked only at complete social networks of dramas. These complete networks describe all “social interactions” between all characters in dramas. We model these interactions in graphs such as the AB and AB A graphs (see Chap. 2). These social networks capture the social structure of the societies in the respective dramas. We now change gears, and zoom in on social networks of particular individual nodes or characters on the actor level in a social network. These personal networks of individual nodes are called Ego networks (see [40] for an early use of the term and concept). An Ego network contains a focal node and all nodes which are directly connected to the focal node. The edges in the Ego network are all the edges which connect all nodes belonging to the Ego network. The Ego network is a subgraph, a concept which is defined in Sect. 2.5.4. We use Ego network in our literary analysis in order to demonstrate how the idiom “show me who your friends are and I’ll tell who you are” will result in wrong decisions due to lack of a comprehensive perception of conflicts. Figure 10.1 shows that we are always an outcome of our social and biological environments. We explore one’s social environment in order to analyze individual actions. This chapter demonstrates how to combine conflict functions (see Definition 5.6) with the Ego network in order to probe into the perspectives of characters in dramas. Ego networks allow us to adopt the perspective of a particular character. Any conflict function algorithm can be used in order to accomplish this task. In this chapter, we use the voting algorithm The voting algorithm splits the graph of characters into factions, according to the narrative see Chaps. 7 and 9 and (discussed in Exercises 6), We are then able to present the ways in which the Ego sees the conflict in a social network. In this chapter, the four leaders of the two opposing camps in Julius Caesar are used as an example of this mind-reading technique.

© Springer Nature Switzerland AG 2021 Z. Lotker, Analyzing Narratives in Social Networks, https://doi.org/10.1007/978-3-030-68299-6_10

159

160

10 Ego Networks in Dramas

Fig. 10.1 This figure shows the conflict between the Ego and the Other

10.2 Related Work Ego networks are a well-established concept and the smallest social networks which have been studied. They appear in many applications of social networks. The Ego network sheds light on individuals at the actor level in the social network (see [22, 39, 86, 91, 138, 165]). There are numerous applications for Ego networks in many fields such as ethnographic kinship analysis, psychology, social psychology, etc.

10.3 Definition of Ego Networks We now define the Ego network formally. Ego Network Definition 10.1 Let G(V, E, W ) be a graph, Let u ∈ V be the Ego node. The ego network Egou (Vu , E u , Wu ) is a induced subgraph. The nodes of this graph are Vu = {v ∈ V : (v, u) ∈ E} ∪ {u}

(10.1)

The edges of the Ego network are E u = {(x, y) ∈ E : x, y ∈ Vu }

(10.2)

10.3 Definition of Ego Networks

161

Once we have identified a conflict using utility anchors (see Definition 5.1), it is illuminating to understand the position of the different anchors in relationship to the partitions/conflicts. For example, who is the most influential inside the partition; who is the most influential outside of the partition; what would happen if one of the anchors defected; etc. These questions can be answered using the Ego network of each of the anchors. The purpose of the Ego network is to describe the social interactions around the Ego node.

10.4 Ego Networks in Dramas We begin our mechanical mind-reading by combining the Ego network point-of-view and the voting algorithm (see Chap. 7). As noted, Ego networks show the way in which individuals (the Ego) see the network, or society. The voting algorithm uses narrative to split society along conflict lines. Using the example of Shakespeare’s Julius Caesar, we can split the network into the camps of the supporters of Caesar, and the conspirators against him. Those individuals on the borders of the conflict are the swing votes. Here, the Ego network and the voting algorithm are combined in order to shed light on Brutus, Cassius, Octavius, and Antony in the play. Using these tools, we can discern how these leaders see the world and the conflict. Figure 10.2 illustrates the Ego networks of the leaders of the conspirators: Brutus and Cassius. Brutus and Cassius primarily only see those within their own camp of conspirators. Brutus is able to see more supporters of Caesar than narrow-minded Cassius does; however, Brutus still sees substantially more conspirators (76%) than supporters (21%) or swing votes (3%). Cassius is a prisoner of his perception: he barely sees his enemies. Cassius sees 88% conspirators, yet only 12% supporters of Caesar (0% undecided). Moving to the Caesaran camp, Fig. 10.3 shows the Ego networks of the leaders of that camp: Octavius and Antony. The Ego network of Octavius reflects his wellknown political abilities (62% conspirators, 38% supporters). As opposed to Brutus, Cassius, and Antony, Octavius is able to see a much accurate picture of the political climate. Octavius is the only one of the four leaders who switches sides (several times). Thus, he is the only one who is able to collect enough information on each side. Antony’s Ego network is similar to Brutus’ and Cassius’, though slightly more balanced. He sees more of his own side (61% of his camp, 33% of the conspirators, and 6% undecided).

162

10 Ego Networks in Dramas

Fig. 10.2 This figure shows the Ego networks of Brutus (left) and Cassius (right). The colors of the nodes are the same as those used in the voting algorithm. Yellow nodes are supporters of Caesar, and red nodes are conspirators against Caesar. Of 34 nodes total, Brutus sees 26 red nodes, 7 yellow nodes, and 1 undecided node. Of 17 total nodes, Cassius sees 15 red, 2 yellow, and 0 undecided nodes

Fig. 10.3 This figure shows the Ego networks of Octavius (left) and Antony (right). The colors of the nodes are the same as those used in the voting algorithm. Yellow nodes are supporters of Caesar, and red nodes are conspirators against Caesar. Of 8 nodes total, Octavius sees 5 red nodes, 3 yellow nodes, and 0 undecided. Of 18 total nodes, Antony sees 6 red, 11 yellow, and 1 undecided nodes

10.5 Conclusion This chapter defined the Ego network, and showed how to combine the voting algorithm together with the Ego network in order to reveal the perspectives of the main characters of evolving social networks. Combining the voting algorithm with the Ego network allows for a deeper understanding of characters’ views of conflicts in dramas.

10.5 Conclusion

163

We demonstrate this process by probing the minds of Brutus, Cassius, Antony, and Octavius: the four leaders of the two opposing camps in Julius Caesar. We partitioned the Ego networks according to the voting algorithm. This allowed us to see that Octavius differs from the other leaders in that he is able to see his enemies more clearly than the other leaders are able to. This also points to the fact that Octavius may have more civil and military intelligence than his fellow leaders. While these findings are naturally taken through the lens of Shakespeare, we believe that this method would work in general social networks as well. This method also can explain Octavius’ success. With this chapter, the first part of the book concludes. We now move from the domain of static networks into dynamic networks. The main tools in the next part will be clocks and evolving social networks. Discrete and continuous time in social networks will both be addressed.

10.6 Exercises Definition of Ego Networks 1. Write a function in your favorite language that gets as the input a social network graph and the name of a node, and generates the Ego network of that node. 2. Imagine a world where each node knows all friends of their friends. Can you determine the graph? Can you characterize these social networks? What does the Ego network of each node look like? Ego Networks in Dramas 3. Compute the most balanced character (i.e., the character who is most neutral main character) in Romeo and Juliet using the voting algorithm and Ego network. Use three parties with the anchors of Romeo, Juliet, and the Prince. 4. Select your favorite drama, and repeat the analysis using the voting algorithm and Ego network as done in this chapter. 5. Compare the Ego networks of Brutus, Antony, Cassius, and Octavius using the Voronoi option analysis instead of the voting algorithms.

Part II

Evolution and Time in Literature Networks

Chapter 11

Introduction to Evolving Social Networks

11.1 Introduction Humans organize time through narrative [156]. If we wish to understand time, one way to do so is through narrative. In Part II of this book, we move from static social networks to dynamic and evolving networks. These evolving networks incorporate time through narrative. Akin to Barthes’ assertion that a rigid timeline in narrative restricts the analytical freedom of the reader [28, 29], Part II offers freedom for more dynamic analysis in social networks through the integration of time. We also raise the following philosophical question: how will machines tell their origin story? If humans organize time through narrative, will machines take after their creators and do so as well? A creation myth is considered by many a better origin story than evolution, as it treats the created organism as the main character. It is just as likely that they will report having walked out of the ocean after having grown legs (Fig. 11.1). How we measure time is influenced by the structure of what object is being measured. This suggests that there are multiple ways to measure time. Mathematics and physics provide us with two opposing models of time: continuous time and discrete time. Time has traditionally been conceived of as discrete in a social network. However, this book suggests that this is a matter of interpretation: time can be either discrete or continuous in a social network. This chapter explores both the discrete and continuous classifications of time in the context of social networks and performance texts. To see how time can be thought of as either discrete or continuous, consider an example from a performance text: Romeo and Juliet from Shakespeare’s Romeo and Juliet. Before the pair meet, Romeo sees Juliet, and perhaps, Juliet sees Romeo as well. Does Romeo fall in love with Juliet the moment he sees her? Or does his love for her develop with the way she moves, speaks, etc? Is it a discrete event or a continuous event? This is a matter of interpretation. For example, if we focus on the first moment of love, it is a discrete event. If we focus on the development of their love, it is a continuous process. The reader cannot see the whole picture unless they © Springer Nature Switzerland AG 2021 Z. Lotker, Analyzing Narratives in Social Networks, https://doi.org/10.1007/978-3-030-68299-6_11

167

168

11 Introduction to Evolving Social Networks

Fig. 11.1 The evolution of machines as told by CPUDarwin

look both at the first moment, and the process of their growing love. Thus, whether time is conceived of as discrete or continuous is a matter of what is more relevant to the question at hand. In this way, the evolution of social networks can be considered continuous or discrete in both time. A similar argument can be constructed in terms of space as well (i.e., does Romeo love Juliet in a continuous way or a discrete manner?). As the above example illustrates, the question of whether time is discrete or continuous hinges on interpretation, and can, in fact, be seen as irrelevant. When grappling with philosophical questions, such as trying to conclude when Romeo began loving Juliet more than himself, the margin of error in terms of whether time is treated as discrete or continuous, pales in comparison to the margin of error when analyzing such subjective, complex, and emotional questions in social networks and narrative. However, in narrative analysis, the question of whether time is treated as discrete or continuous is negligible. The difference in the magnitude of these questions means that both the discrete and continuous models could both be appropriate. Both models can be correct, yield the same result, and approximate one another simultaneously. Deciding to treat time (and space) as discrete or continuous opens up different mathematical tools to the reader. By adopting both models, we are able to enjoy a richer mathematical language, and (at times) ease the computation.

11.2 Notation Instead of spending a lifetime determining which model is more correct and in the process, confuse the reader, this chapter adopts a functional analysis approach. Functional analysis is the standard tool for decomposing mathematical objects, and is used here to decompose evolving social networks. This means that the main objects used here are functions which change over time. Evolving social networks are thus

11.2 Notation

169

evolving objects which change over time, from some set of times T to some space G of a complex object,1 such as a graph or matrix. Evolving social networks are always bounded; for simplicity, there is no question of infinity in terms of time or space in evolving social networks. Time is a complex object in literature and narrative analysis. In this book, we relate to time as the reception time of the reader. The way the reader captures time in narrative is based on the Reception theory which is a version of reader response literary theory. The Reception theory is referred to as audience reception in the analysis of communications models. Reception theory originated from the work of Hans Robert Jauss in the late 1960s (see [123]). We next move on to a brief discussion of time, followed by a brief discussion of space.

11.2.1 Modeling Time As noted, we model time in two ways: discrete and continuous. Discrete time is used to describe atomic or discrete events. These types of events cannot be split into smaller sub-events. In principle, every evolutionary structure has its own measure of time. Many important concepts in social networks can be better understood in the context of evolving social networks, which are formally defined later in this chapter. We denote discrete time as T = {t1 , . . . , tτ }. We assume that T is ordered, i.e., ti < ti+1 for all i ∈ {1, 2, . . . , τ − 1}, τ ∈ N. Continuous time is used to describe smooth and continuous change over time. Usually, differential equations are used to handle evolutionary processes in continuous time. In the domain of continuous time, the main question is what happens to an evolving social network when a small perturbation is inserted into the network? Once this question is answered, a differential system of equations can be derived, and then standard tools can be used to study the evolving social network. We denote continuous time interval as T = [τb , τe ], where τb represents the beginning of time, and τe represents the end of time. We assume that different events in social networks happen sequentially: either before one another, or after one another. Clearly, this is a simplification of time in social networks, since we do not allow for events to occur simultaneously or with overlap. This simplification is justified since narrative is built through a sequence of sentences and paragraphs, which are linearly ordered.

11.2.2 Modeling Space Since we concentrate on functions as opposed to the space itself, this chapter focuses on operators which act on evolving graphs or evolving social networks. The advantage

1

The complex object describes the relationship between a pair of a characters, and not a group of characters. Therefore, we use a network in order to describe that relationship.

170

11 Introduction to Evolving Social Networks

of this approach is that tools from standard functional analysis can then be used on social networks in general. This book focuses on the relationships between pairs of characters. Therefore, the space used should enable us to describe the characters as well as the pairs of characters. This can be achieved using either matrices or graphs. The complex space G is a space which contains either matrices or graphs. G can be the set of all graphs, the set of all multigraphs Gn , or the set of all matrices Mn,n [R] or Mn,n [{0, 1}]. Since a functional analysis approach is used, we are not interested in the particulars of which space is used to describe the network. In this chapter, a general space is denoted by G. An element g ∈ G is called a social network g ∈ G. For the sake of simplicity, some notation is abused in order to avoid confusion. We provide several examples of different sets throughout the chapter in order to make this point clearer, and exhibit to the reader that they can select their favorite model of time and space. There is a huge advantage in using general functions in order to describe evolving social networks. Using general functions allows for correlation, integration, function composition, and all other tools used for functions which have not previously be possible to use in social networks.

11.3 Related Work The study of dynamic networks has recently garnered a great deal of attention. There are many crucial problems in understanding the interplay between time and social networks. Recently, several papers have considered the dynamics of social networks [41, 141, 143, 169]. This is perhaps due to the cellular revolution, since mobile networks now take up significant portion of our lives. While the idea of evolving social networks as functions of time is not new (see [33, 62, 101, 112, 113, 158, 220]), the concept of using evolving social networks as functions of time is new. These previous works do not explicitly define the general notion of an evolving social network as a function of time. Therefore, these works do not decompose functions of time, compute the integrals of functions of time, take the derivatives of functions of time, and so on. In general, modeling dynamic networks requires some assumptions to be made about the evolution of the network over time. Perhaps, the most general case is to assume that the graph can change to another graph, without any restrictions, and is controlled by some, unlimited, all-powerful adversary. This model is usually called the evolving graph. However, when using an all-powerful adversary, usually the task of designing an efficient algorithm becomes too complex. To overcome this, several authors have suggested restricting the power of the adversary to either a Markovian evolving graph model (see [26]), or an edge-evolving Markovian graph model (see [53]). The evolution of social networks is typically studied from a stochastic pointof-view (for example, see the preferential attachment model in [78, 93]). However, studying general evolutionary social networks without assuming stochastic processes has its advantages, particularly in the context of developing algorithms, since when

11.3 Related Work

171

developing the algorithm, the algorithm should work in the general case, and not just in a specific model.

11.4 Evolving Social Networks: The Model Let n be the number of characters/nodes/individuals in a social network, and the set of all characters is denoted by V . Let g denote the relationship between a pair of nodes. This can be described in several ways: either as a matrix, a weighted matrix, a graph, or a weighted graph. Denote the set of all possible relationship between the sets of nodes to be G. In general, social networks are a function of time to space G. Formally: Evolving Social Networks Definition 11.1 Let G be a space of an social network. Let T  R be a total ordered set describing time with respect to 0 for Oedipus Rex. Use the Excel file linked to here. This supports Oedipus’ personal belief that he can outrun fate. This coincides with the Ancient Greek belief in fate. Oedipus must fulfill the prophesy and kill his father; whether he kills him as a saint or a villain is up to him. b. Verify C? (τe ) − C! (τe ) > 0 for Oedipus in Colonus. Use the Excel file linked to here. In this play, Oedipus has been burned by fate and reality. This play has some evidence of believing in freedom of choice, but much less than in Oedipus Rex. c. Verify C? (τe ) − C! (τe ) < 0 for Antigone. Use the Excel file linked to here. In this play, Antigone does not have a choice; she succumbs to fate. d. Concerning your personal life, can you identify people who speak with question marks as opposed to people who speak with exclamation marks. Ask them if they believe in freedom of choice.

Chapter 15

Real Functions

15.1 Introduction Until now, we have studied evolving social networks γ . We have defined evolving social networks as functions of real numbers to some complex space (see Definition 11.1). Frequently in graph theory, we transform a graph g into a real number F(g) ∈ R. For example, the degree dv of a specific node v ∈ V . In general, the real number F(g) can be transformed into a function by composing the two functions F and γ . Therefore, the result of the composition of these two functions is a real function. Since we are familiar with real functions, we can use our knowledge of them. This suggests that we can borrow ideas from static data structures, such as graph theory or linear algebra, and transform these static structures into dynamic structures that include an element of time. We change the static data structures into dynamic structures by converting the static objects into real functions which map time onto a number. This simple, straightforward mechanism is a potent tool. The advantage of transforming a static object into a function is that there is a “perseveration” of some intuition of the static object itself (Fig. 15.1). Our purpose here is to acclimate the reader to the transformation process through simple examples. As in Chap. 12, we again employ the first scene of Macbeth as a running example (for the text of the scene, see Appendix A).

15.2 Related Work Several papers have attempted to extend the concept of centrality into dynamic graphs (see [65, 128, 143]). These papers have all tried to extend the definition of centrality to include time. We take a different approach. A definition of centrality which moves from a static social network to an evolving social network is adopted. This approach

© Springer Nature Switzerland AG 2021 Z. Lotker, Analyzing Narratives in Social Networks, https://doi.org/10.1007/978-3-030-68299-6_15

245

246

15 Real Functions

Fig. 15.1 This figure illustrates the importance of a sequence of events. Who flies? Who falls? Does the bird fly? Does the canon ball fall? Or is it the other way around?

has several advantages over previous works. First, centrality is a well-studied and important subject in static social networks. Additionally, there are many centrality measures, for example: Katz Centrality, Eigenvector Centrality, HITS Centrality, Degree Centrality, Closeness Centrality, and Betweenness Centrality (see Sect. 2.7 and Appendix B.5.6). All of these centrality measures can be immediately adapted into functions, and thus applied to evolving social networks. Note that the concepts outlined above do not change in the process of moving from a static social network to a dynamic one. Therefore, it is not necessary to learn a new definition. Moreover, the intuition on centrality in static graphs can be transformed into dynamic graphs. Another advantage is that mathematical tools which deal with functions can be borrowed and used to analyze social networks. A different line of research concerning centrality in evolving social networks focuses on PageRank, using temporal information to improve the centrality measure (see [27, 137]).

15.3 Definitions In Chap. 11, we defined the evolving social network to be γ : T → G.

(15.1)

In graph theory, there are many functions that take a graph as an input and transform that graph into a number. Formally, F : G → R, where F is any function. We call this the graph number function.

(15.2)

15.3 Definitions

247

The degree dvi of a node vi is an example of such a function. Another example is the diameter of a graph. Essentially, much of graph theory could serve as examples of these types of functions. Now, we can compose the function γ and the function F. Formally: From Evolving Social Networks to Real Functions Definition 15.1 Let F : G → R be graph number function and γ : T → G be an evolving social network. The function Fγ : R → R

(15.3)

Fγ (t) = F(γ (t)).

(15.4)

is a real function defined by

The following diagram shows the interaction of the real functions (the dash arrow) and how they are constructed (solid arrow). T⊂R

γ

G F

F◦γ

R

15.4 Normalized Functions and Correlation In Sect. 14.6.1, we show that the correlation between two monotonic functions is always positive. Therefore, correlation is not recommended to compare clocks or any monotonic functions. Here, we use real functions and the M-diagram (see Definition 13.1) to overcome this difficulty. Correlation over the M-diagram function is, in fact, better suited to analyzing social networks. The reason is due to the fact that the M-diagram cancels any linear effects on the function. Therefore, this covers the hidden non-linear structure. We first extend the definition of normalized clocks into general normalized functions. We remind the reader that νs (t) = τe t − τb (t − 1)

(15.5)

248

15 Real Functions

as can be seen in Eq. (12.19). Additionally, note that νm (t) =

μb − t μb − μe

(15.6)

as can be seen in Eq. (12.21). Both functions are used to define normalized clocks. We use the same function to describe normalized functions. The function F is not monotonic, and therefore the domain of the normalized function is the real number and not the unit interval. Normalized Functions Definition 15.2 Let R : [τb , τe ] → R be a function. The normalized function of R is N R : [0, 1] → R,

(15.7)

N R(t) = νm (R(νs (t))).

(15.8)

which is defined by

The following diagram shows the interaction of the normalized real functions (the dash arrow) and how they are constructed (solid arrow). [τb , τe ]

R

[0,1]

R νm

νs NR

R

We can now apply normalization to our real function F(γ (t)) since it is a real function. Normalized Real Evolving Social Network Functions Definition 15.3 Let F : G → R be a graph number function and γ : T → G be an evolving social network. The function N Fγ : [0, 1] → R

(15.9)

is a normalized real evolving social network functions defined by N Fγ (t) = νm (F(γ (νs (t)))).

(15.10)

15.4 Normalized Functions and Correlation

249

The following diagram shows the interaction of the normalized real evolving social network functions (the dash arrow) and how they are constructed (solid arrow). [τb , τe ]

γ

G

F

R νm

νs N Fγ

[0,1]

R

Lemma 15.1 Let N Fγ : [0, 1] → R

(15.11)

N Fγ (0) = 0

(15.12)

N Fγ (1) = 1.

(15.13)

be a real function such that

and Proof By definition of μb , μe , it follows that μb = F(γ (τb )); μe = F(γ (τe )).

(15.14)

The lemma follows from the definition of N . Now, we define the M-diagram for a single real function R. Note we defined the M-diagram using two clocks. Here, we replace one of the clocks with a standard clock and the other with the real function. M-Diagrams of Real Functions Definition 15.4 Let R be a real function R : [τb , τe ] → R.

(15.15)

The M R -function of R is a function M R : [0, 1] → R

(15.16)

defined according to the formula below M R (t) = N R(t) − t.

(15.17)

Note that the standard clock Cs (t) = t. Since F(γ ) is a real function, we can study M F(γ ) . The advantage of working with the M F(γ ) function over the function F(γ ) is that the linear effects are canceled. Correlation works better with these functions

250

15 Real Functions

in the context of the narrative, since it better captures the narrative. By removing the linear part, we imitate the definition of variance, which removes the expectation from the variable before the second moment. However, in a narrative, the function changes over time. Therefore, it’s better to remove the expectation of the function each time. This is exactly what the M R -function accomplishes. Formally, this is defined as follows. (15.18) M N Fγ (0) = M N Fγ (1) = 0. After defining the M R -function, we can define the M-correlation between two functions. M-Correlation Definition 15.5 Let Fi : [τbi , τei ] → R be two real functions i = 1, 2. The M-correlation is ρ M(F1 , F2 ) = ρ(M F1 , M F2 ).

(15.19)

In many cases, the M-correlation function will capture the narrative better than the correlation does. It allows for negative values as well as positive (see Fig. 15.7, Eq. 15.32, and Exercise 4). The next lemma explains when it is preferable to use M-correlation. Lemma 15.2 Let F1 : [τb , τe ] → R be a real function. Let a, b ∈ R assume that a = 0. Let (15.20) F2 (t) = a F1 (t) + b. ρ(M F1 , M F2 ) = 1.

(15.21)

Proof Note that the codomain of the function F1 is the same as the function F2 . Therefore, the function μs is the same for both normalization functions. Since a = 0, it follows that, for all t ∈ [0, 1], M F1 (t) = M F2 (t).

(15.22)

Since the two function are equal, it follows that ρ(M F1 , M F2 ) = 1.

(15.23)

Following from the above lemma, two functions that are linearly dependent on one another are the same when considering the M-correlation.

15.5 Example: Degree Centrality

251

15.5 Example: Degree Centrality Now that we have outlined theory and definitions, we move to concrete examples. Degree centrality was selected as an example since it is an important centrality measure, it is universal (meaning that it is defined in all models), and it is simple. In Chap. 2, we defined both degree of a node and degree centrality (see Definition 2.13). In the spirit of this chapter, we now incorporate time into these definitions and define degree functions and degree centrality functions. The addition of the term “function” is used to emphasize that these are a function of time. Assume that we are given an evolving system, i.e., γ : T → G.

(15.24)

Let g ∈ G. The degree of a node v ∈ V was defined in Definition 2.2 as a function from the set of nodes to the real numbers. The first step in defining the degree function is to change the codomain of the degree to work on all graphs in G. Formally, let the degree of the node v be (15.25) dv : G → R. In the same way, we assume that the degree centrality of the node v was defined as in Definition 2.13. (15.26) χv : G → R. It is now easy to define degree functions and degree centrality functions in the evolving system as follows. Degree Functions and Degree Centrality Functions Definition 15.6 The degree functions are dv (t) = dv (γ (t)),

(15.27)

and the degree centrality functions are χv (t) = χv (γ (t)).

(15.28)

The following diagram provides an example to understand the composition of the functions in the case of degree centrality. The dotted line shows the degree centrality function as defined by the composition of two functions, χv and γ .

252

15 Real Functions

T

γ

G χv

χv ◦γ

R Note when a new node arrives, the evolving centrality may not seem to be welldefined. However, since the centrality concept is usually well-defined on all graphs, there is no problem in the definition at the time of arrival of the node or after. Note that if the centrality χ is not defined on all graphs, then the evolving centrality is not always defined. If this is the case, the best way to overcome this problem is to remove the evolving social networks from those graphs for which the χ centrality is not well-defined.

15.6 Degree Centrality in Dramas We use our running example of the first scene of Macbeth to compute the degree centrality function. We now demonstrate degree centrality in both discrete and continuous time (see Chap. 12 for definitions of discrete and continuous time). We use directed weighted graphs here. The evolving network or matrix which is used is irrelevant. This is due to the fact that degree centrality is well-defined both on graphs and matrices, and the definitions coincide. The only question left unanswered is whether the time is discrete or continuous. In the previous section, degree centrality was defined in a very broad way. We assume that there is some general space where the degree centrality function is defined. This assumption frees us from the question of how degree centrality is computed. This allows us to have a compact definition of degree centrality without any question of implementation. However, we are left with a question of how the degree centrality is computed. The next two sections close this gap for discrete and continuous time, respectively.

15.7 Normalized Degree Centrality in Discrete Time The Macbeth example in discrete time can be seen in Figs. 11.2 (graph structure) and 11.4 (matrix structure). The out-degree centrality (see Definition 2.13, where the function μ is used to compute the degree, and we consider only nodes that are out-going from node v ∈ V ) in this example is computed in two steps. The first step is to compute the degree centrality matrix, by dividing the adjacency matrix by the time of the evolution. The result of this process can be seen in the second column of Fig. 15.2. The next step is to accumulate the relevant elements in

15.7 Normalized Degree Centrality in Discrete Time

253

Fig. 15.2 This figure summarizes the calculation of normalized evolving degree centrality in the evolving social network of the first scene of Macbeth. The first column shows time, the second column shows the evolving degree centrality matrix, the third column shows the in-degree centrality vector, the fourth column shows the out-degree centrality, and the fifth column shows the total degree centrality

254

15 Real Functions

Fig. 15.3 This figure represents the normalized out-degree centrality where time is discrete for the three main characters in the first scene of Macbeth. Blue represents the out-degree centrality for the First Witch, orange represents the out-degree centrality for the Second Witch, and green represents the out-degree centrality for the Third Witch

the matrix. The result can be seen in the third, fourth, and fifth columns of Fig. 15.2 for various degrees. This can be also be generated as a function. For example, see Fig. 15.3, which uses the running Macbeth example to show the out-degree centrality of the Three Witches. In all of these examples, time is assumed to be discrete. In the next paragraph, we will move to continuous time.

15.8 Normalized Degree Centrality in Continuous Time The Macbeth example in continuous time can be seen in Eq. (15.29) (evolving social matrix) and (Fig. 11.4) (the kernel of that evolution) (see Sect. 11.8.2 for a discussion of kernels for discrete and continuous time). Again, the normalized out-degree centrality in this example is computed in two steps. The first step is to compute the normalized adjacency matrix by dividing the adjacency matrix by the total sum of all the elements in the matrix, which is equivalent to the number of edges. According to the definition of degree centrality, the result of this process can be seen in the degree centrality matrix in the second column of Fig. 15.2. The next step is to accumulate the relevant elements in the matrix. The result can be seen in Fig. 15.4. The χ according to time for the first scene of Macbeth is shown below.

15.8 Normalized Degree Centrality in Continuous Time

⎞ ⎧⎛ 0 8t 0 ⎪  ⎪ ⎪ ⎜ ⎟ t ⎪ ⎪ / 8d x 0 < t ≤ 18 0 0 0 ⎝ ⎠ ⎪ 0 ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎛ 0 0 0 ⎞ ⎪ ⎪ ⎪ 01 0 ⎪  ⎪

t ⎟  ⎪ ⎜ 1 ⎪ < t ≤ 41 ⎪ ⎝ 0 0 8 t − 18 ⎠ / 1 + 1/8 8d x ⎪ 8 ⎪ ⎪ ⎪ 00 0 ⎪ ⎪ ⎛ ⎞ ⎪ ⎪ ⎪ 0 1 0 ⎪  ⎪

t ⎪ ⎜ ⎟ 1 ⎪ ⎪ 8d x < t ≤ 38 / 2 + 0 0 1 ⎝ ⎠ ⎪ 2/8 4 ⎪   ⎪ ⎪ ⎪ 8 t − 41 0 0 ⎪ ⎛ ⎞ ⎪   ⎪ ⎪ 0 8 t − 38 + 1 0 ⎪  ⎪

t ⎪ ⎜ ⎟ ⎪ 3 ⎪ 8d x < t ≤ 21 / 3 + 0 0 1 ⎝ ⎠ ⎪ 3/8 8 ⎪ ⎪ ⎨ 1 0 0 ⎞ χ (t) = ⎛ ⎪ 0 2 0 ⎪  ⎪

t   ⎪ ⎜ ⎟ 1 ⎪ ⎪ < t ≤ 58 0 0 8 t − 21 + 1 ⎠ / 4 + 4/8 8d x ⎝ ⎪ 2 ⎪ ⎪ ⎪ 10 0 ⎪ ⎪ ⎛ ⎞ ⎪ ⎪ ⎪ 0 20 ⎪  ⎪

t ⎪ ⎜ ⎟ ⎪ 5 ⎪ / 5 + 8d x < t ≤ 43 0 0 2 ⎝ ⎠ ⎪ 5/8 8 ⎪   ⎪ ⎪ ⎪ 8 t − 58 + 1 0 0 ⎪ ⎪ ⎛ ⎞   ⎪ ⎪ ⎪ 0 8 t − 34 + 2 0 ⎪  ⎪

t ⎪ ⎜ ⎟ 3 ⎪ < t ≤ 78 0 2 ⎠ / 6 + 6/8 8d x ⎪ ⎝0 ⎪ 4 ⎪ ⎪ ⎪ 2 0 0 ⎪ ⎪ ⎛ ⎞ ⎪ ⎪ ⎪ 0 3 0 ⎪  ⎪

t   ⎪ ⎜ ⎟ 7 ⎪ 7 ⎪ 8d x < t ≤ 1. / 7 + + 2 0 0 8 t − ⎝ ⎠ ⎪ 7/8 8 8 ⎪ ⎩ 20 0

255

(15.29)

Figure 15.4 shows the normalized degree centrality function of time for the Three Witches in the first scene of Macbeth. We now can compute the degree centrality matrix function for the Three Witches (Fig. 15.5).

Mχ1,2 ,Ce

⎧ ⎧ −t 0 < t ≤ 18 −t 0 ≤ t ≤ 18 ⎪ ⎪ ⎪ ⎪ 2  ⎪ t 2 −1.6t+0.2 ⎪ ⎪ ⎪ t −8/3t+1/3 ⎪ ⎪ 1 1 3 1 ⎪ ⎪ − < t ≤ − ⎪  ⎪ t 8 8 t 8