- #1
Maria76
- 14
- 0
Hi,
Here is a weird question (I hope you don't mind).
Let's say we have an alphabet with only 4 letters (A, B, C, D)? How many combinations of give us palindromes (i.e. they read the same way backwards and forwards)? I count 36 possible combinations -
AAAA BAAB CAAC DAAD EAAE FAAF
ABBA BBBB CBBC DBBD EBBE FBBF
ACCA BCCB CCCC DCCD ECCE FCCF
ADDA BDDB CDDC DDDD EDDE FDDF
AEEA BEEB CEEC DEED EEEE FEEF
AFFA BFFB CFFC DFFD EFFE FFFF
This is the same number with an alphabet of only 3 letters -.
AFA, AEA, ADA, ACA, ABA, AAA
BFB, BEB, BDB, BCB, BBB, BAB
CFC, CEC, CDC, CCC, CBC, CAC
DFD, DED, DDD, DCD, DBD, DAD
EFE, EEE, EDE, ECE, EBE, EAE
FFF, FEF, FDF, FCF, FBF, FAF
Is that right?
Now, how about an alphabet with 5 letters? Is there any equation that can be used to determine the number of palindromes, or do I need to use a computer algorithm to work it out.
Thanks,
Maria
Here is a weird question (I hope you don't mind).
Let's say we have an alphabet with only 4 letters (A, B, C, D)? How many combinations of give us palindromes (i.e. they read the same way backwards and forwards)? I count 36 possible combinations -
AAAA BAAB CAAC DAAD EAAE FAAF
ABBA BBBB CBBC DBBD EBBE FBBF
ACCA BCCB CCCC DCCD ECCE FCCF
ADDA BDDB CDDC DDDD EDDE FDDF
AEEA BEEB CEEC DEED EEEE FEEF
AFFA BFFB CFFC DFFD EFFE FFFF
This is the same number with an alphabet of only 3 letters -.
AFA, AEA, ADA, ACA, ABA, AAA
BFB, BEB, BDB, BCB, BBB, BAB
CFC, CEC, CDC, CCC, CBC, CAC
DFD, DED, DDD, DCD, DBD, DAD
EFE, EEE, EDE, ECE, EBE, EAE
FFF, FEF, FDF, FCF, FBF, FAF
Is that right?
Now, how about an alphabet with 5 letters? Is there any equation that can be used to determine the number of palindromes, or do I need to use a computer algorithm to work it out.
Thanks,
Maria