Yoak – The Math Factor Podcast http://mathfactor.uark.edu The Math Factor Podcast Site Tue, 24 Jul 2012 21:06:10 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.25 2006-2007 strauss@uark.edu (The Math Factor Podcast) strauss@uark.edu (The Math Factor Podcast) The Math Factor Podcast Site The Math Factor Podcast The Math Factor Podcast strauss@uark.edu no no A Quick Puzzle From OSCON http://mathfactor.uark.edu/2012/07/a-quick-puzzle-from-oscon/ http://mathfactor.uark.edu/2012/07/a-quick-puzzle-from-oscon/#comments Tue, 24 Jul 2012 21:06:10 +0000 http://mathfactor.uark.edu/?p=1483 I recently returned from the O’Reilly Open Source Convention in Portland Oregon. In the final talk of the event, Paul Fenwick, always an amazing presenter, offered a puzzle during his talk that I thought I’d share.

I will offer the puzzle below, but the best way to experience it is to watch Paul’s talk, Mindware Upgrades For Fun And Profit.  No special technical or other background is necessary to enjoy it.

Albert is looking at Betty.  Betty is looking at Charlie.  Albert is a computer programmer.  Charlie is not.  Is there a computer programmer looking at a non-computer programmer?

What was most interesting to me is that the audience of about a thousand really smart people is then invited to raise their hands for “Yes” “No” or “Not Enough Information” and all but fewer than 10 people raised their hand for the same wrong answer!  I failed along with the vast majority, and the other wrong answer outweighed the right answer (which might have had zero votes… I don’t remember.)

If no one posts the right answer here after a while, I’ll come back with an explanation, but I do encourage you to go watch Paul explain.

 

]]>
http://mathfactor.uark.edu/2012/07/a-quick-puzzle-from-oscon/feed/ 5
Yoak: Denominations of money http://mathfactor.uark.edu/2012/07/yoak-denominations-of-money/ http://mathfactor.uark.edu/2012/07/yoak-denominations-of-money/#comments Wed, 18 Jul 2012 01:11:41 +0000 http://mathfactor.uark.edu/?p=1475 A friend posed this to me today:

Devise an alternate set of denominations for coins and bank notes requiring a minimum number of denominations and such that any amount from $0.01 to $100 could be paid with four units of currency.

I’ve looked at this from another perspective before after it was discussed on Freakonomics but that has to do with minimizing the average number of coins needed and doesn’t go too much into the math.

What’s remarkable is that my friend nearly instantly came to an upper bound that isn’t huge and after hours five of us have failed to improve upon it.  I’ll avoid stating that bound here for now, but will come back and add it to the comments in a bit if there is no traction.

 Another interesting tidbit is that unlike U.S. denominations where a greedy algorithm can verify a minimal number of units that are required (take as many of the largest as you can, then as many of the next largest, etc.) denominations where the denominations aren’t multiples of each other don’t allow this.  Making 15 in 12-5-1 shouldn’t be 12-1-1-1 — it should be 5-5-5.  Even doing verification requires dynamic programming solutions.

 

 

]]>
http://mathfactor.uark.edu/2012/07/yoak-denominations-of-money/feed/ 7
Yoak: Garbled Marbles http://mathfactor.uark.edu/2011/11/yoak-garbled-marbles/ http://mathfactor.uark.edu/2011/11/yoak-garbled-marbles/#comments Mon, 14 Nov 2011 04:55:56 +0000 http://mathfactor.uark.edu/?p=1340 It’s been a while since I posted a puzzle and happened upon a nice one today.

You find yourself babysitting a friend’s marble collection while he’s away at a conference of collectors.  The housekeeper, being an honest type, admits to having disturbed one of the displays.  She assures you that she returned all the marbles and shows you ten marbles laid out thus:

* * * * *

* * * * *

