Re: I Need Help
- From: Michael Press <rubrum@xxxxxxxxxxx>
- Date: Thu, 03 May 2007 03:31:07 GMT
In article
<1177974276.014681.266200@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"mensanator@xxxxxxxxxxx" <mensanator@xxxxxxx> wrote:
On Apr 30, 4:05 pm, OwlHoot <ravensd...@xxxxxxxxxxxxxx> wrote:
On Apr 30, 8:10 pm, "mensana...@xxxxxxxxxxx" <mensana...@xxxxxxx>
wrote:
On Apr 30, 3:33 am, OwlHoot <ravensd...@xxxxxxxxxxxxxx> wrote:
On Apr 30, 4:03 am, "mensana...@xxxxxxxxxxx" <mensana...@xxxxxxx>
wrote:
On Apr 29, 5:17?pm, aelha...@xxxxxxxxx wrote:
I Need Some Algorithm To finding all possible combinations of M
different symbols
like A B C
A A B B C C
B C A C A B
C B C A B A
Start an Access database. Make a table and put in it
each symbol as a record (three records in this example).
Now make a query and put in it as many copies of the
table as there are places in the output (six in the example
given).
Make sure you don't link any of the tables!
Run the query and the database will create the Cartesian
Product of the 6 tables copies.
Voila.
There's a much simpler way than that.
Really?
It's explained in
"Constructive Combinatorics" by Stanton.
If no one else explains it, I'll dig out my copy and post
a summary.
Summary? I thought you said it was much simpler?
How much simpler can you get than
SELECT T_5.c, T_4.c, T_3.c, T_2.c, T_1.c, T.c
FROM T, T AS T_1, T AS T_2, T AS T_3, T AS T_4, T AS T_5;
That may look simple,
Looks alone don't make it simple. It's directly executable by
the Jet engine, THAT"S what makes it simple.
but behind the scenes there's a hell of a lot
going on and, quite possibly, huge amounts of memory being used
for temp tables and so forth.
Oh? And what takes place "behind the scenes" of a Pascal or C
compiler? Why does the "behind the scenes" activity count for
the Jet engine but not for other implementations?
Also, what if a database is not available?
And what if you don't have a Pascal compiler or a C compiler?
Or have them but don't know how to use them? You're just as
***-outta-luck.
In short, it's nice in principle, but in practice pathetic.
I never said it was the BEST algorithm.
What you provide is not an algorithm, and an algorithm is what the
original poster asked for. Therefore you do not provide an answer.
That wasn't the question.
And besides, MS-Access can't execute Pascal or C. And even if it
could, you sometimes need such output in a query to link to other
database structures, so the practice isn't nearly as pathetic
as you imagine. Of course, it's intractable if you ask for too much,
but you think a C implementation isn't also intractable if you ask
for all possible 12 letter permutions of 26 letters?
An algorithm is not written in any particular language.
--
Michael Press
.
- Follow-Ups:
- Re: I Need Help
- From: mensanator@xxxxxxxxxxx
- Re: I Need Help
- References:
- Re: I Need Help
- From: mensanator@xxxxxxxxxxx
- Re: I Need Help
- Prev by Date: Orthogonal polynomials
- Next by Date: Re: Orthogonal polynomials
- Previous by thread: Re: I Need Help
- Next by thread: Re: I Need Help
- Index(es):