Wednesday, July 18, 2012

GeekDad Puzzle of the Week: Math Trolls

Troll Bridge SignGeekDad Puzzle of the Week: Math Trolls:
Q: Nora is taking a trip to visit her Grandmother in northernmost New York State this week, to bring her some freshly picked berries. On the way there, she has to cross a total of 30 bridges, and under each of the these bridges lives a troll. Each troll is aware of their bridge number, and either demands or gives berries based upon the rarest or most applicable description of their bridge. They demand or give berries according to the following schedule:
  • Trolls under odd numbered bridges demand half of your berries.
  • Trolls under even numbered bridges demand 20 berries.
  • Trolls under prime numbered bridges give you half again the number of berries you are carrying.
  • Trolls under perfect square numbered bridges demand a quarter of your berries.
  • Trolls under perfect cube numbered bridges give you the number of berries you are carrying, doubling your number of berries.
If trolls round up in their demands (i.e., if you have 57 berries at the foot of a bridge best described as odd numbered, you will cross it with 28 berries), what is the minimum number of berries Nora must start with so that she ends up with 1,000 berries when she arrives at her Grandmother’s house?
The solution has already been posted on the GeekDad website. If you want to solve it yourself, read no further. A detailed breakdown of my solution is given in the comments.

Thursday, July 12, 2012

NPR Sunday Puzzle (Jul 8, 2012): And the Oscar Goes To...

Oscar statuettesNPR Sunday Puzzle (Jul 8, 2012): And the Oscar Goes To...:
Q: Think of a well-known actor, three letters in the first name, seven letters in the last. One of the letters is an "S." Change the "S" to a "K" and rearrange the result, and you'll name a well-known fictional character. Who is it?
Add an "F" to the fictional character, rearrange to get part of a car.

Edit: TINKER BELL + F rearranges to LEFT BLINKER.
A: BEN STILLER - S + K --> TINKER BELL

Thursday, July 05, 2012

NPR Sunday Puzzle (Jul 1, 2012): Retail Therapy

UPC BarcodeNPR Sunday Puzzle (Jul 1, 2012): Retail Therapy:
Q: Think of a well-known retail store chain in two words. Remove one letter from its name. The remaining letters, in order, will spell three consecutive words that are synonyms of each other. What are they? Hint: The three words are all slang.
I didn't immediately get the answer because they've been getting rid of most of these stores in our area. And the answer I have is technically one word, not two.

Edit: The hint was "getting rid of" which could be another slang synonym.
A: OfficeMax (remove the M) = Off, Ice, Ax as synonyms for "kill"

Wednesday, July 04, 2012

GeekDad Puzzle of the Week: Poaching Berries

Red Raspberries, photofarmer@FlickrGeekDad Puzzle of the Week: Poaching Berries:
Q: Leif and Kestrel are willing to give GeekDad a 20% cut of berries they poach for turning a blind eye. Imagine that Leif picks five berries per poach and Kestrel picks three berries per poach and that they attempt to poach once every day, with the exception of any day just after they’ve been caught. Now imagine that each time they poach berries, they have a 15% chance of getting caught. How many berries can GeekDad expect to eat each each week, averaged over time?
I'll post my thoughts on the answer after the answer is revealed (generally early next week).

Edit: The following answer was what I submitted to end up winning the puzzle:

Let's assume a few things:
1) Leif and Kestrel start in a state where they haven't ever been caught.
2) Each time they are caught, the berries that day don't count. Also, they must skip the next day until trying again.

There are essentially 3 states that each child could be in. Since the probabilities for each child are the same we can group them together, though in reality the puzzle allows for one child to be caught and the other not. The results work out the same, so let's just simplify it to a pair of children trying to poach 8 berries a day.

The children could be:
1) Caught the day before and therefore have no chance of getting berries that day (must sit out).
2) Caught today (15%, if not caught the day before)
3) Not caught today (85%, if not caught the day before)

Each day, the chance of being caught the day before is just carried forward. So on day 2, the chance is 15% they are sitting out. That leaves 85% chance they are attempting poaching. Of that 85%, there's a 15% chance they are caught (0.85 x 0.15 = 12.75%) and an 85% chance they poach successfully (0.85 x 0.85 = 72.25%).

If you repeat this, the next day (Day 3) they have a 12.75% chance of sitting out and a 87.25% chance of attempting poaching. Day 4, the chance of sitting out is 0.15 x 87.25% = 13.0875% and not sitting out is 86.9125%. Day 5, the chance of sitting out is 0.15 x 86.9125% = 13.036875% and not sitting out is 86.963125%. You can continue this progression and you will see that the chance they are sitting out approaches a value of about 13.043478%. The chance they are caught that day is equivalently about 13.043478%. That leaves a 73.913043% chance they are able to poach 8 berries with an expected return of 5.913043478 berries a day.

