Results 1 to 2 of 2

Math Help - paritioning a number into two sets based on sum of digits

  1. #1
    Member
    Joined
    Nov 2010
    Posts
    95

    paritioning a number into two sets based on sum of digits

    hi, how can one determine whether a number belongs to such a set of numbers whose every element can be divided into two sets such that the sum of digits of each set of the number is same.
    E.g
    23450 does belong to such a set , as it can be split into two sets : (3,4,0) and (2,5) such that sum of digits in each set is the same(7).
    Similary 91125 belongs to such a set: (9) and (1,1,2,5).
    but 567 , or 34523 do not belong to such a set of numbers .

    By simple brute-force method it would take long timt to find such number among a range. So is there any better sollution to it? Maybe by usung bit operations?
    Thanks.
    Last edited by pranay; February 12th 2011 at 08:51 AM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member
    Joined
    Mar 2010
    Posts
    280
    The main thing is to make from the given number a set of its digits.

    <br />
a_n \: 10^n+a_{n-1} \: 10^{n-1}+...+a_0 \; \to (a_n, \: a_{n-1}, \: ... \: ,a_0) <br />

    This may be done :
    1) find max n.
    2) dividing the number by 10^i and subtracting from n to 1.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 2
    Last Post: May 3rd 2011, 03:22 PM
  2. Replies: 1
    Last Post: February 11th 2011, 03:52 AM
  3. Replies: 7
    Last Post: November 28th 2010, 09:22 PM
  4. I have six digits, what number am I
    Posted in the Algebra Forum
    Replies: 2
    Last Post: October 3rd 2008, 07:20 AM
  5. number of combination of 8 digits number
    Posted in the Discrete Math Forum
    Replies: 4
    Last Post: April 7th 2008, 03:37 AM

Search Tags


/mathhelpforum @mathhelpforum