PDA

View Full Version : kombinations


Sariaht
Aug28-04, 06:51 AM
All n-variable combinations can exist within a word;
n=1 | a
n=2 | ab
n=3 | cabca

Is the fourth shortest word cabdcabcdabcadbca, and how long is the n:th word?

Hurkyl
Aug28-04, 07:45 AM
n=2 | ab

What about ba?

n=3 | cabca

Or bac?

Sariaht
Aug29-04, 08:53 AM
backwards cab = bac

matt grime
Aug29-04, 08:57 AM
so backwards is permissible, why isn't any other random ordering also equivalent? (ie, exactly what is the full question you want the answer to, seeing as you've given us incomplete information?)

Sariaht
Sep20-04, 06:02 AM
I ment all permutations, but i hoped i could avoid that word

matt grime
Sep20-04, 06:31 AM
that still doesn't make it a well formed question though.

DeadWolfe
Sep21-04, 05:12 AM
Dude, what the hell are you saying?

matt grime
Sep21-04, 06:16 AM
well, if that's aimed at me, cab counts as the same string as bac for this question, now what other strings are identified with bac? sariaht's answer is "all combinations", but that means surely that the answer for a,b,c is abc, ssince that contains all strings of length 3 up to all permutations.

TenaliRaman
Sep21-04, 09:37 AM
the question as i see it .... i will try to rephrase it ....
U have a machine suppose that can read from a strip of letters forward as well as backward but only continuous group of n letters ....
Given letters a,b,c
find the smallest strip of letters such that the machine can get any combination of abc from that?

e.g given by sariaht for 3 letters,
cabca -- length of 5

Question now asks to find the smallest strip length for n letters.

-- AI

Sariaht
Sep28-04, 08:07 AM
Exactly!

What is the smallest word with all permutations of n variables?

matt grime
Sep28-04, 08:46 AM
and as we keep pointing out, your examples do not contain all possible permutations

n=2 ab doesn't contain ba, for instance, however you say this doesn't matter since ba is ab backwards, so what other permutations are equivalent to abc, say? only cba? why not acb? what particularly odd an arbitrary rules do you have that you're not telling us


edit: just read two posts back, so fowards and backwards are the only permissible variations? fine.

TenaliRaman
Sep28-04, 08:54 AM
Sariaht,
i haven't given this much thought but i think i get,
::n!/2 + n - 1::

Actually i have assumed something in my logic here , i will put my logic later if i get the time to actually prove my assumption.

-- AI

Gokul43201
Sep28-04, 08:59 AM
I think Tenali's right.

That would be my guess too.

Sariaht
Sep28-04, 12:14 PM
what!!?

Have I misunderstod the meaning of permutations?

Yes I have, sorry!

What is the smallest word with all n letters long permutations of n variables?

TenaliRaman
Sep28-04, 01:35 PM
LOL!
the proof of the assumption i made was so damn easy ....
man it skipped my visualisation for such a long time ....
So if my answer is right, i won't give it away just now ......
:wink:

-- AI

matt grime
Sep29-04, 03:41 AM
Here's how you start it:

write out abcd...e whatever the n letters are. then cycle through by putting the abcd.. after it. pick a permutation you've not got, repeat, count and leave this question alone, please.

Sariaht
Sep30-04, 12:20 PM
Wonder if you can mathematically calibrate the length of the word.

matt grime
Sep30-04, 02:26 PM
what does calibrate mean in this context, and what;s wrong with the metric 'number of letters in the word'?

Sariaht
Oct1-04, 05:24 AM
The number of letters x you need must be a function of the number of variables n.
What is that function f(n) = x

Not that it makes a difference

Sariaht
Oct5-04, 07:07 AM
Oh, i see: n!/2 + n - 1

Then I know, thanx a lot!

I couldn't see your answer somehow...

But that cannot be right, n = 4 gives 15, but the word is 17 letters long

1 1
2 2
3 5
4 17
5 ?

TenaliRaman
Oct5-04, 11:13 AM
obviously the assumption i had made was a mistake ....
which i later realised unfortunately ....

i will have to give it some more thoughts , i will post something if i get somewhere

-- AI

Sariaht
Oct13-04, 12:23 PM
You could call these words keys to dissordered words by the way.