I It consists of the synthesis of a finite state machine (a circuit) which realizes a bit-to-bit transformation of an infinite sequence
satisfies a specification expressed in a suitable (temporal) logic. Goal: given a specification of the input-output relation between α
Note
In this class we work with finite strings
==Example==
==First Condition==
If at a given time
For instance one solution to this specification would be a constantly blackbox that always returns
So lets add a second condition to prevent the easy solution before:
This says that there should not be 2 consecutive
Now lets add a third Condition:
What is a solution?:
- When there is a 0 we return 0
- if the input is 0, it produces the output 1 if the previous output was a 0, otherwise it returns 0.
What other conditions need to be satisfied?
-
bit-to-bit
When the machine receives the$n_{th}$ character of$α$ (as input), it must immediately produce the$n-th$ character of$\beta$ (as output). It follows that$\beta(n)$ may only depend on$\alpha(1),\dots , \alpha(n − 1), \alpha(n)$ ; i.e. no output delay... -
a finite state solution (machine)
To compute the output of a generic computation step (the output at time
$t$ ), the machine needs to exploit a finite memory of a given size.
A possible solution is the following automaton:
[!Question] What does the syntax of
$x/y$ over the edges mean?$x$ is the ingested letter,$y$ is the output letter. so if we are in state "last output 0" and we ingests$0$ or$1$ we go to the state "last output 1" and output$1$ .
==Example 2==
==Example 3==
(
==Example 3==
1.1 [[Mealy automaton]] aka input-output automaton.
A Mealy automaton
- a finite state automaton
- with an output function:
$\tau: S \times \Sigma \to \Gamma$ -
$S$ is the finite set of states -
$\Sigma$ is a finite input alphabet -
$\Gamma$ is a finite output alphabet
-
Given the input sequence:
where
-
$\delta^*(s_0,\alpha(0),\dots,\alpha(t-1))$ here is needed to define the current state of the automation. Starting from$s_0$ we input the symbols$\alpha(0)$ till$\alpha(t-1)$ till we are in a certain state for instance$s_x$ -
$\alpha(t)$ Is the symbol ingested last to go from the state reached in$t-1$ i.e.$s_x$ to the next state$s_y$ i.e. the state when we are in state$s_x$ and ingest the symbol$\alpha(t)$
Initially the researchers defining Mealy automaton based their reasoning on S1S: Monadic second order of one sucessor denoted by
- The ordering relation
$<$ is (second-order) definable in terms of the successor function$+1: s < t$ if and only if t belongs to each set that includes$s + 1$ and is closed under successor relation. - I For the sake of simplicity, we will only consider Boolean input and output alphabets, that is,
${0, 1}$ . - The S1S-formulas
$φ(X, Y)$ we will take into consideration talk about sequences$α \in {0, 1}^\omega$ and$β ∈ {0, 1}^\omega$ . - The free variable
$X$ identifies those positions where$α$ takes value$1$ , while the free variable$Y$ identifies those where$β$ takes value 1. We denote the interpretations of$X$ and$Y$ induced by$α$ and$β$ by$P_\alpha$ and$P_\beta$ , respectively. That means that$P_\alpha$ and$P_\beta$ are predicates that when given a timepoint$t$ they return$true$ if at that position$\alpha$ or$\beta$ are$1$ .
Church’s problem can be precisely stated as follows:
Given an S1S-formula φ(X, Y), build a Mealy automaton M, with input alphabet
It can be easily generalized to an input alphabet
A finite state winning strategy for an infinite game: according to a game-theoretic interpretation, a Mealy automaton can be viewed as the definition of a winning strategy for player
VV 44 b
2 Turning a Automaton into a game
We know all the features from above already. The thing we will learn is how to turn a Automaton into a game.
They first write a S1S formula then transform it into a Deterministic Muller Automata. Then it gets transformed into a [[Muller Game]] and then into a [[parity game]].
2.2 From S1S to Muller Game
We first transform a S1S specification into a deterministic Muller Automata.
We know that
We can transforms are computable but extremely expensive.
Therefore lets look at a solution:
2.3 From Muller Automata to Muller Game
The automaton in the previous step is transformed into a game.
==Lets do an example==
We have the following Muller Automata which fullfills the above mentioned specifications and we want to turn it to a Muller Game.
Each State
In the example below we see the split up of the node
This models the dynamic that the adversary controls the input bits, us the player control the output bits.
After the input bit was choosen by the adversary, and the output bit is chosen by us, we return to a existing node of the
Lets now convert the Muller Automata from above into a Muller Game:
Below we see the converted Muller Game. The square states are controlled by the adversary, the round states are controlled by us.
Note
The nodes have different names
Lets see how we create all branches from the state
That means the adversary has two choices either he chooses
Now we have to look where the outgoing branches go for Node
With that we have the following game.
Now lets add the node if the input is
This are all branches for for node 1. Then we continue with node
2.4 Games on the Muller Game arena
We now introduce different games and the winning condition for games on the game graph of Muller arenass.
Is the board on which we play the Muller Game.
the Graph has the following setup:
-
$Q$ : All states -
$Q_A$ : States controlled by the adverary -
$Q_B$ : States controlled by the player -
$E$ -> edges There are no deadlocks: i.e.$\forall q \in Q: Eq \neq \emptyset$
Each edge from
A play on the game graph
A game is a pair
Player B wins the play if he can create a path through the arena
2.5 Muller Games, Weak muller games and Reachability games
2.5.1 Muller Games winning condition
-
Muller Game
Muller games: the winning condition is a collection of sets of states
$F ⊆ 2^Q$ such that$B$ wins$\rho$ if and only if$Inf(ρ) ∈ F$ . That is simmilar to the original Muller Automata acceptance condition -
Weak muller games
There exists a weak version of the winning condition of Muller games (Staiger-Wagner condition), according to which
$B$ wins the play$ρ$ if and only if$Occ(ρ) ∈ F$ , where$Occ(\rho) = {q \in Q : \exists i(\rho(i) = q})$ . That means that we do not have to traverse a state$p$ infinitely many times, but$p$ only needs to be traversed once. -
Reachability Games
We define a set of winning sates
$F \in Q$ .$B$ wins the play$\rho$ if some state in the play belongs to$F$ .
2.6 Strategies, Winning Strategy and determined games.
- A Strategy for a player is a mapping
$f : Q^+ \to Q$ such that, given the history of the game up a certain state (under his/her control), specifies his/her behavior at the next step. - A strategy
$f$ for player$B$ from$q$ is a winning strategy if each play from$q$ , played according to f , is won by player B. -
winning region
$WB := {q \in Q | B \text{wins starting from} q}$ is said the winning region of$B$ (the same for$A$ ). - Obviously, the winning regions of Alice and Bob can not be overlapping
$WA \cap WB = \emptyset$ . -
Determined games
If
$W_A \bigcup W_B=Q$ we say that the game is a determined game. This means that for each state of the game, one of the two players have a winning strategy.
The [[solution of a game]]
- to establish for each
$q \in Q$ if$q \in W_A$ or$q\in W_B$ - to build a (finitely describable) winning strategy starting from gamestate
$q$ (for$B$ , if$q \in W_B$ ; for$A$ , otherwise).
There are two types of Strategies:
- positional Strategy:
A strategy is positional if the value of
$f(q_1,\dots,q_k)$ only depends on the current state$q_k$ . A positional strategy for$B$ is a mapping$f: Q_B \to Q$ (similarly for$A$ ) In graph-theoretic terms, a positional strategy for$B$ can be expressed as a subset of edges of$G$ , which includes all edges exiting from states in$Q_A$ and at least one edge exiting from states in$Q_B$ (the one identified by the function). This means that independently how the player$A$ plays in one of the states in$Q_A$ , we can react with one distinct move when it is our turn i.e. we are in one of the states in$Q_B$
In easy words it means that we can build a finite state Mealy automaton that tells us how to win the game.
-
Formally,
$f$ is a finite state strategy if it can be computed by a Mealy automaton of the form$S = (S, Q, Q, s_0 , \delta, \tau )$ , where$S$ is a finite set of states,$Q$ is both the input and output alphabet,$s_0 \in S$ is the initial state,$\delta : S \times Q \to S$ , and$\tau : S \times Q_A \to Q$ , for$A$ , and$\tau : S \times Q_B → Q$ , for$B$ . -
$\delta$ is the transitions function telling us how we move in the Mealy automaton. -
$\tau$ are the transition functions defining to which state we need to go depending on the current state of the game$Q_A$ or$Q_B$ and the state of the Mealy automaton$S$ . -
A strategy
$f : Q^+ \to Q$ on a finite set of states$Q$ can be viewed as a function on words.
A strategy
$$f_S(q_0,\dots,q_k)=\tau(\underbrace{\delta^*(s_0,q_0 \dots q_k-1)}{\text{state at } k},\underbrace{q_k}{\text{input at position } k})$$
where
[!Note] [[Theorem 24]] Weak muller games are Determined and for each weak Muller Game
$(G, F)$ , where$G$ has$n$ states, the winning regions for the two players can be effectively determined and it is possible to build, for each state$q$ in$G$ , a Finite state winning strategy from$q$ (for the winning player) making use of a memory with$2^n$ states.
The explanation of the memory of the Mealy automaton needed for the finite state winning strategy is because of the winning condition of Weak muller game. We need to encounter one of the final states.
The number
[!Note] [[Theorem 25]] Muller Games are Determined and for each Muller game
$(G, F)$ , where$G$ has$n$ states, the winning regions for the two players can be effectively determined and it is possible to build, for each state$q$ in$G$ , a finite state winning strategy from$q$ (for the winning player) making use of a memory with$n! \cdot n$ states.
4 A solution of Church's Problem
- given S1S formula
$\varphi(X,Y)$ we transform it into a Muller Automaton$M$ - We transform the Muller Automata into a Muller Game with graph
$G$ and Muller Winning condition ($G$ inherits its initial state from the automaton) -
Buechi Landweber Theorem makes it possible to determine the winning regions and to establish whether the initial state of the game belongs to
$W_B$ ; in such a case, we build the Mealy automaton$S$ which realizes the winning strategy, starting from the initial state ($S$ is called the strategy automaton); - the Mealy automaton
$A$ , that solves Church's Problem, is obtained from the product of the strategy automaton$S$ and the game graph$M$ .
It is worth pointing out that Buechi Landweber Theorem is exploited only at step 3.
-
The state space of
$A$ is$Q \times S$ , where$Q$ is the set of states of the Muller Automaton$M$ and$S$ is the set of states of the strategy automaton$S$ , and its initial state is$(q_0 , s_0 )$ ; -
A transition (of the Mealy automaton) must be specified for each state
$(q, s)$ and each input bit$b$ , that is, an output bit$b'$ and a new state$(q' , s' )$ ; -
To this end, the state
$q^∗ = (q, b)$ of the game graph$G$ and the state$s^* = \delta(s, q^∗ )$ of the strategy automaton$S$ associated with it must be computed; -
The output function of
$S$ returns the state$q' = \tau(s^* , q^* )$ of the game graph$G$ , while its transition function returns the new memory state$s' = \delta(s^* , q_0 )$ ; -
the output bit
$b_0$ is the value$out(q, b, q_0 )$ associated with the transition from$q^∗ = (q, b)$ to$q'$ .
[!Note] Remark: The memory of A combines the state space of the Muller automaton M and the state space of the strategy automaton S (see item 1).
Visually this looks like this:
- We are in the in the initial state of the strategy automaton
$s_0$ - The state of the game arena gets announced, we jump from
$s_0$ to a state$s$ in which we can react to the new state$q$ (the state of the game arena) - The first input bit
$b$ is chosen, this makes it necessary that the strategy automaton changes it state depending on the current state of the game arena$q$ and the chosen input bit$b$ this is referred to as$(q,b)=q^*$ - The strategy automaton changes its state from
$s$ to $s^$ depending on chosen input bit and the game state i.e. $(q,b)=q^$. This is referred to as an invocation of the transfer function $ \delta(s,(q,b))=\delta(s,q^)=s^$ - The output bit
$b'$ is chosen by the strategy automaton, resulting in an change on the game graph from state$(q,b)$ to state$q'$ . This is an invocation of the transfer function $\tau(s^,q^)=q'$ The movement on the game graph has ended. - As we are now in a new a new state in the game graph, we have to adapt the state of the strategy graph one last time therefore we consider the state of the game graph and the state of the strategy graph ($\delta(s^*,q')$)resulting in a final state
$s'$
[!Note] [[Theorem 26]] A Reachability Games
$(G, F)$ , with$G = (Q, Q_A , E)$ and$F \subseteq Q$ , is determined and both the winning regions$W_A$ and$W_B$ for players$A$ and$B$ , respectively, and the corresponding positional strategies are computable.
[!Note] Proof For
$i = 0, 1,\dots$ , compute the vertices starting from which player$B$ can force a visit in$F$ in at most$i$ moves ($i^{th}$ attractor $Attr^i_B (F)$).When do we add a state to the set of
$Attr_B$ ? If it is a state under the control of$B$ there needs to be one edge ($\exists$ ) to a state that is already part of$Attr_B$ . If the state is under control of$A$ all ($\forall$ ) edges need to go to a state that is already part of$Attr_B$ .The sequence
$Attr^0_B (F)(= F) \subseteq Attr^1_B(F) \subseteq Attr^2_B(F) \dots$ becomes It stationary can be easily for some proved index that$k ≤ |Q|$ . We define$Attr_B=\bigcup^{|Q|}_{i=0}Attr^i_B(F)$ . It can easily be prooven that$W_B=Attr_B(F)$ .
45 a
It is possible to show that the winning condition for weak Muller games (player
In general, positional strategies do not suffice to win Weak muller games. In some cases, indeed, it is necessary to remember the states that have been already visited.
Lets look at the example for Thomas tutorial:
Solution: a Mealy automaton
7 weak parity games from Weak muller games
Pairty -> even and odd
It is possible to associate a
What number do we give each subset?
- If
$R \in F$ $c(R)=2 \cdot |R|$ - if
$R \not \in F$ $c(R)=2 \cdot |R|-1$
Now to determine the cardinality of
To determine the member ship of
- even:
$R \in F$ - odd:
$R \not \in F$
Let
It holds that
A weak Muller game can be transformed into a weak parity game (game simulation).
Lets create an example we have
The cardinality is 3. It does belong to
Lets do another example:
The Cardinality is 2. It does not belong to
If the maximum number
[!Note] This has multiple advantages To look at the game progress one only needs to add the states one traverses in the game, as there is a limited number of states i.e.
$|Q|$ the set will not change from a certain point on i.e. a fixpoint is reached. Then we calculate the "color" number. If the number is even we win the game, if the number is uneven we lose the game. We can forget the actual game and only look at the end result.
We call this game with colors weak parity game.
This introduces the idea of [[Game simulation]].
[!Note] Game simulation When we want to get the result of one game, but play another to deduct the outcome of the first game.
We denote this as as
7.1 Consequences of Game simulations
Consequence: positional strategies for
[!Note] [[Lemma 24]] If there exists a positional winning strategy for player
$B$ in$(G' , W' )$ from$(s_0 , q)$ , then player$B$ has a Finite state winning Strategy from$q$ in$(G, W)$ .
==Proof==
We extend the automaton
8 From Muller Games to parity games
-
Muller games can be simulated by parity games by means of the LAR ([[Latest Appearance Record]]) structure.
-
Intuitively, a LAR represents the sequence of states encountered during a play, ordered according to their last occurrence / appearance. If the current state was already visited in the past, then it is moved from the position h (called hit) it occupies in the current LAR to the first position of the new LAR.
-
Given a LAR
$((i_1 \dotsi_r ), h)$ , its hitting set is the set${i1 , ..., ih }$ of the states which were encountered up to the hit$h$ (including position$h$ ).
8.1 What is a LAR
It is a way to track the states that occur infinitely many times.
We track the occurences of letters, every time we encounter a letter we increase the hitting number.
- hitting number
$0$ - hitting number
$1$ - hitting number 2
- ...
The hitting set contains all letters that we encounter between occurences, ==including the letter itself(as between row 2 and 3, it is only {C})==. Between row 4 and 6 it is for example it is
At a certain point the hitting number can not grow beyond a certain value, because there are some states that we just do not encounter anymore.
Then we take the biggest set since the last
We need to run it
-
$n!$ -> all permuations of states -
$n$ -> all values for the hitting time
8.2 parity games and how we use LARs to determine the if we won
Let
The winning condition for the play
The winning condition for Muller Games can be redefined in terms of a suitable coloring of LAR.
==Parity condition==:
A colored graph
We run the through the graph while keeping track of reoccurences of nodes using a LAR. All unique sets get a colour (number) after the following rule:
When the biggest set that occures is has a even color (number).
In other words we can say it like this
It can be easily shown that the Muller condition
[!Note] Proof:
- if
$Inf(ρ) ∈ F$ , then$H(= {i_1 , ..., i_h }) ∈ F$ and the greatest color that occurs infinitely often is$2h$ , which is even.- (⇐) the greatest color that occurs infinitely often is
$2h$ , which is even, and, thus, the corresponding hitting set belongs to$F$ , from which it follows that$Inf(ρ) ∈ F$ .
A Muller Game
8.3 parity games are deterined
[!Note] [[Theorem 27]] A parity game
$(G, c)$ is determined and the construction of the winning regions and the positional strategies for$A$ and$B$ are effective.
Let
We look at a parity game:
Let
Base case is trivial: If one is already in
Inductive step:
-
Let the greatest color
$k$ be even and let$q$ be a state with color$k$ . -
$A_0 = Attr_B ({q})$ .$Q / A_0$ is a subgame. It shows that$B$ can reach the state$q$ in a finite number of steps. -
By the inductive hypothesis, we can partition
$Q / A0$ in the two winning region$U_A$ an$U_B$ for$A$ and$B$ , respectively. One of the two cases holds:- From
$q$ , player$B$ can force the play to stay in$U_B \cup A_0$ at the next step.
-
$W_B = U_B \cup A_0$ and$W_A = U_A$ by applying the positional strategies of the inductive hypothesis on$U_A$ and$U_B$ , the attractor strategy on$Attr_B ({q})$ , and the choice of the next state from$q$ according to Case$1$ .
- From
$q$ player$A$ can force the play to stay in$U_A$ at the next step
- It follows that
$q \in Attr_A (U_A)$ . Let us consider now the set$A_1 = Attr_A (U_A \cup {q})$ . By applying the inductive hypothesis on the subgame induced by$Q / A_1$ , we obtain$V_A$ and$V_B$ . It holds that$W_B = V_B$ and$W_A = V_A \cup A_1$ , where the winning positional strategies are given by the inductive hypothesis and the attractor strategy on$A_1$ .
- From
From the proof of the theorem, it is not difficult to extract a procedure of exponential complexity.
It is known that the problem: “Given a parity game
The possibility of deciding such a problem in polynomial time is one of the most important open problems in the algorithmic theory of infinite games.
[!Note] Remark: equivalence of the above problem and the model checking problem for the mu-calculus.
A number of variants of Church's Problem can be obtained by modifying or generalizing the specification language.
A special attention has been given to the synthesis problem for LTL and other temporal logics.
46 a
--