1 / 26

Traditional logic and the digital computer

Traditional logic and the digital computer. Both are based on yes/no or binary decisions. Traditional logic deals with propositions. Digital computers deal with on and off.

fathia
Download Presentation

Traditional logic and the digital computer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Traditional logicand thedigital computer • Both are based on yes/no or binary decisions. • Traditional logic deals with propositions. • Digital computers deal with on and off. • Booleans are symbols to represent this dichotomy: bits 0 and 1 or any pair of symbols e.g. (T)rue and (F)alse,

  2. Propositional functions • To propose something is to put something forward for consideration. In doing so, one makes a proposal or a proposition. • A logical proposition is a statement that proposes something that can be decided or determined as to whether it is true or false. The decision to be made is a binary decision. • A proposition can be submitted to a computer provided there is a computable propositional function to determine the truth or falsity of the statement, for example, my sister likes eggs can be determined as being true.

  3. What is, and what is not, a proposition. • "The number 131 is prime " - a proposition & true • "437 is prime" - a proposition and false: because 437=19*23 • "There is only one God, MOG," - a belief. • "Oh, boy!" - an exclamation. • "367 + 589" - a description of an action or a question, or a shorthand for:"Find 367 + 589" - an instruction or a command. • "367+589 = 946" ; "367+589  946" are both propositions-- at least one and only one is true.

  4. Symbolic Logic / Negation • In classic logic, symbols were used to represent propositionsp might denote "367+589 = 946" and q might denote "367+589 ≠ 946" but it is more useful to see p and q as the outputs of the corresponding propositional functions. • The above two propositions are clearly related - when one is true the other is necessarily false. We say one is the negation of the other and write • q = ¬ p or p = ¬ qor q = 1 – p • Clearly: p = ¬ ¬ p = 1 – (1 – p)

  5. The algebra of propositions • Note, when we associate a symbol, e.g. p with a proposition such as I will go, it is not a symbol for that character string (as the text might imply). Our p will be a symbol for the value of the propositional function for that proposition; i.e p is a Boolean, 0 or 1. [In J, or another functional language that implements an algebra of functions, it could be interpreted as the propositional function itself, but in a language like Matlab, that only implements an algebra of variables, p has to represent the values of the function.]

  6. Compound Propositions • Compound propositions are constructed grammatically by the use of the words and, or and not. • However, in our interpretation these words are the names of Boolean functions with the function tables as shown at right. • In classical logic these tables were called “truth tables” with symbols T and F rather than 1 and 0.

  7. Classical Truth Tables • If q = ¬ pthen the relationship between the truth or falsity of the two statements is related as shown in the table below: Leibniz

  8. Classical truth table for and • The symbol used to represent the connective, and, is

  9. Classical truth tables for or , xor • The symbols to represent the connectives, or, and xor are

  10. In J with words for the function symbols and =: *. or =: +. not =: -. • p =: 0 0 1 1 • q =: 0 1 0 1 • (p or q) and not (p and q) • 0 1 1 0 • p,. q,. (p or q) and not (p and q) • 0 0 0 • 0 1 1 • 1 0 1 • 1 1 0

  11. Constructing truth or function tables by hand • p q p or q p and q not (p and q) p xor q • 0 0 0 0 1 0 • 0 1 1 0 11 • 1 0 1 0 11 • 1 1 1 1 0 0 • Working by hand we would be wise to build up to the final expression step by step. • Two logical expressions with identical function values are called equivalent propositions

  12. Tautology and Contradiction Tautologies and contradictions are the only two possible constant Boolean functions

  13. Implication • An implication is a statement that asserts that one cannot have the truth of one proposition without the truth of another. • If p and q are the propositional function values for the propositions and we cannot have p = 1 without having q = 1 then using our logical connectives the propositional function values for this implication are:not ( p and not q) • Checking out all possible values with p=: 0 0 1 1 and q=: 0 1 0 1 we see that not (p and not q) is • 1 1 0 1

  14. Function values for implication • We say that the proposition for p implies the proposition for q and write symbolically p → q or ifpthenq • Notice that the only case in which this proposition is false is if p is true (1) and q is false (0). If p is false the implication holds.For example, if it’s true that if I cut my finger, I will cry then whether I cry or not when I haven’t cut my finger has not bearing on the truth of the implication.

  15. implies or if ... then...

  16. if, and only if (iff)

  17. Necessary & sufficient conditions

  18. Operators in Symbolic Logic

  19. Deduction : Logical Argument A logical deduction is based on premises,i.e. propositions that are accepted as trueand which subjected to the rules of logicproduce a proposition which must then necessarily be true. For example,Premise: whenever it rains, there are clouds in the sky. Premise: there are no clouds in the skyConclusion: it is not raining.We shall develop a symbolic method forthis and more complicated arguments. Aristotle

  20. Fuzzy Logic • She's a little bit older than John but nowhere near as old as Mary. • How old is John – 26and Mary – 30 • Fuzzy inputs can sometimes lead to crisp conclusions: she’s 27

  21. The Laws of Logicexpress logical equivalences Two compound propositions are logically equivalentif they have the same truth values for every combination of the truth values of the component propositions.

  22. Law 1 : Any implication is equivalent to its contrapositiveLaw 2 : p  q  ¬p q

  23. Combinations of two propositions • Any compound proposition constructed from just two base propositions must reduce to one of the propositions listed above. Notice that for each proposition there is the negation of that proposition since “a proposition or its negation” is a tautology.

  24. More equivalences

  25. Laws of Logic

  26. What’s the big idea? • Truth (or function) tables for the propositional functions of statements expressed in symbolic logic show equivalences or laws of logic.

More Related