# Pointless but interesting math puzzles

**URL:** <https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745>\
**Category:** Miscellaneous and Personal Stuff I Must Share\
**Created:** [July 24, 2016, 4:23am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745 "2016-07-24T04:23:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saffer](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/saffer/32/6440_2.png) [@Saffer](https://boards.straightdope.com/u/Saffer)\
**Post date:** [July 24, 2016, 4:23am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/1 "2016-07-24T04:23:07Z")

</div>

This thread is about posting pointless but interesting math puzzles and attempts at solving said math puzzles

I’ll start:

What number is a lower bound for A, where A = x^y, and x^y = y^x, but x does not equal y.

For example, A could equal 16 because 2^4 = 4^2 = 16, and 2 does not equal 4. But I can come up with a number lower than 16 for which I can find x and y.

Don’t forget to add spoilers to your answers

Clue: there is no minimum as for any number that satisfies A, I can always come up with a lower number. So another way of putting this is: what is the highest number that cannot satisfy the conditions of A.

---

<div class="post-metadata">

**Author:** ![Saffer](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/saffer/32/6440_2.png) [@Saffer](https://boards.straightdope.com/u/Saffer)\
**Post date:** [July 24, 2016, 4:31am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/2 "2016-07-24T04:31:27Z")

</div>

Forgot to add: x, y and A are all positive real numbers.  
Sent from my iPhone using Tapatalk

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [July 24, 2016, 6:29am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/3 "2016-07-24T06:29:40Z")

</div>

[spoiler]If I’ve figured things right, the lower bound is e^e. You can never reach this since then x would equal y, but any value above this has an answer.

Start by a little algebra:  
x^y = y^x  
y_log(x) = x_log(y)  
y/log(y) = x/log(x)

So any two values where x/log(x) is equal will be a solution. This function has a (positive) lower bound at e. Above that value, there are always two solutions for x at a given y value.

Because the curve is locally symmetrical around e (the Taylor series does not have an x term), (e - ε) and (e + ε) for arbitrarily small ε is a solution.[/spoiler]

---

<div class="post-metadata">

**Author:** ![Saffer](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/saffer/32/6440_2.png) [@Saffer](https://boards.straightdope.com/u/Saffer)\
**Post date:** [July 24, 2016, 7:14am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/4 "2016-07-24T07:14:32Z")

</div>

> [@Dr.Strangelove](#):
>
> [spoiler]If I’ve figured things right, the lower bound is e^e. You can never reach this since then x would equal y, but any value above this has an answer.
> 
> Start by a little algebra:  
> x^y = y^x  
> y_log(x) = x_log(y)  
> y/log(y) = x/log(x)
> 
> So any two values where x/log(x) is equal will be a solution. This function has a (positive) lower bound at e. Above that value, there are always two solutions for x at a given y value.
> 
> Because the curve is locally symmetrical around e (the Taylor series does not have an x term), (e - ε) and (e + ε) for arbitrarily small ε is a solution.[/spoiler]

You got it! I’ll try think of another…

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [July 25, 2016, 6:34pm UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/5 "2016-07-25T18:34:43Z")

</div>

I’ll try to think of one …

What I _did_ think of was a thread titled _“Name that C program!”_ similar to the old quiz show “Name that Tune!”

The idea would be post a fragment of C code and have programmers guess what the code is useful for, or what body of code it comes from. Any interest?

… I couldn’t decide whether it would belong here or in Thread Games.

---

<div class="post-metadata">

**Author:** ![watchwolf49](https://avatars.discourse-cdn.com/v4/letter/w/e9c0ed/32.png) [@watchwolf49](https://boards.straightdope.com/u/watchwolf49)\
**Post date:** [July 25, 2016, 10:54pm UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/6 "2016-07-25T22:54:53Z")

</div>

Young Butch was deeply in love with the beautiful intelligent and all-around good girl Dora. As she was a traditional girl, Dora played aloof as long as she could, but alas with her self-control lost she admitted to dear Butch her heart was set to him. So joyous was the moment they promptly walked up the hill where they had first met and upon a young ten-year-old oak did engrave four feet above the ground the symbols of love, “BB + DD, forever”. 80 years have past and the occasion of their 75th wedding anniversary they decided to trek up the hill again to witness their prophecy one last time.

How high into the tree did they have to climb IF:

In the first 7 years, the tree grew at 6 feet per year,  
In the next 28 years, the tree grew 4 feet per year,  
In the next 21 years, the tree grew 3 feet per year, and  
In the final 24 years, the tree grew 2 feet per year?

---

<div class="post-metadata">

**Author:** ![TimeWinder](https://avatars.discourse-cdn.com/v4/letter/t/bcef8e/32.png) [@TimeWinder](https://boards.straightdope.com/u/TimeWinder)\
**Post date:** [July 25, 2016, 11:46pm UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/7 "2016-07-25T23:46:27Z")

</div>

Not sure that’s a math puzzle so much as a do you know most (not all) trees grow from the top puzzle…

---

<div class="post-metadata">

**Author:** ![watchwolf49](https://avatars.discourse-cdn.com/v4/letter/w/e9c0ed/32.png) [@watchwolf49](https://boards.straightdope.com/u/watchwolf49)\
**Post date:** [July 25, 2016, 11:50pm UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/8 "2016-07-25T23:50:39Z")

</div>

> [@TimeWinder](#):
>
> Not sure that’s a math puzzle so much as a do you know most (not all) trees grow from the top puzzle…

Surprisingly no, not as a front-end memory … more of a bang-the-head “that’s right” back-end memory

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [July 26, 2016, 2:54am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/9 "2016-07-26T02:54:27Z")

</div>

Pedantry:

> [@Dr.Strangelove](#):
>
> Because the curve is locally symmetrical around e (the Taylor series does not have an x term), (e - ε) and (e + ε) for arbitrarily small ε is a solution.

Well, if you’re willing to ignore the contributions of the degree 3 term. Otherwise, the pair of (e - ε) and (e + ε) for the same ε won’t yield an exact solution. But, regardless, the fact that the function is continuous with a local strict minimum at e means there are solutions arbitrarily close to e.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [July 26, 2016, 4:13am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/10 "2016-07-26T04:13:22Z")

</div>

> [@Indistinguishable](#):
>
> Pedantry:
> 
> Well, if you’re willing to ignore the contributions of the degree 3 term. Otherwise, the pair of (e - ε) and (e + ε) for the same ε won’t yield an exact solution. But, regardless, the fact that the function is continuous with a local strict minimum at e means there are solutions arbitrarily close to e.

[spoiler]Right–I had sorta convinced myself that the higher-order terms would produce errors of ε[sup]2+[/sup], which in handwaving fashion I chose to ignore.

Is there a better way to say what I did? Specifically, I was thinking of the evenness or oddness of the lowest-order term of the Taylor series (ignoring the constant factor). That’s the only term we have to look at if we’re willing to ignore the higher-order errors. And at the least we can say whether, after adding/subtracting ε, we should expect the results to move in the same direction or opposite.

More pedantry of my original post: “the Taylor series does not have an _(x - e)_ term” (since I expanded around e). Which is itself kinda redundant, since the minimum must correspond to a zero in the derivative (which is why I expanded around e in the first place).  
[/spoiler]

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [July 26, 2016, 4:15am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/11 "2016-07-26T04:15:43Z")

</div>

> [@septimus](#):
>
> The idea would be post a fragment of C code and have programmers guess what the code is useful for, or what body of code it comes from. Any interest?

I’m interested! I’ll try to join in the puzzle-creating fun as well.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [July 26, 2016, 4:31am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/12 "2016-07-26T04:31:13Z")

</div>

> [@Dr.Strangelove](#):
>
> [spoiler]Right–I had sorta convinced myself that the higher-order terms would produce errors of ε[sup]2+[/sup], which in handwaving fashion I chose to ignore.
> 
> Is there a better way to say what I did? Specifically, I was thinking of the evenness or oddness of the lowest-order term of the Taylor series (ignoring the constant factor). That’s the only term we have to look at if we’re willing to ignore the higher-order errors. And at the least we can say whether, after adding/subtracting ε, we should expect the results to move in the same direction or opposite.
> 
> More pedantry of my original post: “the Taylor series does not have an _(x - e)_ term” (since I expanded around e). Which is itself kinda redundant, since the minimum must correspond to a zero in the derivative (which is why I expanded around e in the first place).  
> [/spoiler]

FWIW, I wasn’t quibbling with your result that matching pairs exist, just with the implication that such pairs are perfectly centered on the local minimum. For that, you’re not wrong that you can bound the errors from the higher-order terms.

We actually don’t need the Taylor series, as such, beyond that it tells us the location of the local minimum. Any continuous function f (differentiable or not) that has a strict local minimum at (p, f(p)) is such that values arbitrarily close to but on opposites sides of p can be found with matching values under f [these values, then, being arbitrarily close to f(p)]. This is just by the intermediate value theorem: the image of f on (p - ε, p) is some small interval with open lower bound f(p), and similarly for the image of f on (p + ε, p), so that the intersection of those two intervals is nontrivial and produces the matching points we desire (though those matching points needn’t be equally distant from p).

In our case, we have furthermore that f is a strictly decreasing function for inputs below p and a strictly increasing function for inputs above p, which gives us furthermore a one-to-one correspondence induced by matching values under f.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [July 26, 2016, 5:09am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/13 "2016-07-26T05:09:26Z")

</div>

Thanks for the insight. One last bit of uncertainty. Suppose I want to know if this holds for a function, given that p is a maximum (or minimum):  
f(p - ε) = f(p + ε + O(ε[sup]2[/sup]))

What kind of broad classifications can I check to confirm that this holds? I’m pretty sure “analytic” is enough, but that’s too strong–there are obviously even non-analytic functions where the relation holds. Anything come to mind, or is this just going to be a mish-mash of lots of overlapping categories?

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [July 26, 2016, 5:38am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/14 "2016-07-26T05:38:28Z")

</div>

Well, if the function is twice differentiable at p, this holds; that’s the Taylor series type calculation you were doing before. If you have enough differentiability to construct a Taylor series for any f(x) through the k-th order term, the remainder after that (whether the function is further differentiable or not) is o(x[sup]k[/sup]). [Indeed, k-th differentiability is essentially equivalent to the existence of a k-th degree polynomial approximation with o(x[sup]k[/sup]) error. Note these are little ohs.].

p being a minimum for f guarantees f’§ is neither positive nor negative, and thus, if f is second differentiable at input p, then ε |-\> f(p + ε) - f(p - ε) is also second differentiable at ε = 0, with vanishing 0-th and 1-st derivatives, so that it can be expanded as f’’§ e[sup]2[/sup]/2 + o(e[sup]2[/sup]), which is overall O(e[sup]2[/sup]). All of this was basically already noted by you above, of course. If it sounded like I was disputing any of this, I apologize.

Knowing f(p - ε) = f(p + ε + O(ε[sup]2[/sup])) doesn’t in itself directly guarantee the existence of matching pairs, though (you could concoct such an f which was always rational above p and irrational below p, say). But, again, mere continuity, without any further assumptions, _does_ provide matching pairs, so long as f is not exclusively increasing to one side of p and exclusively decreasing to the other side of p.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [July 26, 2016, 10:54am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/15 "2016-07-26T10:54:05Z")

</div>

> [@Dr.Strangelove](#):
>
> I’m interested! I’ll try to join in the puzzle-creating fun as well.

OK. I think I’ll start the thread. Just tell me if it belongs in MPSIMS, Thread Games or somewhere else?

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [July 28, 2016, 12:25am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/16 "2016-07-28T00:25:00Z")

</div>

Here’s an interesting math puzzle of the Monty Hall genre. It actually isn’t “pointless” — Expert bridge players need to know the answer. (And if you already know the answer, please let non-bridge players tackle it first.)

The puzzle arises in the game of contract bridge, but non-players should be able to understand the setup. You and your partner (the dummy) have nine hearts missing only the Queen, Jack, Trey and Deuce. You cash the Ace; LHO plays the Trey, RHO the Jack. You lead toward dummy’s King, LHO following with the Deuce. _Should you play for the Queen to be with LHO or RHO?_ (Your opponents are indifferent in their plays of Trey vs Deuce, or Queen vs. Jack. However, as the play has proceeded they would not play a picture card when a small card still available.)

There are only two possibilities that remain for the original holdings:

LHO: 3 2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RHO: Q J  
LHO: Q 3 2 &nbsp; &nbsp; &nbsp; &nbsp; RHO: J

The cards were shuffled randomly to begin with and, with nothing else to go on, the _a priori_ chances for these two cases are about the same. (1st case is slightly more likely than 2nd.)  
_What is the percentage play now?_

~ ~ ~ ~ ~ ~ ~ ~ ~

I’m bumping the thread mainly to bump the suggestion of a _Name that Code_ thread similar to _Name that Tune_. With a large number of expert programmers posting at SDMB, it might be fun! A player would post a code fragment, another would Name that Code and post his own. Assign Roman numbers to the fragments so that several could be under contest simultaneously. The code fragment could be in any language, could come from real code or be manufactured for the purpose of the game. Responder would say something salient about the code — what it does or where it appears.

Does such a thread belong in IMHO, or in Thread Games? In any event, I won’t start it — too many of my threads have gone unbumped. I will try to contribute if someone else starts the thread.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [July 28, 2016, 1:39am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/17 "2016-07-28T01:39:02Z")

</div>

I don’t _play_ contact bridge, but I have played it and so I understand the setup but don’t know the answer off-hand.

[spoiler]I say the odds after the trick are:  
67%: LHO: Q 2, RHO:  
33%: LHO: 2, RHO: Q

By “indifferent” I assume the players choose the card randomly. I’ll divide into two universes, each subdivided into 4 universes to account for quantization. I put a star next to each card that the player picks.

```auto

LHO: Q 3 2 RHO: J
  LHO: Q *3 2 RHO: *J
  LHO: Q *3 2 RHO: *J
  LHO: Q 3 *2 RHO: *J
  LHO: Q 3 *2 RHO: *J

LHO: 3 2 RHO: Q J
  LHO: *3 2 RHO: *Q J
  LHO: 3 *2 RHO: *Q J
  LHO: *3 2 RHO: Q *J
  LHO: 3 *2 RHO: Q *J

```

From this, I pick out the universes that correspond to what I see–that is, a 3 and a J played:

```auto

  LHO: Q *3 2 RHO: *J
  LHO: Q *3 2 RHO: *J
  LHO: *3 2 RHO: Q *J

```

So 2/3 of the time I see hands played from the first universe, and 1/3 from the second.

I’m not quite sure yet how to formulate this idea into a rule of thumb. Something like a rule of minimum indifference: universes that minimize player choice are more likely than ones that don’t (in this example, the presence of the Q for RHO “dilutes” the probability of that universe existing).

Well, at least assuming I didn’t muck things up. Fun question in any case.[/spoiler]

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [July 28, 2016, 3:02am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/18 "2016-07-28T03:02:57Z")

</div>

Correct.

[SPOILER]Although most good bridge players have good understanding of probabilities, they usually get this wrong until they read a textbook which explains it.

The mnemonic for this is _The Principle of Restricted Choice_. If RHO had Q & J he might have played Q but with Jack alone, his _choice is restricted_ — he must play the Jack if it’s the only card he has.[/SPOILER]

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [July 28, 2016, 4:42am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/19 "2016-07-28T04:42:27Z")

</div>

Neat! I had expected that there would be some kind of named rule for the principle–[spoiler]although in the end it’s all just probability, when actually playing bridge you need rules of thumb, so it’s not surprising it’s been formulated as one.

According to Wikipedia, it was originally stated as:  
“The play of a card which may have been selected as a choice of equal plays increases the chance that the player started with a holding in which his choice was restricted.”

Slightly different phrasing than what I said, but obviously the same basic idea. When the choice is restricted, there’s less dilution of the possibilities across the total–fewer combinations to cover the full 100%.[/spoiler]

---

<div class="post-metadata">

**Author:** ![Hari\_Seldon](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hari_seldon/32/5173_2.png) [@Hari\_Seldon](https://boards.straightdope.com/u/Hari_Seldon)\
**Post date:** [July 29, 2016, 12:50am UTC](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745/20 "2016-07-29T00:50:32Z")

</div>

As Yogi didn’t say it: If a finesse possibility suddenly opens up, take it.

Slight nitpick: The odds aren’t _quite_ 2/3 since a 2-2 distribution is slightly more likely than 3-1. Note that 1-3 is already excluded so this isn’t the same thing as saying that a 2-2 distribution is less likely than a bad split (3-1, 1-3 or worse).

[Next page](https://boards.straightdope.com/t/pointless-but-interesting-math-puzzles/760745.md?page=2)