That equates to approximately 41.39130435 berries a week. With a 20% "commission" after awhile you will be eating approximately 8.27826087 berries each week.

Note: For a more accurate answer (rather than just a decimal approximation) we can solve this algebraically as follows:

Let p be the chance that you ARE sitting out.
Let q be the chance you are NOT sitting out.

Together these are mutually exclusive and therefore add up to 100% (or mathematically we say 1)
p + q = 1
p = 1 - q

The chance you are NOT sitting out, but CAUGHT is 0.15q
The chance you are NOT sitting out, and SUCCESSFULLY POACHED is 0.85q

We know that eventually the two values p and 0.15q end up being the same, so equate them
p = 0.15q

Substitute in 1-q:
1 - q = 0.15q

Rearrange:
1 = 1.15q
q = 1/1.15

The chance we are caught that day is 0.15q
0.15q = 0.15(1/1.15) = 0.15/1.15 = 15/115 = 3/23
And the chance we poach some berries is 0.85q
0.85q = 0.85(1/1.15) = 0.85/1.15 = 85/115 = 17/23

For the sake of completeness that means you have:
3/23 = chance child is sitting out
3/23 = chance child was caught today
17/23 = chance child was able to poach successfully

Now multiply this last number by 8 berries attempted times 7 days and then times 1/5 (20% commission) to get the expected number of berries poached each week.
Berries per week = 17/23 x 8 x 7 x 1/5

If you reduce that to a fraction you end up with:
952/115 = 8 32/115 berries each week.

A: 8 32/115 berries each week.
8.27826086956521739130434... (underlined portion repeats indefinitely)

Thursday, June 28, 2012

NPR Sunday Puzzle (Jun 24, 2012): The Cat is Away

Computer Mouse, Pockafwye@FlickrNPR Sunday Puzzle (Jun 24, 2012): The Cat is Away:
Since I'm not going to be around to comment on the puzzle, I'm putting this week's puzzle on "auto-pilot". Please play nicely and don't give the puzzle answer away.
Here's my standard reminder... don't post the answer or any hints that could lead directly to the answer (e.g. via Google or Bing) before the deadline of Thursday at 3pm ET. If you know the answer, click the link and submit it to NPR, but don't give it away here.

You may provide indirect hints to the answer to show you know it, but make sure they don't give the answer away. You can openly discuss your hints and the answer after the Thursday deadline. Thank you.

Edit: From my comment, We just reached our destination (goal line). After the family got settled here inside... (go all in)
A: GO ALL IN + E --> GOAL LINE

Thursday, June 21, 2012

NPR Sunday Puzzle (Jun 17, 2012): Est-ce que tu parles français?

French word puzzleNPR Sunday Puzzle (Jun 17, 2012): Est-ce que tu parles français?:
Q: Think of a common French word that everyone knows. Add a "v" (as in "violin") to the beginning and an "e" at the end. The result will be the English-language equivalent of the French word. What is it?
Well, I never expected it to take me this long to figure out the puzzle answer. I spent much of last night pouring through lists of common French words as well as English words starting with V and ending with E. My wife was similarly stymied so we gave up and assumed that there must be a typo in the wording of the puzzle. Unfortunately, when I listened to the on-air puzzle, the wording was the same as what is posted. Perhaps it was the clearer head of the morning, but I finally figured out what Will wanted us to do.

It's actually refreshing, for a change, to have a puzzle that takes some time to solve, but I expect there will be some that want to voice a small complaint when the answer is revealed especially since you may find me guilty of not giving a very obvious clue either.

