This is my guess. Feels a bit... incomplete though.
There must be 12 chairs here so that 4x3 people can sit down. We know that there must be two empty seats between each MD because they each have to be flanked by CA and CS. That means there are 12 places to seat MD1 and the other three are forced into their positions.
For each of those 12 options, the other three MDs have 6 ways to arrange themselves (423, 432, 234, 243, 342, 324).
So that's 72 configurations, I believe? Now for each of those 72 configurations, the CSs and CAs can be in two configurations per MD (CS, MD, CA or CA, MD, CS).
If we represent this configurations as a 4-digit number with 1 representing CS/MD/CA and 2 representing CA/MD/CS. So 1111, for instance, would represent all four companies in the CS/MD/CA configuration and 1122 would mean the first two are in CS/MD/CA and the second two are in CA/MD/CS.
We could have 16 configurations then (1111, 1112, 1121, 1122, 1211, 1212, 1221, 1222, and the same 8 again with 2 as the first digit).
So I would make it 72x16 configurations or 1216 configurations.
Still not sure though. It'd be nice to get a second opinion.
It's a bit tough to do it in one try. There are SO many different kinds of relationships. Just to name a few, you have Linear, Logarithmic, Polynomial, and Exponential.
One of the easiest ways (in method and accessibility) is to put the two columns into Excel and graph them. Line is normally the best unless you have multiple results for the same numbers. Make sure you sort them with the input values going from lowest to highest first! Just look at the graph and see if there's any visible relationship.
I can tell you that I've done this with the data you provided and it looks pretty random, but try it for yourself and see what you think.
Here's one by brother in law likes to tell me.
An American officer and a British infantryman walk into a restroom and up to the urinals (different ones, of course!)
When they're done, the American dutifully walks over to the sinks to wash his hands. The infantryman just starts walking out the exit.
"Hey!" calls the officer after him, "Didn't they teach you how to use a sink in Britain?"
"Nope," the infantryman replies, "they taught us not to pee on our hands."
I was never happy with the supposedly philosophical question "Is the glass half empty or half full?".
It depends on the context really. If the process of filling the glass gets it to that point, then it's half full. If you empty the water from the glass to get to that point, then it's half empty. If the glass just suddenly existed with half it's potential volume of water in it, then I think the better question is "Where did it come from and why is it here?"
Curses! Well that certainly makes it much harder to discern the length of the original string. It might still be doable, but it would require
that when a number is encoded, the result never starts with a 1 or 2. That way you could check if the number begins 1 or 2, if so, isolate the
3 digit code, if not, then isolate the 2 digit code.
I think that if all ASCII characters are potentially allowed (specifically things like .,?!$* etc) that will probably kill off any ability to decode it.
Can you double check the output you gave? I'm assuming that the words are alpha only with upper and lower case. Examples I've tried
so far seem to all produce a 3 digit number for each letter either beginning with 1 or 2. The length of the output you've given isn't
divisible by three.
If I'm right, then I believe there is a method, but it does involve brute force (of a kind). It appears initially that for any given string length
each letter corresponds to a specific number depending upon it's position regardless of the other letters around it. I'd basically have to
calculate a massive lookup table.
Assuming I can deduce the length of the string by len(string)/3, then I can use the lookup table to deduce the values for each 3-digit number.
This is all dependant on the fact that the number you gave is missing a digit or two, though
No, it's fine the way you've done it.
A major step in deciphering it would be to know the total length of the three strings. Even if you were able to deduce that somehow
you'd still be unable to determine what part of the concatenated string is Password0, Password1, and UserName. I thought there was
a clue in the encoding string, but that was before I realised all three strings went into the same variable.
Yes, that's true and I see I forgot to mention why he can't have that label. I'm very sorry about that.
If he did have the Three Blues label, then when we come to Math, his only choices for a label that tell him what he has are One Blue or Two Blues. (No Blues would be useless because he already has one blue!)
If he has the One Blue label, then that would mean he has two blue marbles (but Tom already has two, so he can't!).
So he must have the Two Blues label and has 1 blue marble.
Now Harry goes and gets his two yellows. The only remaining labels are "One Blue" and "No Blues". Either way he would be able to tell what he had in his jar, but the problem says that he didn't know, so that can't be right.
The puzzle starts out saying that there are 4 jars.
We're then told that each jar contains 3 marbles made up of blue and yellow.
Also, the number of blue marbles in each one is different.
We can make some assumptions at this point. For three marbles, there are only 4 different amounts of blue that you can have; 0, 1, 2, and 3.
So somebody has no blue marbles, someone has 1, someone has 2, and someone has 3.
We're now told that there's a label in each that describes the number of marbles incorrectly.
So somebody has a label which says "No blue marbles", "1 Blue Marble", etc
Tom takes out two blues and reads his label and knows the answer immediately. He has the "Two Blue Marbles" label because (if it is indeed wrong) that means that the remaining marble can't be Yellow; it must be blue. Since he was the first to go, this is the ONLY label that allows him to know for certain what he has.
So Tom has 3 Blues and the "Two Blue Marbles" label.
Math takes out a Blue and a Yellow and once again know immediately. The only options for him are two blue marbles or one blue marble. He would then either have the "Two Blue Marbles" label or the "One Blue Marble" label. Since Tom has "Two Blue Marbles", then Math must have "One Blue Marble". Since the label is wrong, it must mean that Math has two blue marbles.
So Math has 2 Blues and the "One Blue Marble" label.
Harry now gets two yellows, but he can't tell what the last one is. The only labels remaining are "Three Blue Marbles" or "No Blue Marbles". If he had the "No Blue Marbles" label, then he would know the last one is a Blue marble, because all the labels are wrong. He must therefore have the "Three Blue Marbles" label.
So Harry has either 0 or 1 blue marbles and the "Three Blue Marbles" label.
Sally doesn't even bother to look. Tom and Math have the 3 and 2 marbles so like Harry she can only have 0 or 1. The only label remaining is "No Blue Marbles", which she would know from seeing the other labels. Since the labels are wrong, then she must have 1 marble.
So Harry has 0 marbles and the "Three Blue Marbles" label.
And Sally has 1 marble and the "No Blue Marbles" label.
Hope that helps?