Repository navigation
yuuki's research
< yuuki
Generating all possible strings over a given alphabet is difficult. In Python, you can use itertools.product in a simple case:
from itertools import product
MAX_LENGTH = 5
alphabet = (
"a", "b", "c", "d", "e", "f", "g",
"h", "i", "j", "k", "l", "m", "n",
"o", "p", "q", "r", "s", "t", "u",
"v", "w", "x", "y", "z",
)
for length in range(1, MAX_LENGTH + 1):
for chars in product(alphabet, repeat=length):
print("".join(chars))
# Output:
# a
# b
# ...
# z
# aa
# ab
# ...
# zz
# aaa
# ...
# zzzzzTotal number of strings
There are 26 strings from "a" to "z", and
In general, the sum of
The following are 44 elements of the Japanese alphabet (gojūon) written in rōmaji. Including "n" causes collisions; "na", "ni", etc. are generated twice.
alphabet = (
"a", "i", "u", "e", "o",
"ka", "ki", "ku", "ke", "ko",
"sa", "shi", "su", "se", "so",
"ta", "chi", "tsu", "te", "to",
"na", "ni", "nu", "ne", "no",
"ha", "hi", "fu", "he", "ho",
"ma", "mi", "mu", "me", "mo",
"ya", "yu", "yo",
"ra", "ri", "ru", "re", "ro",
"wa",
)The number of rōmaji strings of length
with initial conditions
| 1 | 5 | 26 |
| 2 | 61 | 676 |
| 3 | 488 | 17,576 |
| 4 | 4,651 | 456,976 |
| 5 | 41,006 | 11,881,376 |
| 6 | 373,930 | 308,915,776 |
When you are at
However, when you are at
What is the formula to find the bot's position
Answer
When
When
We see that
Therefore,
Data
0JAuF0
0 iWNbkU
1 bgRFgs
2 Ctipm0
3 Z+DHC8
4 3riK4c
5 oFkyFk
6 oKzaX4
7 YPqcak
8 eV2DBw
9 Jdp+Zg
A 1BhV5w
B 0BaqIs
C DkAeOU
D 1DApu8
E 4vaQls
F Et6Q4I
G G8r490
H F5QhQg
I MmBPMc
J Hsv4X4
K I0X3SM
L vmdUCU
M ty4XUA
N ok/sl0
O 6TfUFg
P XiCA+Y
Q G7H7BM
R kw4pCM
S fNQT7Q
T DLxTeE
U jo/eyI
V m3TMqI
W it09hU
X 9weMNA
Y wSuV1M
Z gLCCzE
a orob88
b ltOY6g
c CWxa58
d nAq7ds
e 36Bzk4
f u7DOkc
g 2R4/2c
h aZfOac
i pP5fYU
j 9Ytf2k
k 7YNrD0
l mff9qY
m fJG1ig
n 17OC+M
o pSupHk
p Q7IqQM
q bHewwY
r m0eWdg
s RRCH0c
t cc7Mp0
u PEumbo
v VnpGDI
w vYjjlw
x e4GRUM
y zwjpgY
z 93pV5M🧸 Content is available under CC BY 4.0 unless otherwise noted.