Apparently for $p_i\in [0,1)$, it's true that $\prod_i (1-p_i)=0 \Leftrightarrow \sum_i p_i=\infty$.  How can I prove this using Borel-Cantelli? I've said that $p_i = P(X_i=1)$ for some sequence $X_i$ where $X_i$'s are all $0-1$ valued. If $\sum_i p_i=\infty$, then $X_i=1$ infinitely often, so it's impossible for $X_i=0$ for all $i$. Thus $\prod_i (1-p_i)=0.$  But how do I prove the reverse step?
This is supposed to be related to the  (my justification for the independence tag). In Williams' Probability with Martingales, 2BCL is proven and then the following is given as an exercise:  Prove $S \doteq \sum_{n=1}^\infty p_n &lt; \infty \implies \prod_{n=1}^\infty (1-p_n) &gt; 0$ assuming $0 \leq p_n &lt; 1$. Hint: Show that $S &lt; 1 \implies \prod_{n=1}^\infty (1-p_n) \geq 1 - S$.   Proving the hint: I tried to find $\{a_n\}$ s.t. $$\prod_{n=1}^\infty (1-p_n) \geq \prod_{n=1}^\infty e^{a_n} = e^{\sum_{n=1}^\infty a_n} \geq 1 - \sum_{n=1}^\infty a_n \geq 1 - S &gt; 0$$ That is, find $\{a_n\}$ s.t.: 1a. $1 - p_n \geq e^{a_n}$ 1b. $a_n \leq p_n$ I thought of $a_n = \ln(1-p_n)$ (a reason why $p_n &lt; 1$, I guess) Is that right? Edit: Actually, assuming my proof is right, is $S &lt; 1$ used in the proof? If so, where?  From Williams book:
How to get first N elements of a list in C#? I would like to use Linq to query a bus schedule in my project, so that at any time I can get the next 5 bus arrival times. How can I limit my query to the first 5 results?  More generally, how can I take a slice of a list in C#? (In Python I would use mylist[:5] to get the first 5 elements.) Can I just fit a cassette with more gears with the same derailleur? I've got a Boardman Road Sport which I use for commuting and doing reasonable length rides during the week etc. I have Shimano Claris as my rear derailleur and so is some of my groupset. I would like to upgrade my cassette to an either 9 or 10 speed to give me a greater variety of gears. To do this do I need to change my rear derailleur from 8 speed to Shimano 105 or something similar? Or can I just change my cassette? Do I also need to change my shifters as well? I'd like to implement a big int class in C++ as a programming exercise&mdash;a class that can handle numbers bigger than a long int.  I know that there are several open source implementations out there already, but I'd like to write my own.  I'm trying to get a feel for what the right approach is.  I understand that the general strategy is get the number as a string, and then break it up into smaller numbers (single digits for example), and place them in an array.  At this point it should be relatively simple to implement the various comparison operators.  My main concern is how I would implement things like addition and multiplication.  I'm looking for a general approach and advice as opposed to actual working code. $a,b,m,n$ be positive integers such that g.c.d.$(a,b)=1$ and $a^m+b^m|a^n+b^n$ , then $m|n$? Let $a,b,m,n$ be positive integers such that g.c.d.$(a,b)=1$ and $a^m+b^m|a^n+b^n$ , then is it true that $m$ divides $n$ ? Looking for Anime with a prince faking being mentally handicapped hiding a giant mech suit wreaking havoc This is all I can remember.  There are four worlds whose people and technology were all swapped so humans ended up with high tech mech suits that they used to kill each other. There was a supposedly handicapped prince who faked being mentally handicapped and had a giant mech suit hidden underground that he eventually used to wreak havoc on earth.  The protagonist also had a suit and he saved the day. He was in love with a girl who was from another world and when he saved the day, all the people and technology from the different worlds were sent back to their original one causing the girl to leave him. She had colored hair and the final scene was her waking up somewhere with some children commenting on her hair.  There may or may not have been a reference to the protagonists scars in the shape of the constellation of orion on his body.  Any ideas? I've searched the internet for two years trying to find it. I use a Asus laptop with dual-boot Ubuntu and Windows 8.1  Wifi is on but I am not able to detect Wifi networks.  When I run :  lspci -knn | grep Net -A3; rfkill list   This is what happens:    I get  acer-wireless: Wireless LAN     Soft blocked: yes Is there an GUI Designer for python? Is there a GUI IDE for programming python just like java has netbeans?  I wanted one where we could drag &amp; drop test boxes &amp; labels just as we do in swing components using netbeans or eclipse.  Or is there an add-on present in either netbeans or eclipse itself? I am a newbie in linux. I wanted to install ubuntu to my desktop. I currently have two partitions, Windows 8 in installed on one, and i have some important files in another partition. While installing ubuntu, if I chose "Replace Windows 8 with Ubuntu", do I lose the other partition too?   And are there other ways to leave the other partition as it is, and install ubuntu in the partition  where windows was installed. I won a Samsung Galaxy S6 Edge, signed into it with my Google account, played around with it, wiped it, and sold it.  Now the person can't get past setup because it's saying he must login with an account previously synced to the phone.   Is there anything I can do from my side to remove this lock? Compact subset in colimit of spaces Why can't I edit attribute table imported through 'text as layer' I imported the coordinates from an Excel table. They show as single points as intended. Now I want to add columns to the attribute table, but I'm not able to edit it. I wanted to import the following columns from Excel as well, but that doesn't seem to work either.  Sorry for the noob-question, but I couldn't find anything relating the theme through google and such.  Ok, with pictures then: I want to use that to add columns with information to these       You see, the small pensil thingy is greyed out, so I can't edit anything in this layer and I can't add any information to my points.  If I try Ale suggestion I get this error: Where should shell tools be installed? Are there Apple guidelines for where user shell tools in Mountain Lion should be installed? Some (e.g. TeX, or Apple's Git) end up in /usr, and others (e.g. X11) seem to end up in /opt (sometimes with a symlink from /usr), while others (e.g., Git) end up in /user/local, and I wonder what the difference is, and whether one is preferred over the other. 20GB of Temporary Files, Only 50MB in Temp Folder I recently discovered that the Settings app is showing around 20GB of space used by temporary files. But when I go to remove them I can only remove about 28MB. When I open the temp folder by using Run and then %temp% it only shows around 40-50MB of files right after boot. How can I remove these 20GB of invisible files? I only have a 240GB SSD so space is quite scarce. Here are a few photos:    I run Windows 10 Home Activated. I have tried Disk Cleanup but this removed only around 30MB of files.  UPDATE: After turning on hidden items I found a folder name WINDOWS-BT, after doing some research it turned out to be a folder for the previous windows version. I deleted it using TakeOwnerShip pro and this removed around 12GB of temporary files, but 8GB still remain. I am currently downloading TreeSize free to find out where the other 8GB is.  UPDATE 2: Hi, I downloaded TreeSizeFree and I didn't really find anything there.   The biggest folder is 87GB of Program Files which mainly consists of my GTA V install. The Program Files (x86) folder was mainly made up of my Steam games (CS:GO, Besiege, etc). The 5.5GB [3 Files] location was noted as being my pagefile.    The Windows folder shows up as 25GB when in Settings it is only 18GB, this could explain where the other 8GB are coming from. What are some things I should look for in there?  FINAL UPDATE: After deleting the Windows-BT folder it reappeared a few hours later. I decided to check from system updates and surely enough one was downloaded and pending to be installed. After installing the update the Windows-BT folder disappeared on it's own and a new folder taking up 20GB called Windows.old was created. I then followed this  to remove the .old folder and I had all my disk space back! NOTE: Disk Cleanup wasn't able to find the Windows.old folder, this is why I had to delete it from the settings app. Package in Java Convert a Bitmap to GrayScale in Android I was thinking of how to create an IV for a block cipher that doesn't require stored state, and I came up with the idea of using an HMAC of the (padded) plaintext and a (possibly distinct) key as the IV.  This seems to be secure:   The IV will only be reused if there is an HMAC collision or if the plaintext and key are the same.  The former would imply that the HMAC is broken and the latter is harmless, since it is just producing the output twice. The HMAC is verified after decryption, but before padding is checked, so padding-oracle attacks should not be an issue.   In particular, if the HMAC and the block cipher use different keys, there seems to be a very simple proof of security, assuming that either (1) the HMAC cannot be distinguished from a random function or (2) the block cipher is secure against maliciously-chosen (but unique) IVs:   The attacker cannot forge the HMAC, since this would require knowledge of the signing key. Since the signing and encryption keys are different in this case, and the HMAC is assumed random, malicious IVs cannot be triggered by an attacker.   Alternatively, if the cipher is secure against malicious (but unique) IVs, then the security of the cipher+security of the HMAC seem to prove the security of the system.  This (obviously) provides no protection against replay attacks, but that requires state anyway.  However, I am not a cryptographer so I do not trust my conclusions on this matter.  If this technique is secure, it would appear to be quite useful in practice, as it is simple and provides both encryption and authentication. Is it possible to know the (public) IP address of a computer where TeamViewer is ready for a remote control session - without connecting to the computer? How to add horizontal cylinder at end of cube How do I install VMware Player? I am new to Ubuntu and want to install VMWare Player. What is the step by step procedure to install that? Can I be my own trusted CA via an signed intermediate certificate? Can I get a certificate from a root CA that I can then use to sign my own web server certificates? I would, if possible, use a signed certificate as an intermediate to sign other certs.  I know that I would have to configure my systems in a certain way with "my" intermediate certificate in order to supply information about the chain of trust to my clients.   Is this possible? Are root CAs willing to sign a certificate like this? Is it expensive?  BACKGROUND  I'm familiar with the basics of SSL as it pertains to securing web traffic over HTTP. I also have a basic understanding of the way the chain of trust works, in that web traffic is secured "by default" if you encrypt with a certificate that has a valid chain all the way back to a root CA, as determined by the browser/OS vendor.  I am also aware that many of the root CAs have begun signing certificates for end users (like me) with intermediate certificates. That may require a bit more setup on my end, but otherwise, those certificates will work fine. I guess this has to do with protecting their all-valuable private key for the CA and the disaster that it would be if i were ever compromised.  EXAMPLES        Now, we are definitely not the size of any of those organizations, but they seem to be doing something like this. It would definitely make the management of these certificates a lot more palatable, especially considering one way we are expanding the reach of our e-commerce platform.