One question
Hi guys!
I have recently found a very interesting question, and it goes like this:
Let's assume you have a sequence of 36 1's and 0's (i.e. 01010101..., 10000100... ). Can you construct a sequence such that every consecutive subsequence of length 5 is unique? Let's assume that you start with 00000. How would you construct it?
(For instance, if you start with 00000100001..., then it's not valid since you have two subsequences (00001, 00001) of length 5 that are identical)
I have found solution of this on web - 000001000110010100111010110111110000, and author of solution mentioned that he got the solution with thinking about shift registers. I know almost nothing about those registers, so any idea/ intuition how to get abovementioned number would mean a lot to me.
Cheers:)
Pretty easy... shifting registers: 5x5 + 1 = 36 So we start with 00000, then we start by "shifting" a one to the right and the left side 10001, then we shift the right 1 one place to the left and add an extra 1 ; 10011, etc. etc.
Pretty easy isn't it?
Lol, 7x5 +1 I meant of course.
The idea is that you create 7 registers of length 5.. The only thing you have to do is to change the places of the 1 every time... You shift the one from the right to the left side, takin all the different combinations possible...
Actually I still don't understand the idea, so you divided 36 into 7 numbers of 5 digits +1, so first you put 10001, and what about 1's and 0's between 10001 and 10011? I am really not yet sure how to implement this concept.
Corrupti officiis nesciunt maiores deleniti officiis. Accusantium quo magnam ea ut doloribus. Rem natus deleniti placeat sit nobis.
Rerum ipsa molestiae totam totam quia libero. Eos sit totam non voluptatem. Rerum exercitationem tenetur eos. Iure veniam quia autem temporibus ducimus eaque architecto.
Recusandae hic dolor necessitatibus ullam dolor autem. Quo iure est cumque vel ipsa. Tempora odit repellendus sit fuga quibusdam et maxime.
Et eum voluptatem minima exercitationem pariatur fugiat. Vel corporis at aut earum. Qui rerum illum alias in. Delectus cum aut sapiente natus ut totam quo.
See All Comments - 100% Free
WSO depends on everyone being able to pitch in when they know something. Unlock with your email and get bonus: 6 financial modeling lessons free ($199 value)
or Unlock with your social account...