A368946
Irregular triangle read by rows: row n lists the strings of the MIU formal system at the n-th level of the tree generated by recursively applying the system rules, starting from the MI string (see comments and example).
Original entry on oeis.org
31, 310, 311, 31010, 3110, 31111, 310101010, 3110110, 311110, 311111111, 301, 310, 31010101010101010, 3110110110110, 31111011110, 3010, 3100, 3111111110, 31111111111111111, 3011111, 3101111, 3110111, 3111011, 3111101, 3111110, 3010, 30101, 31010
Offset: 0
After recursively applying the rules three times, we get the following tree (cf. Hofstadter (1979), page 40, Figure 11).
.
MI
0 ---------------------- 31
/ \
1 2 <--- Rule applied
/ \
MIU MII
1 ---------------- 310 311
/ / \
2 1 2
/ / \
MIUIU MIIU MIIII
2 --------- 31010 3110 31111 Here rule 3 can
/ / / | | \ be applied twice:
2 2 1 2 3 3 <--- it is first applied
/ / / | | \ to the leftmost
MIUIUIUIU MIIUIIU MIIIIU | MUI MIU III substring
3 --- 310101010 3110110 311110 | 301 310
MIIIIIIII
311111111
.
By reading the tree from top to bottom, left to right, the triangle begins:
[0] 31;
[1] 310 311;
[2] 31010 3110 31111;
[3] 310101010 3110110 311110 311111111 301 310;
[4] 31010101010101010 3110110110110 ... 3010 ... 3010 30101 31010;
...
Please note that some strings may be duplicated in different rows and within the same row: within the first four rows, the string MIU (310) is present in rows 1 and 3. In row 4, the string MUIU (3010) is present twice: it can be generated both by applying rule 3 to MIIIIU (311110) and by applying rule 1 to MUI (301). The initial string MI (31) first reappears in row 5.
- Douglas R. Hofstadter, Gödel, Escher, Bach: an Eternal Golden Braid, Basic Books, 1979, pp. 33-41 and pp. 261-262.
Cf.
A369586 (shortest proofs),
A369408 (length of shortest proofs),
A369587 (number of symbols of shortest proofs).
-
MIUStepO[s_] := Flatten[Map[{If[StringEndsQ[#, "1"], # <> "0", Nothing], # <> StringDrop[#, 1], StringReplaceList[#, "111" -> "0"], StringReplaceList[#, "00" -> ""]}&, s]];
With[{rowmax = 4}, Map[FromDigits, NestList[MIUStepO, {"31"}, rowmax], {2}]]
-
from itertools import islice
def occurrence_swaps(w, s, t):
out, oi = [], w.find(s)
while oi != -1:
out.append(w[:oi] + t + w[oi+len(s):])
oi = w.find(s, oi+1)
return out
def moves(w): # moves for word w in MIU system, encoded as 310
nxt = []
if w[-1] == '1': nxt.append(w + '0') # Rule 1
if w[0] == '3': nxt.append(w + w[1:]) # Rule 2
nxt.extend(occurrence_swaps(w, '111', '0')) # Rule 3
nxt.extend(occurrence_swaps(w, '00', '')) # Rule 4
return nxt
def agen(): # generator of terms
frontier = ['31']
while len(frontier) > 0:
yield from [int(t) for t in frontier]
reach1 = [m for p in frontier for m in moves(p)]
frontier, reach1 = reach1, []
print(list(islice(agen(), 28))) # Michael S. Branicky, Jan 14 2024
A369173
Irregular triangle read by rows: row n lists all of the distinct derivable strings in the MIU formal system that are n characters long.
Original entry on oeis.org
31, 301, 310, 311, 3001, 3010, 3011, 3100, 3101, 3110, 30001, 30010, 30011, 30100, 30101, 30110, 31000, 31001, 31010, 31100, 31111, 300001, 300010, 300011, 300100, 300101, 300110, 301000, 301001, 301010, 301100, 301111, 310000, 310001, 310010, 310100, 310111, 311000, 311011, 311101, 311110, 311111
Offset: 2
Triangle begins:
[2] 31;
[3] 301 310 311;
[4] 3001 3010 3011 3100 3101 3110;
[5] 30001 30010 30011 30100 30101 30110 31000 31001 31010 31100 31111;
...
- Douglas R. Hofstadter, Gödel, Escher, Bach: an Eternal Golden Braid, Basic Books, 1979, pp. 33-41 and pp. 261-262.
Cf.
A369586 (shortest proofs),
A369408 (length of shortest proofs),
A369587 (number of symbols of shortest proofs).
-
A369173row[n_] := Map[FromDigits[Join[{3}, #]]&, Select[Tuples[{0, 1}, n - 1], !Divisible[Count[#, 1], 3]&]]; Array[A369173row, 5, 2]
A369409
Irregular triangle read by rows: row n lists the lines of a "normal" proof (see comments) for the MIU formal system string (theorem) given by A369173(n+1).
Original entry on oeis.org
31, 31, 311, 31111, 301, 31, 311, 31111, 310, 31, 311, 31, 311, 31111, 311111111, 3111111110, 31111100, 311111, 31111111111, 311111111110, 3111111100, 31111111, 311101, 3001, 31, 311, 31111, 311111111, 3111111110, 31111100, 311111, 31111111111, 311111111110, 3111111100, 31111111
Offset: 1
Triangle begins:
[1] 31;
[2] 31 311 31111 301;
[3] 31 311 31111 310;
[4] 31 311;
[5] 31 311 31111 ... 31111100 ... 31111111111 ... 3111111100 31111111 311101 3001;
...
For the theorem MUI (301), which is given by A369173(3,1) or (after flattening) A369173(3), steps 1 and 2 of the algorithm generate the lines 301 -> 31111 -> 311 -> 31 which, when reversed (step 3), give row 2 of the present sequence.
For the theorem MIUU (3100), which is given by A369173(4,4) or (after flattening) A369173(9), steps 1 and 2 of the algorithm generate the lines 3100 -> 311110 -> 31111111 -> 3111111100 -> 311111111110 -> 31111111111 -> 311111 -> 31111100 -> 3111111110 -> 311111111 -> 31111 -> 311 -> 31 which, when reversed (step 3), give row 8 of the present sequence.
- Douglas R. Hofstadter, Gödel, Escher, Bach: an Eternal Golden Braid, Basic Books, 1979, pp. 33-41 and pp. 261-262.
- Paolo Xausa, Table of n, a(n) for n = 1..10823 (rows 1..682 of the triangle, flattened).
- Armando B. Matos and Luis Filipe Antunes, Short Proofs for MIU theorems, Technical Report Series DCC-98-01, University of Porto, 1998.
- Wikipedia, MU Puzzle.
- Index entries for sequences from "Goedel, Escher, Bach".
Cf.
A369586 (analog for shortest proofs).
-
MIUStrings[n_] := Map["3" <> FromCharacterCode[# + 48]&, Select[Tuples[{0, 1}, n - 1], !Divisible[Count[#, 1], 3]&]];
MIUProofLines[t_] := Module[{s = t}, Reverse[Flatten[Reap[Sow[s]; While[StringCount[s, "0"] > 0, Sow[s = StringReplace[s, "0" -> "111", 1]]]; While[s != "31", If[EvenQ[StringCount[s, "1"]], Sow[s = StringDrop[s, -(StringLength[s]-1)/2]], Sow[{s <> "00", s <> "1110", s <> "111", s = StringDrop[s, -(StringLength[s]-4)/2]}]]]][[2,1]]]]];
Map[FromDigits, Map[MIUProofLines, Flatten[Array[MIUStrings, 3, 2]]], {2}]
A369408
Irregular triangle read by rows: T(n,k) is the length of the shortest proof for the MIU formal system string (theorem) given by A369173(n,k).
Original entry on oeis.org
1, 4, 2, 2, 11, 5, 8, 5, 8, 3, 9, 9, 6, 9, 5, 6, 9, 6, 3, 6, 3
Offset: 2
Triangle begins:
[2] 1;
[3] 4 2 2;
[4] 11 5 8 5 8 3;
[5] 9 9 6 9 5 6 9 6 3 6 3;
...
For the theorem MUI (301), which is given by A369173(3,1), the shortest derivation from the axiom MI is MI (31) -> MII (311) -> MIIII (31111) -> MIU (301) (4 lines), so T(3,1) = 4.
- Douglas R. Hofstadter, Gödel, Escher, Bach: an Eternal Golden Braid, Basic Books, 1979, pp. 33-41 and pp. 261-262.
-
MIUStringsW3[n_] := Map[FromCharacterCode[# + 48]&, Select[Tuples[{0, 1}, n - 1], ! Divisible[Count[#, 1], 3] &]];
MIUStepDW3[s_] := DeleteDuplicates[Flatten[Map[{If[StringEndsQ[#, "1"], # <> "0", Nothing], # <> #, StringReplaceList[#, {"111" -> "0", "00" -> ""}]} &, s]]];
Module[{rowmax = 5, treedepth = 10, tree}, tree = NestList[MIUStepDW3, {"1"}, treedepth]; Map[Quiet[Check[Position[tree, #, {2}][[1,1]], "Not found"]]&, Array[MIUStringsW3, rowmax - 1, 2], {2}]]
A369587
Irregular triangle read by rows: row n lists the number of symbols of the shortest proof (see comments) for each of the distinct derivable strings (theorems) in the MIU formal system that are n characters long.
Original entry on oeis.org
2, 13, 5, 5, 68, 17, 44, 20, 44, 9, 52, 52, 31, 52, 18, 31, 52, 31, 10, 31, 10
Offset: 2
Triangle begins:
[2] 2;
[3] 13 5 5;
[4] 68 17 44 20 44 9;
[5] 52 52 31 52 18 31 52 31 10 31 10;
...
For the theorem MIUU (3100), which is given by A369173(4,4), the shortest proof is MI (31) -> MII (311) -> MIIII (31111) -> MIIIIU (311110) -> MIUU (3100), which consists of a total of 20 symbols (counting only M, I and U characters): T(4,4) is therefore 20.
- Douglas R. Hofstadter, Gödel, Escher, Bach: an Eternal Golden Braid, Basic Books, 1979, pp. 33-41 and pp. 261-262.
-
MIUStrings[n_] := Map["3" <> FromCharacterCode[# + 48] &, Select[Tuples[{0, 1}, n - 1], ! Divisible[Count[#, 1], 3] &]];
MIUNext[s_] := Flatten[{If[StringEndsQ[s, "1"], s <> "0", Nothing], s <> StringDrop[s, 1], StringReplaceList[s, {"111" -> "0", "00" -> ""}]}];
Module[{uptolen = 5, searchdepth = 10, mi = "31", g}, g = NestGraph[MIUNext, mi, searchdepth]; Map[Quiet[Check[Map[FromDigits, StringLength[StringJoin[If[# == mi, #, First[Sort[FindPath[g, mi, #, {GraphDistance[g, mi, #]}, All]]]]]]], "Not found"]] &, Array[MIUStrings, uptolen - 1, 2], {2}]] (* Considers theorems up to 5 characters long, looking up to 10 steps away from the MI axiom -- please note it takes a while *)
Showing 1-5 of 5 results.
Comments