wu :: forums
« wu :: forums - binary »

Welcome, Guest. Please Login or Register.
Apr 25th, 2024, 2:26am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   putnam exam (pure math)
(Moderators: Icarus, SMQ, Eigenray, william wu, towr, Grimbal)
   binary
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: binary  (Read 852 times)
mad
Junior Member
**





   


Posts: 118
binary  
« on: Jul 31st, 2007, 1:42pm »
Quote Quote Modify Modify

Let f(k) = y where k is the y-th number in the increasing sequence of non-negative integers with the same number of ones in its binary representation as y, e.g. f(0) = 1, f(1) = 1, f(2) = 2, f(3) = 1, f(4) = 3, f(5) = 2, f(6) = 3 and so on. Given k >= 0, compute f(k).  
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: binary  
« Reply #1 on: Jul 31st, 2007, 2:26pm »
Quote Quote Modify Modify

I can't entirely understand the way you've phrased that..
Is f(k) an inverse function, because it seems k depends on y rather than vice versa.
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
Eigenray
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 1948
Re: binary  
« Reply #2 on: Jul 31st, 2007, 2:55pm »
Quote Quote Modify Modify

It's basically the "prime bits" problem.  Except not necessarily prime.
 
(Inverse problem here and here.)
« Last Edit: Jul 31st, 2007, 2:57pm by Eigenray » IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: binary  
« Reply #3 on: Jul 31st, 2007, 3:03pm »
Quote Quote Modify Modify

Ah, f(k) is the count of nonnegative numbers k with the same number of bits set to one as k.
Now I understand it.
« Last Edit: Jul 31st, 2007, 3:04pm by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
mad
Junior Member
**





   


Posts: 118
Re: binary  
« Reply #4 on: Jul 31st, 2007, 3:31pm »
Quote Quote Modify Modify

Eg.
 
1010
will come after
0011
0101
0110
1001
1010
 
So, it is the 5th number here.
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board