My question arose from learning about encryption (format preserving) and some people are using regular expressions to encrypt strings, so what they do is define a format using regular expression that the strings must follow, create a DFA or NFA for that regex, 'rank' something about the DFA...
Yes that's right. How is this accomplished using only the finite automata?
Also I realize some regex may represent infinite set of strings, however say we are not dealing with the infinite. Say we pose a restriction on max length that the strings can be. So we only enumerate the strings...
No I mean even before obtaining the regular expression. Can anything about the DFA provide you an instance of a string? Does the DFA in any way enumerate all possible string possibilities? Is there anything that does - without having to build all possibilities yourself by iterating over all...
Will this correspond to one and only one possible string (from the total of all possible permutations of the characters) defined by the regular expression?
Taking a regular expression and converting it to a DFA with transition table, can you go backwards? I.e. take one of the rows of the table and determine what input string would be accepted for that row?
It will operate on numbers only not alphabetics, where the number represents the entire string (not individual characters within it - I'm not sure if that answers your question.
Thank you for describing how to get the number as it is represented in positional notation. That was the final step.
Since I don't have my encryption function developed yet, I just made that number up, so 221 is just a hypothetical result of the encryption in the range between 0 and 7N - 1
Yes that's correct, sorry. I'll edit my post to remove the extra character H from the sequence. (Or if someone can do it for me since it seems the edit option is no longer present)
So did I do the calculation correctly?
I think I understand now, I'll explain further what I'm trying to do, can you tell me if I'm on the right track?
I'm trying to encrypt strings of alphabetic characters using format preserving encryption.
So say my vocabulary of strings consist of only these 7 characters A,B,C,D,E,F,G, where...
Sorry guys I forgot the subscripts on my numbers to indicate what base they are in.
I'm not interested to convert form one base to another. I'm staying in the same base (say base 42) and I want to reconstruct the positional notation that was used to get the number. Is that possible?
So...
In positional notation, say I have a number like this in base- 10
73901=7×104 +3×103 +9×102 +0×101 +1×100
it's pretty obvious how to go back and forth from the number to positional notation.
So if someone gave me a new number like 234 I can easily know
23410 = 2×102 + 3×101 + 4×100
However...
I understand that it wanders, and I have the model to calculate the correct position of geomagnetic pole at a given time.
WHat i need to do it plot the points of magnetic latitude and longitude on a map. So I'm trying to transform them into geographic coordinate system.
Anyway I found the...
For a circle of latitude on the Earth centred on the magnetic pole, how do I represent that in geographic coordinates (lat and long), centred on the geographic pole?
Does anyone know how to calculate Magnetic Local Time for a position on earth, given the current Universal Time, and the position in Geomagnetic latitude/longitude?