All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers > Sequences
Increasing numbers representation (Posted on 2018-11-28) Difficulty: 2 of 5
We can represent any increasing (not necessarily strictly-increasing) decimal number via binary strings and vice versa. Let, for example 001101001 represent 2235.
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
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: ( You must be logged in to post comments.)
  Subject Author Date
No Subjectarmando2019-01-12 04:48:15
Please log in:
Remember me:
Sign up! | Forgot password

Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Copyright © 2002 - 2021 by Animus Pactum Consulting. All rights reserved. Privacy Information