The Euler-Equation Approach in Average-Oriented Opinion Dynamics †

: We consider the models of average-oriented opinion dynamics. An opinion about an event is distributed among the agents of a social network. There are an optimization problem and two game-theoretical models when players as centers of inﬂuence aim to make the opinions of the agents closer to the target ones in a ﬁnite time horizon minimizing their costs. The optimization problem and the games of competition for the agents’ opinion are linear-quadratic and solved using the Euler-equation approach. The optimal strategies for optimization problem and the Nash equilibria in the open-loop strategies for the games are found. Numerical simulations demonstrate theoretical results.


Introduction
The new informational aspects of our life allow us to imagine and realize the mechanisms of influences on society's members and their opinions on some political and other social events. We can also assume that that the level of influence may be regulated by centers of influence in different ways (e.g., increasing the costs on advertisement policies, political debates, etc.). Different centers of influence may want to obtain opposite opinions or various levels of opinions on some event and the process to obtain these opinions among the members of the society becomes a competition. We propose several models with one or two players who compete for the opinion of society members based on DeGroot's model of information diffusion [1], in which the opinion dynamic is described as a dynamic process where agents or society members can influence each other's opinions with a given intensity rate at any discrete time.
The models of finding a consensus are close to the models of informational influence on population and information control models (see, e.g., papers [2,3] and books [4,5]). A model of opinion dynamics with two principals or centers of influence is presented in [6], in which the conditions of existence of the limit opinions are obtained for a given matrix of influences. The problem of reaching a consensus can be modeled as a repeated game [7] or mean field game [8]. There are also imitation models of opinion dynamics [9]. The competitive and cooperative models of opinion dynamics are also considered in [10,11], in which the dynamic games of opinion formation are linear-quadratic. The authors find the equilibria representing the level of influence with different information structures (open-loop and closed-loop).
We introduce the models of opinion dynamics when agents, being the members of the network, form their opinions by the influence of the average opinion of the society. The averaging society opinion is considered as a natural way to represent a global trend in the present communities [12]. Besides the agents who form the social network, there are one or two centers of influence which are interested in making the opinion of any player as close as possible to the target one. First, we consider an optimization problem with one player (a unique center of influence) minimizing costs that also depend on the level of influence. In this case, there are only two agents in the network, one of them is directly influenced by the player and the other one is influenced by the player via the opinion of the first agent. Second, we introduce a model of opinion dynamics with two players and two agents in the social network. Each player influences the opinion of the corresponding agent directly and the other agent's opinion indirectly. Players are willing to minimize quadratic costs, trying to make the agents' opinions closer to the target ones. We use the Nash equilibrium as a solution concept to solve the game. Third, we extend the previous model to the case when there are many agents and two players and the agents are divided into two groups by the influence of a particular player.
A social network defined by a set of agents described as the nodes in a network which is called a star is examined in [13]. In that paper, the agents of the society communicate within the network and form opinions by influence of other society members who have direct links with them in the network. Agents cannot vary the intensity of influence over time. We assume that intensities are defined in a given matrix. In a star graph, one agent is centered and all non-central agents have a unique link connecting these agents with the center. The agents which are located not in the center of the network are assumed to be identical with their influential power on the central agent. The communication graph with a star structure can describe the small social networks in any company or office when there exists one head [14]. Models using game theory ideas describing the network structures are considered in [15]. In the case where the network has a lot of nodes, which can be difficult to examine, first the problem of partitioning the nodes is applied (see such models in [16,17]).
In all models presented in the paper, the state of the system considered in discrete time is defined by a profile of the opinions of the social network members. The dynamics of the state variable are given by a linear equation subject to the state in the previous period and players' intensities of influence. The players' costs are linear-quadratic functions with respect to the state variables and players' strategies; therefore, the game we model is a linear-quadratic difference game. See [18,19] for a detailed analysis of the results on LQ games. The Euler-equation approach to find the solutions in such a class of games is considered in [20]. In our paper, we first use the Euler-equation approach for the problems of opinion dynamics. This approach allows to find optimal or equilibrium strategies in a simpler way in comparison with Pontryagin's maximum principle. In numerical simulation made for the paper, the Euler-equation approach demonstrates better results in working time, especially, when the number of periods is large.
The rest of the paper is organized as follows. We describe the Euler-equation approach in Section 2. In Section 3, we describe the optimization model with the given average-oriented opinion dynamics. Section 4 contains the main result for the case of two agents and one player and finds the optimal strategy of the player optimal opinion trajectory in an explicit way. Then we introduce a game-theoretical model of competition for agents' opinion in Section 5. An extension of this model on the case of many agents is presented in Section 6. We briefly conclude in Section 7.

