Parameterized Complexity of Theory of Mind Reasoning in Dynamic Epistemic Logic

Theory of mind refers to the human capacity for reasoning about others’ mental states based on observations of their actions and unfolding events. This type of reasoning is notorious in the cognitive science literature for its presumed computational intractability. A possible reason could be that it may involve higher-order thinking (e.g., ‘you believe that I believe that you believe’). To investigate this we formalize theory of mind reasoning as updating of beliefs about beliefs using dynamic epistemic logic, as this formalism allows to parameterize ‘order of thinking.’ We prove that theory of mind reasoning, so formalized, indeed is intractable (specifically, PSPACE-complete). Using parameterized complexity we prove, however, that the ‘order parameter’ is not a source of intractability. We furthermore consider a set of alternative parameters and investigate which of them are sources of intractability. We discuss the implications of these results for the understanding of theory of mind.


Introduction
Imagine you are in love. You find yourself at your desk and you cannot stop your mind from wandering off. What is she thinking about right now? And more importantly, is she thinking about you, and does she know that you are thinking about her? You look at your phone, no message yet. Does this mean she is not interested, or is she waiting for you to send a message first? This kind of reasoning is an example of the cognitive capacity called 'theory of mind,' 1 which is the capacity for attributing mental states to oneself and others and to reason about these to explain behavior. This capacity is widely studied in various fields such as psychology, philosophy, biology, and cognitive (neuro)science (see, e.g., Frith 2001; Nichols and Stich 2003;Premack and Woodruff 1978;Verbrugge 2009;Wellman et al. 2001). What is especially interesting about the study of theory of mind is that researchers are puzzled by the heavy computational load that the use of theory of mind seems to imply (cf. Apperly 2011;Carruthers 2006;Haselager 1997;Levinson 2006;Sperber and Wilson 1996;Zawidzki 2013). Theory of mind seems to be so computationally demanding that successfully engaging in it seems impossible for resource-bounded minds like our own. As Ian Apperly describes: [T]he problem is that an agent may have any number of beliefs (and other mental states), any of which might be relevant when trying to judge what the agent will think or do in a given situation. […] [W]e should be extremely worried by the potentially intractable computational problems posed by mindreading. (Apperly 2011, p. 9, p. 179) Although there is wide agreement that theory of mind poses a computationally intractable problem, precisely which aspects of theory of mind are sources of this intractability is highly debated (cf. Apperly 2011;Carruthers 2006;Haselager 1997;Levinson 2006;Slors 2012;Zawidzki 2013). One aspect that is recognized in the literature as potentially aggravating the computational load of theory of mind, is the use of higher-order thinking, such as the attribution of beliefs about beliefs. For instance, second-order belief attribution (such as, 'Ayla thinks that Murat believes in unicorns') already seems to be more difficult than first-order belief attribution (Flobbe et al. 2008;Hedden and Zhang 2002;Miller 2009;Wellman et al. 2001). Furthermore, several studies that investigated perspective taking at even higher levels found a prominent drop in performance from the fourth level (Kinderman et al. 1998;Lyons et al. 2010;Stiller and Dunbar 2007; but see also O'Grady et al. 2015). However, since most accounts of theory of mind-and the claims about their supposed (in)tractability-are expressed at an informal level, it is unclear whether this 'order parameter' is indeed a source of intractability and whether restricting it could render theory of mind tractable.
To investigate this we formalize theory of mind reasoning as updating of beliefs about beliefs using dynamic epistemic logic, as this formalism allows to parameterize the order of higher-order belief attribution. We prove that theory of mind reasoning, so formalized, indeed is intractable (specifically, PSPACE-complete). Using parameterized complexity we prove that, contrary to common belief, the order parameter (formalized as the modal depth of epistemic formulas) is not a source of intractability. We furthermore consider a set of alternative parameters and investigate which of them are sources of intractability. We thereby also provide a technical contribution with respect to dynamic epistemic logic (DEL)-we present fixed-parameter intractability and tractability results for the model checking problem for DEL (see Table 1 and Fig. 24 for an overview of the results). To our knowledge, this is the first parameterized complexity analysis for problems related to dynamic epistemic logic.
This work is meant as a showcase for how logic and complexity theory can be used to address questions in cognitive science (see also Cherniak 1990;Frixione 2001;Isaac et al. 2014;Levesque 1988). We address both cognitive scientists and logicians who are interested in theory of mind reasoning and its supposed intractability. We present this work as an example to logicians of how they can contribute to cognitive science, and an illustration to cognitive scientists of how these kinds of analyses can address questions about what makes theory of mind intractable or not. To this end, we include a primer on the conceptual background of computational-level modeling (Marr 1982), and the methodology of using complexity theory in cognitive science. Readers that are mainly interested in the implications of our results for the understanding of theory of mind may choose to skip the details of the complexity-theoretic results as these are not essential to understand the argument that we present. Furthermore, our complexity results may be of independent interest to researchers interested in the (parameterized) complexity of DEL model checking.
The paper is structured as follows. First, in Sect. 2, we introduce the framework of modeling cognitive capacities at Marr's computational level and how and why to formalize the notion of complexity of theories of cognition. Then, in Sect. 3, we discuss the preliminaries of dynamic epistemic logic and introduce our formalism of updating of beliefs about beliefs as a form of model checking for dynamic epistemic logic. In Sect. 4, we discuss the preliminaries of (parameterized) complexity theory, and we analyze the classical and parameterized computational complexity of our formalization. In Sect. 5 we discuss the implications of these results for the understanding of theory of mind. Finally, in Sect. 6, we conclude and suggest directions for future research.
its purported sources of intractability. This approach has been proposed, among others, by van Rooij and colleagues Wareham 2008, 2012) and builds on a combination of computational-level modeling on the one hand, and the use of concepts and proof techniques from classical and parameterized complexity theory on the other hand.

Modeling at the Computational Level
To make formal claims about the complexity of theory of mind, we first need to define a model that captures theory of mind, or at least captures a necessary sub-capacity of theory of mind. This model should be a general model of the capacity, as opposed to a task-specific model of theory of mind in which not the capacity as such, but the application of it in a specific task is modeled. If we were to limit ourselves to a taskspecific model, our results would hold for a specific instance of theory of mind but not necessarily generalise to other instances of theory of mind and therefore say little about the computational complexity of the general capacity.
There are several task-specific models of instances of theory of mind-both probabilistic and logic-based-mainly focussed on false-belief tasks. Braüner (2014), Bolander (2014), Stenning and van Lambalgen (2008), and Arkoudas and Bringsjord (2009) have presented different formalizations of several false-belief tasks, using respectively hybrid logic, dynamic epistemic logic, the event calculus, and closedworld reasoning. Arslan et al. (2013) defined an ACT-R model for the first and second-order false-belief task. Baker (2012) presented a Bayesian model for several alternative theory of mind tasks. Blokpoel et al. (2013) and van Rooij et al. (2011) also proposed generic models of aspects of theory of mind, such as goal inference and recipient design, but these did not explicitly model the attribution of beliefs and beliefs about beliefs. Since our goal here is to specifically investigate the (parameterized) complexity of higher-order theory of mind we will propose a generic model based on dynamic epistemic logic. This formalism allows us to parameterize 'order of thinking' in a flexible way; i.e., there is no need to hard-code an upper limit on the order.
Besides the distinction between a generic and a task-specific model of a cognitive capacity, there are different levels of description at which a model can be pitched. The model that we put forth in this paper is situated at what Marr (1982) called the computational level. This is a description of a capacity in terms of what (kind of) problem needs to be solved, defined by a collection of constraints that need to be satisfied. This kind of description can be specified in terms of an input-output mapping, i.e., as a computational problem.
In addition, Marr defined two other levels of description, namely the algorithmic level and the implementational level. An algorithmic-level description defines the algorithm that is used to solve a problem, and it specifies the representations that the algorithm operates on. For a given computational-level description of a capacity, there can be many different algorithmic-level descriptions compatible with it, i.e., that compute the problem defined at the computional level. Lastly, an implementational-level description defines how an algorithm is implemented physically. Again it holds that the same algorithm can be implemented by different physical realizations.
When we present our results about the complexity of our formal description of theory of mind, we want our results to hold irrespective of the choice of a specific algorithm or implementation. That is why we define our formal description of theory of mind at Marr's computational level.

