Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Txet Maglning Glof, Ayobndy?

by tlhf (Scribe)
on Sep 16, 2003 at 16:39 UTC ( #291874=note: print w/replies, xml ) Need Help??

in reply to Txet Maglning Glof, Ayobndy?

This was my effort:
perl -pe 's|(\w)(\w+)(?=\w)|$1.join"",sort{rand 2}split//,$2|ge' 12345678901234567890123456789012345678901234567890123 10 20 30 40 50 Edit: perl -pe 's|\B(\w+)\B|join"",sort{rand 2}split//,$1|ge'

The golf has more perceptually random results than the other variants posted here which are shorted than it. It doesn't have an even distibution of results tho; words longer than 5 characters have certain permiatations which are more likely to come up. There's an example in the <readmore>.

Permiatations of the world "abcdef", and the likelyhood based on testing of it occuring rounded to fractions:

abcdef: 1/ 8
abcedf: 1/ 8
acbdef: 1/ 8
acbedf: 1/ 8
adbcef: 1/32
adbecf: 1/32
adcbef: 1/32
adcebf: 1/32
adebcf: 1/16
adecbf: 1/16
aebcdf: 1/32
aebdcf: 1/32
aecbdf: 1/32
aecdbf: 1/32
aedbcf: 1/16
aedcbf: 1/16


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://291874]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2021-09-24 00:49 GMT
Find Nodes?
    Voting Booth?

    No recent polls found