Time 
Nick 
Message 
00:07 

BenBE left #rosettacode 
00:28 

realazthat_ is now known as realz 
00:28 

realz is now known as realzies 
01:00 

BenBE joined #rosettacode 
01:12 

CodeBlock joined #rosettacode 
01:12 

CodeBlock left #rosettacode 
01:12 

CodeBlock joined #rosettacode 
01:19 

realazthat_ joined #rosettacode 
01:21 

realzies left #rosettacode 
01:50 

CodeBlock left #rosettacode 
02:19 

CodeBlock joined #rosettacode 
02:31 

CodeBlock left #rosettacode 
02:37 

parsleyfirefly left #rosettacode 
02:49 

CodeBlock joined #rosettacode 
03:25 

Mathnerd314 joined #rosettacode 
03:57 

realazthat_ is now known as realzies 
04:21 

Mathnerd314 left #rosettacode 
04:58 

Coderjoe left #rosettacode 
05:02 

Coderjoe joined #rosettacode 
05:36 

CodeBlock left #rosettacode 
05:37 

CodeBlock joined #rosettacode 
05:37 

CodeBlock left #rosettacode 
05:37 

CodeBlock joined #rosettacode 
06:40 

mwn3d_phone joined #rosettacode 
08:08 

CodeBlock left #rosettacode 
08:08 

CodeBlock joined #rosettacode 
08:08 

CodeBlock left #rosettacode 
08:08 

CodeBlock joined #rosettacode 
08:23 

CodeBlock left #rosettacode 
08:23 

CodeBlock joined #rosettacode 
08:48 

FireFly left #rosettacode 
10:36 

CodeBlock left #rosettacode 
10:37 

CodeBlock joined #rosettacode 
10:37 

CodeBlock left #rosettacode 
10:37 

CodeBlock joined #rosettacode 
12:16 

MigoMipo joined #rosettacode 
12:25 

parsleyfirefly joined #rosettacode 
13:02 

parsleyfirefly is now known as dagnyscott 
13:19 

dagnyscott left #rosettacode 
13:47 

mwn3d_phone left #rosettacode 
14:10 

mwn3d_phone joined #rosettacode 
14:28 

kpreid left #rosettacode 
14:39 

Mathnerd314 joined #rosettacode 
14:54 

Mathnerd314 left #rosettacode 
15:55 

mwn3d_phone left #rosettacode 
16:01 

realazthat_ joined #rosettacode 
16:01 

realzies left #rosettacode 
16:05 

kpreid joined #rosettacode 
16:07 

CodeBlock_ left #rosettacode 
16:08 

sorear left #rosettacode 
16:14 

sorear joined #rosettacode 
16:14 

realazthat_ is now known as realzies\ 
16:14 

realzies\ is now known as realzies 
16:33 
axisys 
what is the possibility of making an typo in a 8 character alphanumeric word ? 
16:33 
axisys 
s/possibility/probability/ 
16:38 
CodeBlock 
uh 
16:38 
* CodeBlock 
shrugs 
16:40 
axisys 
to make it simple lets say the password contains no special characters.. 
16:40 
axisys 
so 10 digits and 26 alpha characters 
16:41 
axisys 
so the first character will be any of the 36 characters 
16:42 
axisys 
so probability of correct character is 1/36 
16:42 
axisys 
now can I say probability of wrong character is 1/35 ? 
16:42 
axisys 
for the first character that is 
16:59 
axisys 
also, I think probability of making a mistake on one character is higher than probability of making a typo on all characters is higher 
17:00 
crc 
you only have 26 alpha characters if you ignore case 
17:00 
axisys 
so to simplify, if real pin is 5239.. there is a higher chance of typing 5329 than 4716 
17:00 
axisys 
crc: yes.. i am trying to simplify it.. correct.. forgot the case 
17:00 
axisys 
crc: thanks 
17:03 
axisys 
i am trying to establish a argument as to why 6 character password has lower chance of making a mistake over 8 character password 
17:03 
axisys 
making a typo that is 
17:05 

sorear left #rosettacode 
17:11 

p6eval left #rosettacode 
17:14 

sorear joined #rosettacode 
17:19 

