Re: Strange 26base enumeration

• To: mathgroup at smc.vnet.net
• Subject: [mg111202] Re: Strange 26base enumeration
• From: DC <b.gatessucks at gmail.com>
• Date: Fri, 23 Jul 2010 07:13:19 -0400 (EDT)
• References: <i293lk\$m1e\$1@smc.vnet.net>

```Define your digits :

In[2]:= digits = FromCharacterCode[#] & /@ Range[65, 65 + 25]

Out[2]= {"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"}

Then :

Tuples[digits, {2}] for 2 digits numbers
....
Tuples[digits, {n}] for n digits numbers

Examples :
In[12]:= Tuples[digits, {2}][[1 ;; 10]]

Out[12]= {{"A", "A"}, {"A", "B"}, {"A", "C"}, {"A", "D"}, {"A",
"E"}, {"A", "F"}, {"A", "G"}, {"A", "H"}, {"A", "I"}, {"A", "J"}}

In[14]:= Tuples[digits, {3}][[-10 ;;]]

Out[14]= {{"Z", "Z", "Q"}, {"Z", "Z", "R"}, {"Z", "Z", "S"}, {"Z",
"Z", "T"}, {"Z", "Z", "U"}, {"Z", "Z", "V"}, {"Z", "Z", "W"}, {"Z",
"Z", "X"}, {"Z", "Z", "Y"}, {"Z", "Z", "Z"}}

-Francesco

On 07/22/2010 10:40 AM, Dr Bruno Campanini wrote:
> I need an algorithm to get such a table:
>
> A
> B
> .
> .
> Z
> AA
> AB
> .
> .
> AZ
> BA
> BB
> .
> .
> BZ
> CA
> .
> .
> ZA
> ZB
> .
> .
> ZZ
> AAA
> AAB
> .
> .
> AAZ
> ABA
> .
> .
> ABZ
> .
> AZA
> .
> AZZ
> BAA
> .
> ZZZ
> AAAA
> AAAB
> .
> .
> ZZZZ
> AAAAA
> AAAAB
> .
>
> Any idea?
>
> Bruno
>

```

• Prev by Date: Re: Very very basic question about Mathematica expressions
• Next by Date: Accepting string input with quotes in Manipulate
• Previous by thread: Re: Strange 26base enumeration
• Next by thread: Displaying a list of variables together with their names