So I saw this very interesting problem. Let's say you have a length of 2, and a base length of 5
l = 2, b = 5
this would be translated to :
11000
Now if you give an input let's say a 2 the ones on the problem above should move by this number. :
11000 → input 2 : 10100
So the pattern is like this :
input: 1 → 11000
input: 2 → 10100
input: 3 → 10010
input: 4 → 10001
input: 5 → 01100
input: 6 → 01010
input: 7 → 01001
input: 8 → 00110
input: 9 → 00101
input: 10 → 00011
input = 10 would be the final number
So the problem is what if you have an l equals to 8
and b equals to 50
:
11111111000000000000000000000000000000000000000000
And you're looking for a pattern something like :
00000010000000011000000000010010000000110000000010
How would this problem be solved without an absurdly large number, is this possible?