Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Repost Puzzle [SOLUTION ADDED]

Repost Puzzle [SOLUTION ADDED]

Scheduled Pinned Locked Moved The Lounge
comsalesquestion
66 Posts 14 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Tom Welch

    Well, if he the scale is off by X, then one side (A) will weigh:

    A + X == CounterWeightA

    The other (B) will weigh:

    B - X == CounterWeightB

    So:

    CounterWeightA + CounterWeightB = (A + X) + (B - X)

    Therefore:

    CounterWeightA + CounterWeightB = A + B

    Fair, no? But he'll have a heck of a time balancing things if A or B is < X. Of course, he could fix it all by using dead weights to tare the balance first.

    D Offline
    D Offline
    Dan Neely
    wrote on last edited by
    #42

    Does this math still hold if the error is A*X instead of A+X? Continuing farther does it hold for A+B*(C+X). You really need to quantify how it's erroring, otherwise there're a potentially infinite number of failure modes that would need tested.

    -- Rules of thumb should not be taken for the whole hand.

    R 1 Reply Last reply
    0
    • N Nish Nishant

      Customer orders X quantity of something. Let Y = X/2 Now he measures out Y amount by putting the stuff on the Left and a weight on the Right. Assume there's an error of Z% where the balance is biased towards the Right one. So he actually weighs out (Y - Z% of Y) Now he measures out Y amount by putting the stuff on the Right and a weight on the Left. Since the error works in the customer's favor now, what's weighed out is (Y + Z% of Y) Putting the two quantities together, he gets :- (Y - Z% of Y) + (Y + Z% of Y) = 2Y = X So, the customer gets exactly the amount he wanted. No cheating at all.

      Regards, Nish


      Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
      Currently working on C++/CLI in Action for Manning Publications. (*Sample chapter available online*)

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #43

      Nishant Sivakumar wrote:

      Let Y = X/2

      how is that division accomplished?

      image processing toolkits | batch image processing | blogging

      N 1 Reply Last reply
      0
      • C Chris Losinger

        Nishant Sivakumar wrote:

        Let Y = X/2

        how is that division accomplished?

        image processing toolkits | batch image processing | blogging

        N Offline
        N Offline
        Nish Nishant
        wrote on last edited by
        #44

        Chris Losinger wrote:

        how is that division accomplished?

        Say the customer wants 4 pounds of wheat. Y is now 4 pounds. So X becomes 2 pounds. You take a 2 pound weight and put that on the Right balance and weigh out 2 pounds (with error). Then you swap balances, putting the 2 pound weight on the Left balance. So you basically weigh twice, but 2 pounds each to get 4 pounds. The balance is faulty, but because you do it twice but from opposite balances, the errors cancel out.

        Regards, Nish


        Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
        Currently working on C++/CLI in Action for Manning Publications. (*Sample chapter available online*)

        C 1 Reply Last reply
        0
        • D Dan Neely

          working. I didn't see an obvious answer and can't take half an hour to scribble on a scratch pad.

          -- Rules of thumb should not be taken for the whole hand.

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #45

          dan neely wrote:

          working. I didn't see an obvious answer and can't take half an hour to scribble on a scratch pad. --

          I believe I've answered it correctly - and if my answer is right, it's a pretty simple puzzle.

          Regards, Nish


          Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
          Currently working on C++/CLI in Action for Manning Publications. (*Sample chapter available online*)

          1 Reply Last reply
          0
          • R Raj Lal

            Since nobody was able to solve it yesterday, i wanted to give a chance to those guys who did not tried Puzzle of the (YESTER)Day A grocer discovered his beam balance was faulty, So he started a new method for weighing customer's orders He divides the order into two halves, putting the first half in the left hand of the balance and weights in the right, then do the opposite. The method is unique no doubt, but is the method fair also, to both his customers and himself ? You can hide , you can run, but you cannot escape, Vote it down if you want to escape i mean if you think the puzzle is not worth a repost. HERE is a sample of PAN Balance[^] SOLUTION[^]

            Omit Needless Words - Strunk, William, Jr.


            Vista? Soapbox Videogadget here

            R Offline
            R Offline
            Raj Lal
            wrote on last edited by
            #46

            Quartz... wrote:

            The method is unique no doubt, but is the method fair also, to both his customers and himself ?

            The answer is NO A "natural" fault in an otherwise fair balance is always proportional to the weight. CASE 1 : The case when there can be an addition error in the measurement is IFF A weight is added to one side intentionally or One of the pan has more weight. THIS can be fairly dealed by the method acquired by the grocer. but since we don't know that this is the case as also pointed out by Dan neely here[^] (only one who came close to the reasoning ) CASE 2 Error due to the beam which is related to the weight. Assume we have 1800 gms of weight in two lots of 900 gms each 1. 900 gms of order is put on the left pan and was found to be 1000 gms on first weighing 2. When we put 900gms on right pan , due to the error the left pan will need 900 x 900 ---------- = 810 gms 1000 So the total weight for which he charges becomes 1000 + 810 = 1810 = 1800 gms (original) + 10 gms (error) This method does reduce the bias of error but still its not accurate QED

            Omit Needless Words - Strunk, William, Jr.


            Vista? Soapbox Videogadget here

            P C 4 Replies Last reply
            0
            • S Shog9 0

              Well, let's work through it...

              1. Grocer divides items, sets half aside.
              2. Grocer puts half items on one side of scale, weights on the other, 'till balanced. Scale indicates 10lbs.
              3. Grocer switches sides, adjusts weights 'till balanced, scale now indicates 11lbs.
              4. Grocer tells customer, "The scale is obviously biased by .5lbs, this half weights 10.5lbs"
              5. Grocer then proceeds to weight the rest of the items by placing them on the same side of the scale used to initially weigh the first set of items, and adding .5lbs to the result (which is 6lbs).
              6. Customer is charged for 17lbs.

              Verdict:

              • The method is unfair to the customer, as the grocer was using the items not being weighed to hide his fat thumb on the balance. Customer was then charged for 17lbs instead of the actual weight (1lbs, 11oz).
              • The method is also unfair to the grocer, as it allowed his greed to become obvious to the customer, who will never again shop in his store and will report his obviously inaccurate scales to the Authorities, causing Trouble (a fair scale would have forced him to resort to a tiered pricing scheme, scamming the customer out of much more money, while letting him think the incredible effort required to calculate prices was ensuring him a better deal).
              • Of course, it's even more unfair to the poor scale repair company, which was deprived of a customer and forced to lay off a young repairman.
              • It's most unfair of all to the repairman's young child, who, his father deprived of money for food, was forced to milk squirrels to put milk on his cereal, which tasted just awful as a result.

              ----

              It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.

              --Raymond Chen on MSDN

              R Offline
              R Offline
              Raj Lal
              wrote on last edited by
              #47

              Shog9 wrote:

              It's most unfair of all to the repairman's young child, who, his father deprived of money for food, was forced to milk squirrels to put milk on his cereal, which tasted just awful as a result.

              And how unfair is that to the squirrel ? poor squirrel

              Omit Needless Words - Strunk, William, Jr.


              Vista? Soapbox Videogadget here

              1 Reply Last reply
              0
              • N Nish Nishant

                Customer orders X quantity of something. Let Y = X/2 Now he measures out Y amount by putting the stuff on the Left and a weight on the Right. Assume there's an error of Z% where the balance is biased towards the Right one. So he actually weighs out (Y - Z% of Y) Now he measures out Y amount by putting the stuff on the Right and a weight on the Left. Since the error works in the customer's favor now, what's weighed out is (Y + Z% of Y) Putting the two quantities together, he gets :- (Y - Z% of Y) + (Y + Z% of Y) = 2Y = X So, the customer gets exactly the amount he wanted. No cheating at all.

                Regards, Nish


                Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
                Currently working on C++/CLI in Action for Manning Publications. (*Sample chapter available online*)

                R Offline
                R Offline
                Raj Lal
                wrote on last edited by
                #48

                check the solution here[^]

                Omit Needless Words - Strunk, William, Jr.


                Vista? Soapbox Videogadget here

                1 Reply Last reply
                0
                • R Raj Lal

                  Quartz... wrote:

                  The method is unique no doubt, but is the method fair also, to both his customers and himself ?

                  The answer is NO A "natural" fault in an otherwise fair balance is always proportional to the weight. CASE 1 : The case when there can be an addition error in the measurement is IFF A weight is added to one side intentionally or One of the pan has more weight. THIS can be fairly dealed by the method acquired by the grocer. but since we don't know that this is the case as also pointed out by Dan neely here[^] (only one who came close to the reasoning ) CASE 2 Error due to the beam which is related to the weight. Assume we have 1800 gms of weight in two lots of 900 gms each 1. 900 gms of order is put on the left pan and was found to be 1000 gms on first weighing 2. When we put 900gms on right pan , due to the error the left pan will need 900 x 900 ---------- = 810 gms 1000 So the total weight for which he charges becomes 1000 + 810 = 1810 = 1800 gms (original) + 10 gms (error) This method does reduce the bias of error but still its not accurate QED

                  Omit Needless Words - Strunk, William, Jr.


                  Vista? Soapbox Videogadget here

                  P Offline
                  P Offline
                  PIEBALDconsult
                  wrote on last edited by
                  #49

                  OK, so if you're saying that the "fault" is of the second type, why not state that to begin with? And is it any different than if he weighed the whole order rather than half?

                  R 1 Reply Last reply
                  0
                  • D Dan Neely

                    Does this math still hold if the error is A*X instead of A+X? Continuing farther does it hold for A+B*(C+X). You really need to quantify how it's erroring, otherwise there're a potentially infinite number of failure modes that would need tested.

                    -- Rules of thumb should not be taken for the whole hand.

                    R Offline
                    R Offline
                    Raj Lal
                    wrote on last edited by
                    #50

                    i have posted the solution here[^]

                    Omit Needless Words - Strunk, William, Jr.


                    Vista? Soapbox Videogadget here

                    1 Reply Last reply
                    0
                    • D David Crow

                      Quartz... wrote:

                      the question asked is Whether the method applied by the grocer is fair ?

                      No, since you've previously indicated that "he cannot weigh any of the halfs accurately." That constraint alone nullifies any attempt at weighing the order by 1/2, 1/4, etc.


                      "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                      "Judge not by the eye but by the heart." - Native American Proverb

                      R Offline
                      R Offline
                      Raj Lal
                      wrote on last edited by
                      #51

                      posted the answer here[^]

                      Omit Needless Words - Strunk, William, Jr.


                      Vista? Soapbox Videogadget here

                      1 Reply Last reply
                      0
                      • N Nish Nishant

                        Chris Losinger wrote:

                        how is that division accomplished?

                        Say the customer wants 4 pounds of wheat. Y is now 4 pounds. So X becomes 2 pounds. You take a 2 pound weight and put that on the Right balance and weigh out 2 pounds (with error). Then you swap balances, putting the 2 pound weight on the Left balance. So you basically weigh twice, but 2 pounds each to get 4 pounds. The balance is faulty, but because you do it twice but from opposite balances, the errors cancel out.

                        Regards, Nish


                        Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
                        Currently working on C++/CLI in Action for Manning Publications. (*Sample chapter available online*)

                        C Offline
                        C Offline
                        Chris Losinger
                        wrote on last edited by
                        #52

                        Nishant Sivakumar wrote:

                        Then you swap balances, putting the 2 pound weight on the Left balance

                        i don't see it. to balance 2lbs in one setup let's assume you have to add E to your pile of wheat; to get 2lbs in the other setup, you then have to subtract 2E from that same pile. the Es don't just cancel out, if you're always changing the amount on the wheat side of the balance - you're either balancing a 2lb weight against X + E or a 2lb weight against X - E, you can't balance X. unless... if the error is constant, there's no need to do any double measuring at all - you figure just figure out what the balance is off by, then offset all your measurements by that amount; ex. if it always weighs 2oz higher on the left side, just add 2oz to the right side, any time you measure anything. if it isn't constant, there isn't enough info given to solve the problem. -- modified at 18:22 Thursday 8th March, 2007

                        image processing toolkits | batch image processing | blogging

                        R 1 Reply Last reply
                        0
                        • P PIEBALDconsult

                          OK, so if you're saying that the "fault" is of the second type, why not state that to begin with? And is it any different than if he weighed the whole order rather than half?

                          R Offline
                          R Offline
                          Raj Lal
                          wrote on last edited by
                          #53

                          PIEBALDconsult wrote:

                          And is it any different than if he weighed the whole order rather than half?

                          i didn't understand your question

                          Omit Needless Words - Strunk, William, Jr.


                          Vista? Soapbox Videogadget here

                          P 1 Reply Last reply
                          0
                          • R Raj Lal

                            PIEBALDconsult wrote:

                            And is it any different than if he weighed the whole order rather than half?

                            i didn't understand your question

                            Omit Needless Words - Strunk, William, Jr.


                            Vista? Soapbox Videogadget here

                            P Offline
                            P Offline
                            PIEBALDconsult
                            wrote on last edited by
                            #54

                            Neither do I. In what way is weighing half at a time different (more accurate?) from weighing the whole thing?

                            --| "Every tool is a hammer." |--

                            R 1 Reply Last reply
                            0
                            • R Raj Lal

                              Quartz... wrote:

                              The method is unique no doubt, but is the method fair also, to both his customers and himself ?

                              The answer is NO A "natural" fault in an otherwise fair balance is always proportional to the weight. CASE 1 : The case when there can be an addition error in the measurement is IFF A weight is added to one side intentionally or One of the pan has more weight. THIS can be fairly dealed by the method acquired by the grocer. but since we don't know that this is the case as also pointed out by Dan neely here[^] (only one who came close to the reasoning ) CASE 2 Error due to the beam which is related to the weight. Assume we have 1800 gms of weight in two lots of 900 gms each 1. 900 gms of order is put on the left pan and was found to be 1000 gms on first weighing 2. When we put 900gms on right pan , due to the error the left pan will need 900 x 900 ---------- = 810 gms 1000 So the total weight for which he charges becomes 1000 + 810 = 1810 = 1800 gms (original) + 10 gms (error) This method does reduce the bias of error but still its not accurate QED

                              Omit Needless Words - Strunk, William, Jr.


                              Vista? Soapbox Videogadget here

                              P Offline
                              P Offline
                              PIEBALDconsult
                              wrote on last edited by
                              #55

                              Quartz... wrote:

                              Error due to the beam which is related to the weight.

                              I'm wondering how this is possible with a balance. I may need to experiment.

                              C 1 Reply Last reply
                              0
                              • C Chris Losinger

                                Nishant Sivakumar wrote:

                                Then you swap balances, putting the 2 pound weight on the Left balance

                                i don't see it. to balance 2lbs in one setup let's assume you have to add E to your pile of wheat; to get 2lbs in the other setup, you then have to subtract 2E from that same pile. the Es don't just cancel out, if you're always changing the amount on the wheat side of the balance - you're either balancing a 2lb weight against X + E or a 2lb weight against X - E, you can't balance X. unless... if the error is constant, there's no need to do any double measuring at all - you figure just figure out what the balance is off by, then offset all your measurements by that amount; ex. if it always weighs 2oz higher on the left side, just add 2oz to the right side, any time you measure anything. if it isn't constant, there isn't enough info given to solve the problem. -- modified at 18:22 Thursday 8th March, 2007

                                image processing toolkits | batch image processing | blogging

                                R Offline
                                R Offline
                                Raj Lal
                                wrote on last edited by
                                #56

                                added solution

                                Omit Needless Words - Strunk, William, Jr.


                                Vista? Soapbox Videogadget here

                                C 1 Reply Last reply
                                0
                                • R Raj Lal

                                  added solution

                                  Omit Needless Words - Strunk, William, Jr.


                                  Vista? Soapbox Videogadget here

                                  C Offline
                                  C Offline
                                  Chris Losinger
                                  wrote on last edited by
                                  #57

                                  a picture? that's not a solution

                                  image processing toolkits | batch image processing | blogging

                                  R 1 Reply Last reply
                                  0
                                  • C Chris Losinger

                                    a picture? that's not a solution

                                    image processing toolkits | batch image processing | blogging

                                    R Offline
                                    R Offline
                                    Raj Lal
                                    wrote on last edited by
                                    #58

                                    no its a seperate REPLY to the Question at the end of the thread

                                    Omit Needless Words - Strunk, William, Jr.


                                    Vista? Soapbox Videogadget here

                                    1 Reply Last reply
                                    0
                                    • R Raj Lal

                                      Quartz... wrote:

                                      The method is unique no doubt, but is the method fair also, to both his customers and himself ?

                                      The answer is NO A "natural" fault in an otherwise fair balance is always proportional to the weight. CASE 1 : The case when there can be an addition error in the measurement is IFF A weight is added to one side intentionally or One of the pan has more weight. THIS can be fairly dealed by the method acquired by the grocer. but since we don't know that this is the case as also pointed out by Dan neely here[^] (only one who came close to the reasoning ) CASE 2 Error due to the beam which is related to the weight. Assume we have 1800 gms of weight in two lots of 900 gms each 1. 900 gms of order is put on the left pan and was found to be 1000 gms on first weighing 2. When we put 900gms on right pan , due to the error the left pan will need 900 x 900 ---------- = 810 gms 1000 So the total weight for which he charges becomes 1000 + 810 = 1810 = 1800 gms (original) + 10 gms (error) This method does reduce the bias of error but still its not accurate QED

                                      Omit Needless Words - Strunk, William, Jr.


                                      Vista? Soapbox Videogadget here

                                      C Offline
                                      C Offline
                                      Chris Losinger
                                      wrote on last edited by
                                      #59

                                      hmm. i thought that's what i said here[^] maybe not. close enough for me, though.

                                      image processing toolkits | batch image processing | blogging

                                      R 1 Reply Last reply
                                      0
                                      • P PIEBALDconsult

                                        Quartz... wrote:

                                        Error due to the beam which is related to the weight.

                                        I'm wondering how this is possible with a balance. I may need to experiment.

                                        C Offline
                                        C Offline
                                        Chris Losinger
                                        wrote on last edited by
                                        #60

                                        PIEBALDconsult wrote:

                                        I'm wondering how this is possible with a balance.

                                        a flexible beam would probably do it

                                        image processing toolkits | batch image processing | blogging

                                        1 Reply Last reply
                                        0
                                        • C Chris Losinger

                                          hmm. i thought that's what i said here[^] maybe not. close enough for me, though.

                                          image processing toolkits | batch image processing | blogging

                                          R Offline
                                          R Offline
                                          Raj Lal
                                          wrote on last edited by
                                          #61

                                          yes :cool: you might be right there, I didnt see that because your reasoning was posted 24 minutes after i posted the solution

                                          Omit Needless Words - Strunk, William, Jr.


                                          Vista? Soapbox Videogadget here

                                          C 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups