tripleC 9(2): 502-509, 2011
ISSN 1726-670X
http://www.triple-c.at
CC: Creative Commons License, 2011.
Evolving Lattices for Analyzing Behavioral Dynamics of
Characters in Literary Text
Eugene S. Kitamura*, Yukio-Pegio Gunji**
*
kitamura@stu.kobe-u.ac.jp, Department of Earth and Planetary Sciences, Graduate School of Science,
Kobe University, Kobe, Japan
**
yukio@kobe-u.ac.jp Department of Earth and Planetary Sciences, Faculty of Science, Kobe University,
Japan
Abstract: This paper is about an application of rough set derived lattices in order to analyze the dynamics of literary text.
Due to the double approximation nature of rough set theory, a pseudo-closure obtained from two different equivalence
relations allows us to form arbitrary lattices. Moreover, such double approximations with different equivalence relations
permit us to obtain lattice fixed points based on two interpretations. The two interpretations used for literary text analysis are
subjects and their attributes. The attributes chosen for this application are verbs. The progression of a story is defined by the
sequence of verbs (or event occurrences). By fixing a window size and sliding the window down the story steps, we obtain a
lattice representing the relationship between subjects and their attributes within that window frame. The resulting lattice
provides information such as complementarity (lattice complement existence rate) and distributivity (lattice complement
possession rate). These measurements depend on the overlap and the lack of overlap among the attributes of characters.
As the story develops and new character and attributes are provided as the source of lattices, one can observe its evolution.
In fact, a dramatic change in the behavior dynamics in a scene is reflected in the particular shifts in the character-attribute
relationship. This method lets us quantify the developments of character behavioral dynamics in a story.
Keywords: Literary text analysis, rough set theory, lattice theory, double indiscernibility, character dynamics, knowledge
management.
1. Introduction
Mathematical characterization or analysis of literary text and theater was active around the 1970’s,
Poetica matematica by Solomon Marcus (1970) having a considerable influence. Many mathemati-
cal methods were applied to text, such as finite-state automata for plot structure analysis (Kahn,
1973), game theory for capturing character relations (Steriadi-Bogdan, 1977; Dinu, 1977), combi-
natorics for dynamics of characters in drama (Mihnea, 1977), etc. Although successful in quantify-
ing literary characteristics, these methods typically provided information per theatrical scene seg-
ment. Additionally, the analysis may depend on subjective categorization of situations or character
intents/motives based on semantic interpretations.
Here we present a method that measures the dynamics of a character’s actions with respect to
the other characters within a scene as the plot unfolds, based on objective information in the dra-
ma. Our method relies on subject-action relation of characters in a literary text. These two groups
or equivalence classes, the characters and their actions, are used to construct Boolean as well as
non-Boolean lattices that correspond to the occurrences of events in the story. Complementarity
and distributivity were used to numerically measure these adaptable lattices.
The lattices use fixed points drawn from the information of two equivalence classes as their ele-
ments (Gunji and Haruna, 2010). Rough set theory (Pawlak, 1981; Pawlak, 1982) is used to proc-
ess the relation between the two equivalence classes and lattices are constructed based on the
inclusion relation of the fixed point elements (Birkhoff, 1967; Davey, 2002). This allows us to obtain
arbitrary lattices, where the relationship between the two equivalence classes may be represented
quantitatively. We chose subjects (characters) and their verb attributes as the two equivalence
tripleC 9(2): 502-509, 2011 403
CC: Creative Commons License, 2011.
classes and applied this method to analyzing literary text. A general application of this method and
a careful explanation of the mathematical methods is made in Kitamura and Gunji (accepted).
2. Methods and Procedures
2.1. Rough Set Theory to Lattice Theory
Rough set is an approximation method to estimate a target by its upper approximation R
*
(X)={x∈
U|[x]
R
∩X≠φ} and lower approximation R
*
(X)={x∈U|[x]
R
⊆X}, where X is the target set, U is a
universal set, x is an element in U, and [x]
R
={y∈U|xRy} is an equivalence class with R being the
equivalence relation between the elements x and y. The elements in a set are assumed to be indis-
tinguishable.
A Galois connection is known to construct a complete lattice in a theory of partially ordered sets.
We get a Galois connection when a pair of maps (F, G) with F:P Q and G:QP is formed, where
P and Q are two partially ordered sets. Thus, F(x)≦y⇔x≦G(y) for any x∈P and y∈Q. Then a
closure operator C:=FG:PP can be constructed from a Galois connection such that, for any x, y∈
P, (i) x≦C(x); (ii) x≦y⇒C(x)≦C(y); (iii) CC(x)=C(x). This results in a complete lattice L
T
={x∈
P|C(x)=x}.
In terms of rough set, a Galois connection is formed with R
*
:P(U) P(U) and R
*
:P(U) P(U),
where P(U) is the power set of U. For any X, Y⊆U, R
*
(X)≦Y⇔X≦R
*
(Y). When C=R
*
R
*
is defined
as a closure operator, this also results in a complete lattice L
C
={X∈U|C(X)=X}.
If, on the other hand, two unrelated binary relations R and S are applied to a universal set U, a
pair of operations S
*
and R
*
(or S
*
and R
*
) do not form a Galois connection. When there is an op-
erator T=R
*
S
*
, T is not a closure operator but is called a pseudo-closure operator, since it satisfies
only (ii) X⊆Y⇒ T(X)⊆T(Y) and (iii) TT(X)=T(X) for X, Y⊆U. Unlike the previous closure operators,
the lattice constructed with fixed points satisfying L
T
= {X∈U|T(X)=X} with pseudo-closure is not a
set lattice. This means that any arbitrary lattice can be constructed with L
T
by choosing the right
equivalence relations S and R.
2.2. Rough Set Derived Lattices
In a lattice <L
T
; ⊆> with L
T
={X⊆U|T(X)=X} and T= R
*
S
*
, an element of L
T
is a subset of the univer-
sal set, and order is defined by inclusion ⊆. In general, L
T
≠P(U), thus join and meet are defined by
X∧Y=T(X∩Y), X∨Y= T(X∪Y) for any X, Y∈L
T
. Only if all subsets of U are collected, L
T
forms a
power set which is a set lattice, where join and meet are defined by union ∪ and intersection ∩.
For example, when a lattice is constructed of fixed points R
*
(R
*
(X))=X from one equivalence rela-
tion R, we only get a set lattice.
A set lattice has two important properties in lattice theory such as complementarity (for any X⊆
U, there exists Y⊆U such that X∨Y=U, X∧Y=φ) and distributivity (A∧(B∨C)= (A∧B)∨(A∧C)
for A, B, C⊆U). In a lattice L
T
, U and φ are the greatest and the least elements. Lattices with both
complemental and distributive property are called Boolean lattices.
When a lattice is constructed of fixed points R
*
(S
*
(X))=X with two equivalence relations R and S,
the resulting lattice can also be a non-Boolean lattice as well as a Boolean lattice. This is a result of
two equivalence classes fully or partially overlapping each other.
The difference between a lattice of L
C
= {X⊆U|C(X)=X} and L
T
={X⊆U|T(X)=X} with C=R
*
R
*
,
T=R
*
S
*
is illustrated in Figure 1. In the case of L
C
, when we denote W= {[a]
R
, [b]
R
, [d]
R
}={{a}, {b, c},
{d, e}}, L
C
=
P
(W), where all possible combinations of equivalence class of R are obtained (Figure 1
(a)). By contrast, in L
T
, although elements of L
T
are possible unions of equivalence class R, some
elements are missing (Figure 1 (b)). For example, let X={a, b, c} in interpretation R. Then R
*
S
*
({a,
b, c})=R
*
([a]
S
∪[c]
S
)= R
*
({a, b, c, d})= [a]
R
∪[b]
R
={a, b, c}. Thus {a, b, c} is an element of L
T
. On the
other hand, let X={a, b, e} in interpretation R. Since R
*
S
*
({a, d, e})=R
*
([a]
S
∪[c]
S
∪[e]
S
)=R
*
(U)=U≠
404 Eugene S. Kitamura & Yukio-Pegio Gunji
CC: Creative Commons License, 2011.
{a, d, e}, hence {a, d, e} is missing in L
T
. Due to the loss of information, an obtained lattice can be
constructed as a non-Boolean lattice. The lattice construction procedure is explained in more detail
in the following section.
(a)
(b)
Figure 1: (a) A lattice created from one equivalence relation. It results only in Boolean lattices. (b) A
lattice created from two equivalence relations. It results in Boolean as well as non-Boolean lattices.
a
b
c
d
e
{a}
{b, c}
φ
{a, b, c}
{b, c, d, e}
{a, b, c, d, e}
{a,
d, e}
R
*
(R
*
(X))=X
Interpretation R
only
R
*
(S
*
(X))=X
φ
{a, b, c}
{d, e}
{a, b, c, d, e}
{a}
Interpretation R
Interpretation S
a
b
c
d
e
e
a
b
c
d
a
b
c
d
e
tripleC 9(2): 502-509, 2011 405
CC: Creative Commons License, 2011.
2.3. Example for Constructing Rough Set Derived Lattice
To construct a rough set derived lattice from two equivalence relations, we need two criteria or
interpretations, R and S. Each fixed point X considered is an equivalence class, for example {a} or
{b, c} or {d, e} in Figure 1 (b) for the interpretation R. Treating each equivalence class as a unit, we
consider its power set: φ, {a}, {b, c}, {d, e}, {a, b, c}, {b, c, d, e}, {a, d, e}, and U={a, b, c, d, e}.
Each equivalence class and its power set composition are used as an X, and operators S
*
and R
*
are applied in this order. When applying S
*
to the X of the interpretation group R, one must take the
upper approximation of X in terms of interpretation S. For example, take {a} of interpretation R and
apply S
*
. We get S
*
(X)= {a, b}. Next, apply R
*
to S
*
(X). R
*
({a, b}) is {a} in interpretation R, since
only the equivalence class {a} is included completely within the elements {a, b}. We started with
X={a} and we get R
*
S
*
(X)={a}. Therefore, the equivalence class {a} is considered a fixed point. As
another example, if we take {b, c} in terms of interpretation R and follow the same procedure, we
get R
*
S
*
(X)={a, b, c}. Therefore, the equivalence class {b, c} is not a fixed point. Repeat this proc-
ess for all element sets in the power set, from φ to U. The empty set φ and the universal set U will
always be a fixed point. Then collect the fixed points and use them as elements to build a lattice
based on their inclusion relationship, with the universal set at the top and the empty set φ at the
bottom.
2.4. Relation Table for Organizing the Equivalence Relation
The relationship between the two equivalence relations R and S are organized in a relation table
shown in Table 1 (a) and (b). Such tables are helpful in identifying fixed points for rough set derived
lattices. The example shown here uses the two equivalence relations R and S in Fig. 1 (b). Table 1
(a) shows the relationship between the elements of the equivalence relations R and S. The 1’s
denote the presence of a relationship and the 0’s denote the lack of a relationship. Table 1 (b)
shows a simplified version from Table 1 (a) by uniting repetitive rows and columns. Here, the sim-
plification happens to result in a grouping of the equivalence classes.
(a)
(b)
S
a
b
c
d
e
a
1
1
0
0
0
b
1
1
1
1
0
c
1
1
1
1
0
d
0
0
1
1
1
R
e
0
0
1
1
1
406 Eugene S. Kitamura & Yukio-Pegio Gunji
CC: Creative Commons License, 2011.
S
{a, b}
{c, d}
{e}
{a}
1
0
0
{b, c}
1
1
0
R
{d, e}
0
1
1
Table 1: (a) A relation table showing the relations between R and S according to the elements. (b)
A simplified version of (a). Unifying repetitive rows or columns gives the same results.
2.5. Application of Rough Set Derived Lattices onto Text Analysis
We used the modern translation of Romeo and Juliet by Shakespeare (Yates-Glandorf (Ed.),
(1985)), Act 1, Scene 1. The subjects used were the drama characters. The attributes used were
the verbs explicitly written as a narration and the lines by each character (the act of speak). Other
actions implied in the conversations but not explicitly stated as a narration were not used to mini-
mize subjective interpretations of the text. This reduced the attributes down to enter, speak, strike
down their swords, fight, stay, pause, and exit. The ending of the action fight was chosen to be at
the arrival (enter) of the prince, before the prince started speaking. The attribute pause by Romeo
in the modern translation acknowledges the verbal zero-signs (Teodorescu-Brinzeu, 1984). Addi-
tionally, the attribute “no reference” was used to label subjects that were present on stage but were
not assigned actions within the considered window size explained below. To simplify the informa-
tion processing, repeated conversations between the same characters (for example, conversations
between Sampson and Gregory in the opening and between Benvolio and Romeo toward the end-
ing of Scene 1) were abbreviated. This reduced the number of actions in the story (performed lines
and narrations) from about 110 lines to about 80 lines.
For our analysis we took a span of 16 action lines or steps for the source window and incre-
mented this fixed window size downward step by step. The window span of 16 steps was chosen to
roughly include more than three subjects and three attributes in order to obtain an informative lat-
tice. The results obtained from the first 15 steps and the last 15 steps will not be a candidate for
consideration due to the incremental increase and decrease in the window size (from size 1 to 15
or 15 to 1) from step 1 to 15 and step 62 to 77 in Figure 2.
The types of resulting lattices were quantitatively measured by their complementarity and dis-
tributivity. Complementarity is the complement existence rate. It is the ratio between the number of
elements with complements and the number of all elements in a lattice. If there are elements with-
out complements, the complementarity will be less than 1. Distributivity is the complement posses-
sion rate. It is the ratio between the total number of complements and the number of elements with
complements. If there are elements with multiple complements such as N
5
or M
3
, the distributivity
will be greater than 1.
3. Results
We obtained a time evolution of lattices as the story progressed (Figure 2). The complementarity
and distributivity were plotted as the number of story steps advanced from 1 to 77. Along with the
complementarity and distributivity, the number of characters and attributes (verbs) in the lattices
were also plotted, as well as the appearance duration of each character.
tripleC 9(2): 502-509, 2011 407
CC: Creative Commons License, 2011.
Figure 2: A plot of complementarity, distributivity, the number of characters and attributes in lattice,
and the appearance duration of characters on stage.
The most notable feature of the graph is the sharp jump of the distributivity that coincides with the
“All leave except Montague, Lady Montague, and Benvolio” at story step 41. The distributivity in-
creases from 1.33 to 3.38. Another notable feature is the recurring minor dips in the complementar-
ity. Most of these dips correspond to the entry of characters on stage (story step 25, 30, 32, 36,
39).
From step 17 to 22 and at step 56 the value of C and D are both 1.0. This is the case when the
lattices are Boolean lattices.
The number of characters and attributes in lattices drags longer than the actual presence of
characters on stage. This is due to the length of window size (16), where a character or its attribute
would not exit the lattice unless the window passes over their attributes. Therefore the presence of
characters and attributes in lattices would be prolonged compared to their actual appearances.
4. Discussion
There is a great contrast in the distributivity between step 40 and 41 as mentioned earlier. Until
Prince Escalus arrives at step 39, into a scene of a gradually escalated fight, the attributes used to
construct the lattices were enter, speak, and fight. After the prince ‘spoke’ his words, two more
attributes are added at step 41, leave (or exit) and stay. The resulting lattices drastically change,
raising the distributivity value. The change is due to the shift in common and non-common attribute
patterns of the characters. Until step 40, the attribute overlap and differences tend to be clustered
(Table 2 (a)). However, the attributes leave and stay induces cavities in the clusters, disrupting its
uniform structure (Table 2 (b)). Granted, one may argue that the rise in distributivity is due to the
mutually exclusive attributes of leave and stay, which is a result of faithfully extracting the literal
information written in the script. We have confirmed that even if we exclude the attribute stay,
which is seemingly redundant since Montague, Lady Montague, and Benvolio are already on stage
and continue to remain there, the distributivity still resulted to be the highest value in the graph
(D=2.60).
408 Eugene S. Kitamura & Yukio-Pegio Gunji
CC: Creative Commons License, 2011.
Even though lattices are constructed based on information of subjects and their attributes, gen-
erally there is not necessarily a direct correspondence between the resulting lattices and the
number of characters and attributes. It is the similarity and dissimilarity of relationships among the
attributes of characters that determine the resulting lattices. At step 41, although the attribute de-
creases one unit and increases two units and the number of characters rises steadily between
story steps 18 to 39, the distributivity does not change in a like manner. It is the shift in the
commonality and differences in the attributes that affected the outcome of lattices. The distributivity
in Figure 2 may suggest that the author had prepared a dramatic scene by increasing the number
of characters and when the potential for tension is at its highest, the attribute relations are shifted to
release the tension. As the window of consideration shifts and old attributes exit the window, the
distributivity value eventually returns to where it used to be.
(a)
(b)
Table 2: (a) A relation table at step 40. (b) A relation table at step 41. (Abbreviations are
S=Sampson, G=Gregory, A=Abraham, Bl=Balthasar, Bn= Benvolio, T= Tybalt, O=officers & citi-
zens, C=Capulet, LC=Lady Capulet, M=Montague, LM=Lady Montague, Pr=Prince Escalus,
Pf=Prince’s followers.)
As far as the minor dips in the complementarity values are concerned, most of them are due to the
appearance of new characters. Newly appearing characters typically provide only the attribute en-
ter. This attribute usually already existed in the relation table. Consequently a new character would
be included in the attributes of another character. Therefore, the new character would not have a
complement of its own, reducing the value of complementarity. Generally, complementarity de-
creases when there is a character whose attributes completely include the attributes of other char-
acters (Table 2 (a)).
Actions
enter
speak
fight
S, G, A, Bl
0
0
1
Benvolio
0
1
1
Tybalt
1
1
1
O, C, LC, M,
LM, Pr
1
1
0
Subjects
Pf
1
0
0
Actions
enter
speak
fight
leave
stay
S, G, A, Bl
0
0
1
1
0
Bn
0
1
1
0
1
T
0
1
1
1
0
O, C, LC, Pr
1
1
0
1
0
M, LM
1
1
0
0
1
Subjects
Pf
1
0
0
1
0
tripleC 9(2): 502-509, 2011 409
CC: Creative Commons License, 2011.
5. Conclusion
We have used a rough set derived lattice to represent the logical relationship between two equiva-
lence classes. This tool was applied to literary text to capture the relations between the characters
and their actions as the story progressed. The transition of the complementarity and distributivity of
the resulting lattices reveals particular shifts in the relations of the attributes (actions) of the charac-
ters, also seen in the relation tables. Such shifts of characters’ attributes may be suggestive of a
writer’s technique for assigning character attributes to manage the suspense levels and drama of
the stories. This method can be useful in gauging the complexity in the subject-activity as a story
progresses.
References
Birkhoff, G. (1967). Lattice Theory. Coll. Publ., XXV, Providence, American Mathematical Society.
Davey, B.A. & Priestley, H.A. (2002). Introduction to Lattice and Order (2nd ed.). Cambridge: Cambridge University Press.
Dinu, M. (1977). How to Estimate the Weight of Stage Relations. Poetics, 6(3-4), 209-227.
Gunji, Y.-P. & Haruna, T. (2010). A Non-Boolean Lattice Derived by Double Indiscernibility. Transactions on Rough Sets XII,
LNCS, 6190, 211-225.
Kahn, E. (1973). Finite-State Models of Plot Complexity. Poetics, 3(1), 5-20.
Kitamura, E.S. & Gunji, Y.-P. (accepted). Figure-Ground Symmetry Analysis of Characters in Literature, SYMMETRY: Cul-
ture and Science, Thematic Issue on Symmetry in Literature.
Marcus, S. (1970). Poetica matematica. Bucurcsti: Editura Academiei R.S.R.
Mihnea, T. (1977). Combinatorics and dynamics of characters in drama. Poetics, 6(3-4), 229-254.
Pawlak, Z. (1981). Information systems-theoretical foundations. Information Systems, 6, 205-218.
Pawlak, Z. (1982). Rough Sets. International Journal of Computer and Information Science, (11), 341-356.
Steriadi-Bogdan, M. (1977). The Evolution of the Plot and Problems of Strategy in a Detective Play. Poetics, 6(3-4), 375-382.
Yates-Glandorf, J. B. (Ed.) (1985). Shakespeare’s Romeo and Juliet. In the Original and Modern English. A Parallel Text
Edition. Logan: Perfection Learning Corporation.
Teodorescu-Brinzeu, P. (1984). The Verbal Zero-Sign in Theater. Poetics 13(1-2), 47-56.
About the Authors
Eugene S. Kitamura
holds a B.Sc. in Physics from James Madison University, U.S.A.. He is currently a doctoral student in the Nonlinear Science
Research Group at the Earth and Planetary Science Department of Kobe University, Japan.
Yukio-Pegio Gunji
is a professor in the Nonlinear Science Research Group at the Earth and Planetary Science Department of Kobe University,
Japan.