• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Find the faulty machine

 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All
one more puzzle for you.

Suppose there are 10 machine producing the ciggarate of 10gm each.
But there is fault in one of the machine and it produces the ciggarate of 9gm only.
You have �electronic weight machine�. Now in only one trial, you have to find the faulty machine.


All the best
[ April 20, 2007: Message edited by: Shashikant Dahatonde ]
 
Bartender
Posts: 612
7
Mac OS X Python
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Far too easy, how about one machine is off (but you don't know by how much - or over/under) and still one measurement.
 
Bartender
Posts: 1205
22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am so disappointed in myself! It took me nearly 20 seconds to figure out Shashikant's puzzle.

I guess I've been blinded by too many problem that use a balance instead of an "electronic weight machine".

Apparently there is something that I don't realize I "know" in Steve's scenario. I'm just not seeing how a single weight measurement can tell you which machine is off if you don't know by how much. I could do it in two measurements (one to see by HOW MUCH the bad machine is off plus one like Shashikant's puzzle).

I suspect there is some "outside the box" solution:
  • Light all the cigs simultaneously and see if one burns faster/slower.
  • Make sure the tobacco in all of the sample cigs is packed equally tightly and see which paper wrapper is fuller.
  • Smoke a sample from each machine and see which one raises your heart rate more or less.


  • Ok, Steve, I give up. How?
     
    Wanderer
    Posts: 18671
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I thought the main challenge in the original problem was figuring out what a "ciggarate" is.

    I also do not see a solution to Steve's version of the puzzle. I suspect he's just made a question with no answer to torment us.
     
    Shashi Kant
    Ranch Hand
    Posts: 117
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator



    I suspect there is some "outside the box" solution:
    Light all the cigs simultaneously and see if one burns faster/slower.
    Make sure the tobacco in all of the sample cigs is packed equally tightly and see which paper wrapper is fuller.
    Smoke a sample from each machine and see which one raises your heart rate more or less.



    It's not the solution to my puzzle.
    you will have to use "electronic weight machine" only.

    try it, it works in one trial only.

    All the best
     
    Rancher
    Posts: 43081
    77
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Shashikant,

    what Ryan posted refers to Steves riddle. I think the consensus is that the one you posted is rather too simple.
     
    Greenhorn
    Posts: 8
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thats easy.

    1. number machines as 1 to 10
    2. produce n cigarettes from nth machine. i.e. machine 1 produces 1 cigarette, machine 2 produces 2 cigarettes... machine 8th produces 8 cigarettes and so on.
    3. weigh all the cigarettes produced once.
    if none of the machine was faulty then the total weight of the cigarettes would have been 1x10 + 2x10 + .... 10x10 = 550
    but one of the machine is faulty let it be the 7th machine(for e.g.) then the weigh of the produced cigarettes is
    1x10 + 2x10 + 3x10 + 4x10 + 5x10 + 6x10 + 7x9 + 8x10 + 9x10 + 10x10 =
    10+20+30+40+50+60+63+80+90+100 = 543

    550 - 543 = 7. implying that 7th machine is faulty.

    Thanks
     
    Shashi Kant
    Ranch Hand
    Posts: 117
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    HI Monica

    tht's the right answer.
    great job.
     
    Greenhorn
    Posts: 8
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator


    550 - 543 = 7. implying that 7th machine is faulty.

    Thanks




    That was awesome!
     
    Ranch Hand
    Posts: 3852
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Originally posted by Monica Dharwad:
    Thats easy.

    1. number machines as 1 to 10
    2. produce n cigarettes from nth machine. i.e. machine 1 produces 1 cigarette, machine 2 produces 2 cigarettes... machine 8th produces 8 cigarettes and so on.
    3. weigh all the cigarettes produced once.
    if none of the machine was faulty then the total weight of the cigarettes would have been 1x10 + 2x10 + .... 10x10 = 550
    but one of the machine is faulty let it be the 7th machine(for e.g.) then the weigh of the produced cigarettes is
    1x10 + 2x10 + 3x10 + 4x10 + 5x10 + 6x10 + 7x9 + 8x10 + 9x10 + 10x10 =
    10+20+30+40+50+60+63+80+90+100 = 543

    550 - 543 = 7. implying that 7th machine is faulty.

    Thanks



    Great!!!
     
    Greenhorn
    Posts: 17
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    great monica gracious gracious !!!
    [ May 03, 2007: Message edited by: pragmatic dsr ]
     
    Ryan McGuire
    Bartender
    Posts: 1205
    22
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Originally posted by Monica Dharwad:
    Thats easy.

    1. number machines as 1 to 10
    2. produce n cigarettes from nth machine. ...
    3. weigh all the cigarettes produced once.
    if none of the machine was faulty then the total weight of the cigarettes would have been 1x10 + 2x10 + .... 10x10 = 550 ...



    You could save the cost of 10 cigarettes by numbering the machines 0 through 9 and then carrying on with Monica's instructions. (Also, the magic number in step 3 changes from 550 to 540.)
    [ May 03, 2007: Message edited by: Ryan McGuire ]
     
    Steve Fahlbusch
    Bartender
    Posts: 612
    7
    Mac OS X Python
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Sorry, been gone...

    Anyway the trick to this one is to know the largest and smallest delta possible - but to make it easy lets say that the off machine is at least 1% off and less than 50% off - so bad sig is in the range of 5-9.9 oz or 10.1 to 15.
    Then it becomes simple take 1 from machine 1 - take 101 from 2, take 100001 from three and so on. just make sure that: the number you grab from each will separate the deltas into descrete ranges.

    Also note: the others have be to dead on, or this could be messy.
     
    Ryan McGuire
    Bartender
    Posts: 1205
    22
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Originally posted by... well... me:
    Apparently there is something that I don't realize I "know" in Steve's scenario.



    Originally posted by Steve Fahlbusch:
    Sorry, been gone...

    Anyway the trick to this one is to know the largest and smallest delta possible - but to make it easy lets say that the off machine is at least 1% off and less than 50% off - so bad sig is in the range of 5-9.9 oz or 10.1 to 15.
    Then it becomes simple take 1 from machine 1 - take 101 from 2, take 100001 from three and so on. just make sure that: the number you grab from each will separate the deltas into descrete ranges.

    Also note: the others have be to dead on, or this could be messy.



    Aha! Just as I suspected. The thing I didn't realize I knew was that there is some minimum amount that the bad machine is off by.

    Besides if we follow the pattern you set down for machines 1 and 2 we need...
    101 from machine 1,
    100,001 from machine 2,
    100,000,001 from machine 3,
    100,000,000,001 from machine 4,
    100,000,000,000,001 from machine 5,
    ...

    Whoa.... a million-million (what I'd call a trillion) and one cigarettes from one machines???

    Actually, I think we only need...
    1 from machine 1,
    51 from machine 2,
    2,601 from machine 3,
    132,651 from machine 4,
    6,765,201 from machine 5,
    345,025,251 from machine 6,
    17,596,287,801 from machine 7,
    897,410,677,851 from machine 8,
    45,767,944,570,401 from machine 9, and
    2,334,165,173,090,451 from machine 10.

    We still need a couple thousand-million-million or so cigs from one machine. For that much, I'd just buy a second scale.
     
    Steve Fahlbusch
    Bartender
    Posts: 612
    7
    Mac OS X Python
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    i didn't say it was cheep, i said it was do-able
     
    Greenhorn
    Posts: 1
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    It's too easy.
    I will take cigarettes according to machine number Viz-first machine one cigarette, second machine two cigarettes,three machine three cigarettes and so on.
    Finally weight all the cigarettes and we found answer according to decreasing weight to normal weight (sum total weight when all machines works in good condition)  Viz-10gm decrease then it found to be fault in first machine and accordingly we see and found that machine.
    Thanks
     
    Saloon Keeper
    Posts: 5654
    214
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hmm, poor Shashi Kant, some did not take this challenge very seriously. Indeed, the puzzle is a well known one. I recently read about a nice Christmas puzzle, that is programmatically a little more challenging. That puzzle is from DK3250 and can be found here: christmas puzzle

    Let's apply it to our cigarette machine, and make a simplified version of the challenge. Here goes:

    A cigarrete machine produces cigarretes in batches of 99. Each cigarette is in principle 10 cm long, but due to certain random processes each cigarrete can be anything between 9 and 11 centimeter, at random (uniformly distributed). Now, these batches are divided into groups of three. Due to packaging reasons, in every group of three no two cigarettes may differ in length more than half a centimeter. To reduce waist, the manufacturer wants to have as many groups out of the 99 batch as possible. What is that maximum, given some batch of 99?
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic