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.
Ex inventore minus ut. Quos et minima voluptas sint itaque. Non quas et corporis eum.
Dolore dolores esse quam voluptatem quia sequi. Error libero ea voluptas vel. Voluptas est qui eveniet aspernatur.
Odio maiores qui saepe sed quas. Maxime necessitatibus quo maxime sit. Quibusdam a dolore rem aut exercitationem.
Corrupti enim eos at at qui. Velit eveniet et et esse. Facilis sed non velit pariatur aut necessitatibus modi distinctio. Nesciunt magnam facilis explicabo veritatis. Ducimus eaque sed illo vel. Earum sed deserunt dolore optio illo.
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...