Near Optimal Behavior via Approximate State Abstraction\@footnotetextA previous version of this paper was published in the Proceedings of the 33rd International Conference on Machine Learning, New York, NY, USA, 2016. JMLR: W&CP volume 48. Copyright 2016 by the author(s).

# Near Optimal Behavior via Approximate State Abstraction\@footnotetextA previous version of this paper was published in the Proceedings of the 33rd International Conference on Machine Learning, New York, NY, USA, 2016. JMLR: W&CP volume 48. Copyright 2016 by the author(s).

## Abstract

The combinatorial explosion that plagues planning and reinforcement learning (RL) algorithms can be moderated using state abstraction. Prohibitively large task representations can be condensed such that essential information is preserved, and consequently, solutions are tractably computable. However, exact abstractions, which treat only fully-identical situations as equivalent, fail to present opportunities for abstraction in environments where no two situations are exactly alike. In this work, we investigate approximate state abstractions, which treat nearly-identical situations as equivalent. We present theoretical guarantees of the quality of behaviors derived from four types of approximate abstractions. Additionally, we empirically demonstrate that approximate abstractions lead to reduction in task complexity and bounded loss of optimality of behavior in a variety of environments.

\newmdenv

[ topline=false, bottomline=false, rightline = false, leftmargin=10pt, rightmargin=0pt, innertopmargin=0pt, innerbottommargin=0pt ]innerproof

MDP
Markov Decision Process
RL
reinforcement learning

## 1 Introduction

Abstraction plays a fundamental role in learning. Through abstraction, intelligent agents may reason about only the salient features of their environment while ignoring what is irrelevant. Consequently, agents are able to solve considerably more complex problems than they would be able to without the use of abstraction. However, exact abstractions, which treat only fully-identical situations as equivalent, require complete knowledge that is computationally intractable to obtain. Furthermore, often no two situations are identical, so exact abstractions are often ineffective. To overcome these issues, we investigate approximate abstractions that enable agents to treat sufficiently similar situations as identical. This work characterizes the impact of equating “sufficiently similar” states in the context of planning and RL in Markov Decision Processes. The remainder of our introduction contextualizes these intuitions in MDPs.

Solving for optimal behavior in MDPs in a planning setting is known to be P-Complete in the size of the state space [28, 25]. Similarly, many RL algorithms for solving MDPs are known to require a number of samples polynomial in the size of the state space [31]. Although polynomial runtime or sample complexity may seem like a reasonable constraint, the size of the state space of an MDP grows super-polynomially with the number of variables that characterize the domain - a result of Bellman’s curse of dimensionality. Thus, solutions polynomial in state space size are often ineffective for sufficiently complex tasks. For instance, a robot involved in a pick-and-place task might be able to employ planning algorithms to solve for how to manipulate some objects into a desired configuration in time polynomial in the number of states, but the number of states it must consider grows exponentially with the number of objects with which it is working [1].

Thus, a key research agenda for planning and RL is leveraging abstraction to reduce large state spaces [2, 21, 10, 12, 6]. This agenda has given rise to methods that reduce ground MDPs with large state spaces to abstract MDPs with smaller state spaces by aggregating states according to some notion of equality or similarity. In the context of MDPs, we understand exact abstractions as those that aggregate states with equal values of particular quantities, for example, optimal -values. Existing work has characterized how exact abstractions can fully maintain optimality in MDPs [24, 8].

The thesis of this work is that performing approximate abstraction in MDPs by relaxing the state aggregation criteria from equality to similarity achieves polynomially bounded error in the resulting behavior while offering three benefits. First, approximate abstractions employ the sort of knowledge that we expect a planning or learning algorithm to compute without fully solving the MDP. In contrast, exact abstractions often require solving for optimal behavior, thereby defeating the purpose of abstraction. Second, because of their relaxed criteria, approximate abstractions can achieve greater degrees of compression than exact abstractions. This difference is particularly important in environments where no two states are identical. Third, because the state aggregation criteria are relaxed to near equality, approximate abstractions are able to tune the aggressiveness of abstraction by adjusting what they consider sufficiently similar states.

