Does it make sense to have 2 branches resulting in same decision while using one single variable to divide the predictor multiple times? I have been recently come across a problem that entails using a decision tree that only uses one continuous variable to divide the predictor on multiple threshold, while some splits result in the same decision. The decision tree is as follows:

So I have two questions:

*

*Does it make sense to use one variable multiple times for dividing the predictor?

*Is it possible that two splits result in the same decision?

I didn't share any codes or data set because I just want to know whether this condition is possible and why we would prefer this.

YES & YES
set.seed(2021)
N <- 10
x0 <- c(runif(N, -4, -2), runif(N, 2, 4))
x1 <- runif(2*N, -2, 2)
plot(x0, rep(1, 2*N), col = 'red')
points(x1, rep(1, 2*N), col = 'blue')

(If someone could run this in R and post the picture, that would be fantastic.)
If you're above $0$, the color depends on if you're above $2$. If you're below $0$, the color depends on if you're below $-2$. However, you cannot split at $2$ or $-2$ and always get the right color. There are reds and blues above $-2$. There are reds and blues below $2$. Splitting on the same variable multiple times allows us to guess the correct color every time.
In some pseudocode:
if x > 0:
    if x < 2:
        color = red
    if x > 2:
        color = blue
if x < 0:
    if x < -2:
        color = red
    if x > -2:
        color = blue

