Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any...
-
Upload
angela-reed -
Category
Documents
-
view
214 -
download
2
description
Transcript of Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any...
![Page 1: Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any programming experience? Something else about yourself.](https://reader036.fdocuments.us/reader036/viewer/2022083119/5a4d1aed7f8b9ab05997c1ef/html5/thumbnails/1.jpg)
Math 51/COEN 19
Dr. Linnell
![Page 2: Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any programming experience? Something else about yourself.](https://reader036.fdocuments.us/reader036/viewer/2022083119/5a4d1aed7f8b9ab05997c1ef/html5/thumbnails/2.jpg)
Who am I?
![Page 3: Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any programming experience? Something else about yourself.](https://reader036.fdocuments.us/reader036/viewer/2022083119/5a4d1aed7f8b9ab05997c1ef/html5/thumbnails/3.jpg)
Who are you?
• What’s your major? Year?• Do you have any programming experience?• Something else about yourself
![Page 4: Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any programming experience? Something else about yourself.](https://reader036.fdocuments.us/reader036/viewer/2022083119/5a4d1aed7f8b9ab05997c1ef/html5/thumbnails/4.jpg)
Logic is the basis of:
• Circuits• Programming• Mathematical proof• Good decision making
![Page 5: Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any programming experience? Something else about yourself.](https://reader036.fdocuments.us/reader036/viewer/2022083119/5a4d1aed7f8b9ab05997c1ef/html5/thumbnails/5.jpg)
Predicate
• A statement that is either true of false• Are these predicates or not?– Joe Biden hates taking out the trash.– Did you take out the trash?– Take out the trash!– Taking out the trash is fun!– Don’t make me make you take out the trash.
![Page 6: Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any programming experience? Something else about yourself.](https://reader036.fdocuments.us/reader036/viewer/2022083119/5a4d1aed7f8b9ab05997c1ef/html5/thumbnails/6.jpg)
Predicate or not?
• 2+4=6• 2+2=5• 3+x=4• x+y=z• 8<6
![Page 7: Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any programming experience? Something else about yourself.](https://reader036.fdocuments.us/reader036/viewer/2022083119/5a4d1aed7f8b9ab05997c1ef/html5/thumbnails/7.jpg)
Predicate or not?
• 2+4=6• 2+2=5• 3+x=4• x+y=z• 8<6
• Mathematical sense of =• We don’t assume variables have values
![Page 8: Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any programming experience? Something else about yourself.](https://reader036.fdocuments.us/reader036/viewer/2022083119/5a4d1aed7f8b9ab05997c1ef/html5/thumbnails/8.jpg)
NegationEnglish Logic Programming Logic name
not ! negation
• Negation of “Joe Biden loves Prince”
• Negation of the negation?
![Page 9: Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any programming experience? Something else about yourself.](https://reader036.fdocuments.us/reader036/viewer/2022083119/5a4d1aed7f8b9ab05997c1ef/html5/thumbnails/9.jpg)
ConjunctionEnglish Logic Programming Logic name
and && Conjunction
• Conjunction of “Joe Biden loves Prince”, “Joe Biden hates Kanye West”
![Page 10: Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any programming experience? Something else about yourself.](https://reader036.fdocuments.us/reader036/viewer/2022083119/5a4d1aed7f8b9ab05997c1ef/html5/thumbnails/10.jpg)
Disjunction
• Disjunction of “Joe Biden loves Prince”, “Joe Biden hates Kanye West”
English Logic Programming Logic name
or || Disjunction
![Page 11: Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any programming experience? Something else about yourself.](https://reader036.fdocuments.us/reader036/viewer/2022083119/5a4d1aed7f8b9ab05997c1ef/html5/thumbnails/11.jpg)
Exclusive orEnglish Logic Programming Logic name
or Exclusive or
• xor of “Joe Biden loves Prince”, “Joe Biden hates Kanye West”
![Page 12: Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any programming experience? Something else about yourself.](https://reader036.fdocuments.us/reader036/viewer/2022083119/5a4d1aed7f8b9ab05997c1ef/html5/thumbnails/12.jpg)
Implication
• Implication of “Joe took out the trash”, “Joe can have cake”
English Logic Programming Logic name
if p then qq if pq unless not p
Implication, conditional
![Page 13: Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any programming experience? Something else about yourself.](https://reader036.fdocuments.us/reader036/viewer/2022083119/5a4d1aed7f8b9ab05997c1ef/html5/thumbnails/13.jpg)
Double ImplicationEnglish Logic Programming Logic name
p if and only if qif p then q
if() {}(kind of)
Bidirectional implication
![Page 14: Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any programming experience? Something else about yourself.](https://reader036.fdocuments.us/reader036/viewer/2022083119/5a4d1aed7f8b9ab05997c1ef/html5/thumbnails/14.jpg)
English Logic Programming Logic name
not ! negation
and && Conjunction
or || Disjunction
or Exclusive or
if-then implication
If and only if if() {} (kind of)
Bidirectional implication
![Page 15: Math 51/COEN 19 Dr. Linnell. Who am I? Who are you? What’s your major? Year? Do you have any programming experience? Something else about yourself.](https://reader036.fdocuments.us/reader036/viewer/2022083119/5a4d1aed7f8b9ab05997c1ef/html5/thumbnails/15.jpg)
Commonly seen conditionals
• p ->q• Converse
• Contrapositive
• Inverse