I have a major problem in understanding connected set!
Consider the set $X = (0,1]$. Now lets describe the following sets which can be considered as the basis for the topology on set $X$.
1) For all $b\in X$, all sets of the form $(0, b]$
2) For all $b\in X$, all sets of the form $(b, 1]$
Clearly above 2 groups of sets together can form the basis of the topology on set $X$. Now clearly we can $(0, x]\cup(x,1]$ is the disjoint union of the set $X$.
In the textbook it is written $(0,1]$ as connected BUT we can see it can be expressed as disjoint unions of open sets as above, Hence not connected! Kindly help.
PS: You can argue that sets of $(0, x]$ nature are not open, but they form the topology on $X$, hence they are open.
Note that the topology that you have defined is not the standard topology on the interval $(0,1]$.
In the standard topology, as a subset of $\Bbb R$, or more concretely, the topology generated by the intervals $(p,q)$ where $p,q\in\Bbb Q$, as well $(p,1]$ where $p\in\Bbb Q$; in that topology the unit interval is connected.
But you changed the topology, so it might be that the space is no longer connected, or not Hausdorff anymore, and so on and so forth.
By the way, it should be pointed that your defined basis is in fact a pre-basis. The intersection of $(0,\frac12]$ and $(\frac13,1]$ is $(\frac13,\frac12]$ which does not contain any sets of the suggested basis.