A maths problem

A maths problem

Sharad M.Pro Member
Carlsbad, CA · Member since 2010 · 1k+ posts · 1k+ votes

Divide $534 (in whole $ increments) into a number of bags so that I can ask for any amount between $1 and $534, and you can give me the proper amount by giving me a certain number of these bags without opening them. What is the minimum number of bags you will require? And how much in each bag?

1Reply
12 views

Most Popular Reply

Rental Property Investor · Mercer Island, WA · Member since 2008 · 22k+ posts · 14k+ votes
15y

Sorry, that's trivial. Use binary numbers. You need 10 bags. The first nine hold $1, $2, $4, $8, $16, $32, $64, $128, $256. That's $511 total, so the last bag holds the remaining $23. For any requested amount less than $511, just hand over the proper combination of the first nine bags. For amounts from $512 to $534, hand over the $23 bag, subtract $23 from the requested amount and then apply the first half of the solution.

This is actually a useful problem for real estate. If you go to the trustee sale and they require a cashier's check for the bid amount, but you don't know where the bidding will end, just bring checks arranged like this and hand over the proper set of checks.

See this reply in the discussion

17 Replies

Jump to latestLatest
  • Sharad M.Pro Member
    OP
    Carlsbad, CA · Member since 2010 · 1k+ posts · 1k+ votes
    15y

    I got another one for anyone who is in mood for some math question on Friday.

    How can you get to number 24 using 3, 3, 7, 7 exactly once?

  • Rental Property Investor · Mercer Island, WA · Member since 2008 · 22k+ posts · 14k+ votes
    15y

    Sorry, that's trivial. Use binary numbers. You need 10 bags. The first nine hold $1, $2, $4, $8, $16, $32, $64, $128, $256. That's $511 total, so the last bag holds the remaining $23. For any requested amount less than $511, just hand over the proper combination of the first nine bags. For amounts from $512 to $534, hand over the $23 bag, subtract $23 from the requested amount and then apply the first half of the solution.

    This is actually a useful problem for real estate. If you go to the trustee sale and they require a cashier's check for the bid amount, but you don't know where the bidding will end, just bring checks arranged like this and hand over the proper set of checks.

  • Investor, Entrepreneur, Educator · Springfield, MO · Member since 2009 · 21k+ posts · 12k+ votes
    15y

    Very good Jon!

  • Sharad M.Pro Member
    OP
    Carlsbad, CA · Member since 2010 · 1k+ posts · 1k+ votes
    15y
    Originally posted by Sharad M.:
    I got another one for anyone who is in mood for some math question on Friday.

    How can you get to number 24 using 3, 3, 7, 7 exactly once?

    Bump. Anyone?

  • Full-Time Investor · Charlotte, NC · Member since 2009 · 2k+ posts · 1k+ votes
    15y

    3(3+7)-7

  • Real Estate Investor · Phoenix, AZ · Member since 2009 · 1k+ posts · 1k+ votes
    15y

    Now I feel really dumb, Jon.

  • Sharad M.Pro Member
    OP
    Carlsbad, CA · Member since 2010 · 1k+ posts · 1k+ votes
    15y
    Originally posted by BryanA:
    3(3+7)-7

    Bryan,

    This gets to 23.

  • Rental Property Investor · Mercer Island, WA · Member since 2008 · 22k+ posts · 14k+ votes
    15y

    Sorry, I shouldn't have said "that's trivial". Its obvious to software engineers who are used to binary numbers.

  • Full-Time Investor · Charlotte, NC · Member since 2009 · 2k+ posts · 1k+ votes
    15y

    whoops..good call...give me another lunch break and i'll see if i can work it out :)

  • Real Estate Investor · Phoenix, AZ · Member since 2009 · 1k+ posts · 1k+ votes
    15y

    No, I was actually dumb. I got to 256 and forgot that I could have one more bag with $23 and remove bags to get to any number I wanted. The funny thing is, my alternative proposal does involve removal.

  • Real Estate Investor · Dania Beach, FL · Member since 2010 · 74 posts · 41 votes
    15y

    (3/7 + 3)*7 = 23.99999 Close enough?

  • Real Estate Investor · Jacksonville, FL · Member since 2010 · 60 posts · 16 votes
    15y

    That's exactly 24; nice one, Kenneth. This was driving me crazy that I resorted to finding the answer on Google. :|

  • Real Estate Investor · Dania Beach, FL · Member since 2010 · 74 posts · 41 votes
    15y

    Mathew,

    This consumed me for almost an hour. I didn't even think about Googling. Old school I guess.

  • Sharad M.Pro Member
    OP
    Carlsbad, CA · Member since 2010 · 1k+ posts · 1k+ votes
    15y

    Good work, Kenneth. I think what confuses most people is the fraction.

  • J ScottPro Member
    Moderator
    Investor · Sarasota, FL · Member since 2008 · 18k+ posts · 17k+ votes
    15y
    Originally posted by Vikram C.:
    No, I was actually dumb. I got to 256 and forgot that I could have one more bag with $23 and remove bags to get to any number I wanted. The funny thing is, my alternative proposal does involve removal.

    I used the same binary logic, but then made the same mistake you did when I said 17.

    I pointed out those 10 bags, and then added the other 7 to build up to $534...forgetting that you could just subtract instead once you added the $23 bag.

    Good call, Jon! I guess I'm too much of a brute force type of engineer and not so much a elegant thinker type... :D

  • Real Estate Investor · Phoenix, AZ · Member since 2009 · 1k+ posts · 1k+ votes
    15y

    Here's the other solution I was referring to in the other thread:

    1
    2
    4
    7
    10
    20
    40
    80
    160
    210

  • Sharad M.Pro Member
    OP
    Carlsbad, CA · Member since 2010 · 1k+ posts · 1k+ votes
    15y
    Originally posted by Vikram C.:
    Here's the other solution I was referring to in the other thread:

    1
    2
    4
    7
    10
    20
    40
    80
    160
    210

    Vikram,

    Great work!

Join the conversationCreate a free account to reply, vote on answers and follow this thread.