MOP Numbers

Discussion in 'Physics & Math' started by gerg, Feb 6, 2004.

  1. gerg Guest

    Hello

    I'm having a little trouble solving this problem, and would like to ask if someone can help me.


    A mop expression is a way of producing a number using only multiplications, ones and pluses. The length of a mop is the number of ones it contains.

    For example, 22 = 1+1+((1+1+1+1)x(1+1+1+1+1)), which has a length of 11.

    Another mop of 22 is 1+((1+1+1)x(1+((1+1)x(1+1+1)))) which has a length of 10. There are no shorter mops for 22.


    DERIVE A METHOD that inputs a single integer n (1<n<10000) and outputs the length of the shortest mop of n.


    Thankyou for anyone who has a look at this

    Gerg
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. NanoTec Registered Senior Member

    Messages:
    30
    (1+1)x(1+((1+1)x(1+1+1+1+1)))=22 [length=10]
    (1+1)x(1+1+((1+1+1)x(1+1+1)))=22 [length=10]

    Any “mop” should satisfy n=C+(XxY)
    where C,X,Y are recursive “mop”s
    the sum of the resulting “mop” values C+X+Y is the length.

    Prime case P: initial C must be >0
    (XxY)= lower number “mop”
    Factorable case: initial C can be 0
    Find factors “mop”s {X,Y}>=2
    Take the factors distribute them between X and Y
    For every distribution find the lowest length “mop”s

    A table of lower order “mop”s would be helpful.
     
  4. Google AdSense Guest Advertisement



    to hide all adverts.
  5. gerg Guest

    ooh, thanks for that - this will help a lot with the programing of a computer program to solve the problem.

    Gerg
     
  6. Google AdSense Guest Advertisement



    to hide all adverts.
  7. NanoTec Registered Senior Member

    Messages:
    30
    Attached is example output data for the recursive process.
    No instances of C > 4, except n=5, exist.
     
    Last edited: Feb 8, 2004

Share This Page