p6eval joined #rosettacode 
17:24 
axisys 
so i know it is easy to remember a 2 digit long number than a 200 digit long number.. but how do I prove it with probability ? 
17:45 
kpreid 
there's a human element there 
17:46 
kpreid 
probability has little to say about that; if you wanted to “prove” it you probably need to throw in some cognitive science and information theory 
17:46 
axisys 
kpreid: i know for myself, it is easy to remember a 2 digit number than a 200 digit number.. trying to find out why with probability 
17:46 
kpreid 
(tho the latter is tightly related to probability) 
17:48 
axisys 
in other words.. i have a higher chance to put my 2 digit atm number while withdrawing money than a 200 digit number .. 
17:48 
axisys 
correctly 
17:49 
axisys 
so need to find the probablity  2 digit number has a higher probability to be correct than produce a 200 digit number 
17:49 
kpreid 
right, and the ways in which you *misremember* numbers are complicated 
17:49 
kpreid 
a simple typo, hitting the wrong key physically, is somewhat more approachable 
17:50 
axisys 
yes. that is what I am after.. typo 
17:50 
kpreid 
if you assume that there is probability p of entering a digit *correctly* (and therefore 1p of entering incorrectly), 
17:50 
kpreid 
and there are n digits, 
17:50 
kpreid 
then you have a p^n chance of getting it right. 
17:50 
kpreid 
(and therefore 1  p^n of getting it wrong) 
17:51 
axisys 
but.. now I need to factor in the lenght of the PIN 
17:51 
kpreid 
yes, that is what n is 
17:56 
axisys 
so if the PIN is all digits.. then p is 1/10 (grossly simplifying human factor) 
17:56 
axisys 
? 
17:56 
kpreid 
that would be if you were entering digits at random 
17:57 
axisys 
ok 
17:57 
kpreid 
so a 2digit code gives you (1/10)^2 = 1/100 
17:57 
kpreid 
which is of course exactly right because there are 100 2digit codes from 00 to 99 
17:58 
kpreid 
but you're *not* entering digits at random, so, sticking with a very simple model it's more in the neighborhood of 9/10 
17:58 
axisys 
kpreid: gotcha 
17:58 
kpreid 
(not because of any 10ness, it's just large) 
17:59 
axisys 
kpreid: so 1/100 is the chance of typing it correctly ? 
17:59 
kpreid 
sure, if you were entering digits completely at random 
17:59 
axisys 
or incorrectly? 
17:59 
axisys 
yes.. lets say it is random.. 
17:59 
kpreid 
there are 100 possible codes so if you pick one uniformly you get a 1/100 chance 
17:59 
kpreid 
there are no parameters here except the number of codes 
18:00 
kpreid 
but that is *COMPLETELY DIFFERENT* from the question of making mistakes in a code you *do* know. 
18:01 
axisys 
do know problem like this or similar, that is discussed somewhere? i could look in wikipedia I guess 
18:03 
kpreid 
hm, well, the formula I gave you is related to the cdf of the http://en.wikipedia.org/wiki/Geometric_distribution but I don't know of a good intro point on wikipedia 
18:03 
fedaykin 
"Geometric distribution  Wikipedia, the free encyclopedia" http://rldn.net/FSr 
18:04 
kpreid 
axisys: I'd recommend picking up any book on elementary statistics you can find 
18:04 
axisys 
kpreid: ok.. time to hit the book store.. thanks 
18:04 
kpreid 
or library :) 
18:05 
axisys 
kpreid: there is a borders close by me.. but sure 
18:06 

