0 Up votes0 Down votes

30 views27 pagesMath for computer

Nov 30, 2013

© Attribution Non-Commercial (BY-NC)

PDF, TXT or read online from Scribd

Math for computer

Attribution Non-Commercial (BY-NC)

30 views

Math for computer

Attribution Non-Commercial (BY-NC)

- Neuromancer
- The E-Myth Revisited: Why Most Small Businesses Don't Work and
- How Not to Be Wrong: The Power of Mathematical Thinking
- Drive: The Surprising Truth About What Motivates Us
- Chaos: Making a New Science
- The Joy of x: A Guided Tour of Math, from One to Infinity
- How to Read a Person Like a Book
- Moonwalking with Einstein: The Art and Science of Remembering Everything
- The Wright Brothers
- The Other Einstein: A Novel
- The 6th Extinction
- The Housekeeper and the Professor: A Novel
- The Power of Discipline: 7 Ways it Can Change Your Life
- The 10X Rule: The Only Difference Between Success and Failure
- A Short History of Nearly Everything
- The Kiss Quotient: A Novel
- The End of Average: How We Succeed in a World That Values Sameness
- Made to Stick: Why Some Ideas Survive and Others Die
- Algorithms to Live By: The Computer Science of Human Decisions
- The Universe in a Nutshell

You are on page 1of 27

6-2

Previous Lecture

Rules of substitution Logic inference Inference and tautologies Rules of inference

6-3

Logic Puzzles

A prisoner must choose between two rooms each of which contains either a lady, or a tiger. If he chooses a room with a lady, he marries her, if he chooses a room with a tiger, he gets eaten by the tiger. he rooms have signs on them! I at least one of these rooms contains a lady II a tiger is in the other room

It is "nown that either both signs are true or both are false

6-4

#otation! p $ the first room contains a lady % $ the second room contains a lady

6-5

Argument .tep *. p p % ,. p % /. p 0. % Reason ). p 'p %( premise e+pression for implication idempotent law modus ponens rule of dis1unctive syllogism to , and /

