Results 1 to 5 of 5

Thread: find the weights......

  1. #1
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    find the weights......

    A store keeper want to weight 1 to 4okg of wood according to the user input. What is the minimum number of weights he should buy for fulfill all the user input? what are the weights?

    -------------------
    suresh


  2. #2
    Expert Member
    Join Date
    Jun 2006
    Answers
    410

    Re: find the weights......

    He should buy 4 weights. And they are 1,3,9 and 27.

    to weigh
    1kg = use 1 kg
    2 kg = 3 -1 (put 1 kg in the other end of the balance)
    3 kg = use 3 kg
    4 kg = 3+1
    5 kg = 9 -3 -1
    6 kg = 9 -3
    7 kg = 9 +1 -3
    8 kg = 9 -1...and so on.

    if you closely look at the weights you can identify that all of them are powers of 3. You can extend this problem up to any powers of 3.


  3. #3
    Expert Member
    Join Date
    Dec 2006
    Answers
    204

    Re: find the weights......

    minimum number of weights is 6
    weighs
    1 kg,2 kg,4 kg,8 kg,16 kg,32 kg.


  4. #4
    Expert Member
    Join Date
    Dec 2006
    Answers
    204

    Re: find the weights......

    Oh! sorry.
    I dint saw the reply too.


  5. #5
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    Re: find the weights......

    James give the perfect explanation for this problem...Well done james...Happy to see you back...

    -------------------
    suresh


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact