Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

02287 - Epistemic logic for Social Networks s204160, s204123, s202192, s165495

FINAL PAPER: LOGIC OF SOCIAL NETWORKS

Rune Nedergaard (s202192), Klaus Jupiter (s204123), Andreas Holme (s204160), Ole Martin Sørensen (s165495)

1 Introduction g : ANom Ñ A. The models in the langauge are Kripke struc-


turs M “ xW, A, k, f, V y
This paper provides an introduction to the language of dynamic
epistemic friendship logic (DEFL) based on the research paper:
Where V : Prop Ñ W ˆ A gives the set of state-agent pairs,
"Facebook and the epistemic logic of friendship[1]. The aim is
where some ρ P Prop holds.
to present DEFL in such a way that the only prerequisites are
knowledge of epistemic logic and propositional logical, which
is what any student who has followed the DTU course 02287 - k is the standard equivalence knowledge relation, where ka , a P
’Logical Theories About Uncertainty and Learning" is expected A represents agent a1 s uncertainty.
to know. To this end, we introduce epistemic friendship logic
(EFL) and the essentials of propositional dynamic logic (PDL)
and general dynamic dynamic logic (GDDL), and in doing this fw represents the friendship between agents given a specific w P
we also touch on selected aspects of modal- and hybrid logic. All W and is a symmetric and irreflexive relation, f is the collection
of this constitutes to DEFL. For each type of logic, we introduce of relations fw where there is one for each world.
the formal notation for the new aspects of it along with informal
interpretations and concrete examples of these.
We will mostly be concerned with named models, which are
GDDL operators provide ways to change a model from its initial models, where g is a surjective function - i.e. all agents are as-
state and thus making the language dynamic. We use GDDL- signed a name. However, we assume bijectivity in all examples,
operators to model public, semi-private and private social an- unless stated otherwise.
nouncements and questions which changes the knowledge of the
agents. Subsequently, we go on to use them for friendship rela-
tions and what holds true in a given state. While it is a topic that The semantics of the language is
is covered in the article [1], we do not consider how DEFL can
model common knowledge, because it is something that (with
M, w, a |ù ρ iff. pw, aq P V pρq where ρ P Prob
some variation) is already covered in epistemic logic.
M, w, a |ù n iff. gpnq “ a for n P ANom
Finally, in the concluding remarks we provide an overview of M, w, a |ù ␣ϕ iff. M, w, a ­|ù ϕ
the interdependencies of the different types of logic and suggest
M, w, a |ù pϕ ^ ψq iff. M, w, a |ù ϕ and M, w, a |ù ψ
a potential avenue for future research on DEFL inspired by the
classic work on "The Game of Life" CITE. M, w, a |ù Kϕ iff. M, v, a |ù ϕ @v P W : xw, vy P ka pwq
M, w, a |ù F ϕ iff. M, w, b |ù ϕ @b P A : xa, by P fw paq
M, w, a |ù Aϕ iff. M, v, b |ù ϕ @b P A
2 Epistemic friendship logic (EFL)
Epistemic friendship logic is an expansion on standard epis-
temic logic with some differences in terms of how index- In order to easier refer to agents we define the following abbre-
ing/referencing is handled. viations

The language looks like so:


@n ϕ “ Apn Ñ ϕq
„ ȷ
ł n
ϕ ::“ ρ | n | ␣ϕ | pϕ ^ ϕq | Kϕ | F ϕ | Aϕ Ó n ϕ :“ pm ^ ϕ q
m
mPANom

K, F and A are model operators which describe knowledge, The @ operator makes the following formula refer to agent
friendship and every agent respectively. Notice that the knowl- g ´1 pnq, so if ”Alice” “ n, ϕ “ I like cake, then @n ϕ = "Alice
edge operator doesn’t take an index i as in standard epistemic likes cake".
logic, where we would have Ki ϕ mean "Agent i knows ϕ".
This is because EFL is inspired by hybrid logic in the sense
that formulas ϕ are valuated given a specific world w P W The binder Ó makes it possible to refer to one self in a formula
and agent a P A. The motivation for doing this is partially where other agents were previously talked about.„ ȷ Ó nϕ can be
found in the types of propositions the langauge deals with, n
read "If I were n then ϕ". In the definition ϕ is the result of
namely ρ P Prop “ indexical propositions such as "I like m
cake" and n P ANom which is an indexical proposition, substituting all occurrences of n in ϕ with m. It might not be ob-
read "I am n", and has it’s semantics built around a function vious that this is what the logic on the rhs of the definition states,