'p %( p, p 'p %(

-. 'p %( p premise

7-6

A literal is a primitive statement 'propositional variable( or its negation p, p, %, % A clause is a dis1unction of one or more literals p %, p % r, %, s s r % A statement is said to be a 2on1unctive #ormal 3orm '2#3( if it is a con1unction of clauses p 'p %( 'r p( p % 'r p( 'r %( 'p % s r( 'r p( r

7-7

CNF Theorem

Theorem 4very statement is logically e%uivalent to a certain 2#3. Proof 's"etch( Let be a 'compound( statement. .tep ). 4+press all logic connectives in through negation, con1unction, and dis1unction. Let be the obtained statement. .tep *. 5sing DeMorgan6s laws move all the negations in to individual primitive statements. Let denote the updated statement .tep ,. 5sing distributive laws transform into a 2#3.

7-8

Example

3ind a 2#3 logically e%uivalent to .tep ). .tep *. .tep ,. 'p %( r 'p %( r 'p r( '% r( 'p %( r

7-9

ule of esolution

p% p r %r he corresponding tautology ''p %( 'p r(( '% r( 778asmine is s"iing or it is not snowing. It is snowing or Bart is playing hoc"ey.66 p $ 7it is snowing6 % $ 78asmine is s"iing6 r $ 7Bart is playing hoc"ey6 77 herefore, 8asmine is s"iing or Bart is playing hoc"ey66 % r is called resolvent

7-10

2onvert the premises into 2#3 2onvert the negation of the conclusion into 2#3 2onsider the collection consisting of all the clauses that occur in the obtained 2#3s 5se the rule of resolution to obtain the empty clause '(. If it is possible, then the argument is valid. 9therwise, it is not. :hy empty clause; he only way to produce the empty clause is to apply the resolution rule to a pair of clauses of the form p and p. herefore, the collection of clauses is contradictory. In other words, for any choice of truth values for the primitive statements, if premises are true, the conclusion cannot be false.

6-11

Logic Puzzles

A prisoner must choose between two rooms each of which contains either a lady, or a tiger. If he chooses a room with a lady, he marries her, if he chooses a room with a tiger, he gets eaten by the tiger. he rooms have signs on them! I at least one of these rooms contains a lady II a tiger is in the other room

It is "nown that either both signs are true or both are false 'p %( p, p 'p %(

7-12

Example

A lady and a tiger &remises! p 'p %(, 'p %( p #egation of the conclusion! 2lauses! p, p %, % Argument! p% % p p premise premise resolvent premise resolvent %

7-14

:e saw that some declarative sentences are not statements without specifying the value of 7indeterminates6 77x < * is an even number66 77If + < ) = >, then + = >66 77A man has a brother66 .ome valid arguments cannot be e+pressed with all our machinery of tautologies, e%uivalences, and rules of inference 4very man is mortal. .ocrates is a man. .ocrates is mortal

7-15

.entences li"e 7+ is greater than ,6 or 7person + has a brother6 are not true or false unless the variable is assigned some particular value. .entence 7+ is greater than ,6 consists of * parts. he first part, +, is called the variable or the sub1ect of the sentence. he second part ? the predicate, 7is greater than ,6 ? refers to a property the sub1ect can have. .entences that have such structure are called open statements or predicates :e write &'+( to denote a predicate with variable +

7-16

7+ is greater than ,6 7+ is my brother6 7+ is a human being6

7+ is greater than y6 7+ is the mother of y6 7car + has colour y6 7+ divides y < @6 7+ sits between y and @6 7+ is a son of y and @6 contain * variables, binary predicates A'+,y(

7-17

*ssigning a +alue

:hen a variable is assigned a value, the predicates turns into a statement, whose truth value can be evaluated.

+B*

false true

+B-

false

+Bmy car yBgrey

7-18

&niverse

:e cannot assign a variable of a predicate A#C value. :e need to obtain a meaningful statementD 7+ is greater than ,6

*, > a cat a big red truc"

4very variable of a predicate is associated with a universe or universe of discourse, and its values are ta"en from this universe 7+ is greater than ,6 7+ is my brother6 7+ is an animal6 7car + has colour y6 + + + + y is a number is a human is a ;;; is a car is a colour

7-19

elational #ata,ases

A relational database is a collection of tables li"e

#o. ). #ame Bradley 2oleman .tudent ID .upervisor ,>)>)*, hesis title &etra Algebraic graph Berenbrin" theory

A table consists of a schema and an instance. A schema is a collection of attributes, where each attribute has an associated universe of possible values. An instance is a collection of rows, where each row is a mapping that associates with each attribute of the schema a value in its universe. 4very table is a predicate that is true on the rows of the instance and false otherwise.

7-20

-uantifiers

9ne way to obtain a statement from a predicate is to assign all its variables some values Another way to do that is to use e+pressions li"e 73or every E6 7 here is E such that E6 7A E can be found E6 7Any E is E6 74very man is mortal6 7 here is + such that + is greater than ,6 7 here is a person who is my father6 2 73or any x, x 0 F

%uantification

7-21

&niversal -uantifiers

Abbreviates constructions li"e 3or all E 3or any E 4very E 4ach E Asserts that a predicate is true for all values from the universe 74very man is mortal6 7All lions are fierce6 2 73or any x, x 0 F #otation! + &'+( means that for every value a from the universe &'a( is true

7-22

73or any x, x 0 F

2

+ &'+( is false if and only if there is at least one value a from the universe such that &'a( is false .uch a value a is called a countere+ample hus to disprove that 74very man is mortal6 it suffices to recall the movie 7Gighlander6

7-23

Existential -uantifiers

Abbreviates constructions li"e 3or some E 3or at least one E here is E here e+ists E Asserts that a predicate is true for at least one value from the universe 7 here is a living "ing6 7.ome people are fierce6 2 7 here is x such that x 10 F #otation! + &'+( means that there is a value a from the universe such that &'a( is true

7-24

7 here is a red carF 2 73or some x, x < 0 F trueD my friend6s car is red falseD

+ &'+( is false if and only if for all a from the universe &'a( is false Disproving an e+istential statement is difficultD

7-25

.ummari@ing true false

here is a countere+ample ? + &'+( 3or every value a from a value a from the universe the universe &'a( is true such that &'a( is false here is a value a from + &'+( the universe such that &'a( is true 3or all values a from the universe &'a( is false

9bserve that + &'+( is false if and only if + &'+( is true + &'+( is false if and only if + &'+( is true

7-26

Example

:hat is the negation of each of the following statements; .tatement All lions are fierce + &'+( 4veryone has two legs + &'+( #egation here is a peaceful lion here is a person having more than two legs, one leg, or no legs at all All people hate coffee here is a tiger in every room

.ome people li"e + &'+( coffee here is a lady in + &'+( one of these rooms '.ome rooms contain a lady(

7-27

.ome/or0

4+ercises from the Boo"! #o. ), *, -aci1, Ha'i,iv(, )*'vii,viii( 'page )>>$)>*(

- Lecture Notes for Transition to Advanced MathematicsUploaded byAngela Walters
- Predicates & QuantifiersUploaded bySean Patrick Altea
- Benson Mates - The Philosophy of Leibniz~ Metaphysics and Language - Oxford University Press, USAUploaded byLuciano Vaga
- Artificial Intelligence QBUploaded byLaksh Manan
- Writing - Jerzy Trzeciak-Writing Mathematical Papers in EnglishUploaded byFadly Nurullah
- Answers for Practice in Logic and HW 1Uploaded byJayaletchumi Moorthy
- LogicUploaded bySehyoonaa Kim
- HW3a--Logic 110 (1)Uploaded byAustin Ho
- Discrete Event Simulation to Generate People PoliticsUploaded byAnonymous 8erOuK4i
- Mah Mba Cet 2011 AnalysisUploaded byaviKadam
- 02_PropLogicPrfs-DNFCombined.handout.pdfUploaded byAde Adeinfo
- Discrete BookUploaded byksr131
- 1984 Syl LogisticUploaded byHector
- Alternative formulations of propositional logicUploaded byFriedrich Vaneigem
- 3 a 28121291Uploaded by1911 rz
- John Gokongwei ScheduleUploaded byDunn Noble
- W. D. Joyner - Mathematics of the RubikUploaded bypahelwan
- Best Clat Coaching in Janakpuri, DelhiUploaded bycompetitiongurukul
- ACTPrep StudentUploaded bycoonli
- Logic in RealityUploaded byrosaluxrosarosae
- Norman_Kretzmann_auth.,_John_Corcoran_eds._Ancient_Logic_and_Its_Modern_Interpretations_Proceedings_of_the_Buffalo_Symposium_on_Modernist_Interpretations_of_Ancient_Logic,_21_and_22_April,_1972.pdfUploaded byBertnardo
- AristotleUploaded byCherry Chryzl Hilario Caro
- Temporal Databases (1)Uploaded bychsudheer291985
- Logic HomeopathyUploaded byOggy Darweesh
- 3 - Philo - What Makes a Question PhilosphicalUploaded byRaquel Garcia
- Words for — Foolish _ Mischievous _ Crazy _ Wild _ MadUploaded byAnkita T. Moore
- The Nature of MeaningUploaded bytonka820
- concerning law with logicUploaded byLogan Davis
- RepawrtUploaded byElizabeth Jordan
- grading_essays.pdfUploaded byScotblue

- If ConditionalsUploaded byVeronica Chindon
- Kah GrammarUploaded byRazaMobizo
- الأبجدية الإنجليزيةUploaded bymohalimussa
- PLAN DE TRABAJO DE INGLES NOVENO BUploaded byJasmine Sheppard
- Sett i Gang I TekstbokUploaded byaldrilily
- Alexander Vovin a Descriptive and Comparative Grammar of Western Old Japanese Part 2 Adjectives, Verbs, Adverbs, Conjunctions, Particles, PostpositionsUploaded byDiana Badulescu
- How Not to Write. the Essential Misrules of GrammarUploaded bysuperbibliophile44
- CoherenceUploaded byapi-3858535
- Verb PatternsUploaded byOum El Ghoul
- Infinitives and Gerund BachUploaded byAnonymous t1D5Uw
- Workbook 9.1 Irregular PreteritesUploaded byTim Owens
- TensesUploaded byJ Marsden
- Marlyn Lesson PlanUploaded byRevales Marlyn
- If ClausesUploaded byAna Nikolic
- Business English Language Practice - Grammar and Vocabulary REDUploaded byedward7ote
- Digi Notes English 14-12-17Uploaded byHafiz Ahmed
- ConstituentsUploaded byWeby Yolannisa
- ParticipleUploaded bywa_abbas
- Adjectival ComplementationUploaded bySvetla Miteva
- Dependent ClauseUploaded byVivi Wulandari
- TKT Glossary 2011Uploaded byVladimir Osorio Cornejo
- 23047 How to Make Compound WordsUploaded bybvbrahmam
- Types of VerbsUploaded byElmehdi Mayou
- Writing IIUploaded byTaufiq Hidayah
- Most Complete English Grammar Test in the World-with answersUploaded bySteven Donahue
- Parts of a SentanceUploaded byNathan Chaney
- GerundUploaded byKristian Aji Nugroho
- Adverbios en InglesUploaded byinesortiz
- 139739036 Grammar Irregular Verbs Simple Past TenseUploaded byKanageswary Sai
- The Prepositional Phrase 1Uploaded byDeden Andy

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.