Processing math: 89%

Total Internal Reflection

Technology and Art


Code

Cobol REKT
Plenoxels
Transformer
Basis-Processing
Cataract
COMRADE
Duck-Angular
Exo
IRIS
MuchHeap
Snail-MapReduce
Underline
Lambda-Queuer
jQuery-Jenkins Radiator

Contact

Github
Twitter
LinkedIn

Site Feed

Functional Analysis Exercises 1 : Distance Metrics

Avishek Sen Gupta on 21 September 2021

This post lists solutions to many of the exercises in the Distance Metrics section 1.1 of Erwin Kreyszig’s Introductory Functional Analysis with Applications. This is definitely a work in progress, and proofs may be refined or added over time.

1.1.2. Does d(x,y)=(xy)2 define a metric on the set of all real numbers?

Proof:

For the distance metric d(x,y)=(xy)2, we need to prove or disprove the Triangle Inequality:

d(x,z)d(x,y)+d(y,z)

We start with the term (xz)2, as follows:

(xz)2=((xy)+(yz))2(xz)2=(xy)2+(yz)2+2(xy)(yz)d(x,z)=d(x,y)+d(y,z)+2(xy)(yz)positive or negative

When the term 2(xy)(yz) is positive:

d(x,z)>d(x,y)+d(y,z)

When the term 2(xy)(yz) is negative or zero:

d(x,z)d(x,y)+d(y,z)

Thus, the Triangle Inequality can only be satisfied for specific values of x, y, and z; hence d(x,y)=(xy)2 is not a valid distance metric.


1.1.3. Show that d(x,y)=|xy| defines a metric on the set of all real numbers.

Proof:

For the distance metric d(x,y)=|xy|, we need to prove the Triangle Inequality:

d(x,z)d(x,y)+d(y,z)

We start with the basic Triangle Inequality for R:

|xz||xy|+|yz|

Adding and subtracting 2|xy||yz| on the RHS we get:

|xz||xy|+|yz|+2|xy||yx|2|xy||yz||xz|(|xy|+|yz|)22|xy||yz|positive

Setting C=2|xy||yz|>0, we get:

|xz|(|xy|+|yz|)2C(|xz|)2(|xy|+|yz|)2C(|xz|)2+C(|xy|+|yz|)2(|xz|)2(|xy|+|yz|)2|xz||xy|+|yz|d(x,z)d(x,y)+d(y,z)

Hence, this proves the Triangle Inequality, and consequently, d(x,y)=|xy| is a valid distance metric.


1.1.5. Let d be a metric on X. Determine all constants k such that (i) kd, (ii) d+k is a metric on X.

(i) Proof:

Let ˉd(x,y)=kd(x,y) be a candidate metric on X. For it to be a valid distance metric, it must satisfy the four axioms of a metric, i.e.:

Putting all of these together, we get the condition that k>0,kR.

(ii) Proof:

Let ˉd(x,y)=d(x,y)+k be a candidate metric on X. For it to be a valid distance metric, it must satisfy the four axioms of a metric, i.e.:

Putting all of these together, we get the condition that k=0,kR.


1.1.6. Show that d in 1.1-6 satisfies the triangle inequality.

Answer: l is the set of all bounded sequences of complex numbers. The metric under consideration is d(x,y)=sup|ζietai|.

We need to prove that d(x,y)d(x,z)+d(z,y). We know that: |ηiζi||ηiθi|+|θiζi|. Taking sup on both sides we get:

sup|ηiζi|sup[|ηiθi|+|θiζi|]

For two sequences (ai) and (bi), we have: aisup(ai)bisup(bi)

Adding the two inequalities, we get:

ai+bisup(ai)+sup(bi)sup(ai+bi)sup(ai)+sup(bi)

The above is because any ai+bi is less than or equal to some constant, so the supremum is also less than or equal to that constant.

Setting ai=|ηiθi| and bi=|θiζi|, we get:

sup[|ηiθi|+|θiζi|]sup|ηiθi|+sup|θiζi|

Putting (1) and (2) together we get:

sup|ηiζi|sup[|ηiθi|+|θiζi|]sup|ηiθi|+sup|θiζi|sup|ηiζi|sup|ηiθi|+sup|θiζi|