CodeBlock_ joined #rosettacode 
18:12 
axisys 
i am trying to find out how much probability increase in typo .. if I have to type 8 characater long passwords instead of 6 character long password.. but it does not look like (1/36)^6 is much different than (1/36)^8 .. heh 
18:13 
axisys 
ofcourse grossly simplified p 
18:13 
sorear 
The difference is (1/36)^2. 
18:14 
sorear 
Which is approximately 0.0008. 
18:14 
axisys 
sorear: yep.. not much difference ... part of it is I am grossly simplifying the p 
18:16 
axisys 
i am pretty sure memory pressure will be higher to remember a longer number.. like kpreid mentioned earlier, factoring that human factor will be complicated 
18:16 
kpreid 
axisys: you're computing the wrong number 
18:16 
kpreid 
that is if you are RANDOMLY CHOOSING DIGITS TO TYPE. 
18:17 
kpreid 
that is completely unrealistic; that's more like trying to bruteforce a password you don't know. 
18:17 
kpreid 
axisys: for any given digit, the probability is close to 1 that you will get it right, not close to 0 
18:18 
axisys 
kpreid: oh ok.. like you mentioned 9/10 for 10ness 
18:18 
axisys 
not 1/10 
18:18 
kpreid 
no 
18:18 
kpreid 
I said 9/10 was *NOT* about 10digits 
18:18 
kpreid 
it was just an arbitrary figure close to 1 
18:18 
axisys 
kpreid: gotcha 
18:18 
kpreid 
realistically it would be more like, oh, 19/20 
18:19 
axisys 
kpreid: how.. (learning) 
18:19 
kpreid 
axisys: well, how often do you make mistakes entering one digit? 
18:20 
axisys 
rarely.. specially when I have typed the same passowrd for about 90 days .. that is when we need to change password 
18:20 
kpreid 
well, *how* rarely? 
18:20 
kpreid 
let's say you've entered the password 100 times 
18:20 
kpreid 
and you made a mistake 3 times 
18:20 
axisys 
ok 
18:20 
kpreid 
that means your probability (based on that evidence) of making a mistake again is 3/100 
18:21 
kpreid 
therefore your probability of *not* making that mistake is 97/100 
18:21 
axisys 
gotcha 
18:21 
kpreid 
now, actually, given what I just said that figure is the overall result, not perdigit 
18:21 
kpreid 
that is, 97/100 = p^n 
18:22 
kpreid 
then p is the perdigit figure 
18:22 
kpreid 
so p = (97/100)^(1/n), p is the n'th root of 97/100 
18:22 
axisys 
i follow 
18:23 
kpreid 
if n is 6, then p is around 0.9949 
18:23 
kpreid 
if n is 8, then p is around 0.9961 
18:23 
kpreid 
not a whole lot different, but you asked about 2 vs 200 
18:23 
kpreid 
and this is backwards anyway 
18:23 
axisys 
kpreid: correct 
18:24 
kpreid 
so assume p is 0.995 (that is, you can enter a 6digit pwd correctly 97/100 of the time) 
18:24 
kpreid 
then 0.995^2 for 2 digits is about 0.99, you'll make a mistake only 1/100 of the time 
18:24 
kpreid 
0.995^200, on the other hand, is about 0.366 
18:25 
kpreid 
which is a lot closer to making a mistake 2/3 of the time 
18:25 
kpreid 
but in practice, this is an oversimplified model 
18:25 
kpreid 
you're not going to make singledigit errors on a 200digit password, you're going to *not remember most of it* 
18:28 
axisys 
correct! 
18:28 
kpreid 
so this simple model does not actually reflect reality in that extreme case. 
18:28 
axisys 
kpreid: no.. 
18:29 
sorear 
In practice, if you give someone a 200digit passcode, they will not remember any of it, and you'll have around 0.995 or 0.999 success rates because people will make random errors typing in the password off the piece of paper on their desk 
18:29 
axisys 
kpreid: i will stick with reality ... we need to decide if we make the user to remember a 6 a+n char .vs. 8 a+n char 
18:30 
axisys 
sorear: :) .. exactly 
18:30 
kpreid 
oh, if you're giving people passwords... 
18:30 
axisys 
kpreid: we let them to make it.. but we are deciding on the length 
18:30 
sorear 
axisys: look into a piece of software called 'pwgen' 
18:31 
axisys 
sorear: i have it in my ubuntu 
18:31 
axisys 
sorear: just ran it.. it creates tons of 8 digit pass 
18:31 
axisys 
sorear: it has lots of switches 
18:35 
kpreid 
ah 
18:35 
kpreid 
axisys: I often use 12character passwords, but they're not completely random strings 
18:35 
kpreid 
if you have a password like 'ginhelliorotonor' (I just made that up) then it has got plenty of randomness relative to even a fancy dictionary attack, but it is easier to remember (for me at least) than random characters because it sounds like a word 
18:35 
kpreid 
Mac OS X's password tools come with an implementation of FIPS181, a standardized password generator algorithm, which I use for when I need to make up a password 
18:35 
kpreid 
I just looked up and the actual standard seems to be notdirectlyavailableforfree but perhaps you could rummage it up somewhere if you're interested 
18:35 
kpreid 
my main point is that it's possible to improve memorability while still having plenty of entropy 
18:44 
axisys 
kpreid: if I can go back to the comment you made earlier 
18:44 
axisys 
14:22:21 <@kpreid> that is, 97/100 = p^n 
18:44 
axisys 
we assumed 3 times make mistakes out of 100 tries 
18:45 
axisys 
that is because the PIN is 4 digit long 
18:45 
axisys 
if the PIN were 8 digit long I don't know how many mistakes will I make 
18:45 

kpreid left #rosettacode 
18:45 
axisys 
so I could not say 3 mistakes out of 100 tries 
18:46 
axisys 
so I need to factor in 4 digit pin .vs. 8 digit pin 
18:46 

