I am trying to solve this problem but I dont understand what am I supposed to do:
You are given the following complexity classes : REC (recursive) ,RE(recursively enumerable) , P , NP , NPSPACE , PSPACE ,REG(regular) , CF(Context Free). Draw them in a hasse diagram with short explanation.
I tried ranking the classes Reg < CF < P <NP < PSPACE=NPSPACE < REC < R.E. but I don't know how to make the hasse diagram.
Computational complexity classes are basically sets of problems. Some of them are included in others. For example, it is quite obvious that $\mathcal{P} \subseteq \mathcal{NP}$ and likewise $\mathcal{P} \subseteq co-\mathcal{NP}$.
It is easy to see that set inclusion $\subseteq$ induces a partial order (it is reflexive, transitive and anti-symmetric). Hasse-diagrams are a way of representing partial orders.
In general, a Hasse-diagram is defined as a graph $G=(V,E)$. The vertices are the given sets (the complexity classes in this case) and the edges define the corresponding partial orders (the set inclusion in this case).
Given two sets $A,B$ such that $A \subseteq B$, then there is a directed edge from $A$ to $B$ in the Hasse diagram.
Now, for our case we have complexity classes. Some of them are included in others, e.g. $\mathcal{P} \subseteq \mathcal{NP}$ as stated above, hence there would be a directed edge from $\mathcal{P}$ to $\mathcal{NP}$ in the Hasse-diagram. We do the same for all given complexity classes.