Edit: I think I was actually rather generous with the hints this time:
  • "Well, I never expected" --> initial letters spell WINE
  • "pouring" --> deliberate misspelling of poring, as in pouring WINE
  • "wife + typo" --> WINE
  • "clearer head of the morning" --> no personal experience with this, but...
  • "what Will wanted" --> string of words starting with W
  • "refreshing" --> another indirect hint to a beverage, coupled with France = WINE
  • "takes some time" --> as in aging a fine WINE
  • "voice a small complaint" --> WHINE
  • "Find Me Guilty" --> Movie starring VIN Diesel
  • "giving" --> hides the word VIN


  • The key for me was actually listening to the on-air puzzle and hearing Will say the puzzle was tricky. But what finally caused the "Aha!" moment was searching for the puzzle submitter "Kate MacDonald" "Murphys, California" and finding her listed as the Winemaker of Stevenot Winery in Murphys, California. In the end this puzzle was challenging but not impossible.
    A: French word: VIN, English word: WINE (VV = W)

    Saturday, June 16, 2012

    GeekDad Puzzle of the Week: When Are the Odds Even?

    Black and white marblesGeekDad Puzzle of the Week: When Are the Odds Even?:
    Q: If we have a bag containing equal numbers of black and white marbles, and we pull out one marble, the odds of it being black are even. If we have a bag containing 120 marbles, 85 of which are black, the odds of us pulling out two marbles and them both being black is also even — (85/120)x(84/119) = 0.5 or 50%.

    If the largest bag we have can hold 1,000,000 marbles, for how many sets of marbles (i.e., the 120 marbles described above are one set) can we pull two marbles and have a 50% chance of them being the same designated color? Are there any sets of marbles for which we can pull three marbles and have a 50% chance of them being the same designated color? If so, how many?
    After the solution is revealed, I'll post the details of my answer.

    Edit: GeekDad Puzzle Solution:
    In the first case you are essentially looking for integer solutions to:
    a(a-1) = 2b(b-1)

    There are EIGHT sets under 1 million that will result in even odds when 2 balls are drawn.

    4 marbles (3 black) --> 4 x 3 = 2(3 x 2)
    21 marbles (15 black) --> 21 x 20 = 2(15 x 14)
    120 marbles (85 black) --> 120 x 119 = 2(85 x 84)
    697 marbles (493 black) --> 697 x 696 = 2(493 x 492)
    4,060 marbles (2,871 black) --> 4,060 x 4,059 = 2(2,871 x 2,870)
    23,661 marbles (16,731 black) --> 23,661 x 23,660 = 2(16,731 x 16,730)
    137,904 marbles (97,513 black) --> 137,904 x 137,903 = 2(97,513 x 97,512)
    803,761 marbles (568,345 black) --> 803,761 x 803,760 = 2(568,345 x 568,344)

    Interestingly, the next number in each sequence can be computed as follows:
    a(n) = 6a(n-1) - a(n-2) - 2

    So for example, the next numbers in the sequence would be:
    Total balls: 6 x 803,761 - 137,904 - 2 = 4,684,660 marbles
    Black balls: 6 x 568,345 - 97,513 - 2 = 3,312,555 black

    Integer sequences: A011900 and A046090

    In the second case you are looking for integer solutions to:
    a(a-1)(a-2) = 2b(b-1)(b-2)

    There is only ONE set under 1 million that will result in even odds when 3 balls are drawn.

    6 marbles (5 black) --> 6 x 5 x 4 = 2(5 x 4 x 3)

    Thursday, June 14, 2012

    NPR Sunday Puzzle (Jun 10, 2012): Have a Seat

    Where NOT to sitNPR Sunday Puzzle (Jun 10, 2012): Have a Seat:
    Q: Name something to sit on. Divide the letters of this exactly in half. Move the second half to the front, without changing the order of any letters. The result will name some things seen on computers. What are they?
    Add the letters D-E-M to the answer, rearrange to name something that might be affected the longer you sit on one of these.

    Edit: BARSTOOL + DEM --> BLOODSTREAM
    A: BARSTOOL --> TOOLBARS

    Thursday, June 07, 2012

    NPR Sunday Puzzle (Jun 3, 2012): Stay Tuned

    TV RerunNPR Sunday Puzzle (Jun 3, 2012): Stay Tuned:
    Q: Take the names of two state capitals. Change one letter in each one, resulting in a phrase naming someone you will see soon on TV. Who is it? (Hint: You don't really have to know anything about TV to solve this puzzle.)
    Whenever I wade through the channels to see what is on TV, I see nothing but re-runs.

    Edit: My hint was "wade" which is a hint to the states of WA and DE as well as an indirect hint to water and diving.
    A: Olympic Diver
    Olympia, WA --> Olympic
    Dover, DE --> Diver

    Sunday, June 03, 2012

    GeekDad Puzzle of the Week: Waffle Cuts

    GeekDad Puzzle of the Week: Waffle Cuts: Waffle, no cuts
    Q: If we only cut along the ridges of a circular waffle, and if each cut traverses the waffle in a straight line from edge to edge, how many different ways can the waffle be cut?
    Note: rotations, horizontal flips, and vertical flips of a set of cuts should only be counted once.
    Given that there are 6 places to cut vertically and 6 places to cut horizontally, that's a total of 12 cut lines. If you allow for any combination of these 12 lines to be cut or not, you have a total of 2^12 = 4096 ways to divide the waffle. But of course, the puzzle asks for the number of unique ways to cut the waffle, not including any mirrored or rotationally symmetric sets of cuts.

    After the official answer to the puzzle is posted, I'll post my solution here.

    Edit: The solution is posted, but just the number without any detail. Also, I disagree with their counting of the "no cuts at all" solution as one of the ways to "cut" the waffle. In any case, a full detailing of my solution along with an enumeration of all 665 (or 666) ways to uniquely cut the waffle can be found in Blaine's Solution to the GeekDad Waffle Puzzle.