Go Back > Fun Stuff > Puzzles

Thread Tools
Old 2020-06-28, 11:49   #1
Jul 2015

1A16 Posts
Default July 2020
tgan is offline   Reply With Quote
Old 2020-07-21, 07:48   #2
Oct 2017

2·3·19 Posts

Does anyone of you know, how the new puzzlemaster reacts to submissions that aren‘t correct? Oded has answered every time very fast - that was a good way to help. But I guess that he wasn‘t obliged to do so.
Dieter is offline   Reply With Quote
Old 2020-07-22, 07:33   #3
Jul 2015

2·13 Posts

I got an answer after few days that my answer is correct
tgan is offline   Reply With Quote
Old 2020-07-30, 05:33   #4
Jan 2020

31 Posts
Default Spin-off

A friend of mine suggested a nice "spin-off" puzzle.

If you solved July 2020 main problem by using three letters or more,
and your dictionary includes letters "I", "B", and "M",
then how many times does substring "IBM" appear in your solution?

Let IBM(n) be the number of occurrences within n-th string of your solution.
Does this sequence follow some nice pattern?

A trivial upper bound is IBM(n) <= LENGTH(n)/3 = FIBONACCI(n)*FIBONACCI(n+1)/3.
A slightly sharper bound is given by RARE(n), the minimum among the occurrences of letters "I", "B", and "M".

What about your ratio IBM(n) / LENGTH(n)?
What about your ratio IBM(n) / RARE(n)?
0scar is offline   Reply With Quote
Old 2020-07-30, 05:57   #5
Jan 2020

31 Posts

As LENGTH(n) grows exponentially, I think that it makes sense to compute the ratios for n up to 10, or their limits as n grows to infinity (only for the brave)

For my currently best solution,
IBM / LENGTH > 0.2
0scar is offline   Reply With Quote
Old 2020-08-28, 14:28   #6
Jan 2020

31 Posts
Default Spin-off solution

The target sequence G(n) = F(n)*F(n+1) satisfies an order-3 homogeneous linear recurrence:
G(n) = 2*G(n-1) + 2*G(n-2) - G(n-3),
so we need a homogeneous linear system of order at least three to generate it,
which means a dictionary of at least three letters.

Three letters actually suffice; I found three such solutions.
Dictionary 1:
{"A": "BC", "B": "AAB", "C": "ABC"}.
Dictionary 2:
{"A": "AB", "B": "AAAC", "C": "AAC"}.
Dictionary 3:
{"A": "AB", "B": "AABC", "C": "B"}.
In each case, the game starts with letter "A";
letter "C" is always the rarest one, at least for index n>2.

Dieter proved a nice closed-form representation for letter-counting functions.
Dictionary 1:
A(n) = F(n+1)*F(n-2);
B(n) = F(n)*F(n-1);
C(n) = F(n-1)^2.
Dictionary 2:
A(n) = F(n)^2;
B(n) = F(n-1)^2;
C(n) = F(n-1)*F(n-2).
Dictionary 3:
A(n) = F(n)*F(n-1) + F(n-2)^2;
B(n) = F(n)*F(n-1);
C(n) = F(n-1)*F(n-2).
Dictionary 1 seems the most promising one, as letter "C" occurs slightly more often (by a factor F(n-1)/F(n-2), which converges to the golden ratio phi=1.618...).

We can change the three spellings in 2*3*6 = 36 ways.
We can replace letters "A","B","C" with letters "I","B","M" in 6 ways.
Among the 216 possible variations, I chose the following one:
{"M": "IB", "I": "MIM", "B": "IBM"}
The game starts with letter "M";
letter "B" is the rarest one for n>2, so the upper bound IBM(n) <= B(n) is sharp.
This solution almost reaches such bound:
IBM(n) = B(n) if n is odd,
IBM(n) = B(n)-1 if n is even.


In each string of the sequence, we can only find the two-letter substrings "BM", "IB", "IM", and "MI".
The sequence starts with a one-letter string, so the claim is trivially true for n=1.
The given list contains all the two-letter substrings of the chosen spellings, so the claim is also true for n=2.
Then, only substrings "BM" and "MI" can arise from a permitted concatenation of spellings:
"BM": "IBMIB",
"IM": "MIMIB",
"MI": "IBMIM",
so the claim is also true for every index n>2 by induction.

In particular, letter "B" is always preceded by letter "I" and followed by letter "M", unless it occurs at the beginning or at the end of a string, so the lower bound IBM(n) >= B(n)-2 holds.

For index n>1, it's easy to check that the first few string characters follow a regular pattern with period 2:
IB... -> MIM... -> IB... -> MIM...
and the same holds for the last few string characters:
...IB -> ...IBM -> ...IB -> ...IBM
so letter "B" never occurs at the begin of a string, but it occurs at the end of even-indexed strings.

For the given solution, the ratio IBM(n)/G(n) converges to the value 1/phi^3 ~ 0.236

Last fiddled with by 0scar on 2020-08-28 at 14:32
0scar is offline   Reply With Quote
Old 2020-08-31, 11:30   #7
Jul 2015

2×13 Posts

Very impressive Oscar
tgan is offline   Reply With Quote

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
July 2018 a1call Puzzles 36 2018-08-06 14:02
July 2016 Xyzzy Puzzles 4 2016-08-06 22:51
July 2015 Xyzzy Puzzles 16 2015-08-19 16:13
July 2014 Xyzzy Puzzles 6 2014-11-02 19:05
Happy July 4th LaurV Lounge 8 2012-07-06 00:13

All times are UTC. The time now is 07:03.

Fri May 7 07:03:36 UTC 2021 up 29 days, 1:44, 0 users, load averages: 3.10, 2.67, 2.47

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.