 All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars  perplexus dot info  Increasing numbers representation (Posted on 2018-11-28) We can represent any increasing (not necessarily strictly-increasing) decimal number via binary strings and vice versa. Let, for example 001101001 represent 2235.
HOW?
Imagine a counter C, which starts at 0.
Our sequence is 001101001. Moving from left to right for every 0 we meet in the string we increase C by one, and for every 1 we meet in the string we print the value of C.
Thus we get this number 2235.

Using this method we can represent all 3-digit increasing(see my definition above) numbers made up of the digits 0,1, and 2 with binary strings of length 5:
11100 = 000
11010 = 001
11001 = 002
etc
....
etc,etc
00111 = 222

Which means that there are 10 5-digit strings covering all increasing numbers from 000 to 222.

How many k-digit (k denotes the length) binary strings are needed to cover all increasing numbers from 0 to n?

Your answer should be definition of F(n,k) and the justification of this formula.

Rem:Clearly, the maximum value of C is 9.

D3 bonus: Devise a doable notation for non-decimal numbers (say base up to 24 implying C over 9).

 No Solution Yet Submitted by Ady TZIDON No Rating Comments: ( Back to comment list | You must be logged in to post comments.) No Subject Comment 1 of 1
How many k-digit (k denotes the length) binary strings are needed to cover all increasing numbers from 0 to n?

I'm going to answer to this as I'm uncertain about what is F(n,k)

To cover all increasing numbers from 0 to n for n<10 you need n+1 digits, so k=n+1
To cover all increasing numbers from 0 to n for n>10 you need the number of digits of n (say it m) + 9, so k=m+9

 Posted by armando on 2019-01-12 04:48:15 Please log in:

 Search: Search body:
Forums (1)