We support this thesis by describing four different types of approximate abstraction functions that preserve near-optimal behavior by aggregating states on different criteria: , on similar optimal -values, , on similarity of rewards and transitions, , on similarity of a Boltzmann distribution over optimal -values, and , on similarity of a multinomial distribution over optimal -values. Furthermore, we empirically demonstrate the relationship between the degree of compression and error incurred on a variety of MDPs.

This paper is organized as follows. In the next section, we introduce the necessary terminology and background of MDPs and state abstraction. Section 3 surveys existing work on state abstraction applied to sequential decision making. Section 5 introduces our primary result; bounds on the error guaranteed by four classes of approximate state abstraction. The following two sections introduce simulated domains used in experiments (Section 6), and a discussion of experiments in which we apply one class of approximate abstraction to a variety of different tasks to empirically illustrate the relationship between degree of compression and error incurred (Section 7).

## 2 MDPs and Sequential Decision Making

An MDP is a problem representation for sequential decision making agents, represented by a five-tuple: . Here, is a finite state space; is a finite set of actions available to the agent; denotes , the probability of an agent transitioning to state after applying action in state ; denotes the reward received by the agent for executing action in state ; is a discount factor that determines how much the agent prefers future rewards over immediate rewards. We assume without loss of generality that the range of all reward functions is normalized to . The solution to an MDP is called a policy, denoted .

The objective of an agent is to solve for the policy that maximizes its expected discounted reward from any state, denoted . We denote the expected discounted reward for following policy from state as the value of the state under that policy, . We similarly denote the expected discounted reward for taking action and then following policy from state forever after as , defined by the Bellman Equation as:

 Qπ(s,a)=R(s,a)+γ∑s′T(s,a,s′)Qπ(s′,π(s′)). (1)

We let RMax denote the maximum reward (which is 1), and QMax denote the maximum value, which is . The value function, , defined under a given policy, denoted , is defined as:

 Vπ(s)=Qπ(s,π(s)). (2)

Lastly, we denote the value and functions under the optimal policy as or and or , respectively. For further background, see Kaelbling et al. [22].

## 3 Related Work

Several other projects have addressed similar topics.

### 3.1 Approximate State Abstraction

Dean et al. [9] leverage the notion of bisimulation to investigate partitioning an MDP’s state space into clusters of states whose transition model and reward function are within of each other. They develop an algorithm called Interval Value Iteration (IVI) that converges to the correct bounds on a family of abstract MDPs called Bounded MDPs.

Several approaches build on Dean et al. [9]. Ferns et al. [14, 15] investigated state similarity metrics for MDPs; they bounded the value difference of ground states and abstract states for several bisimulation metrics that induce an abstract MDP. This differs from our work which develops a theory of abstraction that bounds the suboptimality of applying the optimal policy of an abstract MDP to its ground MDP, covering four types of state abstraction, one of which closely parallels bisimulation. Even-Dar and Mansour [13] analyzed different distance metrics used in identifying state space partitions subject to -similarity, also providing value bounds (their Lemma 4) for -homogeneity subject to the norm, which parallels our Claim 2. Ortner [27] developed an algorithm for learning partitions in an online setting by taking advantage of the confidence bounds for and provided by UCRL [3].

Hutter [18, 17] investigates state aggregation beyond the MDP setting. Hutter presents a variety of results for aggregation functions in reinforcement learning. Most relevant to our investigation is Hutter’s Theorem 8, which illustrates properties of aggregating states based on similar values. Hutter’s Theorem part (a) parallels our Claim: both bound the value difference between ground and abstraction states, and part (b) is analogous to our Lemma 1: both bound the value difference of applying the optimal abstraction policy in the ground, and part (c) is a repetition of the comment given by Li et al. [24] that abstractions preserve the optimal value function. For Lemma 1, our proof strategies differ from Hutter’s, but the result is the same.