The Tractable Cognition Thesis
It is generally assumed among cognitive scientists that human cognitive capacities are constrained by computational tractability. This assumption is also known as the Tractable Cognition thesis (Frixione 2001;. The main ingredients of this thesis are (1) the observation that humans have limited cognitive resources, and (2) human cognitive capacities are confined to those that can be realized in a realistic amount of time, given the available cognitive recourses. To see that (1) is the case it is enough to realize that humans are finite beings in a finite surrounding and that our resources for cognitive processing are thereby bounded. Whether we see cognition as something that is done by means of our brain, the rest of our body, our environment, or by the interaction of these, these bounds remain. Clearly, any process that would involve more particles than there are present in the universe and millions of years to complete, would not be a plausible explanation of human cognition.
Intuitively we can understand the notion of intractability of models of cognition by looking at the goal of cognitive science and the notion of scalability. Cognitive science can be described as the study of human cognitive capacities, and one of its primary aims is to form theories that explain what these capacities are exactly, and how they work (Cummins 2000). The goal is to understand these capacities, taking into account the wide variety and richness of how we manifest them in real life. A common way to study these capacities is by means of experiments in which subjects are asked to perform a specific task. To meet scientific standards of controllable conditions and feasibility in lab settings, the situations that are presented in experiments are of much smaller scale than the wide range of situations that people face in their daily lives. So in practice these experiments deal with the specific application of a capacity in a toy domain, as a way to tap into the full-blown capacity. Given that humans have limited cognitive resources, a model of a cognitive capacity needs to be scalable in such a way that it can potentially also explain how we apply the capacity in real-world situations that are much more varied, open ended, and of larger size than the toy domains of experimental settings. An intuitive way of thinking about the (in)tractability of models of cognition is by this notion of scalability. When a model is intractable then it cannot plausibly scale up to provide explanations for the domain of real-life situations.

The P-Cognition Thesis
For the tractable cognition thesis to be of optimal use, we of course want to be more formally precise about what it means for a model to be intractable. There have been several proposals for how to formalize this by using tools from computational com-plexity theory. In computational complexity theory the classical characterization of (in)tractability is done by the distinction between polynomial-time computability and NP-hardness (see, e.g., Garey and Johnson 1979). The class of computational problems that are polynomial-time solvable are seen as tractable, whereas problems that are NP-hard are considered intractable. If the commonly believed (yet unproven) claim that P = NP holds, then NP-hard problems cannot be solved in polynomial time. 2 The fastest known algorithms for NP-hard problems take more than polynomial time, e.g., exponential time. In the same way as we described for unscalable models of cognition, it holds for NP-hard problems that small sized inputs might very well be manageable. However, as their inputs grow bigger, the time needed to solve them will quickly blow up to astronomical proportions.
This classical definition of intractability has been the inspiration for the formalization of the Tractable Cognition thesis in the form of the P-cognition thesis. The P-cognition thesis states that cognitive capacities are confined to those that can be realized using at most a polynomial amount of time (Frixione 2001;. This means that when we characterize cognitive capacities in the form of a computational-level model, that we only consider those input-output mappings that are polynomial-time computable as potential plausible models of cognition, in terms of the cognitive recourses that are required. Note that this is not the same as saying that all polynomial-time computable models are plausible models of cognition-being polynomial-time computable is merely posed as a necessary condition, not as a sufficient condition.

The FPT-Cognition Thesis
An objection that has been posed to the P-cognition thesis by van Rooij (2008) is that the P-cognition thesis is too restrictive and risks rejecting potentially plausible models of cognition. When a computational problem is NP-hard for a certain input domain, this means that there is no algorithm that can solve the problem in polynomial time for all inputs in that domain. It could however be that when the input domain is restricted to inputs with a certain structure, the problem becomes much easier to solve. An example of this is the Traveling Salesperson Problem. The input to this problem is a set of cities, distances between them, a point of departure, and a maximum route length. The question that is asked is whether there is a route that starts and ends in the point of departure, visits all other cities exactly once, and does not exceed the maximum route length. This problem is known to be NP-hard when allowing all possible inputs to the problem (Karp 1972). However, when the cities are aligned exactly on a circle, the problem becomes almost trivial to solve. Even when not all cities are aligned on a circle but many of them are and those that are not lay inside this circle, the problem is still relatively easy to solve. This property of cities being close to aligned on a circle can be captured by drawing a line around the outermost cities (more formally, drawing the convex hull) and looking at the cities that lay in the interior of this hull. The fewer cities there are inside the hull, the easier the problem becomes to solve.
This notion of problems being easier to solve for inputs with a certain structure is captured by the computational complexity notion of fixed-parameter tractability. This notion is a central tool within parameterized complexity theory, a branch of complexity theory where complexity is measured not only in terms of the input size, but also in terms of an additional parameter (see, e.g., Downey and Fellows 2013). This parameter can be defined in such a way that it captures a particular type of structure in an input, where a low value of the parameter signifies that an input is highly structured, and a high value of the parameter means that an input has little structure. The Traveling Salesperson Problem, for instance, has been proven to be fixed-parameter tractable when parameterized by the number of interior points in the convex hull (Deineko et al. 2006).
This parameterized notion of tractability was the inspiration for the FPT-cognition thesis by van , which states that cognitive capacities are confined to those that can be realized using at most a fixed-parameter amount of time for one or more input parameters that are small in practice. Since all models that are polynomialtime solvable are also fixed-parameter tractable, this means that the FPT-cognition thesis is a relaxed version of the P-cognition thesis. It allows for all models that were recognized by the P-cognition thesis as being tractable, and in addition it allows some more models that were not recognized by the P-cognition thesis as being tractable.
NP-hard models of cognition pervade cognitive science, spanning many different cognitive domains, such as vision (Tsotsos 1990;van Rooij 2003), reasoning (Oaksford and Chater 1998;Levesque 1988;Reiter 1980), planning (Bylander 1994;Newell and Simon 1988), language (Barton et al. 1987;Ristad 1993;Szymanik 2016;Wareham 1999) and decision-making (Otworowska et al. 2017;van Rooij et al. 2005). Under the P-cognition thesis it would be a natural response to disregard those models and scrape them from the list of plausible models. Such a practice would most likely lead to throwing out the baby with the bathwater. Models of cognition are often built on and informed by years of (experimental) research. When a model is NP-hard this does not mean that all parts of it are false or useless, on the contrary. An NP-hard model of cognition might be heading exactly in the right direction, capturing much of how a certain capacity really works. It could be the case that the intractability of that model is a result of overgeneralisation (see . This would mean that the model captures a much broader phenomenon, which might include capacities that people actually (can) perform but in addition also includes more general capacities that people do not and cannot perform. Fixed-parameter tractability can be a useful tool to explore how a model is overly general, and to identify structural properties related to the capacity of interest, that could be exploited to make a certain problem tractable. These ideas will be made precise in Sect. 4, after introducing our model of theory of mind. In our analysis of the complexity of theory of mind and in the interpretation of our results, we use the FPT-cognition thesis as our theoretical framework.

Formalizing Theory of Mind Using Dynamic Epistemic Logic
In this section we present a computational-level model of a subcapacity of theory of mind, namely the updating of beliefs about beliefs in dynamic epistemic logic. First, we introduce some basic concepts and definitions of dynamic epistemic logic. Then, we give both an intuitive description and a formal definition of the model, and we illustrate this with an example.

Preliminaries: Dynamic Epistemic Logic
Dynamic epistemic logic (DEL) is a particular kind of modal logic (see van Benthem 2011;van Ditmarsch et al. 2008), where the modal operators are interpreted in terms of belief or knowledge. For the reader that is familiar with the details of DEL it suffices to know that we use the same framework as van Ditmarsch et al. (2008) with two modifications. Following Bolander and Andersen (2011), we allow both single and multi-pointed models, and we include postconditions in our event models (which are mappings to propositional literals). The postconditions allow modeling ontic, i.e., factual, change, in addition to epistemic change-which we believe is needed for a general applicability of the model. Furthermore the use of multi-pointed models allow for representing the internal perspective of an observer (cf. Aucher 2010; Dégremont et al. 2014;Gierasimczuk and Szymanik 2011), instead of the perfect external view (i.e., the omniscient god perspective). For the purpose of this paper we focus mainly on epistemic models and event models as semantic objects and less on the corresponding language.
First, we define epistemic models, which are Kripke models with an accessibility relation for every agent a ∈ A. Epistemic models are used to represent facts and beliefs in a given situation. Intuitively, an epistemic model represents how agents perceive a given situation: their knowledge, beliefs, or uncertainty about the facts and (the knowledge, beliefs, or uncertainty of) the other agents in that situation.
Definition 1 (Epistemic model) Given a finite set A of agents and a finite set P of propositional variables, an epistemic model is a tuple (W, R, V ), where: -W is a non-empty set of worlds; -R is a function that assigns to every agent a ∈ A a binary relation R a on W ; and -V is a valuation function from W × P into {0, 1}.
The accessibility relations R a can be read as follows: for worlds w, v ∈ W , w R a v means 'in world w, agent a considers world v possible.' We consider the usual restrictions on relations in epistemic models and event models, such as KD45 and S5 relations (see van Ditmarsch et al. 2008). In KD45 models, all relations are transitive, Euclidean, and serial, and in S5 models all relations are transitive, reflexive, and symmetric.
We define the following language for epistemic models. We use the modal belief operator B, where for each agent a ∈ A, B a ϕ is interpreted as 'agent a believes (that) ϕ.' Definition 3 (Epistemic language) The language L B over A and P is given by the following definition, where a ranges over A and p over P: We will use the following standard abbreviations, := p ∨ ¬p, ⊥ := ¬ , ϕ ∨ ψ := ¬(¬ϕ ∧ ¬ψ), ϕ → ψ := ¬ϕ ∨ ψ,B a ϕ := ¬B a ¬ϕ.
The semantics for this language is defined as follows.
Definition 4 (Truth in a single-pointed epistemic model) Let M = (W, R, V ) be an epistemic model, w ∈ W , a ∈ A, and ϕ, ψ ∈ L B . We define M, w | ϕ inductively as follows: When M, w | ϕ, we say that ϕ is true in w or ϕ is satisfied in w.
Definition 5 (Truth in a multi-pointed epistemic model) Let (M, W d ) be a multipointed epistemic model, a ∈ A, and ϕ ∈ L B . M, W d | ϕ is defined as follows: Next, we define event models. Event models represent changes brought about in some initial situation by actions or events and how these changes are perceived by agents, i.e., what these agents consider to have occurred and how this influences their beliefs. Such actions or events may be as broad as agents reading, speaking, hearing, or seeing, or physical changes in the environment. Event models are constructed very similarly to epistemic models. Intuitively, the events in an event model represent the possible events that are considered by the agents, and the relations between these events represent the knowledge, beliefs, or uncertainty of the agents about the actual event that has taken place.
Definition 6 (Event model) An event model is a tuple E = (E, Q, pre, post), where E is a non-empty finite set of events; Q is a function that assigns to every agent a ∈ A a binary relation Q a on E; pre is a function from E to L B that assigns to each event a precondition, which can be any formula in L B ; and post is a function from E to L B that assigns to each event a postcondition. Postconditions are conjunctions of literals: propositional variables and their negations (including ).
The accessibility relation Q a can be read as follows: for events e, f ∈ E: eQ a f means 'in event e, agent a considers event f possible.'

Definition 7 (Pointed event model / action) A pair (E, E d )
consisting of an event model E = (E, Q, pre, post) and a non-empty set E d ⊆ E of designated events is called a pointed event model. A pair (E, E d ) is called a single-pointed event model when E d is a singleton and a multi-pointed event model when |E d | > 1. We will use the term "action" interchangeably with the term "event model".
We define the notion of a product update, which is used to update epistemic models with event models (Baltag et al. 1998). Updating a pointed epistemic model with an (applicable) event model yields a new pointed epistemic model. Updating an epistemic model with an event model can result in a change in the domain, the relations, and/or the valuation of an epistemic model. The resulting epistemic model represents how the facts in the initial situation changed and how the agents updated their beliefs by the occurrence of the event.
Finally, we define when event models are applicable in a state.

Definition 9 (Applicability) We say that an event model or action
We define applicability for a sequence of event models or actions inductively. The empty sequence, consisting of no actions, is always applicable. A sequence a 1 , . . . , a k of actions is applicable in a pointed epistemic model For convenience, we will depict epistemic models and event models graphically. We represent worlds with solid dots and events with solid squares, and we indicate the designated world(s) or event(s) with a circle or a square around that world or event. We represent the relations between worlds or events with lines that are labeled with the relevant agent symbols. Valuations are represented as labels next to the worlds: we label only those propositional variables that are true in a given world. Events are labeled with a tuple pre, post : the first element of the tuple is the precondition and the second element is the postcondition of the event. When an element of the tuple is , this means that the event has no precondition (or postcondition). See Fig. 1 for an example of an epistemic model and Fig. 2 for an example of an event model. All epistemic models and event models that we present in our proofs are S5 models, i.e., they have equivalence relations. For the sake of presentation, in all our drawings we replace each relation R a with some R a , whose transitive reflexive closure is equal to R a . For instance, each world has a reflexive relation to itself for every agent, which we omit.

Dynamic Belief Update
Next, we present a computational-level model of a central sub-capacity of theory of mind reasoning, namely the updating of beliefs about beliefs, based on observed behavior and other factors of change. Our aim is to capture, in a qualitative way, the kind of reasoning that is necessary to be able to engage in (higher-order) theory of mind reasoning. We model this using dynamic epistemic logic (DEL), which allows us to parameterize higher-order reasoning. Specifically, we use a special case of the model checking problem for DEL. Complexity results (hardness) for this sub-capacity will hold (as a lower-bound) for the complexity of the full capacity. We present the model in the form of a decision problem, so that we can analyze its computational complexity using hardness-tools from computational complexity theory. A defining feature of theory of mind reasoning is the fact that it can vary in order. 'Ahmed believes that I will pick him up at eight,' is an example of first-order belief attribution. 'Trish thinks that Fernando knows that we will throw him a surprise party,' is an instance of second-order belief attribution. We formalize this order of theory of mind as the modal depth of epistemic formulas since a first-order belief attribution may be formalized by some sentence B a p with modal depth one and a second-order belief attribution by some sentence B a B b p with modal depth two, and so on. Intuitively, the following happens in the model. First, there is an initial situation in which a subject observes one or more agents. This subject has certain beliefs about the epistemic states and the (worldy) facts in this initial situation. Then, the subject observes some actions or events that bring about certain factual or epistemic changes. Based on this, the subject updates their beliefs about the epistemic states and the facts in the new situation.
The input of the model consists of the initial situation and the sequence of actions and events that happen, together with a question about the new situation. For instance, 'does agent X believe Y?' The output of the model is the answer to that question. So in this case either 'yes, agent X believes Y,' or 'no, agent X does not believe Y.' Such a set-up is often found in experimental tasks, where subjects are asked to reason about the epistemic states of agents in a scenario that they are presented. It might feel more natural to model such cognitive tasks as a search problem, where the question is, for instance, 'what does agent X believe?' or 'what does agent X belief about Y?' We pose the model in the form of a decision problem, as this is convenient for analyzing its computational complexity. Since the complexity of the decision problem holds as a lower bound for the complexity of such a search problem, considering the decision problem suffices for the purpose at hand.
Consider the following scenario, which is used in the Sally-Anne task (Baron-Cohen et al. 1985;Wimmer and Perner 1983;see Fig. 3 for an illustration). This is the classical task that is used to test theory of mind, specifically reasoning about falsebelief, in young children. Initially, we see Sally and Anne with a box and a basket. Sally has a marble that she puts into the basket. Then Sally leaves and Anne puts the marble into the box. After this, Sally comes back and we are asked where Sally thinks that the marble is. We could model this as an instance of our model, as an input consisting of an initial situation, an event, and a question. In the initial situation both Sally and Anne know that the marble is in the basket. Then there is the event in which Sally leaves and Anne moves the marble into the box. Applying this event to the initial situation leads to a new situation in which the marble is in the box, Anne knows that the marble is in the box, and Sally believes that the marble is in the basket. The question would be: 'does Sally believe that the marble is in the basket?' The output of the model would be, 'yes, Sally believes that the marble is in the basket.' There are also second-order versions of this false believe task (see Miller 2009). Since we are interested in the effect of higher-order reasoning on the (in)tractability of theory of mind, the second-order version is very relevant to our story. For simplicity we model only the first-order false belief task here to explain how our model works.
In our model the initial situation is given in the form of a pointed epistemic model (M 0 , W d ), and the actions and events are given as event models (E 1 , E 1 ), . . . , (E u , E u ). The question is given as a statement ϕ in language L B , for which we ask whether ϕ is true in the updated model, i.e., the model that results from updating the initial situation The full definition of the model is as follows.

DBU -Dynamic Belief Update
Instance: A set of propositional variables P and a set of Agents A. An initial Now we can use this Dynamic Belief Update model to formalize the Sally-Anne task. This formalization is similar to the one presented by Bolander (2014). See Fig. 4 for a graphical presentation of our formalization of the Sally-Anne task.

Computational Complexity Results
Next, we analyze the computational complexity of the Dynamic Belief Update model that we presented in the previous section. As we explained earlier, our aim is to investigate whether the 'order' of higher-order theory of mind reasoning is a source of intractability. We show that, without additional restrictions, the model is PSPACEhard, and that, possibly counterintuitively from a cognitive science perspective, the 'order parameter' is not a source of intractability. We also consider several other parameters of the model to investigate which of them are sources of intractability (see Table 1 for an overview of these parameters and Fig. 24 for an overview of the results). We show that only when restricting both the number of event models and the number of events in these event models, the model becomes tractable. We first review some basic notions from both classical and parameterized complexity theory. Readers that are familiar with these notions could skip Sects. 4.1 and 4.2.

Preliminaries: Classical Complexity Theory
We introduce some basic concepts of classical complexity theory. For a more detailed treatment we refer to textbooks on the topic (e.g., Arora and Barak 2009).
In complexity theory, computational problems are often studied in the form of decision problems. Decision problems represent yes-no questions that are asked about a given input. Let be a finite alphabet. A decision problem L (over ) is a subset of * , where * is the set of all strings over the alphabet , i.e., * = { m ; m ∈ N}.
We call x ∈ * a yes-instance of L if and only if x ∈ L, and a no-instance if and only if x / ∈ L. To simplify notation, we usually do not mention the underlying alphabet explicitly.
The concept of efficiently solvable problems is captured by the complexity class P, which denotes the class of all decision problems that can be decided by a polynomialtime algorithm, i.e., an algorithm that runs in time c 1 · n c 2 for some constants c 1 , and c 2 , where n denotes the input size. In order to give evidence that certain problems are intractable (i.e., are not in P), complexity theory offers a theoretical tool that is based on the following complexity class: NP.
The class NP consists of all decision problems for which yes-instances can be verified in polynomial time. Let L be a decision problem, and let x be an instance of L. Then L is in class NP if there exists a polynomial-time computable function f (a verifier), such that x is a yes-instance of L if and only if there exists a certificate u of polynomial size, such that f (x, u) = 1. Alternatively, NP can be defined as the class of all decision problems that can be solved by a nondeterministic algorithm that runs in polynomial time. Intuitively, a nondeterministic algorithm is an algorithm that can make guesses during the computation. This algorithm is said to solve the problem if there is at least one sequence of guesses that leads the algorithm to accept. The algorithm is said to run in polynomial time if for all possible sequences of guesses the algorithm terminates in polynomial time.
Another crucial part of this intractability tool is the notion of polynomial-time reductions. Let L and L be two decision problems. A polynomial-time reduction from L to L is a mapping R from instances of L to instances of L such that: (1) for all instances x of L it holds that x = R(x) is a yes-instance of L if and only if x is a yes-instance of L, and (2) R is computable in polynomial time.
We can now describe the final notions that we need for the theoretical tool to show intractability: the notions of hardness and completeness for a certain complexity class. Let L be a decision problem and K a complexity class. Then (1) L is K-hard if each problem L in K is polynomial-time reducible to L, and (2) L is K-complete if L is K-hard and in K. Intuitively, problems that are hard for class K belong to the most difficult problems in K.
It follows from the definitions that P ⊆ NP. Furthermore, it is widely believed that P = NP (see, e.g., Fortnow 2009;Gasarch 2012). This conjecture implies that NPhard problems are not polynomial-time solvable. Therefore, showing that a problem is NP-hard gives evidence that this problem is intractable.
Another class that can be used in a similar way to show intractability is the class PSPACE. This class consists of all problems that can be solved by an algorithm that runs in at most polynomial space. Intuitively, this can be seen as an algorithm that uses a polynomial amount of memory. The class PSPACE is a superset of NP, and a problem that is PSPACE-hard is not polynomial-time solvable, unless P = NP.

Preliminaries: Parameterized Complexity Theory
We introduce some basic concepts of parameterized complexity theory. For a more detailed introduction we refer to textbooks on the topic Fellows 1999, 2013;Flum and Grohe 2006;Niedermeier 2006).
A parameterized problem is similar to a decision problem. In a parameterized problem each instance is paired to a particular parameter value. Let be a finite alphabet. A parameterized problem L (over ) is a subset of * × N. For an instance (x, k), we call x the main part and k the parameter.
The complexity class FPT, which stands for fixed-parameter tractable, is the direct analogue of the class P in classical complexity. Problems in this class are considered efficiently solvable because the non-polynomial-time complexity inherent in the problem is confined to the parameter and in effect the problem is efficiently solvable even for large input sizes, provided that the value of the parameter is relatively small.
Let be a finite alphabet. An algorithm A with input (x, k) ∈ × N runs in fpt-time if there exists a computable function f and a polynomial p such that for all (x, k) ∈ × N, the running time of A on (x, k) is at most f (k) · p(|x|). Algorithms that run in fpt-time are called fpt-algorithms. A parameterized problem L is fixedparameter tractable if there is an fpt-algorithm that decides L. FPT denotes the class of all fixed-parameter tractable problems.
Similarly to classical complexity, parameterized complexity also offers a hardness framework to give evidence that (parameterized) problems are not fixed-parameter tractable. The following notion of reductions plays an important role in this framework.
Let L and L be two parameterized problems. An fpt-reduction from L to L is a mapping R from instances of L to instances of L for which there is a computable function g : N → N such that: (1) for all instances (x, k) of L it holds that (x , k ) =

R(x, k) is a yes-instance of L if and only if (x, k) is a yes-instance of L, (2) R is computable in fpt-time, and (3) k ≤ g(k).
Another important part of the hardness framework is the parameterized intractability class W[1]. To characterize this class, we consider the following parameterized problem.
The  Downey and Fellows 2013).
Another parameterized intractability class, which can be used in a similar way, is the class para-NP. The class para-NP consists of all parameterized problems that can be solved by a nondeterministic algorithm that runs in fpt-time.
W[1] is a subset of para-NP. This implies that para-NP-hard problems are not fixedparameter tractable, unless W[1] = FPT. In fact, the conjecture P = NP already implies that para-NP-hard problems are not fixed-parameter tractable (Flum and Grohe 2006, Theorem 2.14). To show para-NP-hardness, it suffices to show that DBU is NP-hard for a constant value of the parameters (Flum and Grohe 2003).

PSPACE-Completeness
We show that Dynamic Belief Update (DBU) is PSPACE-complete. Our proof holds for the general case (without any specific restrictions on the relations), and furthermore it holds when the problem is restricted to single-pointed S5 or KD45 models. Since DBU is a special case of DEL model checking, this hardness result also holds for the more general case of DEL model checking that is usually considered in the literature. Aucher and Schwarzentruber (2013) and van Eijck and Schwarzentruber (2014) showed PSPACE-completeness for DEL model checking in the unrestricted case. Since their proofs depend on the use of multi-pointed models, their results do not hold for the case restricted to single-pointed S5 models. Bolander et al. (2015) considered a special case of DEL model checking that is very similar to the one we consider. They show PSPACE-completeness for the case restricted to single-pointed models, but their proof does not settle whether hardness holds even when the problem is restricted to single-pointed S5 models.
For our reduction, we consider the decision problem True Quantified Boolean Formulas (TQBF), which is the canonical PSPACE-complete problem (Stockmeyer and Meyer 1973).
Proof To show PSPACE-hardness, we specify a polynomial-time reduction from TQBF to DBU.
A main principle of the reduction is that the final updated model M m = (M, w 0 )⊗ (E 1 , e 1 )⊗· · ·⊗(E m , e m ) represents exactly all possible truth assignments to var(ϕ). We map the variables of ϕ, x 1 , . . . , x m , to agents 1, . . . , m, and we use these to represent the truth values of the variables x 1 , . . . , x m under a given assignment. Furthermore, we use a distinguished agent a to construct R a -equivalence classes that represent particular truth assignments to var(ϕ), and we call these groups of worlds. In a group that represents assignment α, world w represents that x i is true under α if there is an R i -edge from w to a world w where propositional variable y (a new variable, that we introduce) is true. If there is no such world in the group, this represents that x i is false under α.
The other general principle of the reduction is that we use the modal operator B and its dualB := ¬B¬ to simulate the behavior of the quantifiers in ϕ. To define [ϕ], we first define the following polynomial-time computable mappings. For 1 ≤ i ≤ m, let: We define [ψ] to be the adaptation of formula ψ where every occurrence of x i in ψ is replaced byB aBi y. Now we let In Fig. 5 we give an example of such a group of worlds that represents assignment α = {x 1 → T, x 2 → F, x 3 → F, x 4 → T}. Each world has a reflexive relation to itself for every agent, which we omit from our illustrations for the sake of presentation. More generally, in all our drawings we replace each relation R a with some R a whose transitive reflexive closure is equal to R a . Now, we construct an initial model, (M, w 0 ), that represents the truth assignment to var(ϕ) that maps every variable of ϕ to true. Model (M, w 0 ) is a single-pointed epistemic model with agents a, 1, . . . , m and propositional variable y. It consists of worlds w 0 , w 1 , . . . , w m , w 1 , . . . , w m , of which worlds w 0 , w 1 , . . . , w m are an R aequivalence class: a group of worlds. See Fig. 6 for an illustration. Again, each world has a reflexive loop for every agent, which we leave out for the sake of presentation. This will be the case for all drawings that we present. Then we construct a sequence of applicable single-pointed event models (E 1 , e 1 ), . . . , (E m , e m ). For each 1 ≤ i ≤ m, we define (E i , e i ) as shown in Fig. 7. Event models (E 1 , e 1 ), . . . , (E m , e m ) are used to extend the initial model into model (M, w 0 ) ⊗ (E 1 , e 1 ) ⊗ · · · ⊗ (E m , e m ), which represents all possible truth assignments to the vari-ables of ϕ. Each event model (E i , e i ) copies the entire previous model, and in addition, for each group of worlds in the previous model it adds a slightly adapted group of worlds. This happens in such a way that the assignment that the adapted group of worlds represents, differs from the assignment that the original group of worlds represents, only in the assignment to the variable x i , setting it to false in the adapted group. The preconditions of event model (E i , e i ) work as follows. When updating some previous model-either (M, w 0 ) or some (M, w 0 )⊗(E 1 , e 1 )⊗· · ·⊗(E i−1 , e i−1 )-with event (E i , e i ), event e i copies the entire previous model. Event e i copies an adaptation of each group of worlds by leaving out each pair of worlds w, w , with w R i w and w = w , that represents variable i. It does this by copying only those worlds w from which there is no R i -edge to a world in which propositional variable y is true, i.e., by copying worlds in which B i ¬y is true. In addition, event e i also copies worlds w in which y is true and from which there is no R i -edge to a world in which propositional variable y is false, i.e., by copying worlds in which y ∧ B i y is true. Now, how this reduction works is that in the final updated model M m = (M, w 0 )⊗ (E 1 , e 1 ) ⊗· · ·⊗(E m , e m ) one can, as it were, move from the designated world and visit different groups by taking a path that alternates between different R i -steps, where 1 ≤ i ≤ m. The group that is reachable directly from the designated world represents an assignment where all variables in ψ are set to true. Furthermore, one can walk different paths through the model starting from the designated world, which will bring you to different groups of worlds. Given a group of worlds that represents a particular assignment α, taking a (non-reflexive) R i -step will lead to a group of worlds that represents some α that differs from α only in the value it gives to x i .
By the way we defined [ϕ], we can now simulate the behavior of the quantifiers in ϕ and verify whether ϕ is a true quantified Boolean formula by doing model checking for M m . To illustrate this, we give an example. Figure 8 shows the final updated model for a quantified Boolean formula with variables x 1 and x 2 . In this model there are four groups of worlds: {w 0 , w 1 , w 2 }, {w 3 , w 4 }, {w 5 , w 6 }, and {w 7 }, representing respectively assignments {x 1 → T, x 2 → T}, {x 1 → F, x 2 → T}, {x 1 → T, x 2 → F}, and {x 1 → F, x 2 → F}. Note that for each Boolean formula ϕ with |var(ϕ)| = m, model (M m , w 0 ) is identical, irrespective of the structure of ϕ. The only difference in constructing the reduction is in the construction of [ϕ].
Then, verifying whether, for instance, formula ∃x 1 ∀x 2 .x 1 ∨ x 2 is true can be done by checking whether M m | B 1 B 2 (B aB1 y ∨B aB2 y), which is indeed the case. This is because the construction of M m works in such a way that formula ∃x 1 ∀x 2 .x 1 ∨ x 2 is true if and only if from w 0 one can take an R 1 -step to a group of worlds M from where all groups of worlds M that are reachable by an R 2 -step represent an assignment that makes x 1 ∨x 2 true. In the same manner, verifying whether ∀x 1 ∀x 2 .x 1 ∨x 2 is true can be done by checking whether B 1 B 2 (B aB1 y∨B aB2 y) is true in M m , which is not the case.
We say that group of worlds M in model M m agrees with α if M represents some assignment β to var(ϕ) and α ⊆ β. We say that w is the base world of M if w is the unique world in M such that there is no edge from w to a world where y is true. For example, in Fig. 8, worlds w 0 , w 3 , w 5 , w 7 are the base worlds.
We show that ϕ ∈ TQBF if and only if (M, w 0 ) ⊗ (E 1 , e 1 ) ⊗ · · · ⊗ (E m , e m ) | [ϕ]. We do so by proving, with downwards induction, that for all 1 ≤ i ≤ m + 1 the following claim holds.  We start by showing that the claim holds for i = m + 1. Let α be any assignment to the variables x 1 , . . . , x m , and let w be the base world of a group of worlds M in M m that represents assignment β, with α ⊆ β. In this case M not only agrees with α, but in fact α = β. Since M represents assignment β, then, by construction of M m , for each variable x j of ϕ that is true under β, there is an R a -edge from w to a world from which there is an R j -edge to a world where y is true, meaning that (M m , w) | B aB j y. Similarly, for each variable x k of ϕ that is false under β, we have that (M m , w) | B aBk y. Then, by construction of [ψ], we know that ψ is true under α if and only if [ψ] is true in w. Therefore, the claim holds for i = m + 1. Now assume that the claim holds for i = j + 1, for an arbitrary j ≥ 1. We show that then the claim also holds for i = j. Let α be any assignment to the variables x 1 , . . . , x j−1 , and let w be the base world of a group M that agrees with α. is true in w. By construction of M m , all equivalence classes for R 1 , . . . , R m are of size two because this is the case in model (M, w 0 ), and this property is kept intact by the event models. So the worlds that are R j -reachable from w are w itself and some world w * = w. Furthermore, by construction of M m , for any base world w of some group M there is exactly one world w * = w that is R j -reachable from w, and w * is the base world of some group M * = M. The assignment that M * represents differs from the assignment that M represents only in the assignment to the variable x i . Now assume without loss of generality that group M agrees with assignment α 1 , then group M * agrees with α 2 . Therefore, by the induction hypothesis, is true in both w and w * , and thus in all worlds that are R j -reachable from w. Hence, Next, assume that Q j . . . Q m .ψ is not true under α. Consider the case where Q j = ∀. (The case where Q j = ∃ is analogous.) Then there is some assignment α ⊇ α to the variables x 1 , . . . , x j , such that Q j+1 . . . Q m .ψ is not true under α . Let M be the group of worlds that agrees with α , and let w be the base world of M . Now, by the induction hypothesis, we know that is not true in w. We know that w is R j -reachable from w by construction of M m and the fact that the assignments that M and M represent differ only by variable Therefore, the claim holds for the case that i = j. Now, by induction, the claim holds for the case that i = 1, and hence it follows that ϕ ∈ TQBF if and only if (M, w 0 ) ⊗ (E 1 , e 1 ) ⊗ · · · ⊗ (E m , e m ) | [ϕ]. Since this reduction runs in polynomial time, we conclude that DBU is PSPACE-hard.

Theorem 2 DBU is PSPACE-complete.
Proof In order to show PSPACE-membership for DBU, we can modify the polynomial-space algorithm given by Aucher and Schwarzentruber (2013). Their algorithm works for the problem of checking whether a given single-pointed epistemic model makes a given DEL-formula true, where that formula may contain event models that can be multi-pointed but have no postconditions. To make their algorithm work for our formalism, it needs to be able to deal with multi-pointed epistemic models and event models with postconditions. In order to make their algorithm work for multi-pointed epistemic models, we can call the algorithm several times: once for each of the designated worlds. Furthermore, a modification is needed to deal with postconditions. Their algorithm checks the truth of a formula by inductively calling itself for subformulas. In order to deal with postconditions, only the case where the formula is a propositional variable needs to be modified. Instead of just checking whether the variable is true in the initial model, one needs to take into account whether this variable has been set to true or false by the postconditions.

Parameterized Complexity Results
Next, we provide a parameterized complexity analysis of Dynamic Belief Update (DBU).

Parameters for DBU
We consider the following parameters for DBU. For each subset κ ⊆ {a, c, e, f, o, p, u} we consider the parameterized variant κ-DBUof DBU, where the parameter is the sum of the values for the elements of κ as specified in Table 1. For instance, the problem {a, p}-DBU is parameterized by the number of agents plus the number of propositional variables. Even though technically speaking there is only one parameter, we will refer to each of the elements of κ as parameters. For every set κ of parameters it holds that if κ-DBU is fixed-parameter tractable, then for every κ ⊇ κ, κ -DBU is also fixed-parameter tractable. For the modal depth of a formula we count the maximum number of nested occurrences of modal operator B. Formally, we define the modal depth d(ϕ) of a formula ϕ (in L B ) recursively as follows.
For the size of a formula we count the number of occurrences of propositional variables and logical connectives. Formally, we define the size s(ϕ) of a formula ϕ (in L B ) recursively as follows.
if ϕ = B a ϕ 1 , for some agent a.

Fixed-Parameter Intractability Results
In the following, we show fixed-parameter intractability for several parameterized versions of DBU. We will use the parameterized complexity classes W[1] and para-NP to show intractability; i.e., we will show hardness for these classes. Note that we could additionally use the class para-PSPACE (Flum and Grohe 2003) to give stronger intractability results. For instance, the proof of Theorem 1 already shows that { p}-DBU is para-PSPACE hard since the reduction in this proof uses a constant number of propositional variables. However, since in this paper we are mainly interested in the border between fixed-parameter tractability and intractability, we will not focus on the subtle differences in the degree of intractability and restrict ourselves to showing W[1]-hardness and para-NP-hardness. This is also the reason why we will not show membership for any of the (parameterized) intractability classes; showing hardness suffices to indicate intractability. For the following proofs we use the wellknown satisfiability problem Sat for propositional formulas, which is the canonical NP-complete problem (Cook 1971;Levin 1973). We use the fact that hardness for Sat holds even when restricted to propositional formulas that are in 3CNF (Cook 1971).

Proposition 1 {a, c, e, f, o}-DBU is para-NP-hard.
Proof To show para-NP-hardness, we specify a polynomial-time reduction from Sat to DBU, where parameters a, c, e, f , and o have constant values. Let ϕ be a propositional formula with var(ϕ) = {x 1 , . . . , x m }. Without loss of generality we assume that ϕ is a 3CNF formula with clauses c 1 to c l . We introduce a propositional variable z m+1 and construct a single-pointed epistemic model (M, w 0 ) and an applicable sequence of single-pointed event models (E 1 , e 1 ), . . . , (E m+l , e m+l ), such that ϕ ∈ Sat if and only if (M, w 0 ) ⊗ (E 1 , e 1 ) ⊗ · · · ⊗ (E m+l , e m+l ) | z m+1 . The general idea behind this reduction is that we use the individual worlds in model M m = (M, w 0 ) ⊗ (E 1 , e 1 ) ⊗ · · · ⊗ (E m , e m ) to list all possible assignments to var(ϕ). We do this by introducing a propositional variable z i for each variable x i in ϕ and by constructing M m in such a way that the valuation V m over these propositional variables, in a given world w, represents an assignment α over var(ϕ), i.e. α(x i ) = V m (w, z i ). So each world in model M m represents an assignment α over var(ϕ), and each assignment α over var(ϕ) is represented by a world in model M m .
We let (M, w 0 ) be a single-agent, single-pointed epistemic model, consisting of a single world, in which all propositional variables z i are set to false. Furthermore, we construct a sequence of applicable single-pointed event models (E 1 , e 1 ), . . . , (E m , e m ). For each 1 ≤ i ≤ m, we define (E i , e i ) as shown in Fig. 9. Now, checking whether formula ϕ is satisfiable can be done by checking whether ϕ is true in any of the worlds in M m .
Furthermore, to keep the formula that we check in the final updated model M m+l = (M, w 0 ) ⊗ (E 1 , e 1 ) ⊗ · · · ⊗ (E m+l , e m+l ) of constant size, we sequentially check the truth of each clause c i and encode whether the clauses are true with an additional variable z m+1 . This is done by event models (E m+1 , e m+1 ) to (E m+l , e m+l ), which we define for m + 1 and for each j, m + 2 ≤ j ≤ m + l as shown in Figures 10 and 11. In the final updated model M m+l , variable z m+1 is true in a world w if and only if clauses c 1 to c l are true in w, i.e., if it makes formula ϕ true. Hence, we can conclude that ϕ ∈ Sat if and only if (M, w 0 ) ⊗ (E 1 , e 1 ) ⊗ · · · ⊗ (E m+l , e m+l ) | z m+1 .

Proposition 2 {c, e, f, o, p}-DBU is para-NP-hard.
Proof To show para-NP-hardness, we specify a polynomial-time reduction R from Sat to DBU, where parameters c, e, f , o, and p have constant values. Let ϕ be a propositional formula with var(ϕ) = {x 1 , . . . , x m }. Without loss of generality we assume that ϕ is a 3CNF formula with clauses c 1 to c l . We introduce a propositional variable z and agents b and c, and we construct a single-pointed epistemic model (M, w 0 ) and an applicable sequence of single-pointed event models (E 1 , e 1 ), . . . , (E m+l , e m+l ), such that ϕ ∈ Sat if and only if (M, w 0 ) ⊗ (E 1 , e 1 ) ⊗ · · · ⊗ (E m+l , e m+l ) | B bBc z.
The general idea behind this reduction is similar to the reduction in the proof of Theorem 1. Again, we use groups of worlds to represent particular assignments to the variables in ϕ. To construct these, we use a single-pointed epistemic model (M, w 0 ) with agents a, 1, . . . , m and propositional variable y, such as defined in Fig. 6. Furthermore, we use a sequence of applicable single-pointed event models (E 1 , e 1 ), . . . , (E m , e m ). For each 1 ≤ i ≤ m, we define (E i , e i ) as shown in Fig. 12.
To keep the formula that we check in the final updated model M m+l = (M, w 0 ) ⊗ (E 1 , e 1 ) ⊗ · · · ⊗ (E m+l , e m+l ) of constant size, we sequentially check the truth of each clause c i and encode whether the clauses are true with an additional variable z. This is done by the single-pointed event models E m+1 to E m+l . For m + 1 and for m + 2 ≤ j ≤ m + l, we define event models (E m+1 , e m+1 ) and (E j , e j ) as shown in Figures 13  and 14. Event model e j (corresponding to clause j) marks each group of worlds that represents an assignment that satisfies clauses 1 to j. It makes sure that each group of worlds that represents a satisfying assignment for the given formula will have an R c relation from a world that is R b -reachable from the designated world to a world where propositional variable z is true.
In the final updated model, there will be such a marked group if and only if all clauses are satisfiable (and thus if and only if the whole formula is satisfiable). Hence, we can conclude that ϕ ∈ Sat if and only if (M, w 0 )⊗(E 1 , e 1 )⊗· · ·⊗(E m+l , e m+l ) | B bBc z.  Fig. 11 The event model (E m+ j , e m+ j ), used in the proof of Proposition 1 assume that m is even. We introduce a propositional variable z * and agents b and c, and we construct a single-pointed epistemic model (M, w 0 ) and an applicable sequence of single-pointed event models (E 1 , e 1 ), . . . , (E m+1 The reduction is based on the same principle as the one used in the proof of Theorem 1. Again, we use groups of worlds to represent particular assignments to the variables in ϕ. To keep the number of agents constant, we use a different construction to represent the variables in ϕ. We encode the variables by a string of worlds that are connected by alternating relations R a and R b . We use the folowing polynomial-time computable mappings. For 1 ≤ i ≤ m, we define [x i ] inductively as follows: Then [ϕ] is the adaptation of formula ϕ, where for 2 ≤ i ≤ m, every occurrence of x i in ϕ is replaced byB a ([x i ]y ∧ ¬[x i−1 ]y), and every occurrence of x 1 is replaced byB a [x 1 ]. Let M be a group of worlds, and let w be the unique world in M such that there is no world accessible from w, in one step, where y is true. We say that M represents an assignment α to variables x 1 , . . . , To construct this model with groups of worlds we introduce a single-pointed epistemic model (M, w 0 ) with agents a and b, and propositional variables y and z, such as defined in Fig. 15. Furthermore, we use a sequence of applicable single-pointed event models (E 1 , e 1 ), . . . , (E m , e m ). We define (E 1 , e 1 ) as shown in Fig. 16, and for each 2 ≤ i ≤ m, we define (E i , e i ) as shown in Fig. 17.
Furthermore, we keep the size of the formula constant by encoding the satisfiability of the formula with a single propositional variable. We do this using event model (E m+1 , e m+1 ) with agent c and propositional variable z * , as defined in Fig. 18. Event model (E m+1 , e m+1 ) makes sure that each group of worlds that represents a satisfying assignment for formula ϕ will be marked; namely, each such group will have an R c relation from a world that is R b -reachable from the designated world to a world where propositional variable z * is true. Then in the final updated model M m+1 = (M, w 0 ) ⊗ (E 1 , e 1 ) ⊗ · · · ⊗ (E m+1 , e m+1 ) there will be such a marked group if and only if formula ϕ is satisfiable, i.e., ϕ ∈ Sat if and only if M m+1 | B bBc z.
We consider the following parameterized problem, that we use in our proof of Proposition 4. This problem is W[1]-complete (Fellows et al. 2009).

Instance:
A graph G and a vertex-coloring c : V (G) → {1, 2, . . . , k} for G. Parameter: k. Question: Does G have a clique of size k that includes vertices of all k colors? That is, are there v 1 , . . . , v k ∈ V (G) such that for  N , E). We construct a formula ϕ, a singlepointed epistemic model (M, w 0 ), and an applicable sequence of single-pointed event models (E 1 , e 1 ), . . . , (E k+( k 2 ) , e k+( k 2 ) ) such that (G, c) ∈ {k}-Multicolored Clique if and only if (M, w 0 ) ⊗ (E 1 , e 1 ) ⊗ · · · ⊗ (E k+( k 2 ) , e k+( k 2 ) ) | ϕ. The general idea behind this reduction is that we use event models (E 1 , e 1 ), . . . , (E k , e k ) to list all k-sized subsets of differently colored vertices of graph G in model M k = (M, w 0 ) ⊗ · · · ⊗ (E k , e k ). Each world in M k represents a particular k-colored, k-sized subset of vertices in graph G. Then with event models (E k+1 , e k+1 ), . . . , (E k+( k 2 ) , e k+( k 2 ) ) we encode the existing edges between these vertices in model M k+( k 2 ) = M k ⊗ (E k+1 , e k+1 ) ⊗ · · · ⊗ (E k+( k 2 ) , e k+( k 2 ) ). Then we can check in M k+( k 2 ) whether there is a world that represents a k-colored, k-sized subset of vertices that is pairwise fully connected with edges. This is the case if and only if G has a k-clique with k different colors.
For each vertex v i ∈ N we introduce propositional variable x i . We let (M, w 0 ) be a single-agent, single-pointed epistemic model, consisting of a single world, in which all propositional variables are set to false. Furthermore, we construct a sequence of applicable single-pointed event models (E 1 , e 1 ), . . . , (E k The set D j contains a propositional variable for each vertex v in N that has color j, and u j is the number of vertices in N that have color j. (Note that these d i j are names for propositional variables of the form x i .) For each 1 ≤ i ≤ m, we define (E i , e i ) as shown in Fig. 19.
We say that a world w represents a k-colored, k-sized subset of vertices v i 1 , . . . , v i k in graph G if propositional variables x i 1 , . . . , x i k are true in w and all other x i are false in w. Note that all k-colored, k-sized subsets of vertices in graph G are represented by a world in model M k = (M, w 0 ) ⊗ · · · ⊗ (E k , e k ), and every world in M k represents a k-colored, k-sized subset of vertices in graph G.
Let t = |N | 2 and let the set of all possible edges between the vertices in N be E = {{x 1 , x 1 }, . . . , {x t , x t }}. (Note that x and x are names for propositional variables of the form x i .) We introduce a propositional variable z, and a propositional variable r i j e j = e j,0 : , e j,1 : for each 1 ≤ i < j ≤ k. We will use propositional variable r i j to encode in some world w whether in the subset of vertices that w represents there are a vertex v with color i and a vertex w with color j that are connected by an edge {v, w} in G. For each {x l , x l } ∈ E we define: Now for each k 1 ≤ j ≤ k + k 2 , we define (E j , e j ) as shown in Fig. 20. Note that all k-colored, k-sized subsets of vertices in graph G are represented by a world in model M k+( k 2 ) = (M, w 0 )⊗(E 1 , e 1 )⊗· · ·⊗(E k+( k 2 ) , e k+( k 2 ) ), and each world in M k+( k 2 ) represents a k-colored, k-sized subset of vertices in graph G. Furthermore, some propositional variable ψ l = r i j is true in world w in M k+( k 2 ) only if x l and x l are true in w and {x l , x l } is an edge between vertices x l and x l in G.
Now we let ϕ = 1≤i< j≤k r i j . By construction, we have that ϕ is true in a world w only if all the k vertices in the k-colored, k-sized subset of vertices in graph G that are represented by w are connected by an edge in graph G. And conversely, if there is a world w corresponding to a set of k vertices with different colors that are all connected to each other by an edge in graph G, then in this world all propositional variables r i j are true, and thus ϕ is true in w. Hence, (G, c) ∈ {k}-Multicolored Clique if and only if M k+( k 2 ) | ϕ. Since this reduction runs in polynomial time, parameters a, c, and o have a constant value, and parameters f and u depend only on parameter k (namely f = 2 k 2 − 1 and u = k + k 2 ), we can conclude that {a, c, f, o, u}-DBU is W[1]-hard.
We sketch the general idea behind the reduction. Let ϕ be a propositional formula with var(ϕ) = {x 1 , . . . , x m }. Then let ϕ be the formula obtained from ϕ by replacing each occurrence of x i with ¬x i . We note that ϕ is satisfiable by some assignment α that sets k variables to true if and only if ϕ is satisfiable by some assignment α that sets k variables to false, i.e, that sets m − k variables to true. We use the reduction to list all possible assignments to var(ϕ ) = var(ϕ) that set m − k variables to true. We represent each possible assignment to var(ϕ ) that sets m − k variables to true by a group of worlds, like in the proof of Theorem 1.
Just as in the proof of Theorem 1, we construct a single-pointed epistemic model (M, w 0 ) with agents a, 1, . . . , m and propositional variable y, as shown in Fig. 6. Then for each 1 ≤ i ≤ k, we define (E i , e i,i ) as shown in Fig. 21. Note that in each event model the designated event is e i,i . This is to ensure that the event models are applicable. Now model M k = (M, w 0 ) ⊗ (E 1 , e 1 ) ⊗ · · · ⊗ (E k , e k ) consists of groups of worlds that each represent some assignment α to var(ϕ ) = var(ϕ) that sets m − k variables to true. Each assignment α to var(ϕ ) = var(ϕ) that sets m − k variables to true is represented by a group of worlds in model M k . For be the adaptation of formula ϕ where every occurrence of x i in ϕ is replaced byB a [x i ]. By construction, formulaB b [ϕ ] is true in model M k if and only if there is a group of worlds in M k that represents some assignment α that sets m − k variables to true and that satisfies formula ϕ , i.e., if and only if there is some assignment α that satisfies formula ϕ and that sets k variables Since Without loss of generality, assume that m ≥ 2. We introduce propositional variable z * and construct a single-pointed epistemic model (M, w 0 ) and an applicable sequence of single-pointed event models (E 1 , e 1 ), . . . , (E k+1 , e k+1 ), such that ϕ ∈ {k} − W Sat [2CNF] if and only if (M, w 0 ) ⊗ (E 1 , e 1 ) ⊗ · · · ⊗ (E k+1 , e k+1 ) | z * .
We modify the reduction in the proof of Proposition 5 to keep the values of parameters a and f constant. To keep the number of agents constant, we use the same strategy as in the reduction in the proof of Proposition 3, where variables x i , . . . , x m are represented by strings of worlds with alternating relations R b and R a . And just like in the proof of Proposition 3, the size of the formula is kept constant by encoding the satisfiability of the formula with a single propositional variable. Then each group of worlds that represents a satisfying assignment for the given formula will have an R c relation from a world that is R b -reachable from the designated world to a world where propositional variable z * is true.
We introduce a single-pointed epistemic model (M, w 0 ) with agents a and b, and propositional variables y and z, such as defined in Fig. 15. Let [x i ] be defined as in the proof of Proposition 3. Then for each 1 ≤ i ≤ k, we define (E i , e i,i ) as shown in Fig. 22. Again, to ensure that the event models are applicable, in each event model the e k+1 , e k+1 [ϕ ], z * c Fig. 23 The event model (E k+1 , e k+1 ), used in the proof of Proposition 6 designated event is e i,i . Now model M k = (M, w 0 )⊗(E 1 , e 1 )⊗· · ·⊗(E k , e k ) consists of groups of worlds that each represent some assignment α to var(ϕ) that sets m − k variables to true. And conversely, each assignment α to var(ϕ) that sets m −k variables to true is represented by a group of worlds in model M k .
Let ϕ be the formula obtained from ϕ by replacing each occurrence of x i with ¬x i , and let [ϕ] be defined as in the proof of Proposition 3. We introduce agent c and define event model (E k+1 , e k+1 ) as shown in Fig. 23. Event model (E k+1 , e k+1 ) makes sure that each group of worlds that represents a satisfying assignment for formula ϕ will be marked by propositional variable z * . Thereby the size of formula f is kept constant. Now, in a similar way as in the proof of Proposition 5, we have that Since this reduction runs in polynomial time, parameters a, f , o, and p have constant values, and parameter u depends only on parameter k (namely u = k + 1), we can conclude that {a, f, o, p, u}-DBU is W[1]-hard.

Fixed-Parameter Tractability Results
Next, we turn to a case that is fixed-parameter tractable.

Theorem 3 {e, u}-DBU is fixed-parameter tractable.
Proof We present the following fpt-algorithm that runs in time e u · p(|x|), for some polynomial p, where e is the maximum number of events in the event models and u is the number of event models (i.e., the number of updates).
As a subroutine, the algorithm checks whether a given basic epistemic formula ϕ holds in a given pointed epistemic model (M, W d ), i.e., whether M, W d | ϕ. This can be done in polynomial time in the size of M plus the size of ϕ. First, we note that for every modal logic formula ϕ, we can construct in polynomial time a firstorder logic formula ψ with two variables, such that checking whether ϕ is true in a given pointed epistemic model (M, W d ) can be done by checking the truth of ψ in M. We can construct this ψ by means of the standard translation (van Benthem 1977, Definition 2.1), whose definition can straightforwardly be adapted to the case of multiple agents. This adapted definition can also be used for the slightly more general case of multi-pointed models.
Furthermore, given a model and a formula in first-order logic with a constant number of variables, checking whether the formula is true in the model can be done in polynomial time in the size of the model plus the size of the formula (Vardi 1995, Proposition 3.1). Therefore, we can decide the truth of a given modal logic formula in a given model in polynomial time.
The size (i.e., the number of events) of each M i is upper bounded by |M 0 | · e u , so for each update checking the preconditions can be done in time polynomial in e u · |x| by using the subroutine we described above. This means that computing M u can be done in fpt-time.
Then the algorithm decides whether ϕ is true in M u . This can be done in time polynomial in the size of M u plus the size of ϕ. We know that |M u | + |ϕ| is upper bounded by |M 0 |·e u +|ϕ| and thus upper bounded by e u · p(|x|) for some polynomial p. Therefore, deciding whether ϕ is true in M u is fixed-parameter tractable. Hence, the algorithm decides whether x ∈ DBU and runs in fpt-time.

Overview of the Results
We showed that DBU is PSPACE-complete, we presented several parameterized intractability results (W[1]-hardness and para-NP-hardness) and we presented one fixed-parameter tractability result, namely for {e, u}-DBU. In Fig. 24, we present a graphical overview of our results and the consequent border between fp-tractability and fp-intractability for the problem DBU. We leave {a, c, p}-DBU and {c, f, p, u}-DBU as open problems for future research.

Discussion
Theory of mind reasoning is notorious in the cognitive science literature for its presumed computational intractability. A possible reason could be that it may involve higher-order thinking (e.g., 'you believe that I believe that you believe'). To investigate this we formalized theory of mind reasoning as updating of beliefs about beliefs using dynamic epistemic logic (DEL). We presented the Dynamic Belief Update (DBU) model (which is a special case of DEL model checking), and we proved that it is PSPACE-complete. This means that (without additional constraints), there is no algorithm that computes DBU in a reasonable amount of time. In other words, without restrictions on its input domain, the model is computationally too hard to serve as a plausible explanation for human cognition. To investigate whether the 'order parameter' is a source of intractability, i.e., whether restricting the order of reasoning could render DBU tractable, we analyzed the parameterized complexity of DBU.
Possibly counterintuitively from a cognitive science perspective, we did not find any fixed-parameter tractability results for the order parameter, which we operationalized as the modal depth of formula ϕ in DBU. Already for a formula with modal depth one (even with just a single agent) DBU is NP-hard. It follows as a corollary from Proposition 1 that {o}-DBU (and {a}-DBU, and {a, o}-DBU) are para-NP-hard. For the parameters that we considered, we did not find any set of parameters for which adding order parameter o makes DBU fixed-parameter tractable. Note that  u} {a, c, f, o, u} {a, c, e, f, o} {a, p} {c, p} {f, p, u} {c, p, u} {a, e, f, o, p} {c, e, f, o, p} { a, f, o, p, u} {c, o, p, u} {a, c, p} { c, f, p, u} {a, c, e, f, o, p, u} , {a, c, o, p}-DBU or {c, f, o, p, u}-DBU could then be fixed-parameter tractable. In these cases, only in combination with at least three or four other parameters could restricting the order parameter lead to fixed-parameter tractability. Summing up, we found no evidence to support the claim that higher-order thinking is a source of intractability for theory of mind. It is important not to confuse computational intractability with cognitive difficulty here. Higher-order thinking could still be a source of difficulty for performing theory of mind for other reasons than computational complexity (e.g., due to limited working-memory). It is interesting to note that in our PSPACE-hardness proof we used more than one agent, while for DBU restricted to a single agent we were only able to show NPhardness. It is known that for games the complexity of the single-agent case often lays low in the polynomial hierarchy (e.g., NP-complete), while the two-agent case usually brings the complexity up to PSPACE-completeness (see, e.g., Burke et al. 2015;Reyzin 2006). We find this remarkable and we expect the same to hold for DBU. Determining the exact upper bound on the complexity of DBU restricted to a single agent, we leave for future research. Just like the modal depth, the number of agents seems to be related to higher-order theory of mind. Restricting a problem to a single agent, basically means eliminating the possibility of higher-order theory of mind. Allowing for two or more agents, on the other hand, means that there can be agents reasoning about each other; i.e., it allows for higher-order theory of mind. Like for many games, restricting DBU to a single agent does not render it tractable, as already for a single agent it is NP-hard. It is remarkable that even though it does not make the difference between tractability and intractability, the difference between one or more agents might still make the difference between a lower or higher location in the complexity landscape.
While we did not find any tractability results for the order parameter, we did find a fixed-parameter tractability result for the combination of two other parameters that we considered-namely, for parameters e and u, respectively the maximum number of events in any of the given event models and the number of event models, (i.e., the number of updates). When restricting only the number of events in the event models or only the number of event models, this does not render DBU tractable, but restricting both does. This shows that e and u together form a source of intractability. This result is perhaps not surprising since these two parameters determine the size of the search space for DBU. This is because the size of the final updated model (M 0 , W d ) ⊗ (E 1 , E 1 ) ⊗ · · · ⊗ (E u , E u ) (i.e., the search space for DBU) can be as large as and is upper bounded by the size of the initial model (M 0 , w 0 ) times e u . This fixed-parameter tractability result is consistent with the fact that a sequence of event models (E 1 , E 1 ), . . . , (E u , E u ) can be combined into one event model (E , E ) that has the same effect-at the cost of increasing the number of events to e u (van Ditmarsch and Kooi 2006). This means that combining the individual event models into one big event model does not buy tractability, since the size of the updated model (M 0 , W d ) ⊗ (E , E ) will still be as large as the size of the initial model (M 0 , w 0 ) times e u .
The question arises how we can interpret parameters e and u in terms of their cognitive counterparts. To what aspect of theory of mind do they correspond, and moreover, can we assume that they have small values in (many) real-life situations? In general, one could say that event models represent steps of change in time, and that the number of events in these event models represent the number of possible things (both factual and observational) that can happen. For instance, in the Sally-Anne example that we modeled the event model contains two events: one for the possibility that the marble stayed in the basket and one for the possibility that the marble was moved into the box while Sally is not aware of this. This event model stands for the change step in which 'Sally leaves the room and Anne moves the marble into the box.' It seems like a reasonable assumption that when considering situations of change, we do not consider many different steps of change at the same time, or that we consider many different things that could possibly happen in that situation. Of course, verifying this requires empirical research.
For the understanding of the complexity of theory of mind it is interesting that parameters e and u are unrelated to the order parameter. This seems to indicate that what makes theory of mind intractable is not necessarily higher-order thinking about others' mental states but, more in general, reasoning about change. So our results indicate that, contrarily to what is often believed, the intractability of theory of mind is not due to involvement of a specialized form of reasoning for the social domain.
Besides the implications for the understanding of the complexity of theory of mind, our complexity results might also be of independent interest for researchers working on dynamic epistemic logic. Previous results have shown that DEL model checking is PSPACE-complete for the case restricted to single-pointed KD45 models (Aucher and Schwarzentruber 2013;Bolander et al. 2015;van Eijck and Schwarzentruber 2014). We showed that DEL model checking is PSPACE-complete even for the more restricted case of single-pointed S5 models. We also analyzed the problem from a parameterized complexity point of view. We proved that for most combinations of the considered parameters the problem is fixed-parameter intractable (by means of hardness results for the classes W[1] and para-NP), and for one case we proved fixedparameter tractability (see Fig. 24 for an overview). These parameterized complexity results can be informative for researchers interested in implementations of DEL in computer science and AI. Understanding which parameters are sources of intractability in DEL-based models of epistemic reasoning informs such applied research efforts by specifying under which conditions tractable belief updating is possible and when it is not.

Conclusion
We analyzed the computational complexity of theory of mind, formalized as the updating of beliefs about beliefs in dynamic epistemic logic (DEL). A key finding is that our results suggest that the intractability of theory of mind is not due to the computational demands imposed by 'higher-order reasoning,' as often assumed in cognitive science. Instead, our results suggest that intractability of theory of mind may be better sought in the computational demands posed by a more general form of reasoning about steps of change in time.
In sum, our work showcases how logic and complexity theory can inform debates in cognitive science. We adopted this methodological approach and conceptual framework to help bridge the areas of logic and cognitive science. We hope that it may serve as a guide for more future research at the interface of logic, complexity, and cognition. Future research may include investigating alternative ways to parameterize higher-order thinking in DEL. It would be interesting to see whether there are other ways to formalize and possibly bound the order of reasoning in DEL models. For a broader applicability of using DEL for modeling theory of mind, future research may furthermore include extending the model to a wider palette of mental states, like emotional and motivational states.