Re: random letter software
From: Micheal Artindale (micheal.artindale_at_sympatico.ca)
Date: 02/27/05
- Next message: Wolf Kirchmeir: "Re: Epistemology 201: The Science of Science"
- Previous message: Willem: "Re: [XPOST] A unique number for every "person" - can it be done?"
- In reply to: mensanator_at_aol.compost: "Re: random letter software"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 27 Feb 2005 15:41:50 -0500
<mensanator@aol.com> wrote in message
news:1109488596.306325.58380@z14g2000cwz.googlegroups.com...
> Micheal Artindale wrote:
> > I am looking for a software program that would give me random letter
> set.
> >
> > I would start with 8 letters a-h, and i would like it to create a
> list of
> > all the possible 6 letter combinations. Each letter can be repeated,
> but not
> > side by side... eg abahac would be ok, but aabahc would not.
> >
> > Is this possible with either corel suite, or MS office?
>
> Yes, you can do it in MS-Access or any other SQL database.
> But it can become unwieldy if you ask for too large an output.
> There are 262,144 possible 6-letter words that can be created
> from 8 letters. The non-duplicate adjacent letter restriction
> reduces this 134,456 words, so the specific case you asked for
> is easily handled. If you wanted to use all 26 letters, the
> unrestricted number of words would be 308,915,776 which
> would probably not be practical even when restricted.
>
> >
> > How do i do it?
>
> Create a Table (t) with 1 text field (r) of length 1.
>
> Populate the table:
> a
> b
> c
> d
> e
> f
> g
> h
>
> Create a Query (q) having SQL code:
> SELECT [t].[r] & [t_1].[r] & [t_2].[r] & [t_3].[r] & [t_4].[r] &
> [t_5].[r] AS r6
> FROM t, t AS t_1, t AS t_2, t AS t_3, t AS t_4, t AS t_5
> WHERE (((t_1.r)<>[t].[r]) AND ((t_2.r)<>[t_1].[r]) AND
> ((t_3.r)<>[t_2].[r]) AND ((t_4.r)<>[t_3].[r]) AND
> ((t_5.r)<>[t_4].[r]));
>
>
> Output of q:
>
> bababa
> cababa
> dababa
> eababa
> fababa
> gababa
> .
> .
> .
> chghgh
> dhghgh
> ehghgh
> fhghgh
> ghghgh
> <134456 records>
I got it to work....but its tooooo huge.
I would like to refine it to 50,000 or less.
So, 2 of my ideas are, each letter combination would not repeat itself. Each
letter can only repeat once.
So a few would not exist, like ababab, or abcabc, but abcbac could exist.
What would be the code? and, could you explain what the parts cover, so that
if i would like to change it, i know what each will do.
Thanks,
Micheal
- Next message: Wolf Kirchmeir: "Re: Epistemology 201: The Science of Science"
- Previous message: Willem: "Re: [XPOST] A unique number for every "person" - can it be done?"
- In reply to: mensanator_at_aol.compost: "Re: random letter software"
- Messages sorted by: [ date ] [ thread ]