The Euler-Equation Approach
Let X ⊂ R n and U ⊂ R m be the state space and the control set, respectively. The state of a system evaluates with respect to dynamics with initial state x 0 ∈ X. The optimal control problem is to find a control u(t) ∈ U maximizing Functional with respect to the state dynamics Equations (1) and a given initial condition x(0) = x 0 . We can reformulate this problem in terms of the state trajectory x(t). Suppose that we can express u(t) from Equation (1) as a function of x(t) and x(t + 1), say u(t) = q(x(t), x(t + 1)). Therefore, we can rewrite Functional (2) in the following form: where g t (x(t), x(t + 1)) = r t (x(t), q(x(t), x(t + 1))), t = 0, 1, . . . , T − 1.
The Euler equation approach gives the necessary conditions (see [20][21][22]) for the optimal trajectory x * (t): We can notice that games considered in the paper belong to the class of linear-quadratic games, so the necessary conditions will be also sufficient conditions. We will apply the Euler-equation method to find the optimal strategies in the dynamic games with average-oriented opinion dynamics.

Optimization Problem
We consider a society consisting of n agents. Each agent i has an opinion x i ∈ R, i = 1, . . . , n. The agents communicate with each other and change the opinion over time, which is assumed to be discrete and finite. Let opinion of agent i at time t be x i (t) ∈ R, t = 0, . . . , T. We also assume that there exists a player who influences the opinion of one particular agent, say agent 1 with intensity u(t) ∈ R at time t = 0, 1, . . . , T − 1. In period T the player does not influence the agent's opinion. The opinion of agent 1 changes depending on his own opinion, the average opinion of the society and influence of the player. The opinion of any agent i = 2, . . . , n changes over time depending on his own opinion and the average opinion of the society. The opinion dynamics is defined by the following equations: with initial condition In Equations (5) and (6), constants a i ∈ R + , i = 1, . . . , n show the beliefs of agents to the average opinion of the society. The higher the average opinion, the higher the opinion of the agent at next time period. Let the player aim in taking the opinion of all agents around some particular level s ∈ R minimizing the total costs which are where δ ∈ (0, 1] is a discount factor and c > 0 is the player's costs per unit of influence intense.

Case of Two Agents and One Player
For simplicity, we first consider the problem when the society consists of two agents and the opinion of agent 1 is influenced by the player. Therefore, we have the dynamics equations: with initial condition The dynamics equations may be rewritten in the following form: with the same initial conditions. The optimization problem for the player is to minimize the functional The following theorem provide conditions to find the optimal strategy u(t) minimizing Functional (12) subject to initial Conditions (9) and the state dynamics of Systems (10) and (11). Theorem 1. Let {u * (t) : t = 0, . . . , T − 1} be the optimal strategy minimizing Functional (12) subject to initial conditions (9) and state dynamics Equations (10) and (11) and {(x * 1 (t), x * 2 (t)) : t = 0, . . . , T} be the corresponding state trajectory, then the optimal strategy u * (t), t = 0, . . . , T − 1 is and corresponding optimal state trajectory (x * 1 (t), x * 2 (t)), t = 1, . . . , T is satisfied to equations: Proof of Theorem 1. For simplicity, we introduce a new variable z(t) as Then, we rewrite state equations in the following way: . For using the method of Euler's equations, we find the expression of u(t) from Equation (14) and substitute it to Functional (3) and obtain The function J(z, x 2 ) is convex in z, x 2 . So, the minimum of this function under condition given by Equation (15) always exists. We form the Lagrange function and write the first order conditions .., T, we obtain the system of equations: The theorem is proved. Remark 1. The Euler equation approach used to prove Theorem 1 and further Theorems 2 and 3 can be called an inverse method of solving the optimal control problems. System (13) in Theorem 1 is solved with respect to the state variable, i.e., the solution gives the optimal trajectory, and corresponding optimal controls are found in a unique way from the optimal state trajectory. This approach can be used only if the control or strategy can be represented as a function of state variables. Example 1. Let the parameters of the optimal control problem be following: a 1 = 0.8, a 2 = 0.6, δ = 0.9, c = 0.1 and initial opinions be x 1 (0) = 0.4, x 2 (0) = 0.3. For time horizon T = 8 and target opinion s = 0.9, the optimal trajectory and optimal control are presented in Table 1. The optimal value for Functional (3) is 1.141.

