Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

I asked indirectly a question in Re: Length obfuscation that I'd like to extend here to a wider audience:

Is there a means to obtain the translation seed "n0123.." permutationally?

The translation seed allows to shift any permutational string to the right by one sign. What I mean by permutationally is that you can obtain your result with the help of the function perm() primarily. For example the natural suite "0123..n" can be obtained permutationally by repeating y = perm(x,x) and then y1 = perm(y,x) enough times with y1,y2,etc. for any permutation x. In Re: Length obfuscation I think that with some more efforts, the function comp() could be reduced to a particular composition of calls to perm().

I know it's more a math question than a Perl one but I found that it was not a bad idea to ask for the wisdom of Perl monks - who are used to deal with generic problems of this kind after all. Getting the translation seed permutationally should make a system of permutational functions more efficient.

sub perm { my ($target,$agent) = @_; my @targ = split //,$target; my @perm = split //,$agent; my $res; for (my $i = 0; $i < (@perm); $i++){ $res .= $perm[$targ[$i]] } return $res; }

Comment:

By "permutation" we understand any permutation of the distinct elements pertaining to the natural - or well ordered - suite "01..n". The function perm() above accepts two permutations in the same base n+1 < 11. For this function, "012", "3102", "7465023198", are valid permutations when "013", "3112" or "7465023198A" are not.


In reply to How to get the translation seed? by emilbarton

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (5)
    As of 2015-07-03 20:30 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









      Results (56 votes), past polls