Approximate state abstraction has also been applied to the planning problem, in which the agent is given a model of its environment and must compute a plan that satisfies some goal. Hostetler et al. [16] apply state abstraction to Monte Carlo Tree Search and expectimax search, giving value bounds of applying the optimal abstract action in the ground tree(s), similarly to our setting. Dearden and Boutilier [10] also formalize state-abstraction for planning, focusing on abstractions that are quickly computed and offer bounded value. Their primary analysis is on abstractions that remove negligible literals from the planning domain description, yielding value bounds for these abstractions and a means of incrementally improving abstract solutions to planning problems. Jiang et al. [20] analyze a similar setting, applying abstractions to the Upper Confidence Bound applied to Trees algorithm adapted for planning, introduced by Kocsis and Szepesvári [23].

Mandel et al. [26] advance Bayesian aggregation in RL to define Thompson Clustering for Reinforcement Learning (TCRL), an extension of which achieves near-optimal Bayesian regret bounds.  Jiang [19] analyze the problem of choosing between two candidate abstractions. They develop an algorithm based on statistical tests that trades of the approximation error with the estimation error of the two abstractions, yielding a loss bound on the quality of the chosen policy.

### 3.2 Specific Abstraction Algorithms

Many previous works have targeted the creation of algorithms that enable state abstraction for MDPs. Andre and Russell [2] investigated a method for state abstraction in hierarchical reinforcement learning leveraging a programming language called ALISP that promotes the notion of safe state abstraction. Agents programmed using ALISP can ignore irrelevant parts of the state, achieving abstractions that maintain optimality. Dietterich [12] developed MAXQ, a framework for composing tasks into an abstracted hierarchy where state aggregation can be applied. Bakker and Schmidhuber [4] also target hierarchical abstraction, focusing on subgoal discovery. Jong and Stone [21] introduced a method called policy-irrelevance in which agents identify (online) which state variables may be safely abstracted away in a factored-state MDPDayan and Hinton [7] develop “Feudal Reinforcement Learning” which presents an early form of hierarchical RL that restructures -Learning to manage the decomposition of a task into subtasks. For a more complete survey of algorithms that leverage state abstraction in past reinforcement-learning papers, see Li et al. [24], and for a survey of early works on hierarchical reinforcement learning, see Barto and Mahadevan [5].

### 3.3 Exact Abstraction Framework

Li et al. [24] developed a framework for exact state abstraction in MDPs. In particular, the authors defined five types of state aggregation functions, inspired by existing methods for state aggregation in MDPs. We generalize two of these five types, and , to the approximate abstraction case. Our generalizations are equivalent to theirs when exact criteria are used (i.e. ). Additionally, when exact criteria are used our bounds indicate that no value is lost, which is one of core results of Li et al. [24]Walsh et al. [34] build on the framework they previously developed by showing empirically how to transfer abstractions between structurally related MDPs.

## 4 Abstraction Notation

We build upon the notation used by Li et al. [24], who introduced a unifying theoretical framework for state abstraction in MDPs.

###### Definition 1

(, ): We understand an abstraction as a mapping from the state space of a ground MDP, , to that of an abstract MDP, , using a state aggregation scheme. Consequently, this mapping induces an abstract MDP. Let and .

###### Definition 2

(, ): The states in the abstract MDP are constructed by applying a state aggregation function, , to the states in the ground MDP, . More specifically, maps a state in the ground MDP to a state in the abstract MDP:

 SA={ϕ(s)∣s∈SG}. (3)
###### Definition 3

