Logic for Dummies – Part 1
It seems like one of the things I really have to get my head round if I want to understand some of the principles of computer science is logic. Now, I figured that would be easy. I mean, I can remember truth tables for AND, OR, NOT, NOR, NAND, etc. from school, so how hard can it be?
Yup, how hard can it be – the classic sign of someone who doesn’t know enough about the problem to know that they don’t know enough about the problem.
Turns out that this logic stuff is actually a massive domain of expertise, with what seems to be a hallmark trap of computer science for a non-CS graduate like me – different terminology. Some of the stuff in there isn’t so hard or unfamiliar, but it’s hiding behind academically-oriented jargon that you have to get your head around before you even start.
That said, once you do get into it, it’s pretty fascinating stuff, that looks like it could be pretty useful in work now and again. The obvious one I’ve thought of so far is those times where you end up with some complex SQL where-clause and you need negate the clause to find all the results that don’t match it. There’s a load of rules I’ve seen so far in this logic thing help to simplify and change the form of logical expressions.
I’m also finding it pretty interesting how this stuff can capture knowledge. I reckon the best known logic programming language is Prolog which captures facts and rules, and it feels like you kinda need to get this stuff at some level for Prolog to make much sense. I think it’s starting to, now for me – and it feels a little like looking down the rabbithole.
Finally, as if more reason were needed, you never know when knowing what a hypothetical syllogism is will win your team the pub quiz down at the Ferret and Trouserleg. Maybe.
So far, I’ve been following an undergraduate-level course, provided by the Indian Institute of Technology, Madras on youtube, and making myself some revision notes/crib sheets, which I’ve attached – they’ll at least give you an idea of what’s covered in each lecture. The lectures are about an hour long, and I think they’re paced pretty well if you’re starting out with this stuff. I’m up to Lecture 6, so here’s my links to what I’ve got so far…
Lecture 1, Propositional Logic
Lecture 2, Propositional Logic (contd)
Lecture 3, Predicates and Quantifiers My Lecture 3 Notes
Lecture 4, Predicates and Quantifiers (contd) My Lecture 4 Notes
Lecture 5, Logical Inference
I’ve also been checking out the relational model, formal grammars and Finite State Automata, in preparation for my next module which starts on the 12th… just hope it’ll be enough!
I’ll post up the other notes when I’ve written them up. There’s loads more lectures – but I haven’t done them yet. I’ll post up a Part 2 soon…
The views expressed here are the personal views of the author.
In: Computer Science, Logic, MSc · Tagged with: lecture, Logic, prolog, propositional, youtube