That looks fine, but the note to the side of it says five lines of four marbles each.  Since this is two lines of five marbles, must there be marbles missing or can they be laid out in a manner consistent with the note?

 

 

]]>
http://mathfactor.uark.edu/2011/11/yoak-garbled-marbles/feed/ 2
Polygonous Party Games http://mathfactor.uark.edu/2010/03/polygonous-party-games/ http://mathfactor.uark.edu/2010/03/polygonous-party-games/#comments Tue, 23 Mar 2010 21:04:10 +0000 http://mathfactor.uark.edu/?p=1044 You and other party-goers are lead to different places in a wood blind-folded.  You’re instructed to remove your blindfold at the sound of a horn and read a letter you’ve been provided.  When the bell sounds, you remove the blindfold and the letter reads thus:

You’ll notice around you that there are lengths of rope tied between hundreds of trees around you.  You may notice that any tree with any rope tied to it has exactly two ends tied to it, each stretching to a different tree.  In fact, these hundreds of treees form a giant concave polygon.  Some of you are inside that polyon and others are outside.  To win the game, you must be the first to reach the clubhouse at the top of the hill (which is outside of the polygon!) and report correctly whether you were initially inside the polygon or outside of it.  You can pass under the ropes, but please don’t change them in any way.  Good luck!

What strategy might you employ to determine your status and require as little time as possible to get back to the clubhouse?

 

]]>
http://mathfactor.uark.edu/2010/03/polygonous-party-games/feed/ 6
Yoak: Wheel Whepair http://mathfactor.uark.edu/2010/02/yoak-wheel-whepair/ http://mathfactor.uark.edu/2010/02/yoak-wheel-whepair/#comments Wed, 17 Feb 2010 01:02:39 +0000 http://mathfactor.uark.edu/?p=1014 A woodworker has a disc of wood, perfectly round, an inch thick and ten inches in diameter.  He wants to make it a wheel and so prepares to drill a one inch hole in the exact center.  Sadly, an ill-timed catastrophic sneeze causes him to drill the hole two inches off-center.  Undaunted, he pulls out his mathematically perfect laser saw (which can make perfect, zero-width cuts in wood) and his mathematically perfect glue (which can glue surfaces together with zero distance between them).  He cuts a piece of the wheel away, glues it back in a different position, and he has exactly the wheel he wanted to begin with.  How does he accomplish this?

 

]]>
http://mathfactor.uark.edu/2010/02/yoak-wheel-whepair/feed/ 8
Yoak: Pirate Treasure Map http://mathfactor.uark.edu/2010/01/yoak-pirate-treasure-map/ http://mathfactor.uark.edu/2010/01/yoak-pirate-treasure-map/#comments Mon, 25 Jan 2010 19:00:54 +0000 http://mathfactor.uark.edu/?p=1010 Our band of intrepid pirates, having resolved previous squabbles over distributing booty amongst themselves and other issues have come across a treasure map fragment.  The picture has been destroyed, but the following text can be read:

Stand upon the gravesite and you’ll see two great palms towering above all others on the island.  Count paces to the tallest of them and turn 90 degrees clockwise and count the same number of paces and mark the spot with a flag.  Return to the gravesite and count paces to the second-tallest of the trees, turn 90 degrees counter-clockwise and count off that number of paces, marking the spot with a second flag.  You’ll find the treasure at the mid-point between the two flags.

Fortunately, our pirates knew which island the map referred to.  Sadly, upon arriving at the island, the pirates discovered that all evidence of a gravesite had faded.  The captain was preparing to order his men to dig up the entire island to find the fabled treasure when one of the more geometrically inclined pirates walked over to a particular spot and began to dig.  The treasure was quickly unearthed on that very spot.

