Tagged: by: SMADA Toggle Comment Threads | Keyboard Shortcuts

  • Unknown's avatar

    Jim Randell 8:57 am on 29 August 2021 Permalink | Reply
    Tags: by: SMADA   

    Brain-Teaser 42: [Pounds and pence] 

    From The Sunday Times, 7th January 1962 [link]

    Our greengrocer is an odd sort of man. When I asked for 2 lb. of grapes, he counted out 64 grapes and asked for 4s. I raised my eyebrows, so he weighed them and was exactly right.

    “Oh”, I said, “and suppose I ask for beans?”

    “Try working it out for yourself”, he replied. “An onion is half the price of a carrot, 24 times the weight of a pea, and a quarter the price of a pound of beans. Seven times the number of peas that weigh the same as the number of onions that cost as much as 2 lb. of grapes, is less by the number of beans that weigh 12 lb. and the number of pence in the price of 16 lb. of carrots, than the number of beans that weigh as many pounds as the difference between the number of grapes that weigh the same as half the number of onions as there are carrots in a pound and a half, and the number of beans that cost as many pennies as there are grapes in the weight of a gross of peas. You get 6 times as many beans for the price of 6 carrots as you do grapes for the price of 2 lb. of onions. The cost of 3 carrots is to that of a grape as a bean is to a pea in weight, and two dozen carrots make three.”

    “Three what?” I asked.

    “Pounds, of course”, he replied.

    How many beans make five?

    This puzzle was originally published with no title.

    [teaser42]

     
    • Jim Randell's avatar

      Jim Randell 8:58 am on 29 August 2021 Permalink | Reply

      Working in prices of pennies and weights of 1lb, we can try to determine the following values for each item:

      (number of items per lb)
      (price of 1lb of items)
      (weight per item) = 1 / (items per lb)
      (price per item) = (price of 1lb items) / (items per lb)

      Untangling the facts we are given:

      “2 lb. of grapes = 64 grapes; cost = 4s. = 48d”

      (grapes per lb) = 32
      (weight per grape) = 1/32
      (price of 1lb grapes) = 24
      (price per grape) = 3/4

      “An onion is half the price of a carrot, 24 times the weight of a pea, and a quarter the price of a pound of beans.”

      (price per carrot) = k
      (price per onion) = k/2

      (peas per lb) = p
      (weight per pea) = 1/p
      (onions per lb) = p/24
      (weight per onion) = 24/p
      (price of 1lb onions) = (p/24) × (k/2) = kp/48

      (price per onion) = (price of 1lb beans) / 4
      (price of 1lb beans) = 4 × (k/2) = 2k

      “The cost of 3 carrots is to that of a grape as a bean is to a pea in weight”

      (price of 3 carrots) / (price of 1 grape) = (weight of 1 bean) / (weight of 1 pea)
      (price of 3 carrots) × (weight of 1 pea) = (weight of 1 bean) × (price of 1 grape)
      (3k) × (1/p) = (weight of 1 bean) × (3/4)
      (weight of 1 bean) = 4k/p
      (beans per lb) = p/4k

      (price per bean) = (price of 1lb beans) / (beans per lb)
      (price per bean) = (2k) / (p/4k)
      (price per bean) = 8k²/p

      So the answer to the question: “how many beans in 5 lb?”, is: 5 × (p/4k).

      All we need to do now is determine k and p.

      “You get 6 times as many beans for the price of 6 carrots as you do grapes for the price of 2 lb. of onions.”

      (number of beans for (price of 6 carrots)) = 6× (number of grapes for (price of 2lb onions))
      (number of beans for 6k pence) = 6× (number of grapes for kp/24 pence)
      (6k) / (8k²/p) = 6× (kp/24) / (3/4)
      (kp/24) (8k/p) = (3/4)
      8k² / 24 = 3 / 4
      k² = 9/4
      k = 3/2

      “two dozen carrots make three [lbs]”

      (carrots per lb) = 24/3 = 8
      (weight per carrot) = 1/8
      (price of 1lb carrots) = 8 × (3/2) = 12

      This leaves us with:

      “Seven times the number of peas that weigh the same as the number of onions that cost as much as 2 lb. of grapes, is less by the number of beans that weigh 12 lb. and the number of pence in the price of 16 lb. of carrots, than the number of beans that weigh as many pounds as the difference between the number of grapes that weigh the same as half the number of onions as there are carrots in a pound and a half, and the number of beans that cost as many pennies as there are grapes in the weight of a gross of peas.”

      We can break this down into:

      X = 7A + B + C

      where:

      A = “the number of peas that weigh the same as the number of onions that cost as much as 2 lb. of grapes”
      B = “the number of beans that weigh 12 lb.”
      C = “the number of pence in the price of 16 lb. of carrots”
      X = “the number of beans that weigh as many pounds as the difference between the number of grapes that weigh the same as half the number of onions as there are carrots in a pound and a half, and the number of beans that cost as many pennies as there are grapes in the weight of a gross of peas.”

      A = (the number of peas that weigh (the weight of (the number of onions that cost (the price of 2lb of grapes))))
      A = (the number of peas that weigh (the weight of (the number of onions that cost 48 pence)))
      A = (the number of peas that weigh (the weight of 64 onions))
      A = (the number of peas that weigh 1536/p lbs)
      A = 1536

      B = (the number of beans that weigh 12lb)
      B = 12 × (p/6)
      B = 2p

      C = (the number of pence in the price of 16lb of carrots)
      C = 16 × 12
      C = 192

      X = (the number of beans that weigh as many pounds as (the difference between (the number of grapes that weigh the same as (half the number of onions as there are (carrots in a pound and a half))) and (the number of beans that cost as many pennies as there are (grapes in the weight of (a gross of peas))))

      X = (the number of beans that weigh as many pounds as (the difference between Y and Z))
      Y = (the number of grapes that weigh the same as (half the number of onions as there are (carrots in a pound and a half)))
      Z = (the number of beans that cost as many pennies as there are (grapes in the weight of (a gross of peas)))

      Y = (the number of grapes that weigh the same as (half the number of onions as (the number of carrots in a pound and a half)))
      Y = (the number of grapes that weigh the same as (half the number of onions as (12 carrots)))
      Y = (the number of grapes that weigh the same as (6 onions))
      Y = (the number of grapes that weigh 144/p lbs)
      Y = 4608/p

      Z = (the number of beans that cost as many pennies as there are (grapes in the weight of (a gross of peas)))
      Z = (the number of beans that cost as many pennies as there are (grapes in (the weight of 144 peas)))
      Z = (the number of beans that cost as many pennies as there are (grapes in 144/p lbs))
      Z = (the number of beans that cost 4608/p pennies)
      Z = 256

      There are probably more than 18 peas per lb, so:

      X = (the number of beans that weigh as many pounds as (256 − 4608/p))
      X = (256 − 4608/p) × (p/6)
      X = 128p/3 − 768

      Hence:

      X = 7A + B + C
      128p/3 − 768 = 7×1536 + 2p + 192
      128p/3 = 11712 + 2p
      p = 35136 / 122
      p = 288

      Solution: There are 240 beans in 5 lb.

      We can summarise the calculated information as:

      grapes: 32 grapes per lb; price per lb = 24d
      carrots: 8 carrots per lb; price per lb = 12d
      onions: 12 onions per lb; price per lb = 9d
      peas: 288 peas per lb; price per lb = ?
      beans: 48 beans per lb; price per lb = 3d

      Which means grapes and onions have the same unit price (3/4 d each).

      Like

  • Unknown's avatar

    Jim Randell 11:17 am on 1 November 2020 Permalink | Reply
    Tags: by: SMADA   

    Brain-Teaser 12: [Birthdays] 

    From The Sunday Times, 14th/21st May 1961 [link] [link]

    My wife and I, my son and daughter, my two grandsons, and my granddaughter (the youngest of the family, who was fifteen last birthday) were all born on the same day of the week, and we all have our birthdays on the same date, but all in different months. [I won’t be able to say this if there are any further additions to the family.]

    My grandsons were born nine months apart, my daughter eighteen months after my son, and I am forty-one months older than my wife.

    What are all our birth dates?

    This puzzle was originally published in the 14th May 1961 edition of The Sunday Times, however the condition in square brackets was omitted, and the corrected version (and an apology) was published in the 21st May 1961 edition.

    This puzzle was originally published with no title.

    [teaser12]

     
    • Jim Randell's avatar

      Jim Randell 11:18 am on 1 November 2020 Permalink | Reply

      I assume the missing condition means that it is not possible for an 8th member of the family to have the same “day of week” and “day of month” birthday, but not share a birthday month with one of the group of 7.

      The current calendar repeats itself every 400 years, so this program looks for sets of dates in a 400 years span that share the same “day of week” and “day of month” values, but that only involve 7 different months. (So that any further additions to the family could not be born of the same day of the week and day of the month, but a month that has not yet been used. (The condition that was missing when the puzzle was originally published)).

      It then looks for dates that satisfy the required differences, and checks the all use different months.

      It runs in 199ms.

      Run: [ @repl.it ]

      import datetime
      from enigma import group, catch, printf
      
      # generate dates between years a and b
      def dates(a, b):
        d = datetime.date(a, 1, 1)
        i = datetime.timedelta(days=1)
        while d.year < b:
          yield d
          d += i
      
      # the date n months earlier than d
      def earlier(d, n):
        (yy, mm, dd) = (d.year, d.month, d.day)
        (y, m) = divmod(mm - n - 1, 12)
        return catch(datetime.date, yy + y, m + 1, dd)
      
      # group 400 years of dates by (<day of week>, <day of month>)
      d = group(dates(1850, 2250), by=(lambda d: (d.weekday(), d.day)))
      
      # now look for keys that involve exactly 7 different months
      for ((dow, dom), vs) in d.items():
        ms = set(d.month for d in vs)
        if len(ms) != 7: continue
      
        # collect possible birthdates for the granddaughter
        (gda, gdb) = (datetime.date(1945, 5, 15), datetime.date(1946, 5, 14))
        for gdd in vs:
          if gdd < gda: continue
          if not(gdd < gdb): break
      
          # find birthdates for the grandsons (earlier than gd)
          for gsd2 in vs:
            if not(gsd2 < gdd): break
            gsd1 = earlier(gsd2, 9)
            if gsd1 is None or gsd1 not in vs: continue
      
            # find birthdates for the son and daughter (earlier than gs1 - 15 years)
            dx = gsd1 - datetime.timedelta(days=5479)
            for dd in vs:
              if not(dd < dx): break
              sd = earlier(dd, 18)
              if sd is None or sd not in vs: continue
      
              # find birthdates for the husband and wife (earlier than sd - 15 years)
              wx = sd - datetime.timedelta(days=5479)
              for wd in vs:
                if not(wd < wx): break
                hd = earlier(wd, 41)
                if hd is None or hd not in vs: continue
      
                # check the months are all different
                if len(set(d.month for d in (gdd, gsd2, gsd1, dd, sd, wd, hd))) != 7: continue
      
                printf("{dow} {dom}", dow=["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"][dow])
                printf("-> husband = {hd}, wife = {wd}")
                printf("-> son = {sd}, daughter = {dd}")
                printf("-> grandsons = {gsd1}, {gsd2}")
                printf("-> granddaughter = {gdd}")
                printf()
      

      Solution: The birthdates are all Mondays. The full list is (by generation):

      husband = 31st October 1898; wife = 31st March 1902
      son = 31st January 1921; daughter = 31st July 1922
      grandson1 = 31st August 1942; grandson2 = 31st May 1943; granddaughter = 31st December 1945

      The only “day of month” that allows exactly 7 months to be used is the 31st of the month, as there are only 7 months that have 31 days.

      Like

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel
Design a site like this with WordPress.com
Get started