Sujet : Re: Does the number of nines increase?
De : ben (at) *nospam* bsb.me.uk (Ben Bacarisse)
Groupes : sci.mathDate : 11. Jul 2024, 02:11:05
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <878qy8n36e.fsf@bsb.me.uk>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Gnus/5.13 (Gnus v5.13)
"Chris M. Thomasson" <
chris.m.thomasson.1@gmail.com> writes:
On 7/10/2024 5:32 PM, Ben Bacarisse wrote:
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
[...]
For example, with these tiles, the sequence 1, 2, 1, 3 produces
>
>
aa bb aa abb
aab ba aab b
>
r[0] = aa
r[1] = bb
r[3] = abb
r[4] = aab
r[5] = ba
r[6] = b
>
Where:
>
r[0] r[1] r[0] r[3]
r[4] r[5] r[4] r[6]
>
>
Is a legit mapping?
I have no idea why you numbered the strings like that. In C I might
represent this example as:
struct {
char *top, *bottom;
} tiles[3] = {
{ "", "" }, // dummy entry so we can use numbers 1 to 3
{ "aa", "aab" },
{ "bb", "ba" },
{ "abb", "b" }
};
and there is a solution because the concatenation of
tile[1].top, tile[2].top, tile[1].top, tile[3].top
and
tile[1].bottom, tile[2].bottom, tile[1].bottom, tile[3].bottom
are the same string. The solution being the sequence of indexes 1, 2,
1, 3.
Is that any help?
-- Ben.