How did the pirate know where to dig?

 

]]>
http://mathfactor.uark.edu/2010/01/yoak-pirate-treasure-map/feed/ 18
Yoak: Miles, Kilometers and Fibonacci Numbers http://mathfactor.uark.edu/2009/12/yoak-miles-kilometers-and-fibonacci-numbers/ http://mathfactor.uark.edu/2009/12/yoak-miles-kilometers-and-fibonacci-numbers/#comments Thu, 03 Dec 2009 04:43:54 +0000 http://mathfactor.uark.edu/?p=980 I’m overdue to post a puzzle, but I’m momentarily tapped out. Here’s a curiosity in the meantime: You can provide a very good estimate of a conversion from miles to kilometers by choosing sequential Fibonacci numbers.  The conversion rate is 1.609344 kilometers to a mile. So this gives us:

1 2 1.609
2 3 3.219
3 5 4.828
5 8 8.047
8 13 12.875
13 21 20.921
21 34 33.796
34 55 54.718
55 89 88.514
89 144 143.232
144 233 231.746
233 377 374.977
377 610 606.723
610 987 981.700
987 1597 1588.423

This leaves you in pretty good shape if you need to get from Cincinnati, OH to Destin, FL at 610 Miles, but what if you need to convert some distance that doesn’t happen to be a Fibonacci number?  Just build it up from parts!

100 miles is 89+8+3.  So in kilometers, that’s 144 + 13 + 5 or 162 kilometers.  (160.9344 by conversion…)

OK.  Here’s a puzzle, sort of.  I found this interesting set of numbers recently:

{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 53, 371, 5141, 99481 }

The series doesn’t continue.  That’s all of them.  What’s special about those numbers?

]]>
http://mathfactor.uark.edu/2009/12/yoak-miles-kilometers-and-fibonacci-numbers/feed/ 6
Yoak: More Goings On At The ‘Crazy Buttocks’ Party http://mathfactor.uark.edu/2009/11/yoak-more-goings-on-at-the-crazy-buttocks-party/ http://mathfactor.uark.edu/2009/11/yoak-more-goings-on-at-the-crazy-buttocks-party/#comments Sun, 22 Nov 2009 07:52:25 +0000 http://mathfactor.uark.edu/?p=950 In Living With Crazy Buttocks, Stephen Morris told us of a rather interesting party. The story continues…

After winning their trip to Paris, the guests became elated and celebrated with the consumption of some adult beverages. Ever responsible, the host confiscated the keys to all cars to ensure that no one drove home drunk. Later on, when things started to calm down, party-goers started to request the return of their keys claiming to be sober enough for the drive home.

Having once been out-done by the guests, our host took another whack. He distributed all of the keys, but did so randomly. He then presented a challenge he felt sure they’d only be able to satisfy if they were indeed sober enough to drive. They were allowed to exchange keys, but only in rounds. During each round, each party-goer could either do nothing or pair up with another party-goer and exchange the sets of keys each was holding. (Each party-goer could be part of at most one pairing per round.) No one would be allowed to drive home unless everyone recovered their own keys.

The host wished to allow only a fixed number of rounds. To be fair, he wanted to be sure that it would indeed be possible to make the change. However, he also wanted to make it as difficult as possible for the party-goers. What is the minimum number of rounds must allow them to ensure that an exchange would be possible?

For clarity, all key recipients can discuss, share information such as who has the keys of whom, and agree upon a strategy. Also, careful readers will realize that there were 20 guests at the party originally. Sadly, it was a rather disorderly party and some guests did leave early, but many more appeared. Everyone present at the key ceremony had a key confiscated, and everyone with a key confiscated received a key for this challenge, but neither you nor the host knows just how many there are.

]]>
http://mathfactor.uark.edu/2009/11/yoak-more-goings-on-at-the-crazy-buttocks-party/feed/ 2
Follow Up: Yoak: Batteries, and the Problem of the Week http://mathfactor.uark.edu/2009/11/follow-up-yoak-batteries-and-the-problem-of-the-week/ http://mathfactor.uark.edu/2009/11/follow-up-yoak-batteries-and-the-problem-of-the-week/#respond Sat, 21 Nov 2009 21:31:09 +0000 http://mathfactor.uark.edu/?p=938 { Hi, Steve here. Jeff asked me to post a solution and I’m more than happy to oblige. It’s a fun puzzle with some nice maths to explore. I learnt a lot about graph theory and a new theorem (new to me), Turan’s theorem. More on that later. }

