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.
  • R Raj Lal

    thats the assumption here ( which should be taken as correct ) That can be item count or any other reliable way

    Omit Needless Words - Strunk, William, Jr.


    Vista? Soapbox Videogadget here

    D Offline
    D Offline
    David Crow
    wrote on last edited by
    #25

    Quartz... wrote:

    thats the assumption here ( which should be taken as correct )

    So if we assume that 1/2 the order can be weighed correctly, just multiply it by 2 to get the weight of the whole order. :rolleyes:


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

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

    R C 2 Replies Last reply
    0
    • D David Crow

      Quartz... wrote:

      thats the assumption here ( which should be taken as correct )

      So if we assume that 1/2 the order can be weighed correctly, just multiply it by 2 to get the weight of the whole order. :rolleyes:


      "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
      #26

      the assumption is he is able to divide the order in two halfs he cannot weigh any of the halfs accurately Example if he is selling packets of sugar and there are 4 packets he knows that half of them will be two packets , but he won't know that how much woulds be the weight of a single packet or two packets

      Omit Needless Words - Strunk, William, Jr.


      Vista? Soapbox Videogadget here

      P D 2 Replies Last reply
      0
      • D David Crow

        Quartz... wrote:

        thats the assumption here ( which should be taken as correct )

        So if we assume that 1/2 the order can be weighed correctly, just multiply it by 2 to get the weight of the whole order. :rolleyes:


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

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

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

        ding ding. we have a winner.

        image processing toolkits | batch image processing | blogging

        R 1 Reply Last reply
        0
        • T Tim Deveaux

          Is it a scale or a balance? A balance doesn't have two pans - I don't see how you could put a large dollop of loose lard on the beam side without causing the customer some concern.

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

          HERE is a sample of PAN Balance[^]

          Omit Needless Words - Strunk, William, Jr.


          Vista? Soapbox Videogadget here

          T 1 Reply Last reply
          0
          • R Raj Lal

            the assumption is he is able to divide the order in two halfs he cannot weigh any of the halfs accurately Example if he is selling packets of sugar and there are 4 packets he knows that half of them will be two packets , but he won't know that how much woulds be the weight of a single packet or two packets

            Omit Needless Words - Strunk, William, Jr.


            Vista? Soapbox Videogadget here

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

            It's printed on the packet. And why would he be selling them by weight? Or individually for that matter? And what if the customer is buying a packet of sugar and a watermelon?

            1 Reply Last reply
            0
            • C Chris Losinger

              ding ding. we have a winner.

              image processing toolkits | batch image processing | blogging

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

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

              Omit Needless Words - Strunk, William, Jr.


              Vista? Soapbox Videogadget here

              D P 2 Replies 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

                T Offline
                T Offline
                Tom Welch
                wrote on last edited by
                #31

                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.

                P D 2 Replies Last reply
                0
                • T Tim Deveaux

                  Is it a scale or a balance? A balance doesn't have two pans - I don't see how you could put a large dollop of loose lard on the beam side without causing the customer some concern.

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #32

                  Tim Deveaux wrote:

                  A balance doesn't have two pans...

                  Are you sure? Balance: an instrument for determining weight, typically by the equilibrium of a bar with a fulcrum at the center, from each end of which is suspended a scale or pan.


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

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

                  T 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

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

                    OK, you've posted an image a balance; now how exactly is the balance faulty? If one of those pan supports were to break, there would be no way to use the balance until it's fixed.

                    1 Reply Last reply
                    0
                    • R Raj Lal

                      the assumption is he is able to divide the order in two halfs he cannot weigh any of the halfs accurately Example if he is selling packets of sugar and there are 4 packets he knows that half of them will be two packets , but he won't know that how much woulds be the weight of a single packet or two packets

                      Omit Needless Words - Strunk, William, Jr.


                      Vista? Soapbox Videogadget here

                      D Offline
                      D Offline
                      David Crow
                      wrote on last edited by
                      #34

                      Quartz... wrote:

                      he cannot weigh any of the halfs accurately

                      So why is the scale even being used then?


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

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

                      1 Reply Last reply
                      0
                      • R Raj Lal

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

                        Omit Needless Words - Strunk, William, Jr.


                        Vista? Soapbox Videogadget here

                        D Offline
                        D Offline
                        David Crow
                        wrote on last edited by
                        #35

                        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 1 Reply Last reply
                        0
                        • D David Crow

                          Tim Deveaux wrote:

                          A balance doesn't have two pans...

                          Are you sure? Balance: an instrument for determining weight, typically by the equilibrium of a bar with a fulcrum at the center, from each end of which is suspended a scale or pan.


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

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

                          T Offline
                          T Offline
                          Tim Deveaux
                          wrote on last edited by
                          #36

                          Ooops - I meant to say a beam balance...

                          1 Reply Last reply
                          0
                          • R Raj Lal

                            HERE is a sample of PAN Balance[^]

                            Omit Needless Words - Strunk, William, Jr.


                            Vista? Soapbox Videogadget here

                            T Offline
                            T Offline
                            Tim Deveaux
                            wrote on last edited by
                            #37

                            Yes - I meant to say beam balance[^]

                            1 Reply Last reply
                            0
                            • R Raj Lal

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

                              Omit Needless Words - Strunk, William, Jr.


                              Vista? Soapbox Videogadget here

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

                              No, you also asked to know the reasoning. Simply saying, "no, it isn't fair" isn't enough.

                              1 Reply Last reply
                              0
                              • R Raj Lal

                                Where are you guys ... ?

                                Omit Needless Words - Strunk, William, Jr.


                                Vista? Soapbox Videogadget here

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

                                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 R 2 Replies Last reply
                                0
                                • 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.

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

                                  Tom Welch wrote:

                                  he could fix it all by using dead weights to tare the balance first.

                                  Yes, so the fact that he didn't leads me to believe that the balance is not as predictable as that. Therefore completely unreliable.

                                  1 Reply Last reply
                                  0
                                  • R Raj Lal

                                    Where are you guys ... ?

                                    Omit Needless Words - Strunk, William, Jr.


                                    Vista? Soapbox Videogadget here

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

                                    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 1 Reply Last reply
                                    0
                                    • 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
                                          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