# Simple example with letter codes
result <- get_reachable_states(1:20, c("L", "X"), k = 4)
writeLines(result$cycle_info)
# Example with numeric codes
n <- 20
k <- 4
start_state <- 1:n
allowed_positions <- c("1", "3", "2")
result <- get_reachable_states(start_state, allowed_positions, k)
writeLines(result$cycle_info)
head(result$reachable_states_df)
Run the code above in your browser using DataLab