How to denote the set of all students who take the same class as some given student $s'$?

76 Views Asked by At

I have a set of Students: $S = \{s_1, \ldots, s_2 \}$. Now each student takes some class (doesn't matter what class). Now I need to have a set $X$ that contains all students that take the same class, for some given student $s'$:

Is $X$ correctly defined: $X = \{ s : \forall s \in S(s.class = s'.class \wedge s \neq s')\}$ ?? Or do you have some more elegant solution (if mine is correct)?

1

There are 1 best solutions below

0
On BEST ANSWER

Let $S=\{s_1,s_2,\ldots, s_n\}$ be the set of students and $C$ be the set of available classes. Denote by $c(s)$ the class student $s$ takes. Given a particular student $s'$ the set $X$ of all students that take the same class as $s'$ is denoted by $$X:=\bigl\{s\in S\>\bigm|\> c(s)=c(s')\bigr\}\ .$$ Here the chosen student $s'$ is a member of $X$. If you do not want that you can define the set $$\dot X:=\bigl\{s\in S\>\bigm|\> s\ne s' \ \wedge \ c(s)=c(s')\bigr\}\ .$$