Berkeley CSUA MOTD:Entry 24687
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/07/10 [General] UID:1000 Activity:popular
7/10    

2002/5/3-5 [Science/GlobalWarming, Computer/SW/Languages] UID:24687 Activity:high
5/2     Math people: if I have a password generator that doesn't generate
        any collsions in 1,000,000 runs, is there a way to estimate a lower
        bound on the size of the space with a certain confidence?
        \_ yes.  Lower bound of 1,000,000.
        \_ You expect a collision at about \sqrt{n} trials, if there are
           n elements in your space. See birthday paradox. -chialea
           \_ What chialea means to say is that, if you trust it to be using
              reasonably strong random bits (which aren't, for instance, cyclic
              and loop in a cycle of length 1,000,001), there's good reason
              to expect the space size to be >=1e12. However, there are
              many real-world issues that would make this analysis null and
              void, and to actually get statistical confidence intervals
              on it, you'd need to assume quite a bit about the world, and
              then talk to somebody who knows more statistics than I. -alexf
              \- hola i havent done the math but is there a rule of thumb
              that says "for n buckets with equal/indep probability, the
              number of instaces to have say 50% collsions is some f(n)"?
              withthe birthday problem it's 365 with close enough to
              equal probability to hit 50% collision chance at 24 or 28
              [i forgot the number] ... i am wondering about a rule of
              thumb like the "rule of 70" on interest rate doubling, or
              say even stirling formula for n! --psb
              \_ I found a web page that said it's about 1.2*sqrt(n).
                 Using Stirling's formula and a Taylor series for ln,
                 I get that the constant in front is sqrt(2*ln(2))
                 which is about 1.1774. Details left to the reader -lewis
                 \_ URLp
                 \_ constants are for sissies
              \_ Thanks alex, that's indeed what I meant. I blame it all on
                 e190! -chialea
2025/07/10 [General] UID:1000 Activity:popular
7/10    

You may also be interested in these entries...
2014/1/14-2/5 [Computer/SW/Languages/C_Cplusplus] UID:54763 Activity:nil
1/14    Why is NULL defined to be "0" in C++ instead of "((void *) 0)" like in
        C?  I have some overloaded functtions where one takes an integer
        parameter and the other a pointer parameter.  When I call it with
        "NULL", the compiler matches it with the integer version instead of
        the pointer version which is a problem.  Other funny effect is that
        sizeof(NULL) is different from sizeof(myPtr).  Thanks.
	...
2010/8/12-9/7 [Computer/SW/Languages] UID:53921 Activity:nil
8/12    Judge Walker denies Stay. Prop 8 null and void from next Wednesday:
        <DEAD>ecf.cand.uscourts.gov/cand/09cv2292<DEAD>
	...
2010/3/8-30 [Computer/SW/Unix] UID:53745 Activity:nil
3/8     I have a mod_rewrite question that I think should be straight-
        forward but I think I'm not getting something.
        I have a virtual server with some root, say /home/user/public_html/
        and in there I have two subdirs, say /app1/ and /app2/
        and i want the following:
        http://mysite/app1   -->   /home/user/public_html/app1
	...
2009/8/27-9/9 [Computer/SW/OS/Windows] UID:53306 Activity:nil
8/27    '"Fatal flaw" in Windows 7 raising eyebrows'
        http://tech.yahoo.com/blogs/null/146995
        \_ stupid journalism. --mac user
	...
2009/4/30-5/6 [Computer/Theory] UID:52923 Activity:nil
4/30    Sorting question!  I have n sorted arrays of doubles.  What's the
        fastest way to sort them into 1 big sorted array?
        \_ as mentioned below: you are describing one half of mergesort
        \_ You really have to ask this question?
           \_ You don't know either, huh?
        \_ If three are n sorted arrays of m doubles each, I think the fastest
	...
2009/4/24-28 [Computer/SW/Languages/Functional] UID:52902 Activity:nil
4/23    what book is this?
        "I'm reading this horrible horrible book about a programmer
         from silicon valley that gets magically
         transported into some world where magic is real
         and uses computer programming skillz to become the world's
         greatest sorceror … in book 1 of the series
	...
2009/3/29-4/3 [Computer/HW/Laptop, Science/GlobalWarming] UID:52768 Activity:high
3/29    "Leaving computers on overnight = $2.8 billion a year"
        http://tech.yahoo.com/blogs/null/130078
        \_ Not good for hardware to power it up and down all the time. I
           always leave all my computers on all the time, except for
           laptops which I allow to sleep (but still be powered).
           \_ How is this the case for desktops but not laptops?  I don't see
	...
2009/1/26-2/1 [Computer/SW/SpamAssassin] UID:52462 Activity:nil
1/26    Can somebody show me a procmail rule which drops email from
        users {foo, bar, baz}@{host1,host2,host3}.berkeley.edu.
        I dont want to have to create a rule set like this for
        each combination:
        :0:
        * ^From: cfengine@host.berkeley.edu
	...
2009/1/21-26 [Computer/SW/Languages/Java, Computer/HW/Memory] UID:52436 Activity:nil
1/21    If I have a linked list of structs and many of those structs have
        members that are structs then what is the best way to free() the
        memory when I am done with them? I thought I would walk the list
        and do a free() on each member of each struct, but that generates
        errors like free(): invalid pointer, presumably because I don't
        always allocate memory in each struct. No, I never took a class in
	...