[Tutor] How different is math logic from computer logic?

alan.gauld@bt.com alan.gauld@bt.com
Sun Dec 8 19:12:01 2002


> Unfortunately, it seems to me that the logic my math book is 
> talking anout has nothing (well, almost) to do with computer 
> logic. Exactly how different are they anyway? For example:
> If I work, I cannot study. Either I work or I pass Math. I 
> pass Math. Therfore, I studied.
> 
> After calling my friend, we agreed that it would be that it 
> was a true statement. Yet, the truth tables said that it was 
> both. I am confused.

In this case the 'or' is exclusive thus you do one or the other 
but not both. Backwords reasoning like your example is the modus
operandi of programming languages like Prolog. The idea being 
that you describe your problem precisely to the computer and 
it then uses the description to deduce the answer. It is a 
different style to the imperative techniques used in Python
but very powerful for some types of problem.

Hopefully that gives some ideas for further investigation...

Alan g