6 ms·
What everyone knows and what no one knows
- papandada 6y agoOne thing that stuck with me about these kinds of questions was that logical "implies" can be translated to set theory as "is a subset of." Then I draw a Venn diagram and the lightbulb goes on instantly for me.
- ealhad 6y agoI don't understand. If A implies B, then not B implies not A, and I'm pretty sure when I was in CS school in France (5 years ago) we learned this. And I'm also pretty sure that I knew this before, though I can't exactly remember when I first learned it.
- lkbm 6y agoModus tollens. It was also covered in both CS (explicitly in Discrete Math) and Philosophy (explicitly in Intro to Logic, and implicitly in many others) at my school in the US. It seems like the question in the article doesn't really make it clear that you're supposed to answer about the relation between the two. It could easily be interpreted as a question about the truth value of each. It's definitely true that some people don't think in terms of formal logic and wouldn't know this anyway (this is why we have affirming the consequent and denying the antecedent as common examples of bad logic), but I don't think the question as stated demonstrates that of them. EDIT: Just remembered it being explicitly explained in Intro to Philosophy and/or Professional Ethics as well.
- lkbm 6y agoOne amusing thing I saw in the two courses I mentioned is that in Intro to Logic, we spent something like a month learning each of the eighteen rules of inference, gradually adding a couple each day until we were familiar with all of them. In Discrete Math, the professor wrote out the eighteen rules in as part of a single lecture and then we had homework due that same week wherein we were expected to know and use all of them. (He may have introduced predicate logic in that same lecture.) Intro to Logic was a philosophy course, but some majors allowed students to take it instead of their one required College Algebra course. The result was it was a lot of very non-technical people who struggled with intro algebra, and consequently struggled with formal logic. (Predicate logic was the focus of the third section of the course later on.) Discrete Mathematical Structures was a math/cs course, where almost every student was a CS major, so it was predominantly technically-minded people for whom formal logic was at least very familiar, if not natural.
- pico303 6y agoI think it's a trick question, in the way he phrases it. If A implies B, then not B implies not A. But he doesn't say that. He says, "If A implies B, does not A imply not B," for which the answer is no.
- ealhad 6y agoWell, no, he asks "What can we say about `not A' and `not B'?"
- pico303 6y agoAh, sorry. You're right.
- chrisweekly 6y agoYet, your answer was the complete and correct answer!
- whoisburbansky 6y agoThe way he phrases it is "What can we say about !A and !B," according to the article. The only time he talks about "If A implies B, does not A imply not B," is when describing close answers he got to his question. I don't think it's a trick question the way he asks it, and it also seems like the sort of thing you should be able to work out with concrete examples if you aren't sure.
- teorema 6y agoGod I feel like an idiot for questioning this, but is it really true not B implies not A in that situation? It seems like it depends on what you mean by "implies." E.g., you could have A -> B, and A -> C, and B != C. Then C is not B, but implies A just as much as B might (in the very least it doesn't imply not A per se, as A might be true). It seems like there's some implicit assumptions going on.
- lpellis 6y ago
- ecaradec 6y agoI think it's more that people are not familiar with the formal presentation of the problem. I doubt many people would have difficulty understanding a less abstract statement: dog => mammal (dog implies mammal ) What can we say about not a dog ? (can be a cat, or a chair... ) What can we say about not a mammal ? (can be a chair, building... ) It's more intuitive because we as human understand the groups.
- whoisburbansky 6y agoIt surprises me that more of the folks he interviewed didn't try to figure out the contours of the formal presentation of the problem by plugging in concrete examples; isn't that the default "brute force" attempt you'd expect from someone trying to work out problems like this? It's the same thing you'd expect from someone solving Leetcode problems; you don't attack the general case immediately unless you've memorized the problem before, you usually try to play around with concrete examples until you've got enough of a handle on it to try and code up something a little more general.
- solumos 6y ago> I got a few vague and wordy excursions into things that are true and things that are false, but never the clear, straightforward answer. Not once. Sounds like he made a point to shut down that line of reasoning.
- falseprofit 6y agoWhat part of this quote gives you that impression?
- nineplay 6y agoI don't think I've ever used the word 'implies' in that context, which may be the problem with the question. It still doesn't quite make sense in my thought process. Does a dog 'imply' a mammal? I wouldn't think so, a dog guarantees a mammal. 'Implies' to me suggests a possible underlying interpretation. If someone tells me he wants to eat, it implies that he is hungry. However he might not be hungry, he might be strict about eating at 8pm for other reasons. An 'implication' is perhaps the most likely association, but not necessarily the correct one.
- bluenose69 6y agoFor me, the shocker is the penultimate paragraph, stating that many computing programmes at many institutions no longer teach logic. I could see that for a fourth-rate community college (maybe) but if we are talking about universities here, then it's time to close down those departments.
- jimhefferon 6y agoA course in logic is often offered in a Phil Dept, perhaps as a way to meet liberal studies requirements (that's where I took it, and where the course is at the school where I now teach). The equivalence of A => B and ~B => ~A is taught in every college and university CS program I've ever seen, as part of a standard course that may be called something like Discrete Math. I teach this course out of a book by Rosen and another popular author is Epp. This equivalence is also, as many other posters noted, perfectly natural to a person with a technical bent. But I understood the piece's author's point to be that they are looking for a certain maturity. When we teach, we see that there are stages of competence through which students pass. First they are able to ape the required work on a sentence-by-sentence basis, but not whole problems from start to finish. Next they are able to reliably work entire problems, but only in a context (for instance, they can do induction in the Induction section but outside of it they are easily confused). Finally, with enough practice, they have a larger view and can select the appropriate tool for the job when there are a lot of tools lying around, as well as apply that tool. (FWIW, I take the posters here saying that the author didn't prompt well enough to be recognizing those stages, implicitly.)
- solumos 6y agoI can't help but think that this is due to a combination of selection bias via the applicant pool and interviewer bias. It's kind of ironic that his logic is flawed here - "I interviewed 120 master's program applicants and none of them knew about contrapositive equivalence - therefore students are no longer learning basic logic rules in undergrad." I'm making a big assumption here, but the way this reads, the author sounds like the kind of interviewer who would get frustrated if a candidate wouldn't immediately know the answer to a question or if a candidate asked for clarification, and subsequently write off a candidate before the interview's over. If that's the case, it's not entirely surprising that 100% of his interviewees would fail this question.
- lmilcin 6y agoWell, this is interesting but not surprising. I have conducted hundreds of interviews and I am astonished at low level of knowledge or understanding of some things that are completely obvious to me. I don't typically ask questions outside typical tech topics so that I don't bias against people who did not go to CS course. Some of questions that I almost never get correct answer to but feel completely obvious to me: - Under what conditions linked lists are faster than array lists (Java)? - Why can't one process take a pointer, send it to another process to have it dereference to same data? When does this work? - Is Java pass by reference or pass by value language? Why? (I ask this senior Java developers and never got correct answer) - Can more than one processes listen on the same port on the same interface and IP address? - What does `volatile` keyword do in Java, exactly? - Explain what is a breakpoint and how it stops the program. I would assume at least some of the things should be familiar to somebody who spent years programming in the given language.
- rcconf 6y agoI'll try to answer these, just for fun, even though I am not doing an interview. I have not Googled anything, so if things are horribly wrong, let me know. - I have no idea, but I could try answering this through thinking through the problem. Generally a linked list has a pointer to from one item to the other. An array list I assume uses arrays for holding the items using indexes. What are the available operations generally for a data structure? Search - Search would be O(1) in array list and O(N) in linked list, can't be this. Insert - Insert in a linked list is actually quite quick if you have the node since you could just move the pointers. For an array list, you would have to shift everything over. I think this is the answer. Remove - Same deal as Insert. Did I get this right? - Because processes cannot access each others memory, the OS prevents from happening. A pointer is a pointer to an address in memory so you generally cannot do this. In terms of where would this work, umm, maybe in an old OS that didn't have the protection, or perhaps dynamically linking libs? - Neither, it's pass by copy from what I recall. Or something of the sorts. Maybe call by sharing? I would just explain how it works since that's easier, generally everything in Java is copied, so it's pass by value in the traditional sense. But when you think pass by value, are objects copied? The answer is no, objects copy their pointer instead in Java. So when you modify a passed object, it does modify the underlying data in that object, but you can never re-assign the object. - Nope, I don't think so. From what I recall, I've always had programs fail to run if I use the same IP + Port + Interface. You can do virtual hosts in Apache/Nginx tho where you can handle multiple different domains on the same port. - Volatile is generally used when working with threading. I cannot fully recall what it is, but it's required in thread safety. I would generally use thread safety operations and data structures instead here, but I do recall having to use volatile a few times. - I don't know how a breakpoint works exactly, but it's a marker placed in code and when a debugger runs into it, it stops the process. I assume since the Java code gets converted to byte code for the JVM to process, it would be a byte code added between the lines where the breakpoint lives. Note: haven't used Java in 4 years.
- Enginerrrd 6y agoI'm well aware of the logical contrapositive in the form: if A implies B, then Not B implies Not A. I've used this fact, unprompted, in a variety of contexts. However, there's something about the way this guy asked the question that makes me unsure whether I would have correctly answered it on the spot. It's somehow detached from both application, and the logic that underlies it. If the question had been asked as: "Is there any relationship between Not A and Not B" I would have instantly gotten the correct answer. ...But the way he asked it, it comes across as a question about whether Not A implies Not B which of course does not follow the given. I realize none of those words are in actually in there, yet the phrasing of the question somehow leads my brain into filling in the gaps in that way. My suspicion is that this is actually a common thought pattern and perhaps those being interviewed may have fallen into a similar trap.
- sampo 6y ago> What can we say about `not A' and `not B'? Haha, yes. I interpreted the `and` in that sentence as the logical connective, and (A → B) says nothing about (¬A ∧ ¬B). But he meant `and` in the human language sense.
- mrfredward 6y agoThe author compares it to asking about 2+2, but I think it's more closely analogous to asking "What can we say about 4 and 2+2?" Given the ambiguous wording, I wouldn't expect anyone to answer confidently, and lost of intelligent people would answer eight rather than "they're equal."
- deleted 6y ago[deleted]
- deleted 6y ago[deleted]
- notJim 6y agoI agree this question is phrased very strangely in a way I find hard to parse. Perhaps this is a common way of speaking in academia, but "what can we say about…" was not a phrase I immediately understood. I was also unsure if he meant `not A AND not B` or, casually, `not A` and also `not B`. If it was phrased more precisely, I think I would have been able to answer better. This whole thing reminds me of old-style, bad tech interviews where the interviewer is really selecting for someone similar to themselves, i.e., someone who understands a particular obscure phrasing of a problem, and immediately knows the correct answer. However, he does point out that he tried explaining things, and different phrasing, so maybe there really is something here.
- effable 6y agoDo you think the results would be different if people were asked "If A implies B then does not B imply not A"? This could just be about using the right prompt - I do not know how information is stored in the brain and whether most people would be able to access the correct answer: "not B implies not A" if the prompt were just "what can we say about not A and not B". Assuming that most people would actually know the answer if prompted the right way, one reason the prompt given in the article may not lead them to the answer could be that most people do not need to apply Modus Tollens outside of a class on Logic. And thus, since the concept has never been widely applied, at least in their heads, it is not accessible? This is all conjecture of course.
- falseprofit 6y agoI think this is applied all the time, but we might not always realize when we're using it. Also, while your version of the prompt may be more likely to elicit the correct response, this does not mean the original prompt was somehow wrong.
- br1anberg 6y agobefore reading the article my initial answer was 'nothing'
- seanwilson 6y ago> I recently conducted a large number of remote one-on-one interviews of candidates to a new master program in software engineering. > Assume that A implies B. What can we say about `not A' and `not B'? Maybe I'm missing something but there's no "implies" operator in programming languages and it isn't used this way in casual language so why would you expect software engineers to understand a very precise definition of an operator they don't use? I've taught formal logic classes and people new to it including programmers always have problems with "implies". Formal logic isn't intuitive and needs to be taught.
- clairity 6y agoit's also underspecified if the desired answer is "not A implies not B". there are an infinitude of examples of that particular conclusion being false in the real world.
- seanwilson 6y agoI think you're demonstrating my point. It sounds like you're going with what you intuitively think "implies" must mean like you would if you saw it written in a news article, when instead the article is using a formal logic definition that would appear appears often in logic/math proofs. You really need to look at the truth table the implies operator and read off the answer from there. There'd be no confusion if the operator didn't have a name that roughly matched something we say in casual language.
- clairity 6y agoand that's exactly my point. you need to specify 'formal logic', otherwise, it's underspecified.
- seanwilson 6y agoAh, okay. Yes, it's ambiguous to the point of being a trick question to me.
- leephillips 6y agoI have also found that most people don’t know how to think. There is nothing tricky or unclear about the way he asks the question. I certainly wouldn’t hire somebody to write computer programs who couldn’t answer this question right away. I don’t think that’s harsh or elitist; I just don’t see how someone who doesn’t know this basic rule of thought can be a decent programmer. Not that I would qualify. I’m not sure what the complexity of quicksort is. But I know how to think. I think. ADDED: I’m also fuzzy on MVC. I think I know what they’re supposed to mean, but, in practice, the ideas seem to overlap so much that I’m unsure. In Django, for example, that calls itself an MVC framework, there is a certain lack of agreement about what is what. So I would be able to answer the question that “nobody” can, and not do too well on the other one.
- kemiller2002 6y agoI honestly, don't think this is a fair assessment. For years, there has been a huge argument about what they should teach as far as CS goes. Logic is definitely important, but do you really fault a degree program and a kid's (young adult) ability on something that is never stated that way in the real world? Most people just want to graduate and get on with life. They learn what they need to pass and then move on, and there is nothing wrong with that. I put this in the same boat as all those logic puzzles they asked in the mid 90's early 00's. Ok maybe someone given enough time should be able to figure it out, but there are a lot of people out there that will do just fine at a job without being able to answer it on the spot. Bertrand is definitely in a league of his own as far as skill and intelligence, but he comes from a different era than today. I'm not insulting his age, but I do think that we need to take into account what has changed over the last 35-40 years. Things seem so much more complex than before. Even source control is complex. I feel for people just starting out these days. It's a give and take. You have to gloss over some things to make time to teach about others.
- BeetleB 6y ago> Logic is definitely important, but do you really fault a degree program and a kid's (young adult) ability on something that is never stated that way in the real world? Most people just want to graduate and get on with life. He is not interviewing people who want to "get on with life". He's interviewing people who are entering a Master's program. In most areas of engineering, and especially in CS/SW, one can get pretty good pay and make a living without an MS. So for MS and beyond, universities care more about academic rigor, etc, and whether what they learn is useful in industry is given a much lower weight (rightly so). A lot of universities really don't want MS/PhD students who are using it to get a promotion or bump in pay. Some do compromise for MS students assuming they're paying full tuition. Chances are quite high that when they take a grad level course, the professor will expect you to know this. I did grad studies in a different engineering discipline, and professors generally had low tolerance for students who did not know something this basic. Finally: > on something that is never stated that way in the real world? I'm probably biased, but I often state this in the real world :-) It has not been a problem in professional settings.
- anotheryou 6y agoNow I read the thread here and still don't know the answer. I too am a bit stuck with the word "implied". Is it if A is true, B must be true?. I answered the question without reading further and wrote this: not A: - obvious: can not be A; - and maybe relevant in the context but no true insight: could be B, could imply A, could imply B Exactly the same for B (can not be B, etc.) Hope I'm hired now.
- hnjst 6y agoNot sure if it helps someone, but I like to use the following intermediate formula to explain it: "A implies B" is equivalent to "B or (not A)" (either B is true and then A can be true or false, or B is false but then A cannot be true since it would entail that B is true as well). "B or (not A)" is equivalent to "(not A) or B" and to "(not A) or (not (not B))", you can then apply the previous reasoning to realize it's also equivalent to "(not B) implies (not A)". Not sure if my twisted way of thinking about it helps anyone though... furthermore it requires to have clearly in mind the distinction between "or" and "xor", the later being sadly closer to the vernacular use of "or"...
- hnjst 6y agoAnother exemple that I like: "When it rains I carry my umbrella." does not prevent me from carrying said umbrella when the weather is nice. However it is the same as saying that "when I don't have my umbrella with me then the weather is good".
- mikewarot 6y agoQuicksort isn't O(n), as far as I know, the best you can do is O(n log(n)) Implies isn't something I've ever had to program... and it took me a moment to figure out that NOT B implies NOT A, which is interesting... but I don't see how it's useful.
- Jtsummers 6y agoImplies is probably something you've used in a program's logic, it's probably not something you've directly programmed (in the sense that few people, outside of exercises, are going to code up logical operators). You'll see it in some conditionals. Think of the logical expression: If the radiation emitter is on then the safety door is closed. This is not causal, we don't say that we will close the door, we are saying something that should just be true about the system (like in an assert). Perhaps if this assert fails we want the whole thing to shutdown. Since languages like C don't have an implies operator, you'd write this assert as something like: ASSERT(!RADIATION_EMITTER_ON || DOOR_IS_SHUT, "Well, we irradiated something, but probably not what we wanted.") It holds the same logical meaning (you can evaluate it by examining the truth table of A => B and ~A || B). A B | A => B ~A || B F F | T T F T | T T T F | F F T T | T T