$(X,\tau)$ a topological space with $X\neq \emptyset$ and $D = \{D \subseteq X : D$ is dense in $(X, \tau) \}$. Be $(X,\tau)$ a topological space with $X\neq \emptyset$ and $D = \{D \subseteq
X : D$ is dense in $(X, \tau) \}$.
(a)Prove that it is a discrete topology over X if, and only if, $D = \{X\}$.
Definition. The discrete topology is formed by the parts of X, i.e, ℘(X).
From the imprint that only set X is dense in itself, and no other subset of $X$ is dense in $X$.
(b) Prove that τ is the chaotic topology on X if, and only if, $D$ =
℘(X) - {∅}.
Definition. The caotica topology consists of: $\{\emptyset, X\}$
Can you help me, please?
 A: A subset $D$ of $X$ is dense in $X$ if and only if $\operatorname{cl}D=X$.

*

*Show that if $X$ has the discrete topology, $\operatorname{cl}A=A$ for every $A\subseteq X$.

*Show that if $X$ has the indiscrete topology, $\operatorname{cl}A=X$ for every non-empty $A\subseteq X$.

Once you’ve done this, you’ll have shown $X$ is the only dense subset of $X$ in the discrete topology, and every non-empty subset of $X$ is dense in $X$ in the indiscrete topology. (Why?)
For the other direction, you want to show (a) that if $X$ is the only dense subset of $X$, then $X$ has the discrete topology, and (b) that if every non-empty subset of $X$ is dense in $X$, then $X$ has the indiscrete topology.

*

*For (b), show that if every non-empty subset of $X$ is dense in $X$, then the only closed sets in $X$ are $\varnothing$ and $X$. HINT: If $F\subseteq X$ is closed, then $F=\operatorname{cl}F$.

*For (a), note that if $X$ does not have the discrete topology, then there is an $x\in X$ such that $\{x\}$ is not open; show that $X\setminus\{x\}$ is dense in $X$.

A: Adding to Brian M. Scott Answer:
Claim: In (a) part, Converse part:
Suppose $D=\{X\}$ and Let there is some subset of $X$ not open in $X$ , let's say $\{x\}$
then,
Claiming $X\setminus\{x\}$ is dense in $X$ :
Then for every $U$ subset of $\tau$ such that
if $x \in U$ then $U\cap(X\setminus\{x\})$ not equal to $\phi$ as $\{x\}$ is not open in $\tau$.
So, clearly $X\setminus\{x\}$ is dense in $X$.