Case of Two Agents and Two Players
Now we consider the case of competition on agents' opinions. In comparison with the model described above, we assume that there are two players and one of them directly influences agent 1 and the other one -agent 2. The players have the same discount factors but they are different in their costs per unit of influence intense (c 1 and c 2 ) and target opinion levels (s 1 and s 2 ).
The state equations for opinions of agents 1 and 2 are with initial Condition (9). Players 1 and 2 are willing to minimize the functionals correspondingly, where c i > 0 is player i's costs per unit of influence intensity. We can define a two-player game in normal form representation with the set of players' strategies U 1 , U 2 , where U j = (u j (t) ∈ R : t = 0, . . . , T − 1), j = 1, 2, players' cost functions J 1 , J 2 , defined by Formulas (19) and (20) s.t. state Equations (17) and (18) with initial state x(0) = (x 1 (0), x 2 (0)) = (x 0 1 , x 0 2 ). The game belongs to the class of linear-quadratic games.
The Nash equilibrium is used as an optimality principle or solution of the game with profile of strategies (u * 1 , u * 2 ) s.t. the inequalities hold for any u 1 ∈ U 1 and u 2 ∈ U 2 . Let us fix u 2 (t), t = 0, . . . , T − 1 and find the best response of Player 1. We use the Euler-approach to find the Nash equilibrium in the game described. First, we find expressions of u 1 (t) from state Equation (17) as a function of x 1 and x 2 and u 2 (t) from state Equation (18) as a function of x 1 and x 2 : The goal of the first player is to minimize subject to Condition (18). We form the Lagrange function where k 1 = {k 1 t , t = 0, . . . , T − 1}. Finding the derivatives ∂L 1 (x 1 ,x 2 ,k 1 ) and ∂L 1 (x 1 ,x 2 ,k 1 ) ∂x 2 (t) , t = 1, . . . , T and equating them to zero, we obtain the corresponding systems: From the first equation of System (21) we obtain (21), we obtain the system of equations to define the best response strategy of Player 1:

t and substituting it to System (22) and taking into account the second equation in System
We determine the best response strategy of Player 2 in the same way.
The following theorem gives the necessary conditions of the Nash equilibrium for the game described above.

Case of Many Agents and Two Players
In this section we extend the model introduced in Section 4 on the case when there are more than two agents. The finite set of agents is divided into two groups. The first group contains agent 1 whose opinion is influenced by the average opinion of the society and Player 1. The second group contains n identical agents whose opinion is influenced by the average opinion of the society and Player 2.
Proof of Theorem 3. First, we fix u 2 (t), t = 0, . . . , T − 1 and find the best response of Player 1. Using the Euler-approach to find the Nash equilibrium in the game described, we find expressions of u 1 (t) from state Equation (24) as a function of x 1 , x 2 , . . ., x n+1 and u 2 (t) from state Equation (25) as a function of x 1 , . . . , x n+1 : The goal of the first player is to minimize subject to Equation (25). We form the Lagrange function where k 1 = {k 1j t , j = 2, . . . , n + 1, t = 0, . . . , T − 1}. Finding the derivatives ∂L 1 ∂x 1 (t) and ∂L 1 ∂x i (t) , i = 2, . . . , n + 1, t = 1, . . . , T and equating them to zero, and taking into account the symmetry of agents 2, . . ., n + 1, we obtain the corresponding systems: From the first equation of System (29) we obtain Denotingk 1 t = k 1 t δ −t and substituting it to Equation (30) and taking into account the second equation in System (29), we obtain the system of equations to define the best response strategy of Player 1: We determine the best response strategy of Player 2 in the same way and obtain the System (28).   . Strategy trajectories (red -u 1 (t), blue -u 2 (t)).
Corresponding graphs of the costs as the functions on n are depicted on Figure 7. One can notice that the cost function of Player 1 who influences directly on agent 1 is non-monotonic. First, it decreases for n from 1 to 5, then it increases. As this fact is not clearly recognized from Figure 7

Remark 2.
The Euler-equation approach can be considered as an indirect method of solving optimal control problems contrary to Pontryagin's maximum principle. The Euler-equation approach defines the system of equations with respect to state variables. In many cases the method leads to a solution of difference equation with respect to state variables. We should notice the computational advantage of the Euler-equation, the realizations of which (see Examples 1-4) provide better results compared with realizations of Pontryagin's maximum principle, e.g., the program finding the equilibrium strategies and costs in Example 2 for 20 periods provides the results on Euler-equation approach in 5 s, but on Pontryagin's maximum principle, it takes more than 20 min.

Conclusions
We propose a model of opinion dynamics with one and two players who may influence the society opinion interacting with the agents. The opinion of an agent, being a member of a society, is formed taking into account not only his own past opinion but also the past average opinion of the society. We use the arithmetic mean of the opinion as an average opinion while the other methods of averaging may be considered in future research including geometric mean, a power mean or a random mean [23]. We find the optimal influence intensity of the player in the case when he is the unique center of influence and the Nash equilibria when there are two centers in cases where there are two agents and many agents in the society. We use the Euler-equation approach to find the solutions. The equilibrium policies found in the paper may help in planning the "influence strategy" for the players, minimizing their costs to make opinions of the members of a social network as close to the desired one as possible. The method of solving the problem may be applied to the models with more than two players and many groups of influence. The presentation of the resulting systems of equations providing the Nash equilibrium may be difficult in paper format. Numerical modeling demonstrates the theoretical results of the paper.

Conflicts of Interest:
The authors declare no conflict of interest.