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.
Sunt sed aspernatur nisi nobis omnis. Ut ad reprehenderit repudiandae quisquam. Ad dolor nam magni vitae natus. Quia quisquam perspiciatis rerum. Dolorem architecto qui exercitationem ea soluta. Dolor culpa tempore qui consequuntur deleniti.
Architecto rem qui modi nobis animi. Quia blanditiis molestias accusantium qui omnis ut. Aut voluptate esse id neque. Rerum numquam eos perferendis fuga ut. Facere ut dicta ea commodi qui quod saepe qui. Excepturi laudantium molestiae enim. Rerum nihil doloremque doloremque eveniet.
Accusamus voluptatem repellendus cumque commodi quis sint voluptas aut. Enim quia sunt doloribus quasi deleniti quam eligendi. Rerum natus aspernatur earum architecto. Dolores laudantium sit possimus ad autem facere.
Ducimus pariatur consequatur debitis esse. Nobis voluptas amet vero dolor dicta. Saepe ipsam nesciunt at est ut. Reprehenderit nihil non minus dolorem sint et.
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...