I was going through the text "Discrete Mathematics and its Application" by Kenneth Rosen (5th Edition) where I am across the definition of equivalence relation and felt that it is one sided.     Definition: A relation on a set A is called an equivalence relation if it is reflexive, symmetric, and transitive.   Now let us analyze the situation of what equivalence is meant to us intuitively.  Let there be a binary relation $R$ defined on a set $A$. Now we suppose that $R$ be reflexive, symmetric and transitive.  So we have for $a,b,c \in A$    $a R a$ (by the reflexive property of R) if $a R b$ then $b R a$  (by the symmetric property of R) if $a R b$ and $b R c$ then $aRc$ (by the transitive property of R)   Intuitively we can satisfy ourselves with the fact that the above are the necessary conditions for $R$ to be equivalent. So "if $R$ is reflexive, symmetric and transitive, then $R$ is an equivalence relation"  Now working our intuition for equivalence relation $\sim$ we note the following.  Let $\sim$ be an equivalence relation on a set A, then for $a,b,c \in A$ we have,   $a \sim a$ (by the intuitive knowledge of what $\sim$ means) if $a\sim b$ then $b \sim a$ (by the intuitive knowledge of what $\sim$ means) if $a\sim b$ and $b \sim c$ then $a\sim c$ (by the intuitive knowledge of what $\sim$ means)   Now we see that (1) implies $\sim$ is reflexive, (2) implies that $\sim$ is symmetric and (3) implies that $\sim$ is transitive.  So we have "if $\sim$ is an equivalent relation then $\sim$ is reflexive, symmetric and transitive"  From the two intuitive implications we can conclude that A relation on a set A is called an equivalence relation if and only if it is reflexive, symmetric, and transitive. and not what the book says. This definition makes quite sense unlike the book definition which says that if $R$ fails to be either reflexive or symmetric or transitive then $R$ may or may not be an equivalence relation, which after all gives a weird feeling.  Correct me if my logic is wrong.
In some books the word "if" is used in definitions and it is not clear if they actually mean "iff" (i.e "if and only if"). I'd like to know if in mathematical literature in general "if" in definitions means "iff".  For example I am reading "Essential topology" and the following definition is written:     In a topological space $T$, a collection $B$ of open subsets of $T$ is said   to form a basis for the topology on $T$ if every open subset of $T$ can be written as a union of sets in $B$.   Should I assume the converse in such a case? Should I assume that given a basis $B$ for a topological space, every open set can be written as a union of sets in $B$?  This is just an example, I am not asking specifically about this sentence.
Is there a way to make Runnable's run() throw an exception? How do I install the latest version of gcc and g++?  I am using a variety of C++11 and C++1y features; which is why I need this. Best way to strip punctuation from a string It seems like there should be a simpler way than:  import string s = "string. With. Punctuation?" # Sample string  out = s.translate(string.maketrans("",""), string.punctuation)   Is there? How can I prevent someone from resetting my password with a Live CD? Recently one of my friends came over to my place, within 15 minutes he hacked my account using a Live CD and reset the password in front of me. I was baffled to see such a thing. Please guide me to prevent such a future attempt using a Live CD. Does a 2100W angle grinder need an earth pin? I have recently purchased a Makita 2100W angle grinder. It has just the live (L) and neutral (N) connectors unlike the one I previously used, which had a third protected earth (PE) connection.   Would it be better if I changed the connections to a 3 pin connector? How do we "restore" notepad after crash? I remember reading a series when I was around 7th or 8th grade about aliens who had taken over Earth by putting metal caps on people when they were "entering adulthood" to control them (not direct control, but it would keep them from rebelling). There was a faction of people who able to escape and had fake caps and would save teens who were about to be capped.  The main protagonist was a teen boy who was a boxer (or training to be a boxer or something). The aliens would hold tournaments for the humans and whoever won would be "worthy" to serve as personal slaves to the aliens.     The protagonist won and was able to get inside to try and learn more about the aliens from the inside. What is a tty, and how do I access a tty? I want it to be look like this:    I have an HDD and an SSD in my PC, I want to install Ubuntu to SSD, I have windows on HDD. I want to be able to boot ubuntu from the windows 10 uefi boot manager. How do I do it? SQL function as default parameter value? I tried changing a default parameter value with this:  ALTER PROCEDURE [dbo].[my_sp] @currentDate datetime = GETDATE()   and all the SQL pre-compiler gave me was this error:     Msg 102, Level 15, State 1, Procedure my_sp, Line 8 Incorrect syntax near '('.   I have already created the procedure. (I'm not sure if that's relevant.) I was using a null default value and checking for that later, but that doesn't seem proper. Can I do this in one line?   Update: I was going off of :      [ = default ] Is a default value for the parameter. If a default value is defined, the function can be executed without specifying a value for that parameter.            Note:     Default parameter values can be specified for CLR functions except for the varchar(max) and varbinary(max) data types.         When a parameter of the function has a default value, the keyword DEFAULT must be specified when the function is called to retrieve the default value. This behavior is different from using parameters with default values in stored procedures in which omitting the parameter also implies the default value.   Am I reading this wrong?  Many thanks. Following my question , I am wondering if there are strong views for or against the use of standard deviation to detect outliers (e.g. any datapoint that is more than 2 standard deviation is an outlier).  I know this is dependent on the context of the study, for instance a data point, 48kg, will certainly be an outlier in a study of babies' weight but not in a study of adults' weight.  Outliers are the result of a number of factors such as data entry mistakes. In my case, these processes are robust.   I guess the question I am asking is: Is using standard deviation a sound method for detecting outliers? Pretty much every application I use in full-screen (including Firefox, MacVim and the Terminal) have tabs on the top of the screen.  The problem is, when I move my mouse to reach the tabs I'll often accidentally touch the top of the screen, bringing in the OS menu OVER the tabs:    Is there any way to change this behavior? I'd prefer it if the menu bar would stay hidden when I'm using a full-screen app, even if my mouse does touch the top of the screen. App keeps crashing & rendering error since update to 1.0.68 I can reproduce that every time now, I go to a site, open an article, then to the next site, open another article. The Feed page pops up for a second, the article page lays over this with some some transparent areas (see picture). The same app-version is ok on a Smartphone with Android 4.4.2. I also sent in some bug reports.    Edit  1.0.71 isn't the solution yet. I go to Meta SE, then to an article. When I want back to Meta SE again, it crashes. Much earlier than before. I already sent in a bug report for this.  Another Edit  I can describe it better now. From the questions-page of a site I go to a post. When I use the back button, everything is ok, I can go to the next site. When I try to go to the next site directly from the post, it crashes. This only happens on the Nexus 10 with Android 5.1.1, App version 1.0.71. Hope this helps.  Edit3  This is fixed in 1.0.73 now. Thanks again. Get the cartesian product of a series of lists? How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...] How do I move to a new tab in gedit using the keyboard? If I have multiple tabs open, how do I move from one to another? (Ubuntu 11.10; gedit 3.2.1) On every loading of a lib, I get the error:     no version information available   This lib has been compiled on another PC (ubuntu 10.04) than the one running it (mandriva 2010.2).  $ ldd /usr/local/gnu-eabi-4.5.2/i686-pc-linux-gnu/arm-eabi/lib/libbfd-2.21.so /usr/local/gnu-eabi-4.5.2/i686-pc-linux-gnu/arm-eabi/lib/libbfd-2.21.so: /lib/libz.so.1: no version information available (required by /usr/local/gnu-eabi-4.5.2/i686-pc-linux-gnu/arm-eabi/lib/libbfd-2.21.so)  linux-gate.so.1 =&gt;  (0xffffe000)  libz.so.1 =&gt; /lib/libz.so.1 (0xb77a7000)  libc.so.6 =&gt; /lib/i686/libc.so.6 (0xb7655000)  /lib/ld-linux.so.2 (0xb787a000)   Edit: the workaround didn't work. Is it possible to legally visit uninhabited islands in the Pacific for a couple of days/weeks like Robinson Crusoe Do you know any way how can I visit uninhabited islands in the Pacific (French Polynesia, Micronesia etc.) and stay there for a couple of days or weeks?  The only condition, these island (or islands) should have drinking water.  Could it be done legally or only illegally?  Does any company do such crazy things via plane or boat?  Any information is appreciated.  I am mostly interested in French Polynesia.  Boat or plane... that's not very important. I want my intent to be launched when the user goes to a certain url: for example, the android market does this with  urls. so does youtube. I want mine to do that too. How to escape text for regular expression in Java Does Java have a built-in way to escape arbitrary text so that it can be included in a regular expression? For example, if my users enter "$5", I'd like to match that exactly rather than a "5" after the end of input. $f$ is surjective iff it has a right inverse: using the axiom of choice and errors in ProofWiki