This proves the Triangle Inequality for the given distance metric.


1.1.8. Show that another metric ˉd on the set X in 1.1-7 is defined by ˉd(x,y)=ba|x(t)y(t)|dt.

Proof:

The distance metric given is: d(x,y)=ba|x(t)y(t)| We know that:

|x(t)y(t)||x(t)z(t)|+|z(t)y(t)|

Integrating both sides with respect to t from a to b, we get:

ba|x(t)y(t)|ba|x(t)z(t)|+ba|z(t)y(t)|d(x,y)d(x,z)+d(z,y)

1.1.9. Show that d in 1.1-8 is a metric.

For reference, the axioms (M1) to (M4) are as follows:

The discrete metric is: d(x,x)=0d(x,y)=1, for xy

This satisfies (M1), since d(x,y){0,1}.

(M2) also follows from d(x,x)=0.

(M3) also follows from d(x,y)=d(y,x)=1 if xy and d(x,x)=0.

Let’s prove the Triangle Inequality. We have:

d(x,z)0d(z,y)0

Adding the above inequalities, we get:

d(x,z)+d(z,y)0

Case 1

If x=y, then d(x,y)=0, and we have:

d(x,z)+d(z,y)d(x,y) for x=y

Case 2

If xy, then d(x,y)=1. Then, we have 3 sub-cases:

(2.1) z=x,zy. Then d(x,z)+d(z,y)=0+1=1d(x,y)

(2.2) z=y,zx. Then d(x,z)+d(z,y)=1+0=1d(x,y)

(2.3) zy,zx. Then d(x,z)+d(z,y)=1+1=2d(x,y)

In all the above cases, we have d(x,y)d(x,z)+d(z,y), thus proving (M4) (the Triangle Inequality).


1.1.10. (Hamming Distance) Let X be the set of all ordered triples of zeros and ones. Show that X consists of eight elements and a metric d on X is defined by d(x,y)= number of places where x and y have different entries. (This space and similar spaces of n-tuples play a role in switching and automata theory and coding. d(x,y) is called the Hamming distance between x and y; cf. the paper by R. W. Hamming (1950) listed in Appendix 3.)

Proof:

The set of all ordered triples of zeros and ones, forms a sequence of numbers X=[0,7],xiX,xiZ in their binary form. Thus, it is evident that the number of triples is 23=8.

Let a,b,c0,1, then each number in this set, can be represented as xi=a+2b+4c. Then the suggested distance metric is:

d(x,y)=|axay|+|bxby|+|cxcy|

Let x1, x2, x3 be defined as follows:

x=ax+2bx+4cxy=ay+2by+4cyz=az+2bz+4cz d(x,z)=|axaz|+|bxbz|+|cxcz|=|axay+ayaz|+|bxby+bybz|+|cxcy+cycz|

Now we have the following inequalities:

|axay+ayaz||axay|+|ayaz||bxby+bybz||bxby|+|bybz||cxcy+cycz||cxcy|+|cycz|

Summing up these inequalities, and noting that the LHS resolves to d(x,z), we get:

d(x,z)|axay|+|ayaz|+|bxby|+|bybz|+|cxcy|+|cycz|d(x,z)(|axay|+|bxby|+|cxcy|)+(|ayaz|+|bybz|+|cycz|)d(x,z)d(x,y)+d(y,z)

Thus, this proves the Triangle Inequality for the Hamming Distance as a metric.


1.1.12. (Triangle inequality) The triangle inequality has several useful consequences. For instance, using the generalised triangle inequality, show that |d(x,y)d(z,w)|d(x,z)+d(y,w).

We write the two following triangle inequalities. One involves x, y, z. The other one involves w, y, z.

d(x,y)d(x,z)+d(z,y) d(z,y)d(z,w)+d(w,y)

Adding d(x,z) to (3), we get:

d(x,z)+d(z,y)d(x,z)+d(z,w)+d(w,y)

Thus, we have:

d(x,y)d(x,z)+d(z,y)d(x,z)+d(z,w)+d(w,y)d(x,y)d(x,z)+d(z,w)+d(w,y)d(x,y)d(x,z)+d(z,w)+d(y,w)(by the Symmetry property of a Distance Metric) d(x,y)d(z,w)d(x,z)+d(w,y)