kpreid joined #rosettacode 
18:54 
sorear 
take the chances of success at 4, and square it 
18:54 
sorear 
convince yourself of why this is so. 
18:58 
axisys 
(97/100)^(1/4) = 0.9924 
18:58 
axisys 
0.9924 ^ 2 = 0.98488578 
19:02 
sorear 
no, (97/100)^2 = ? 
19:02 
sorear 
or 0.9924^8 = ? 
19:03 
sorear 
protip: for nx << 1, (1  x) ^ n ~= 1  nx 
19:03 
axisys 
(97/100)^2 = 0.940899 
19:04 
axisys 
0.9924^8 = 0.940792929 
19:04 
axisys 
almost same.. got it 
19:05 

FireFly joined #rosettacode 
19:06 
axisys 
sorear: thanks for that hint. 
20:00 
axisys 
sorear: what is x ? is it probability ? 
20:01 
axisys 
ok nx << 1 
20:01 
axisys 
what is << ? 
20:01 
axisys 
< is less than <= is less than or equal 
20:02 
sorear 
<< is mathematicianspeak for "much less than" 
20:02 
axisys 
sorear: ok 
20:02 
sorear 
1 << 100 
20:02 
sorear 
0.999 ^ 5 = (1  0.001) ^ 5 is about 0.995 = (1  0.001 * 5) 
20:03 
axisys 
i see 
20:03 
sorear 
the actual answer is 0.995009990004999 
20:04 
sorear 
now if you have 0.9 ^ 9 = (1  0.1) ^ 9, you can't use that approximation because 0.1 * 9 is not much less than 1 
20:04 
axisys 
sorear: i see 
20:04 
axisys 
sorear: is that a theorm as well? 
20:05 
axisys 
sorear: or just observation? 
20:05 
sorear 
this approximation can be derived by the technique of "ignoring second order infinitesimals" 
20:05 
sorear 
if you have (1  x) * (1  y) where x and y are both much less than 1 
20:06 
sorear 
then the product is 1  x  y + x*y 
20:06 
sorear 
however, since x and y are much less than 1, x*y is much smaller than either x or y, so it can be ignored "to first order" 
20:06 
sorear 
thus 1  (x+y) 
20:06 
axisys 
gotcha! 
20:06 
sorear 
going from that to 1  x*n is just induction 
20:06 
axisys 
make sense 
20:07 
axisys 
sorear: yep 
20:07 
sorear 
it's not really a theorem because "x*y is small enough to ignore" is not formal language 
20:09 
sorear 
another way to derive the approximation is to expand e^x and ln(x) as Taylor series around x = 1, giving to first order x + 1 and x  1 respectively 
20:10 
sorear 
then (1  x) ^ n = e^(ln(1  x) * n) ~= 1 + (x * n) 
20:12 
axisys 
i forgot the relation between e and ln 
20:13 
axisys 
its been a while 
20:13 
sorear 
e^(ln x) = x 
20:14 
sorear 
also I made a slight error  the Taylor series for e^x is being expanded around x = 0 there, not x = 1 
20:15 
axisys 
if x = 0 , ln x = ? 
20:17 
sorear 
Inf 
20:27 

gwern joined #rosettacode 
20:27 

gwern left #rosettacode 
20:29 

mbishop left #rosettacode 
20:32 

mbishop joined #rosettacode 
20:37 
axisys 
ok..so ln x = 0 when x = 1 
20:38 
axisys 
so e^0 = 1 
20:39 
sorear 
yes, 
20:39 
sorear 
. 
20:43 
axisys 
how is this e^(ln(1  x) * n) ~= 1 + (x * n) ? 
20:43 
axisys 
when x << 1 
20:43 
sorear 
Are you familiar with Taylor series? 
20:44 
axisys 
sorear: hmm.. probably not anymore .. been a while.. studied in EE .. thats a while while ago 
20:44 
axisys 
sorear: :) 
20:45 
sorear 
e^x = 1 + x + x^2/2! + x^3/3! + x^4/4! + x^5/5! + ... # Does this look familiar? 
20:46 
axisys 
sorear: it does! 
20:47 
sorear 
to first order in x we can say e^x =~ 1 + x 
20:48 
sorear 
there's something called "Taylor's theorem" that can quantify the error, but I don't know how to use it 
20:48 
sorear 
likewise ln(x) can be expanded in powers of (x  1) and approximated as (x  1) to first order 
20:49 
sorear 
ln(x) can't be expanded as powers of x because the first term would have to be infinite 
21:05 

mwn3d_phone joined #rosettacode 
21:09 

mikemol left #rosettacode 
21:20 

MigoMipo left #rosettacode 
22:25 

dagnyscott joined #rosettacode 
23:09 

FireFly left #rosettacode 
23:17 

realzies is now known as realazthat 