# I Basic question about set theory

Tags:
1. Jul 6, 2016

### rattma

Hi, Is the following notation correct?

X = {xt> max(xt-k,...,xt-1,xt+1,...,xt+k)|(t-k,...,t+k) ∈ T2k+1∧ k ∈ ℕ\{0}} where T = [1,n]∩ℕ denotes the time periods over which x runs.

I basically want to say that X is the set of points that are local maxima in a neighbourhood of k points to the right and left of each point. my query is that, for instance, for k=3 and t=2, the condition would actually be :

x2 > max(x1,x3,x4,x5)

and (x1,x3,x4,x5) is not a point in the space T7

Maybe a better option would be to write t-k,...,t+k ∈ T instead of (t-k,...,t+k) ∈ T2k+1 ...but it still seems unclear to me.

Last edited: Jul 6, 2016
2. Jul 7, 2016

### micromass

It's not right. In the first part of the set builder notation you have $x_t > \max\{x_{t-k}...\}$. This evaluates to true and false. You can't have that in the first part. The first part must be the name of the element in the set, the second part must be a condition on that element.

So I would write it as
$$\{x_t~\vert~t\in T~\wedge~\exists k\in \mathbb{N}\setminus \{0\}:~((t-k,...,t+k)\in T^{2k+1}~\wedge~x_t>\max\{x_{t-k},...,x_{t-1},x_{t+1},...,x_{t+k}\})\}$$

3. Jul 7, 2016

### rattma

Thank you!. What is the difference between the first "|" and the ":" ? I thought they meant the same thing (such that).

Other question: under your formulation, is it no longer a problem that (t-k) does not belong to T in some instances? For instance, take t=2 and k=3. In those border case, the condition should read $$x_2>max(x_1,x_3,x_4,x_5)$$. Isn't the condition excluding these cases? Or is it accounted for by :
∃k ?

Also, would it possible to write something like this, or would this also be wrong:

$$X=\{x_{t}| x_{t} > max_{x_j}\{\mathcal{B}_{k}(x_{t})\}\}$$ where $$\mathcal{B}_{k}(x_t) = \{x_j|\forall (t,j,k)\in\mathbb{T}^3\wedge j\neq t :\parallel t-j \parallel\leq k \}$$

I want to define $\mathcal{B}_{k}(x_t)$ as the neighbourhood of center $x_t$ and radius $k$. Then, I want to say that X is the set of points such that each point in X is larger than the maximum value in its neighbourhood $\mathcal{B}_{k}(x_t)$ .

Sorry for asking so many questions!

4. Jul 7, 2016

### micromass

There is no difference, it's a matter of tradition. You can write sets as $\{x ~\vert~P(x)\}$ but also as $\{x~:~P(x)\}$. On the other hand, you write logical formulas as $\forall x:~P(x)$, or as $\forall x~(P(x))$, but somehow $\forall x~\vert~P(x)$ is not used.

I did account for that by putting in $(t-k,...,t+k)\in T^{2k+1}$ so I don't really understand your qustion. You're right that the condition $x_2 > \max\{x_1,x_3,x_4,x_5\}$ isn't account for in my formulation, but $x_2$ would still count as a local maximum because of $x_2 > \max{\x_1,x_3\}$.

Some things wrong. First of all, you can't use $x_j$ on the left hand side and $\forall j$ on the right hand side. Second, you can't say $\forall x~\wedge~P(x):~Q(x)$, the syntax is $\forall x:~P(x)$. So you need to rewrite
$$\mathcal{B}_k(x_t) = \{x_j~\vert~j\neq t~\wedge~||t-j||\leq k\}$$
and
$$X = \{x_t~\vert~\exists~k:~x_t > \max\mathcal{B}_k(x_t)\}$$

5. Jul 7, 2016

### rattma

Thanks. What I meant was that for k=3 and t=2, the condition in the set reads $x_2>max(x_{-1},x_{0},x_{1},x_{3},x_{4},x_{5}) \wedge (x_{-1},x_{0},x_{1},x_2,x_{3},x_{4},x_{5}) \in \mathbb{T}^{7}$ but since $\mathbb{T} = \{1,2,3,...,T\}$, $x_{-1},x_{0}$ do not exist and therefore $(x_{-1},x_{0},x_{1},x_2,x_{3},x_{4},x_{5}) \in \mathbb{T}^{7}$ does not exist either... Probaby this is wrong again :D

6. Jul 7, 2016

### micromass

You're correct. But $x_2$ is still caught as a maximum because of $x_2 > \max\{x_0,x_1,x_3,x_4\}$ so for $k=2$.

7. Jul 8, 2016

### chiro

Hey rattma.

You should probably account for multiple solutions just in case there are more than one solution.

I'd specify an implicit condition and use that as your rule to build the set based on that [basically you specify your P(x) condition implicitly rather than explicitly to do so].

8. Jul 9, 2016

### rattma

I am sorry. I am bit of a beginner... could you be more specific with the meaning of implicit condition? Thank you =)

9. Jul 9, 2016

### chiro

Implicit solutions are functions of the variables where they can't easily be separated.

An example of one is y^2 = sin(xy) + e^x