We write the two following triangle inequalities. One involves x, z, w. The other one involves x, y, w.

d(z,w)d(z,x)+d(x,w) d(x,w)d(x,y)+d(y,w)

Adding d(z,x) to (5), we get:

d(z,x)+d(x,w)d(z,x)+d(x,y)+d(y,w)

Thus, we have:

d(z,w)d(z,x)+d(x,w)d(z,x)+d(x,y)+d(y,w)d(z,w)d(z,x)+d(x,y)+d(y,w)d(z,w)d(x,z)+d(x,y)+d(y,w)(by the Symmetry property of a Distance Metric) d(z,w)d(x,y)d(z,x)+d(y,w)

Summarising (4) and (6), we get:

d(x,y)d(z,w)d(x,z)+d(y,w)d(z,w)d(x,y)d(x,z)+d(y,w)|d(x,y)d(z,w)|d(x,z)+d(y,w)

1.1.13. Using the triangle inequality, show that |d(x,z)d(y,z)|d(x,y).

Proof:

We have to show that:

|d(x,z)d(y,z)|d(x,y)

We write the following Triangle Inequality:

d(x,z)d(x,y)+d(y,z)d(x,z)d(y,z)d(x,y)

The other Triangle Inequality we write is:

d(y,z)d(y,x)+d(x,z)d(y,z)d(x,z)d(y,x)d(y,z)d(x,z)d(x,y)(by the Symmetry property of a Distance Metric)

Summarising the results of (7) and (8), we get:

d(x,z)d(y,z)d(x,y)d(y,z)d(x,z)d(x,y)|d(x,z)d(y,z)|d(x,y)

1.1.14. (Axioms of a metric) (M1) to (M4) could be replaced by other axioms (without changing the definition). For instance, show that (M3) and (M4) could be obtained from (M2) and d(x,y)d(z,x)+d(z,y).

For reference, the axioms (M1) to (M4) are as follows:

Proof for (M3):

The allowed assumptions are:

Set z=y in (A2), so that we get:

\require{cancel} \begin{equation} d(x,y) \leq d(y,x) + \cancel{d(y,y)} \text{ (by (A1))} \\ \Rightarrow d(x,y) \leq d(y,x) \label{eq:1-1-14-abs-1} \end{equation}

From (A2), we get d(y,x) as:

\begin{equation} d(y,x) \leq d(z,y) + d(z,x) \label{eq:1-1-14-y-x} \end{equation}

Set z=x in \eqref{eq:1-1-14-y-x} again, so that we get:

\begin{equation} d(y,x) \leq d(x,y) + \cancel{d(x,x)} \text{ (by (A1))} \\ \Rightarrow d(y,x) \leq d(x,y) \\ \Rightarrow d(x,y) \geq d(y,x) \label{eq:1-1-14-abs-2} \end{equation}

Summarising the results of \eqref{eq:1-1-14-abs-1} and \eqref{eq:1-1-14-abs-2}, we get:

d(x,y) \leq d(y,x) \\ d(x,y) \geq d(y,x)

This implies that:

\begin{equation} d(x,y)=d(y,x) \label{eq:1-1-14-symmetry} \end{equation} \blacksquare

Proof for (M4):

(M4) should immediately follow from \eqref{eq:1-1-14-symmetry}, since:

d(x,y) \leq d(z,x) + d(z,y) \Rightarrow d(x,y) \leq d(x,z) + d(z,y) \blacksquare

1.1.15. Show that nonnegativity of a metric follows from (M2)to (M4).

Proof:

We have to prove that: d(x,y) \geq 0 follows from (M2) and (M4).

From the Triangle Inequality (M4), we have:

d(x,y) \leq d(x,z) + d(z,y)

Set x=y, then we get:

d(y,y) \leq d(y,z) + d(z,y) \\ \Rightarrow \underbrace{\cancel{d(y,y)}}_\text{by (M2)} \leq d(y,z) + \underbrace{d(y,z)}_\text{by (M3)} \\ \Rightarrow 2d(y,z) \geq 0 \\ \Rightarrow d(y,z) \geq 0

This proves (M1).

\blacksquare
tags: Mathematics - Proof - Functional Analysis - Pure Mathematics - Kreyszig