In Yoak: Batteries, and the Problem-of-the Week Jeff posed a great problem from Stan Wagon’s Problem of the Week.

You have eight batteries, four good and four dead. You need two good batteries to work the device; if either battery is dead then the device shows no sign of life. How many tests using two batteries do you need to make the device work?

In some similar sounding puzzles we might change the tests depending on the results we get as we go along. That doesn’t work here. We will stop if any test succeeds, we only carry on as long as the tests fail. We never get any information that we could use to choose our next test. That means we can choose the combinations we are going to use before we start our tests.

There are two ways of posing this problem. The one we have used is to make the device work. The other is to identify two working batteries which requires one less test.

Another problem is to find all four working batteries (which laciermaths neatly dealt with in the comments) and yet another is to find the most efficient approach which minimises the average number of tests.

The following seven combinations are guaranteed to make the device work.

(1,2),(1,3),(2,3),(4,5),(4,6),(5,6),(7,8)

 

Any six of these tests will identify two working batteries, for example our tests could be:

(1,2),(1,3),(2,3),(4,5),(4,6),(5,6)

If all of these tests fail then at most one battery from {1,2,3} can work and at most one battery from {4,5,6} can work. As we know there are four good batteries we can deduce that both 7 and 8 are working batteries.

So we have an answer to the problem, six tests are sufficient to identify two good batteries and seven tests are sufficient to work the device.

But hold on a minute! We haven’t yet shown that there isn’t an answer with fewer tests.

I came up with a proof but I won’t repeat it here because Jim Schmerl gave a much better one to POW. The better proof works for any number of batteries with any number being good.

It says: With n batteries and r good batteries then the best solution is to split the batteries into r-1 groups of roughly equal size and then test each pair within each group.

Let’s consider our seven tests again.


Here n is 8 and r is 4. We split the batteries into r-1 = 3 groups and test each pair in each group. At least one group has two good batteries so this will definitely give a solution.

These sorts of diagrams are called graphs. A graph is just a set of vertices connected by edges. A graph with v vertices and all possible edges is called Kv. Our solution consists of K3, K3 and K2.

Now how do we show that this is minimal. Well we have some clever tricks.


The figure above is certainly a solution but it isn’t minimal.

7 has three edges and 8 has just one edge. We can reduce the number of edges by a procedure I call ‘Make 7 like 8’. The procedure involves:

1.    Remove all edges from 7.

2.    Connect 7 to the same vertices as 8.

3.    Connect 7 to 8.

That procedure gives:


We now have 11 edges instead of 12.

If we start with a solution then the ‘Make a like b’ procedure will give another solution. Why is this?

  • If the four good batteries include both 7 and 8 then they will be tested as we test the pair 7 and 8.
  • If the four good batteries do not include 7 then they are tested in the original solution and so will be tested in the new solution. We have only changed tests that include 7.
  • If the four good batteries include 7, but not 8, then they will be tested. The equivalent group, replacing 7 with 8, is tested. For example consider {1,4,6,7}. The equivalent group is {1,4,6,8}. We know this is tested as it doesn’t involve 7 and so is tested in the original solution. But 7 connects to the same vertices as 8 so {1,4,6,7} is tested in the new solution.

We can repeat this trick as often as we like. You might like to play around with it, start with a solution with a ridiculous number of edges and see how far you can reduce it by repeating this trick.

The number of edges connected to a vertex, a, is called the degree of a which is written d(a). The procedure ‘Make a like b’ will reduce the number of edges if d(a) > d(b) + 1.