(): Given a , each ground state has associated with it the ground states with which it is aggregated. Similarly, each abstract state has its constituent ground states. We let be the function that retrieves these states:

 G(s)={{g∈SG∣ϕ(g)=ϕ(s)},if s∈SG,{g∈SG∣ϕ(g)=s},if s∈SA. (4)

The abstract reward function and abstract transition dynamics for each abstract state are a weighted combination of the rewards and transitions for each ground state in the abstract state.

###### Definition 4

(): We refer to the weight associated with a ground state, by . The only restriction placed on the weighting scheme is that it induces a probability distribution on the ground states of each abstract state:

 Missing dimension or its units for \hskip (5)
###### Definition 5

(): The abstract reward function is a weighted sum of the rewards of each of the ground states that map to the same abstract state:

 RA(s,a)=∑g∈G(s)RG(g,a)ω(g). (6)
###### Definition 6

(): The abstract transition function is a weighted sum of the transitions of each of the ground states that map to the same abstract state:

 TA(s,a,s′)=∑g∈G(s)∑g′∈G(s′)TG(g,a,g′)ω(g). (7)

## 5 Approximate State Abstraction

Here, we introduce our formal analysis of approximate state abstraction, including results bounding the error associated with these abstraction methods. In particular, we demonstrate that abstractions based on approximate similarity (5.2), approximate model similarity (5.3), and approximate similarity between distributions over , for both Boltzmann (5.4) and multinomial (5.5) distributions induce abstract MDPs for which the optimal policy has bounded error in the ground MDP.

We first introduce some additional notation.

###### Definition 7

(, ): We let and stand for the optimal policies in the abstract and ground MDPs, respectively.

We are interested in how the optimal policy in the abstract MDP performs in the ground MDP. As such, we formally define the policy in the ground MDP derived from optimal behavior in the abstract MDP:

###### Definition 8

(): Given a state and a state aggregation function, ,

 πGA(s)=π∗A(ϕ(s)). (8)

We now define types of abstraction based on functions of state–action pairs.

###### Definition 9

(): Given a function and a fixed non-negative , we define as a type of approximate state aggregation function that satisfies the following for any two ground states , :

 ˜ϕf,ε(s1)=˜ϕf,ε(s2)→∀a|f(s1,a)−f(s2,a)|≤ε. (9)

That is, when aggregates states, all aggregated states have values of within of each other for all actions.

Finally, we estliabsh notation to distinguish between the ground and abstract value () and action value () functions.

###### Definition 10

(, ): Let and denote the optimal Q and optimal value functions in the ground MDP.

###### Definition 11

(, ): Let and stand for the optimal Q and optimal value functions in the abstract MDP.

### 5.1 Main Result

We now introduce the main result of the paper.

{mdframed}

[roundcorner=1pt, backgroundcolor=white]

###### Theorem 1.

There exist at least four types of approximate state aggregation functions, , , and , for which the optimal policy in the abstract MDP, applied to the ground MDP, has suboptimality bounded polynomially in :

 ∀s∈SGVπ∗GG(s)−VπGAG(s)≤2εηf (10)

Where differs between abstraction function families:

 ηQ∗ =1(1−γ)2 ηmodel =1+γ(|SG|−1)(1−γ)3 ηbolt =(|A|1−γ+εk% bolt+kbolt)(1−γ)2 ηmult Missing or unrecognized delimiter for \right

For and , we also assume that the difference in the normalizing terms of each distribution is bounded by some non-negative constant, , of :

 ∣∣ ∣∣∑iQG(s1,ai)−∑jQG(s2,aj)∣∣ ∣∣ ≤kmult×ε ∣∣ ∣∣∑ieQG(s1,ai)−∑jeQG(s2,aj)∣∣ ∣∣ ≤kbolt×ε

Naturally, the value bound of Equation 10 is meaningless for , since this is the maximum possible value in any MDP (and we assumed the range of is ). In light of this, observe that for , all of the above bounds are exactly 0. Any value of interpolated between these two points achieves different degrees of abstraction, with different degrees of bounded loss.

We now introduce each approximate aggregation family and prove the theorem by proving the specific value bound for each function type.

### 5.2 Optimal Q Function: ˜ϕQ∗,ε

We consider an approximate version of Li et al. [24]’s . In our abstraction, states are aggregated together when their optimal -values are within .

###### Definition 12

(): An approximate function abstraction has the same form as Equation 9:

 ˜ϕQ∗,ε(s1)=˜ϕQ∗,ε(s2)→∀a|QG(s1,a)−QG(s2,a)|≤ε. (11)
###### Lemma 1.

When a type abstraction is used to create the abstract MDP:

 ∀s∈SGVπ∗GG(s)−VπGAG(s)≤2ε(1−γ)2. (12)

Proof of Lemma 1: We first demonstrate that -values in the abstract MDP are close to -values in the ground MDP (Claim 1). We next leverage Claim 1 to demonstrate that the optimal action in the abstract MDP is nearly optimal in the ground MDP (Claim 2). Lastly, we use Claim 2 to conclude Lemma 1 (Claim 3).

###### Claim 1.

Optimal -values in the abstract MDP closely resemble optimal -values in the ground MDP:

 ∀sG∈SG,a|QG(sG,a)−QA(˜ϕQ∗,ε(sG),a)|≤ε1−γ. (13)

Consider a non-Markovian decision process of the same form as an MDP, , parameterized by integer an , such that for the first time steps the reward function, transition dynamics and state space are those of the abstract MDP, , and after time steps the reward function, transition dynamics and state spaces are those of . Thus,

 ST ={SGif T=0SAo/w RT(s,a) ={RG(s,a)if T=0RA(s,a)o/w TT(s,a,s′) =⎧⎪⎨⎪⎩TG(s,a,s′)if T=0∑g∈G(s)[TG(g,a,s′)ω(g)]if T=1TA(s,a,s′)o/w

The -value of state in for action is:

 QT(s,a)=⎧⎪⎨⎪⎩QG(s,a)if T=0∑g∈G(s)[QG(g,a)ω(g)]if T=1RA(s,a)+σT−1(s,a)o/w (14)

where:

 σT−1(s,a)=γ∑sA′∈SATA(s,a,sA′)maxa′QT−1(sA′,a′).

We proceed by induction on to show that:

 ∀T,sG∈SG,a|QT(sT,a)−QG(sG,a)|≤T−1∑t=0εγt, (15)

where if and otherwise.

Base Case:

When , , so this base case trivially follows.

Base Case:

By definition of , we have that is

 Q1(s,a)=∑g∈G(s)[QG(g,a)ω(g)].

Since all co-aggregated states have -values within of one another and induces a convex combination,

 Q1(sT,a)≤εγt+ε+QG(sG,a) ∴ |Q1(sT,a)−QG(sG,a)|≤1∑t=0εγt.

Inductive Case:

We assume as our inductive hypothesis that:

 ∀sG∈SG,a|QT−1(sT,a)−QG(sG,a)|≤T−2∑t=0εγt.

Consider a fixed but arbitrary state, , and fixed but arbitrary action . Since , is . By definition of , , :

 QT(sT,a)=∑g∈G(sT)ω(g) ×⎡⎢⎣RG(g,a)+γ∑g′∈SGTG(g,a,g′)maxa′QT−1(g′,a′)⎤⎥⎦.

Applying our inductive hypothesis yields:

 QT(sT,a)≤∑g∈G(sT)ω(g)×[RG(g,a) +γ∑g′∈SGTG(g,a,g′)maxa′(QG(g′,a′)+T−2∑t=0εγt)].

Since all aggregated states have -values within of one another:

 QT(sT,a)≤γT−2∑t=0εγt+ε+QG(sG,a).

Since is arbitrary we conclude Equation 15. As , by the sum of infinite geometric series and . Thus, Equation 15 yields Claim 1.

###### Claim 2.

Consider a fixed but arbitrary state, and its corresponding abstract state . Let stand for the optimal action in , and stand for the optimal action in :

 Missing dimension or its units for \hskip

The optimal action in the abstract MDP has a -value in the ground MDP that is nearly optimal:

 VG(sG)≤QG(sG,a∗A)+2ε1−γ. (16)

By Claim 1,

 VG(sG)=QG(sG,a∗G)≤QA(sA,a∗G)+ε1−γ. (17)

By the definition of , we know that

 QA(sA,a∗G)+ε1−γ≤QA(sA,a∗A)+ε1−γ. (18)

Lastly, again by Claim 1, we know

 QA(sA,a∗A)+ε1−γ≤QG(sg,a∗A)+2ε1−γ. (19)

Therefore, Equation 16 follows.

###### Claim 3.

Lemma 1 follows from Claim 2.

Consider the policy for of following the optimal abstract policy for steps and then following the optimal ground policy in :

 πA,t(s)={π∗G(s)if t=0πGA(s)if t>0 (20)

For , the value of this policy for in the ground MDP is:

 VπA,tG(sG)=RG(s,πA,t(sG))+ γ∑sG′∈SGTG(sG,a,sG′)VπA,t−1G(sG′).

For , is simply .

We now show by induction on that

 ∀t,sG∈SgVG(sG)≤VπA,tG(sG)+t∑i=0γi2ε1−γ. (21)

Base Case:

By definition, when , , so our bound trivially holds in this case.

Inductive Case:

Consider a fixed but arbitrary state . We assume for our inductive hypothesis that

 VG(sG)≤VπA,t−1G(sG)+t−1∑i=0γi2ε1−γ. (22)

By definition,

 VπA,tG(sG)=RG(s,πA,t(sG))+γ∑g′TG(sG,a,sG′)VπA,t−1G(sG′).

Applying our inductive hypothesis yields:

 VπA,tG(sG)≥RG(sG,πA,t(sG))+γ∑sG′TG(sG,πA,t(sG),sG′)(VG(sG′)−t−1∑i=0γi2ε1−γ).

Therefore,

 VπA,tG(sG) ≥−γt−1∑i=0γi2ε1−γ+QG(sG,πA,t(sG)).

Applying Claim 2 yields:

 VπA,tG(sG)≥−γt−1∑i=0γi2ε1−γ−2ε1−γ+VG(sG) ∴ VG(sG)≤VπA,tG(sG)+t∑i=0γi2ε1−γ.

Since was arbitrary, we conclude that our bound holds for all states in for the inductive case. Thus, from our base case and induction, we conclude that

 ∀t,sG∈SgVπ∗GG(sG)≤VπA,tG(sG)+t∑i=0γi2ε1−γ. (23)

Note that as , by the sum of infinite geometric series and . Thus, we conclude Lemma 1. ∎

### 5.3 Model Similarity: ˜ϕmodel,ε

Now, consider an approximate version of Li et al. [24]’s , where states are aggregated together when their rewards and transitions are within .

###### Definition 13

(): We let define a type of abstraction that, for fixed , satisfies:

 ˜ϕmodel,ε(s1)=˜ϕmodel,ε(s2)→∀a|RG(s1,a)−RG(s2,a)|≤ε~{}AND  ∀sA∈SA∣∣ ∣∣∑sG′∈G(sA)[TG(s1,a,sG′)−TG(s2,a,sG′)]∣∣ ∣∣≤ε. (24)
###### Lemma 2.

When is created using a type:

 ∀s∈SGVπ∗GG(s)−VπGAG(s)≤2ε+2γε(|SG|−1)(1−γ)3. (25)

Proof of Lemma 2:

Let be the maximum -value difference between any pair of ground states in the same abstract state for :

 B=maxs1,s2,a|QG(s1,a)−QG(s2,a)|,

where . First, we expand:

 B=maxs1,s2,a∣∣∣RG(s1,a)−RG(s2,a) +γ∑sG′∈SG[(TG(s1,a,sG′)−TG(s2,a,sG′))maxa′QG(sG′,a′)]∣∣∣ (26)

Since difference of rewards is bounded by :

 B≤ε+γ∑sA∈SA∑sG′∈G(sA)[(TG(s1,a,sG′) −TG(s2,a,sG′))maxa′QG(sG′,a′)]. (27)

By similarity of transitions under :

 B≤ε+γ\textscQMax∑sA∈SAε≤ε+γ|SG|ε\textscQMax.

Recall that QMax , and we defined :

 B≤ε+γ(|SG|−1)ε1−γ.

Since the -values of ground states grouped under are strictly less than , we can understand as a type of . Applying Lemma 1 yields Lemma 2. ∎

### 5.4 Boltzmann over Optimal Q: ˜ϕbolt,ε

Here, we introduce , which aggregates states with similar Boltzmann distributions on -values. This type of abstractions is appealing as Boltzmman distributions balance exploration and exploitation [32]. We find this type particularly interesting for abstraction purposes as, unlike , it allows for aggregation when -value ratios are similar but their magnitudes are different.

###### Definition 14

(): We let define a type of abstractions that, for fixed , satisfies:

 ˜ϕbolt,ε(s1)=˜ϕbolt% ,ε(s2)→∀a∣∣ ∣∣eQG(s1,a)∑beQG(s1,b)−eQG(s2,a)∑beQG(s2,b)∣∣ ∣∣≤ε. (28)

We also assume that the difference in normalizing terms is bounded by some non-negative constant, , of :

 ∣∣ ∣∣∑beQG(s1,b)−∑beQG(s2,b)∣∣ ∣∣≤kbolt×ε. (29)
###### Lemma 3.

When is created using a function of the type, for some non-negative constant :

 ∀s∈SGVπ∗GG(s)−VπGAG(s)≤2ε(|A|1−γ+εk% bolt+kbolt)(1−γ)2. (30)

We use the approximation for , with error:

 ex=1+x+δ≈1+x. (31)

We let denote the error in approximating and denote the error in approximating .

Proof of Lemma 3:

By the approximation in Equation 31 and the assumption in Equation 29:

 ∣∣ ∣ ∣ ∣ ∣∣1+QG(s1,a)+δ1∑jeQG(s1,aj)−1+QG(s2,a)+δ2∑jeQG(s1,aj)±kε\leavevmodeto15.75pt\vboxto15.75pt\pgfpicture\makeatletterto0.0pt\pgfsys@beginscope\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@color@rgb@fill000\pgfsys@setlinewidth0.4pt\nullfontto0.0pt\pgfsys@beginscope\hbox{{\pgfsys@beginscope{{}{{{}}}{{}}{} {}{}{}{}{}{}{}{}{{}\pgfsys@moveto{5.674072pt}{0.0pt}\pgfsys@curveto{5.674072pt% }{3.133703pt}{3.133703pt}{5.674072pt}{0.0pt}{5.674072pt}\pgfsys@curveto{-3.133% 703pt}{5.674072pt}{-5.674072pt}{3.133703pt}{-5.674072pt}{0.0pt}\pgfsys@curveto% {-5.674072pt}{-3.133703pt}{-3.133703pt}{-5.674072pt}{0.0pt}{-5.674072pt}% \pgfsys@curveto{3.133703pt}{-5.674072pt}{5.674072pt}{-3.133703pt}{5.674072pt}{% 0.0pt}\pgfsys@closepath\pgfsys@moveto{0.0pt}{0.0pt}\pgfsys@stroke% \pgfsys@invoke{ }}{{{{}}{\pgfsys@beginscope\pgfsys@transformcm{1.0}{0.0}{0.0}{% 1.0}{-2.999954pt}{-1.999969pt}{}\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0% }\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@color@rgb@fill{0}{0}{0}\footnotesize% {a}}}{}\pgfsys@endscope}}}}\pgfsys@endscope}}\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@endscope\hss\endpgfpicture∣∣ ∣ ∣ ∣ ∣∣≤ε (32)

Either term is positive or negative. First suppose the former. It follows by algebra that:

 −ε≤1+QG(s1,a)+δ1∑jeQG(s1,aj)−1+QG(s2,a)+δ2∑jeQG(s1,aj)+εkbolt≤ε (33)

Moving terms:

 −ε(kε+∑jeQG(s1,aj))−δ1+δ2≤εkbolt⎛⎝1+QG(s1,a)+δ1∑jeQG(s1,aj)⎞⎠+QG(s1,a)−QG(s2,a)≤ε(εkbolt+∑jeQG(s1,aj))−δ1+δ2 (34)

When is the negative case, it follows that:

 −ε≤1+QG(s1,a)+δ1∑jeQG(s1,aj)−1+QG(s2,a)+δ2∑jeQG(s1,aj)−εkbolt≤ε (35)

By similar algebra that yielded Equation 34:

 −ε(−εkbolt+∑jeQG(s1,aj))−δ1+δ2≤−kε⎛⎝1+QG(s1,a)+δ1∑jeQG(s1,aj)⎞⎠+QG(s1,a)−QG(s2,a)≤ε(εkbolt+∑jeQG(s1,aj))−δ1+δ2 (36)

Combining Equation 34 and Equation 36 results in:

 Extra open brace or missing close brace (37)

Consequently, we can consider as a special case of the type, where . Lemma 3 then follows from Lemma 1<