1 af 8
02287 - Epistemic logic for Social Networks s204160, s204123, s202192, s165495

but consider that the only part which will be true and about n will
only be true, when for M, w, a then gpnq “ a. Every other for-
mula in the sequence of logical ors will not mention n at all. This AppxF yn ^ @n Kϕq Ñ K@n Kϕq
gives us a notion of me, since we will only be truthfully speak-
ing about me{n when we are actually looking at the agent who For agent a the antecedent is false, since a isn’t friends with c in
is named n. any world, and thus the implication holds for a.

Something interesting to note is the information sharing between For agent b the antecedent is true, since b is friends with c and c
friends as a consequence of knowledge operator K and friend- knows they like cake (for both world w0 , w1 ). The consequent
ship operator F in unison. Namely, we have is also true, since in every world b considers possible c knows ϕ.
Thus b knows what a knows without it being "explicitly" stated
anywhere that this should be the case.
AppxF yn ^ @n Kϕq Ñ K@n Kϕq

is valid. The formula xF y “ ␣F ␣ and reads "I have a friend 3 PDL


who", similarily xKy “ ␣K␣, xAy “ ␣A␣ and read "It is epis-
temically possible for me" and "There is someone who" respec- The language described so far is static. However, social net-
tively. Thus, the formula reads "For everyone who is friends with works are not static, since the interactions of people changes the
n and n knows ϕ, then they know that n knows ϕ". This might (model) epistemic certainty of agents as a well as the structure
not seem like much, but as we will later see, this fact gives pri- (social relations etc.). To incorporate dynamic interactions, we
vacy complications when it comes to privately messaging other add General dynamic dynamic logic (GDDL) to our language,
agents. which results in a language called dynamic epistemic friendship
logic (DEFL). GDDL is an expansion of Propositional dynamic
logic (PDL). For this reason, we begin by introducing PDL as a
To provide an intuition for why this holds, consider the example stepping stone towards GDDL.

3.1 Propotional dynamic logic


PDL is a language which mainly deals with representing and rea-
soning about programs, which are queries with a general struc-
ture but dynamic results. PDL consists of: F which consists of
the possible atomic propositional formulas and T which consists
of the possible atomic programs both also consist of schematics
for creating more complex formulas/programs. F and T are de-
fined as:

F φ :“ ρ | n | ␣φ | pφ ^ φq | xπyφ
Fig. 1: Example of a Model in EFL T π :“ K | F | A | φ? | pπ; πq | pπ Y πq | π ˚

The thick lines represent a knowledge relation and the dotted for ρ P P rop and n P AN om. Where we say that the program
lines represent friendship relations. ϕ is the propostion "I like terms are referred to as: π P T and the formulas: φ P F. The
cake". The model can be described by the Kripke structure table below goes through the different programs and explains
their function [2]:
M “ xtw0 , w1 u, ta, b, cu,
tka “ txw0 , w0 y, xw1 , w1 yu, 1. φ? : Proceed if φ is True, else fail.
kb “ txw0 , w1 y, xw0 , w0 y, xw1 , w1 yu, 2. pπ1 ; π2 q : Execute program π1 followed by π2 .
kc “ txw0 , w1 y, xw0 , w0 y, xw1 , w1 yuu,
3. pπ1 Y π2 q : Execute both π1 and π2 non-deterministically,
tfw0 “ txa, by, xb, cyu which can be interpreted as an inclusive disjunction.
fw1 “ txb, cyuu,
V pσq “ txw0 , cy, xw1 , cy, xw1 , byuy 4. π ˚ : Keep executing program π until an equilibrium has
been reached, which is guaranteed to happen within a fi-
Note that in the Kripke structure only the set V pσq has been nite amount of repetitions.
included, but V p␣σq is simply the complentary set of V pσq and
hasn’t been included for ease of reading. The programs F, K and A describe the same relations as defined
The same goes for the symmetric counter parts to the world/agent earlier in EFL.
pairs for the knowledge and friendship operator.
Also note that the reflexive knowledge relations aren’t explicitly The way we denote programs and formulas in a model M is de-
drawn, and in following examples will continue not to be. fined as below. We introduce an operator JK, which is used to
query for specific sets based on a model M. The specific sets
which are queried for are the ones where the program or formula
We look at the formula in question are satisfied.

2 af 8
02287 - Epistemic logic for Social Networks s204160, s204123, s202192, s165495

rrρssM “ V pρq for ρ P P rop 4.1 PDL-transformation


V pρq describes the set of worlds-agent pairs that model ρ
PDL-transformations work by redefining the basic programs 1
for some model. A basic example is: rK :“ πsM . This states
rrnssM “ W x gpnq, for n P AN om
that we redefine the knowledge program (K) such that the new
The set of world-agent pairs (w,a) for agent(s) with nominal n knowledge is π for some model (M ). This can also be stated as:
rrpφ ^ ψqssM “ rrφssM X rrψssM
rrKssrK:“πsM “ rrπssM
Describes the set of world-agent pairs where both φ and ψ are
true This is saying that: We have some model M , that has been al-
tered by the PDL-transformation: rK :“ πs. Such that the new
rr␣φssM “ W \ rrφssM model is: rK :“ πsM . We then look at the set containing all the
Returns all the world-agent sets were φ isn’t true knowledge for a model: JKKM but the model we look at "has
had its knowledge transformed": the knowledge for is the trans-
rrxπyφssM “ tw P W | wrrπssM v and v P rrφssM formed model: rK :“ πsM . Since we transformed the knowl-
for some v P W u edge we can rewrite the knowledge into how it is now defined:
We write wJπKM v for xw, vy P JπKM . rrπssM .
The set of states1 w, where a program π when executed results The most common programs to redefine are: K and F . Since
in the transition to some state v, where φ is True. these relations describe the knowledge we wish to alter to make
the model dynamic. Redefining the "all agents" program A
rrKssM “ txpw, aq, pv, aqy | ka pw, vqu makes less sense as changing it would cause it to loose its
The set containing all knowledge relations for the agents, in the meaning.
form of pairs of state pairs PDL-transformation only alter formulas and models, thus worlds
are not affected:
rrF ssM “ txpw, aq, pw, bqy | fw pa, bqu
The set containing all friendship relations for the agents as of rK :“ πsw “ w
pairs of states.
This results in the following being valid for PDL-tranformations:
rrAssM “ txpw, aq, pw, bqy | a, b P A, w P W u
The set containing all relations between all agents to all other M, w, a |ù rK :“ πsφ iff rK :“ πsM, w, a |ù φ
agents, in the form of pairs of state pairs.
It makes sense to apply the PDL-transformation to a formula, as
rrφ?ssM “ txw, wy | w P rrφssM u it alters the programs within. Thus indirectly changing how the
The set containing the reflexive relations from each state to programs that are based on the model affects the formula.
itself where φ holds. Examples of PDL-transformations using the knowledge pro-
M M M gram could be:
rrπ1 ; π2 ss “ txw, vy | wrrπ1 ss s and srrπ2 ss v
for some s P W u
- rK :“ KsM . Simply stating that the model keeps its relations,
The set of pairs of states connected using first π1 and then π2 Thus changing nothing. This transformation is also sometimes
defined as: I, for the identity transformation.
rrπ1 Y π2 ssM “ rrπ1 ssM Y rrπ2 ssM - rK :“ J?sM . Stating that every world in the model only has
The set of pairs of world-agent pairs that can be connected the reflexive relation. Since rrJ?ssM is the identity relation.
using either π1 or π2
We cannot redefine the programs in any way we see fit, as we
rrπ ˚ ssM “ txw, vy | w “ v or wi rrπ ˚ ssM wi`1 want our model to hold to EFL. Therefore we have to hold the
for some n ě 0, w0 , . . . , wn P W, w0 “ w and wn “ vu definitions from the prior section about EFL. Some of the possi-
ble requitements are:
The set of world pairs connected by repeated use of the same
program
• Symmetry: Not a problem by default, as all relations here
are symmetric
Having defined PDL we can begin defining its extension: Gen-
eral dynamic dynamic logic (GDDL)
• Reflexivity: Often handled by having π Y J?, where π
4 General dynamic dynamic logic is some arbitrary program. This results in the reflexivity
relation being true for all states.
General dynamic dynamic logic (GDDL) allows relational
change and increased uncertainly in models. Thus allowing
• Transitivity: Often handled by using π ˚ as we then get
agents to act and alter the model without other agents knowing.
connections to all other states that are connected to the
To define General dynamic dynamic logic (GDDL) we first de- original world.
fine its most basic operator, the PDL-transformation..
1 Though one can also redefine nominals and propositional variable, allow-
1 We refer to world-agent pairs as states ing for more flexibility in the use of PDL-transformations.

3 af 8
02287 - Epistemic logic for Social Networks s204160, s204123, s202192, s165495

But not all redefinitions require all of these. The knowledge pro-
gram requires all three, but for example friendship requires sym-
metry and irreflexiveness.

An example of using GDDL-transformations could be:

Assuming a named model M as depicted to the left in figure


2. A PDL-transformation can be applied to this model chang-
ing the model’s relations. In the figure 2 two different PDL-
transformations are modelled. One modelling the knowledge
(rK :“ pn?; Kq Y J?sM ) and one modelling the friendship Fig. 3: Basic knowledge altering GDDL-operation
(rF :“ J?sM ). Let’s start by breaking down the knowledge
based PDL-transformation:
We can view GDDL-operations as a duplication of the original
model, where we perform some PDL-transformation on each of
them. In this case we perform some action d0 resulting in PDL-
transformation ∆0 on one, and some other action d1 on the other
resulting in PDL-transformation ∆1 . The models modified by
the PDL-transformations have the exact same world-agent pairs,
but different relations in the model.
In figure 3 K 1 denotes the knowledge relations between the the
1
world-agent pairs, such that: pw, d0 qrrK 1 ssM pw, d1 q for w P W .
This is simply states that the knowledge relation between the
Fig. 2: Simple PDL-transformations 1
same state after two different actions exists in the set rrK 1 ssM .
1
M is the product W x d, where d is the set of all di ’s, essen-
tially returning the set containing the modified models. As such
1
This PDL-transformation is made up of two parts: (1) n?; K and rrK 1 ssM is the set containing all possible relations between dif-
(2) J?. Going though each world-agent pair we in (1) check if ferent models.
our current world-agent pair’s agent is named n. If it is, then As a consequence of adding actions, we get a 3-dimensional
we execute the next program: K, meaning that we just keep the model, as we have 3 measures of where we are looking, 1: world,
old knowledge relations. Since we have a disjunction between 2: agent, 3: action.
(1) and (2), we execute2 both no matter what. (2) says that we
get the reflexive relations, as explained earlier. Thus all agents In the bottom of figure 3 we see another redefinition of the
named n keep their relations, while agents who aren’t named knowledge program. We call this one the "integrating" transfor-
n only have reflexive knowledge relations. This results in the mation. This transformation is the final transformation that leads
model named: rK :“ pn?; Kq Y J?sM as seen in figure 2. to the model ∆M . Here we redefine all knowledge relations in
the model, often based on K (the relations in the sub-models
The friendship based PDL-transformation is quite simple viewed r∆i sM ) and K 1 (the relations between the models).
after the other one, as it only performs (2). The main difference
We base an example on the named model M described in figure
between the two models, is that this one redefines the friendship
5 with the purpose of using GDDL-operations in action.
relations instead of the knowledge relations, resulting in the
right most model in figure 2: rF :“ J?sM . We use two actions with their corresponding PDL-transformations:

d0 : ∆0 : rK :“ pp␣bq?; Kq Y J?s
Now that the PDL-transformations have been explained, we can
d1 : ∆1 : I “ rK :“ Ks
move on to the other GDDL-operations.
And the "integrating" transformation:

K :“ ppc?; K 1 q Y pp␣aq?; Kq Y J?q˚


4.2 GDDL-operators This can be displayed more clearly as:

GDDL-operators are constructed using PDL-transformations.


We create multiple iterations of the same model, and link them
together creating a new larger model.

We denote the wanted final model r∆sM (or ∆M ) and the sub-
models they are made of as r∆i sM . Each sub-model is created
using a PDL-transformation [∆i ] linked to some action di , and
they are then combined as shown in figure 3.

2 Note that it is possible for a program to fail, in which it "returns" the empty Applying these PDL-transformations to our models results in the
set. sub-models M 1 “ t∆0 M, ∆1 M u, as shown in figure ??.

4 af 8
02287 - Epistemic logic for Social Networks s204160, s204123, s202192, s165495

a model transformation.1 One of the most common examples in


public announcement logic (PAL) is "the muddy children puz-
zle", where three children have to reason about their knowledge
following several public announcements [3].

The puzzle goes like this: Three children are playing in the mud.
Their father arranges them in a semicircle so that each child can
see every other child. Each child examines every other child’s
face but can not examine his or her own face. A series of public
announcements follow:
Fig. 4: Caption

For the action d0 we have: rK :“ pp␣bq?; Kq Y T ?s which • Father: "At least one of you has mud on your forehead."
is mostly the same as the PDL-transformation from figure 2, (n
replaced with b) but with the twist that p␣bq? "refers" to all agent • First child: "I do not know whether my forehead is muddy
but b instead of only b as in figure 2. This results in all knowledge or not."
being revealed to agent b, as we remove all knowledge relations
from this agent.
d1 results in ∆1 “ I which is the identity transformation. There- • Second child: "I do not know whether my forehead is
fore, r∆1 sM simply returns the original model M , r∆1 sM “ muddy or not."
M.
These sub-models can then be combined into the final model
• Third child: " I know my forehead is muddy!"
∆M , as displayed in figure 5 using the "integrating" transfor-
mation on M 1 .
Each announcement alters model M until the third child only
has to consider four possible worlds. Then, as he can see that the
other children are clean, he knows his forehead must be muddy
(assuming all agents are truthful and trustworthy).

As a starting point, such a fundamental act of communication as


a public announcement can be modeled as an action sendθ pψq:

sendθ pψq “ rK :“ pθ?; cutK pψqq Y p␣θ?; Kqs

Fig. 5: Example of GDDL operation


Where the PDL-transformation cutK pφq is defined by
We break the "integrating" transformation down into pieces to
better understand it. This one consists of 3 main pieces: (1)
cutK pφq “ pφ?; K; φ?q Y p␣φ?; K; ␣φ?q
pc?; K 1 q, (2) p␣aq?; Kq and (3) J? all connected by Y, meaning
that all three are performed. (1) simply states that if the agent
is c then it gains the possible relations from K 1 , so the relations Which relates xw, ay to xv, by iff a “ b, ka pw, vq, and φ holds
between actions. (2) states that everyone who isn’t a keeps their true for a in both w and v or false in both w and v. This means
relations from the sub-models. (3) simply states that all states that the K links are cut between states where φ has conflicting
that doesn’t already have reflexivity gains it. This is then fol- propositions for agent a, and the new model rK :“ cutK pφqsM
lowed by: π ˚ , meaning that this program is repeated until con- is returned.
vergence. This is necessary to gain transitivity which is required
for a model to be an EFL model. Consider the first announcement in the muddy children puzzle:
We say that a GDDL-transformation ∆ is a general EFL dy- "At least one of you have mud on your forehead (is dirty d)".
namic operator if it is in the language of PDL terms defined This can be modeled with the send action sendA pxAydq, where
above, possibly augmented with internal relations such as K 1 it is announced to all agents that some agent is dirty. This action
and also preserves the property of being a EFL-model: when- will cut any knowledge relations for all agents to worlds conflict-
ever M is a EFL-model, so is ∆M [1]. ing with xAyd. Figure 6 displays the alteration of model M after
the announcement, where w7 is no longer considered possible as
no agents are dirty here. Figure 6 uses gray lines between worlds
purely for visualization purposes. Gray lines between agents are
5 Social Announcements friendship relations, with the friendship relation between agent
a and c not displayed also for visualization purposes.
Dynamic epistemic logic (DEL) allows agents to reason about
changes of knowledge resulting from communication, and as
agents communicate, their models transform accordingly. A 1 The public announcement isn’t actually a transformation, but more of a

public announcement is possibly the most basic example of such hypothetical transformation, but the distinction will be made clearer later.

5 af 8
02287 - Epistemic logic for Social Networks s204160, s204123, s202192, s165495

on her forehead. This is expressed by the formula ri Ÿ d! :


Js@i KAK@i d, which reads "Ingrid knows that everyone
knows that she is dirty".

5.2 Announcements About Receivers


A message sent by agent n to agents θ containing information
about the reciever can be modeled similarly: rn : ψ! Ź θsφ, with
the statement that φ holds defined by

@n Apθ Ñ
Ý ψq Ñ
Ý rsendθ pψqsφ
In the initial "muddy children puzzle", an example of such a
message could be "you have mud on your forehead". Then, con-
Fig. 6: The initial model M and the resulting model sider the same simple example with θ “ J, the announcement
rsendA pxAydqsM rn : ψ! ▷ Jsφ and the equivalence @n KApθ Ñ Ý ψq ÝÑ rK :“
cutθ pψqsφ.
So the cut-operator cutK pψq lets an action sendθ pψq verify or
Ingrid could now announce to her friends (Jonas and Kevin) that
falsify ψ to all agents satisfying θ. Agents who do not sat-
they have mud on their foreheads. Letting Ingrid be the an-
isfy θ have their ka relations left unchanged. It is also impor-
nouncer n, then the announcement just made can be represented
tant to notice that this type of action is only semi-private. Only
as Ó nrn : d! ▷ JsAKxF yn d, where AKxF yn d is read "ev-
agents satisfying θ will receive the message, but all agents will
eryone knows that the friends of Ingrid have mud on their fore-
know that the action took place. This is tied to the formula
head". Everyone would then update their epistemic uncertainty
AppxF yn ^ @n Kϕq Ñ K@n Kφq discussed in section 2, where
by only keeping knowledge relations ka where Jonas and Kevin
once the epistemic about some formula φ is removed for one of
have mud on their forehead - i.e. where φ holds.
your friends, you will know that your friend knows φ and the
friends of yours will know that you have a friend who knows φ
and so on. Thus your network of friends and their network of 5.3 Private Announcements
friends will know what you were told in the message which you As previously mentioned, communication on the presented form
received, which makes the message only semi-private. Later, is only semi-private, as all agents will know that an announce-
this action will gain complexity to cope with a greater degree of ment has occurred. So, for example, if Ingrid is a sender n and
privacy where only the sender and receiver will be aware of the Jonas is the receiver m, and the message ψ says, "I have mud on
action or communication that transpires. my forehead (d)", Kevin will know that if Ingrid has mud on her
forehead, then Jonas will know this by the validity
5.1 Announcements About the Sender
Ó nrn ◁ d! : msAKp@n Kd Ñ
Ý @m K@n dq
A message sent by agent n to agents θ containing information
about the sender can be defined as rn Ÿ ψ! : θsφ, with the state- Which reads, "everyone knows that if n (Ingrid) knows that she
ment that φ holds defined by is dirty, then m (Jonas) also knows that n is dirty. This is often
considered a breach of privacy. Therefore, to ensure privacy be-
@n Kψ Ñ
Ý rsendθ p@n ψqsφ tween n and m, we can embed the sendθ pψq action in a GDDL-
operator, similar to the one previously presented, as shown in
This means that if n knows ψ (@n Kψ), then φ will hold after figure 7. Formulas of private announcements are denoted with
n announces ψ to agents θ. The sendθ -operator will cut any triple bracket: rrrn Ÿ ψ! : θsssφ, where φ holds after n privately
knowledge relations for agents that satisfy θ where ψ is conflict- announces ψ to agents θ.
ing.

Let’s examine a simple case with θ “ J, and the formula rn Ÿ


ψ! : Jsφ. This means that φ holds after n announces ψ publicly,
which in this case simplifies to

Ý rK :“ cutK p@n ψqsφ


@n Kψ Ñ
Back to the "muddy children puzzle". Suppose that the three
children playing in the mud are named Ingrid, Jonas, and Kevin.
Now they can not see each other, but they can examine their Fig. 7: The sendθ pψq-action embedded in a GDDL operator
forehead in a mirror. A message regarding the sender could, for
example, be Ingrid announcing, "I have mud on my forehead"
(where d means "I have mud on my forehead"). Now both Jonas The first PDL-transformation in figure 7 is sendθ p@n ψq and the
and Kevin knows that Ingrid has mud on her forehead from the second is the identity transformation I. The K 1 relation repre-
validity of riŸd! : JsAK@i d, where AK@i d is read "Everyone sents ignorance about wether sendθ p@n ψq has taken place or
knows that Ingrid is dirty (muddy). not. The model r∆sM is computed by "integrating" over the
transformation rK :“ πs as before but with π “ pK Y p‰
Assuming that all senders knows the message also lets Ingrid θ?; K 1 qq˚ . This transformation leaves agents other than θ with
know that now Jonas and Kevin also know that she got mud the ignorance relation K 1 .

6 af 8
02287 - Epistemic logic for Social Networks s204160, s204123, s202192, s165495

6 Knowing your friends


Who is friends with whom matters. So far we have looked at
mainly knowledge relations denoting agents’ epistemic uncer-
tainty over which world (in which model) they are in. However,
the whole purpose of Dynamic epistemic friendship logic is
arguably to be able to express how social relations influences
our epistemic situation. To see why friendship matters (epis-
temically), consider that the social announcements that agents
make are likely to differ based on whether or not the receiver
is a friend. Since social announcements are hypothetical PDL
model-transformations (if I were to tell my friends φ, then they
would no longer be uncertain about φ), this means that an Fig. 8: Model M : Initial situation
agent’s knowledge of which model she is in can be contingent
on her knowledge of who the speaker of a social announcement Anna thinks that she can improve her epistemic situation by ask-
is friends with. However, before getting into an example, let us ing Bob if he has a strictly professional relation to Carol and
first establish how one might acquire knowledge of who one’s therefore asks him and contingent on him not being friends with
friends are: by asking questions. Carol thinks that Bob can be trusted: ra : ␣xF yc? ▷ bs@b t.

6.1 Asking questions The model transformation for Bob telling Anna that he isn’t
friends with Carol looks like so: rsenda p@b ␣xF ycqsM “ M 1 .
Similarly to social announcements of friendship such as: This cuts the all accessibility relations between the world-pairs
Ó nrn : xF yn!▷xF yns saying: "You, my friends, are my friends", (u0 , u3 ) and (u1 , u2 ), whereby the latter pair become irrelevant
an agent n can ask whether or not an agent m is her friend: from the perspective of the actual world u3 and we therefore only
Ó nrn : xF yn? ▷ ms "Are you, m, my friend?" draw the former two in the resulting model:

Notice that the ? symbol used in the above social announce-


ment differs from the program ϕ? defined in section 3.1. The
? symbol used here simply indicates that the social announce-
ment is a question rather than a statement. Recall that if one
were to enact a social announcement/perform the correspond-
ing PDL-transformation, it would result in any formula written
to the right of the announcement becoming true after the trans-
formation: Ó nrn : xF yn! ▷ xF ynsF KxF yn "After I tell my
friends that they are my friends, they will know that they are my Fig. 9: Model M 1 : After Bob’s announcement of non-friendship
friends". Similarly for a question: if it is answered positively,
then it equates to an announcement of the fact by the receiver of Notice that this announcement is not private but semi-private.
the question. Let us now consider an example where knowledge We chose to model it like this because modeling Carol’s un-
of friendship matters. certainty (K’-relations) about whether or not Anna is uncertain
about Carol and Bob’s friendship seems irrelevant to the exam-
6.2 Trusting people with sensitive information ple and would only add undue complexity in the form of adding
a dimension to the model.
Suppose that the newly graduated Anna (a) is applying for a job
at a startup owned by Carol (c), where Anna’s old study-group
Now that Anna knows Bob is not friends with Carol, she decides
member Bob (b) also works. Anna and Bob are friends but have
to tell him privately about her pregnancy, which can be captured
not seen each other since the Covid-19 pandemic started. Before
by the following GDDL operator:
going to the job-interview Anna meets up with Bob to hear about
the workplace. She learns that it is a desirable job for her, but
that Carol is a morally dubious leader who primarily focuses on
the financial success of the company. This information worries
Anna, because she is in the early stages of her pregnancy and
suspects that Carol obtaining this information might negatively
influence her chances of getting the job.

Bob asks Anna if there is any news in her life, which places
Anna in a conundrum, because upon learning that Bob works for
the morally dubious Carol, Anna is uncertain whether she can Fig. 10: GDDL-operator for private announcement
trust Bob although she still considers him a friend1 . Let p denote
that Anna is pregnant and let t denote that Anna considers Bob This results in the following model M 2 , where Carol has ac-
trustworthy. The situation is shown in Figure 8, where u3 is the cessibility relations between different worlds (u0 , u3 ) represent-
actual state2 . ing her ignorance of Anna’s pregnancy, as well as the K’ re-
1 We postpone modelling changing friendship relations until the next section.
lations between the world-model pairs (pu0 , d0 qK 1 pu0 , d1 q and
2 Notice that the model is 3D, which we would usually reserve for a model

that has had a GDDL-operator applied to it. However, in this instance it was not possible to draw the required relations in 2D with straight lines.

7 af 8
02287 - Epistemic logic for Social Networks s204160, s204123, s202192, s165495

pu3 , d0 qK 1 pu3 , d1 q denoting Carol’s ignorance of the fact that In Figure 12 we again remove the hypothetical world, which is
Anna has told Bob: considered by no one in the actual world.

7 Conclusions and Future research


This paper has introduced Dynamic epistemic friendship logic
(DEFL) in a manner accessible to students of the DTU course
02287 previously only familiar with epistemic logic and propo-
sitional logic. DEFL is a logic that seeks to model changing
epistemic and friendship relations. Our starting point was epis-
temic logic utilizing Kripke structures. This was then expanded
into the static language of Epistemic friendship logic (EFL) by
adding components from modal logic and hybrid logic. From
modal logic we first added the basic operators of necessity and
possibility. We then introduced nominals and indexical proposi-
tions from hybrid logic that allows us to specify which agent has
Fig. 11: Model M 2 : After Anna’s private announcement to Bob certain relations and propositions. One of the main differences
between EFL and epistemic logic is that EFL has friendship rela-
6.3 Changing the network tions between states in addition to knowledge accessibility rela-
tions. In order to move from EFL to DEFL, the language of EFL
Now that we have seen how the presence and absence of friend- was expanded using PDL. PDL adds programs that are able to
ship relations can lead one to announce or withhold sensitive change the perspective from which we evaluate some formula.
information, let us consider how the announcement of such in- PDL is used as a stepping stone towards General dynamic dy-
formation might also alter friendship relations. namic logic (GDDL) where we gain the ability to directly alter
models and model truly private messages (announcements). The
Similar to the GDDL sendθ pφq that works by cutting knowl- culmination of the different types of logic achieves DEFL.
edge relations (i.e. removing uncertainty) from the receiver(s)
θ regarding φ, it is also possible to alter friendship relations. This introduction has included small examples hinting at the po-
Friendship relations can be removed (one-way) by a cut-operator tential DEFL has to model a wide range of interesting social
interactions that future research could explore further. One in-
defined as: teresting application could be to model the evolution of friend-
cutF pn, mq “ p␣n?; F q Y pF ; ␣m?q ship groups based on shared interest with the assumption that an
agent is only able to be part of a single group. This could per-
haps be programmed in a manner similar to "The Game of Life"
This can be extended to removing the friendship relation both such that a group of agents are randomly generated with different
ways by subsequently applying the identical operator with the initial interests modeled by propositions, where these interests
reverse order of numerators: might be subject to random (or loneliness-induced) change on
an individual level as well as being influenced by group dynam-
r´Fn,m s “ rF :“ cutF pn, mqsrF :“ cutF pm, nqs ics. The agents could then be initially randomly placed within
the model, where knowledge relations would be used to model
With these defined, we continue our story. Consider what would information about the shared interests of other individuals or
happen if Anna, arriving for her job interview, overhears Bob groups. For example, someone who is bad a mingling (i.e. ig-
telling Carol by the coffee-machine (i.e. accidentally publicly norant about most groups’ interests) would have fewer groups
announcing), that Anna had told Bob she is pregnant. In this available to choose from. Parameters such as desire and will-
case Carol would know that Anna is pregnant and that she had ingness enter into and remain within a group could be based on
told Bob. Anna would also know that Bob had told Carol what the group satisfying some criteria of a given proportion shar-
Anna told Bob and is therefore not trustworthy any longer, which ing the top-n interests of the group. The act of searching for
would make Anna want to cut her friendship with Bob. This new groups and requesting to become part of or leaving a group
situation is captured as: would be modelled as GDDL-operators akin to the cut-operators
mentioned in this paper. It would be interesting to see how initial
rb ◁ @a p! : Js@c Kp@a p ^ @b K@a pq ^ @a K@b ␣t conditions as well as different parameters might lead to more or
less stable group formations as well as certain unlucky individu-
This would result in the following model M 3 : als being excluded due to an unlucky set of interest propositions
or ignorance of groups with shared interests.

r´Fa,b srsendc p@a p ^ @b K@a pqsrt :“ pb?; ␣tq Y tsM 2


References
[1] Patrick Girard Jeremy Seligman, Fenrong Liu, “Facebook
and the epistemic logic of friendship,” 2013.

[2] Stanford Encyclopedia of Philosophy, “Propositional dy-


Fig. 12: Model M 3 : Cutting friendships after breach of trust. namic logic,” 2019.

8 af 8
02287 - Epistemic logic for Social Networks s204160, s204123, s202192, s165495

[3] Alexandru Baltag and Bryan Renne, “Dynamic Epistemic


Logic,” in The Stanford Encyclopedia of Philosophy, Ed-
ward N. Zalta, Ed. Metaphysics Research Lab, Stanford
University, Winter 2016 edition, 2016.
[4] Aditya Bhutra, Simple Introduction to Epistemic Game The-
ory, 04 2016.
[5] Stanford Encyclopedia of Philosophy, “Propositional epis-
temic logic,” 2016.

9 af 8

You might also like