We can therefore make the following claim:

Claim 1: In an optimal solution the degree of any two vertices will differ by no more than one.

So far so good but we need to go a bit further. We can use the same trick to show the following:

Claim 2: In an optimal solution if a-b and b-c then a-c (where a-b means there is an edge between a and b).

This means the solution splits the batteries into groups where each pair within a group is tested.

Proof of Claim 2:

Suppose there is a chain a-b-c but there is no edge between a and c (so a-c is not true). We can always reduce the number of edges.

Case 1: If d(b) > d(a) we ‘Make b like a’. This reduces the number of edges by at least one, we remove the b-c edge.

Case 2: Similarly if d(b) > d(c) we ‘Make b like c’.

Case 3: Otherwise we have d(b) <= d(a) and d(b) <= d(c). We ‘Make a like b’ and then ‘Make c like b’. These two procedures will also reduce the number of edges by at least one.

To illustrate this lets go back to our example. We left it like this.


 

We have the chain 1-3-5 but not 1-5. d(3) > d(1) so we ‘Make 3 like 1’. That gives:


Now we have the chain 4-5-6 but not 4-6. As d(4) <= d(5) and d(6) <= d(5) we have the third case. First ‘Make 4 like 5’ and then ‘Make 6 like 5’.


What our two claims show is that an optimal solution will split the batteries into roughly equal groups (the degree of any two vertices can differ by no more than one), each pair within a group is tested.

It only remains to show that we should use three groups.

More than three groups is not a solution, we could have one good battery in each group.

The other possibilities are to have one group, K8, which has 28 edges or to have two groups, K4 and K4, which has 12 edges.

So having three groups, with 7 edges, is optimal.

In the general solution we should have as many groups as possible which is r-1.

 

So this proves the general solution we have before: With n batteries and r good batteries then the best solution is to split the batteries into r-1 groups of roughly equal size and then test each pair within each group.

 

This is equivalent to Turan’s theorem.

For an optimal solution we need to consider the ‘complement graph’. This just means the graph with an edge precisely where our solution graph doesn’t have one. As our solution has 7 edges and there are 28 possible edges the complement graph has 21 edges. Such a graph is called a Turan graph.

The Turan graph can be got by splitting the vertices into r-1 groups and then connecting each pair which are not in the same group.

Since each group of four vertices in the solution graph contains at least one edge the same four vertices in the complement graph are missing an edge. In other words the complement graph does not contain K4 , it is K4-free.

Turan’s theorem says the graph with n vertices with the most edges which is Kr-free is the Turan graph, exactly the complement of our solution graph.

]]>
http://mathfactor.uark.edu/2009/11/follow-up-yoak-batteries-and-the-problem-of-the-week/feed/ 0
Yoak: Batteries, and the Problem of the Week http://mathfactor.uark.edu/2009/11/yoak-batteries-and-the-problem-of-the-week/ http://mathfactor.uark.edu/2009/11/yoak-batteries-and-the-problem-of-the-week/#comments Wed, 11 Nov 2009 19:17:42 +0000 http://mathfactor.uark.edu/?p=872 Recently I discovered Stan Wagon’s Problem of the Week.  This is a delightful mailing list / site and some of the problems are in the vein of puzzles I post here.  Recent problem 1125 captured the attention of several Math Factor authors so I thought I’d post the puzzle here as an excuse to introduce you all to that list.

You have eight batteries and know that four are good and four are dead, but don’t know which are which.  Your only method of testing them is to insert two into a device that will work if you’ve put in two good batteries and not otherwise.  How many such “tests” are required in order to be sure that you’ve located two good batteries?

As of this posting, the answer to this question is not yet on the POTW website, but if you come to this later, the spoiler may be there, so be careful to avoid spoilers if you want to work this through.

]]>
http://mathfactor.uark.edu/2009/11/yoak-batteries-and-the-problem-of-the-week/feed/ 2