Spring 2017 QUICK FACTS CS Major requirement 2 lectures per week Tue Thu SKN for 010x CSIC 1115 for 020x030x 2 discussion sessions per section Mon Wed Grading Discussion attendance ID: 712973
Download Presentation The PPT/PDF document "Welcome to CMSC 250. Grab 4 colored inde..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Welcome to CMSC 250. Grab 4 colored index cards from my desk.
Spring 2017Slide2
QUICK FACTS
CS Major requirement
2 lectures per week (Tue / Thu SKN for 010x, CSIC 1115 for 020x-030x)
2 discussion sessions per section (Mon / Wed)Grading:Discussion attendance (signed, 5%)Post-lecture ELMS quizzes (10%)Homeworks (PDFs, uploaded on ELMS, 10%)2 midterms (20 & 25%), 1 Final (30%)Book:Epp, “Discrete Mathematics and Applications”, any edition is fine. (This is adopted!)If you want more, you can also check Rosen, “Discrete Mathematics and Applications”, any edition. (This is not adopted!)
Slide3
Homework 0
Read syllabus
thoroughly
and read the policies clearly.We will not go over them in class.We are sticklers for rules and extremely time-pressed.For example: If you have an anticipated religious absence from a midterm that you know about within the first two weeks of class and you tell us about it one day before the relevant midterm, nothing we can do!Slide4
What do you expect to learn off of 250?
I want to:
Sharpen my math skills
ResearcherFind out if CS is good for meSome other thing (explain)Become a better developerSlide5
What you will gain from 250
Direct applications
We will learn how an
if-then conditional (like in code) can be written cleanly and correctly using ANDs (, ORs () and negations (~)Hardware circuits: Particularly if you’re an engineer, you’ll need to learn the logical foundations of circuits, i.e we will build a 4-bit adderProbability: Important if you want to make money playing cards.Indirect applicationsThe fact that is irrational means that we can’t…. Slide6
What you will gain from 250
Direct applications
We will learn how an
if-then conditional (like in code) can be written cleanly and correctly using ANDs (, ORs () and negations (~)Hardware circuits: Particularly if you’re an engineer, you’ll need to learn the logical foundations of circuits, i.e we will build a 4-bit adderProbability: Important if you want to make money playing cards.Indirect applicationsThe fact that is irrational means that we can’t…. store it in computer memory! Slide7
What you will gain from 250
Direct applications
We will learn how an
if-then conditional (like in code) can be written cleanly and correctly using ANDs (, ORs () and negations (~)Hardware circuits: Particularly if you’re an engineer, you’ll need to learn the logical foundations of circuits, i.e we will build a 4-bit adderProbability: Important if you want to make money playing cards.Indirect applicationsThe fact that is irrational means that we can’t…. store it in computer memory!Developing a logical train of thought in Computer ScienceE.g countability of
uncountability
of
.
Slide8
Submitting your homeworks
Online submission of PDFs through ELMS
Directly edit the PDF
Word-to-PDF (we will upload many resources for you to learn it)Handwrite on top (legibly), scan into a PDF Slide9
Submitting your homeworks
Online submission of PDFs through ELMS
Directly edit the PDF
Word-to-PDF (we will upload many resources for you to learn it)Handwrite on top (legibly), scan into a PDF Syllabus clearly states: If we can’t read your response, we will grade you with a zero for that question!Slide10
Module 1: Propositional Logic
The most elementary kind of logic in Computer Science
Also known as Boolean Logic, by virtue of
George Boole (1815 – 1864)Slide11
Propositional Symbols
The building blocks of propositional logic.
Think of them as
bits or boxes that hold a value of 1 (True) or 0 (False)Denoted using a lowercase english letter (p, q, … , a) Please avoid c and t (will explain why later)pSlide12
Propositional Symbols
The building blocks of propositional logic.
Think of them as
bits or boxes that hold a value of 1 (True) or 0 (False)Denoted using a lowercase english letter (p, q, … , a) Please avoid c and t (will explain why later)Can I put anything beyond T and F in a propositional symbol?pYeah, sureNo way!
It’s not
that simple
Who the hell cares?Slide13
Propositional Symbols
The building blocks of propositional logic.
Think of them as
bits or boxes that hold a value of 1 (True) or 0 (False)Denoted using a lowercase english letter (p, q, … , a) Please avoid c and t (will explain why later)Can I put anything beyond T and F in a propositional symbol?pYeah, sureNo way!
It’s not
that simple
Who the hell cares?Slide14
Operations in boolean logic
There are three basic operations in
boolean
logicConjunction (AND)Disjunction (OR)Negation (NOT)Other operations can be defined in terms of those three.Slide15
Operations in boolean logic
There are three basic operations in
boolean
logicConjunction (AND)Disjunction (OR)Negation (NOT)Other operations can be defined in terms of those three.Operation(AND, OR, NOT,…)Input bitsOutput bitSlide16
Negation
~
F
T
T
F
F
T
T
FSlide17
Negation
~
F
T
T
F
F
T
T
F
‘~’ is
a _____ operator
Binary
UnarySlide18
Negation
~
‘~’ is
a _____ operator
Binary
Unary
F
T
T
F
F
T
T
FSlide19
Conjunction (^)
^
F
F
F
F
T
F
T
F
F
T
T
T
F
F
F
F
T
F
T
F
F
T
T
TSlide20
F
F
F
F
T
F
T
F
F
T
T
T
F
F
F
F
T
F
T
F
F
T
T
T
Conjunction (^)
^
Rule of thumb: p
and
q must be 1Slide21
Fun exercise
Fill-in the following truth table:
F
F
?
F
T
?
T
F
?
T
T
?
F
F
?
F
T
?
T
F
?
T
T
?Slide22
Fun exercise
Fill-in the following truth table:
F
F
F
T
T
F
T
T
F
F
F
T
T
F
T
TSlide23
Fun exercise
Fill-in the following truth table:
F
F
F
F
T
T
F
T
T
F
F
F
F
T
T
F
T
TSlide24
Fun exercise
Fill-in the following truth table:
F
F
F
F
T
F
T
F
T
T
F
F
F
F
T
F
T
F
T
TSlide25
Fun exercise
Fill-in the following truth table:
F
F
F
F
T
F
T
F
T
T
T
F
F
F
F
T
F
T
F
T
T
TSlide26
Fun exercise
Fill-in the following truth table:
F
F
F
F
T
F
T
F
T
T
T
F
F
F
F
F
T
F
T
F
T
T
T
FSlide27
Disjunction
v
F
F
F
F
T
T
T
F
T
T
T
T
F
F
F
F
T
T
T
F
T
T
T
TSlide28
Disjunction
v
F
F
F
F
T
T
T
F
T
T
T
T
F
F
F
F
T
T
T
F
T
T
T
T
Rule of thumb:
one of
p
or
q
must be 1Slide29
Fun exercise
Fill-in the following truth table:
F
F
?
F
T
?
T
F
?
T
T
?
F
F
?
F
T
?
T
F
?
T
T
?Slide30
Fun exercise
Fill-in the following truth table:
F
F
F
T
T
F
T
T
F
F
F
T
T
F
T
TSlide31
Fun exercise
Fill-in the following truth table:
F
F
F
F
T
T
F
T
T
F
F
F
F
T
T
F
T
TSlide32
Fun exercise
Fill-in the following truth table:
F
F
F
F
T
F
T
F
T
T
F
F
F
F
T
F
T
F
T
TSlide33
Fun exercise
Fill-in the following truth table:
F
F
F
F
T
F
T
F
T
T
T
F
F
F
F
T
F
T
F
T
T
TSlide34
Fun exercise
Fill-in the following truth table:
F
F
F
F
T
F
T
F
T
T
T
T
F
F
F
F
T
F
T
F
T
T
T
TSlide35
Fun exercise
Fill-in the following truth table:
Anything interesting here?
F
F
F
F
T
F
T
F
T
T
T
T
F
F
F
F
T
F
T
F
T
T
T
TSlide36
Fun exercise
Fill-in the following truth table:
Anything interesting here?
F
F
F
F
T
F
T
F
T
T
T
T
F
F
F
F
T
F
T
F
T
T
T
TSlide37
Binary connectives (
)
: “If- then”In LaTeX: \implies: “If and only if”In LaTeX: \equivTruth tables:
F
F
T
F
T
T
T
F
F
T
T
T
F
F
T
F
T
T
T
F
F
T
T
T
F
F
T
F
T
F
T
F
F
T
T
T
F
F
T
F
T
F
T
F
F
T
T
TSlide38
Binary connectives (
)
: “If- then”In LaTeX: \implies: “If and only if”In LaTeX: \equivTruth tables:
F
F
T
F
T
T
T
F
F
T
T
T
F
F
T
F
T
T
T
F
F
T
T
T
F
F
T
F
T
F
T
F
F
T
T
T
F
F
T
F
T
F
T
F
F
T
T
T
From false, everything follows!Slide39
Practice
Fill in the following truth tables:
F
?
T
?
F
?
T
?
r
(
F
F
F
?
F
F
T
?
F
T
F
?
F
T
T
?
T
F
F
?
T
F
T
?
T
T
F
?
T
T
T
?
r
F
F
F
?
F
F
T
?
F
T
F
?
F
T
T
?
T
F
F
?
T
F
T
?
T
T
F
?
T
T
T
?Slide40
Practice
Fill in the following truth tables:
F
T
T
F
F
T
T
F
r
(
F
F
F
T
F
F
T
T
F
T
F
T
F
T
T
T
T
F
F
T
T
F
T
T
T
T
F
F
T
T
T
T
r
F
F
F
T
F
F
T
T
F
T
F
T
F
T
T
T
T
F
F
T
T
F
T
T
T
T
F
F
T
T
T
TSlide41
Contradictions / Tautologies
Examine the statements:
What can you say about those statements?
Use of c and t