Congruential Generators.

#1
Find all of the cycles of the following congruential generators. For each
cycle identify which seeds \(X_0\) lead to that cycle.
\((a). X_{n+1} = 9X_n + 3\mod 11\)
\((b). X_{n+1} = 8X_n + 3\mod 11\)
\((c). X_{n+1} = 8X_n + 2\mod 12\)

How can i choose the seed,\(X_0\), at random ?

###When will i stop to generate numbers ?

I supposed to draw \(X_0\) at random from \(0\) to \(10\) [since \(m=11\)]and wrote `R` codes :

Code:
      X<- 0
      X[1]<-8 # seed ,Xo

     for(i in 2:11){
        X[i]<-(9*X[i-1]+3)%%11
        cat("",9*X[i-1]+3,"",X[i],"\n") 
    }
   
    X
How can i solve the problem ?
 

Dason

Ambassador to the humans
#2
If you know the answer the ideal thing that would happen would be that you post the solution to help out anybody else with a similar problem.