I am trying to check my understanding of open and closed sets. My professor gavels the following idea about open sets. I will have an example afterwards to check my understanding fully as an FYI.

Open ball, open sets: continuity

1. The open ball (a basic open set) with a center x and radius $r>0$ is given by $B(x,r)=\{y\in\mathbb{R}^{n}|d(x,y)<r\}$

$s\subset \mathbb{R}^{n}$ open if $\forall x\in s$, $\exists r> 0$ such that $B(x,r)\subseteq s$
2. (ex) $s=(0,1)\subseteq \mathbb{R}^1$

$r=\min \{x, 1-x\}, B(x,r)$$=(x-r,x+r)\subset s$ $\therefore$ $S=(0,1)$ is open.

Question(s):

1. looking at the formula for the open ball, is the $d(x,y)$ referring to Euclidean distance?
2. is it correct to say that as long as distance between x and y is smaller than the radius that I have an open set?
3. related to the example given by my professor in class, what exactly is the $r=\min\{x,1-x\}$? How did they choose that to prove the openness of the set?
4. finally, why is the function for $B(x,r)$ set as $(x-r, x+r)$? I am assuming it has something to do with $r=min\{x,1-x\}$ but I am not sure.

Thanks In advance for offering your assistance.