Week 2 Discrete Math CS 225 401 (Part 1)

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Predicate

Refers to the part of a sentence that gives information about the subject. Sentence that contains a finite number of variables and becomes a statement when specific values are substituted for the variables.

Theorem 3.2.1 Negation of a Universal Statement The negation of a statement of the form ∀x in D, Q(x) is logically equivalent to a statement of the form ∃x in D such that ∼Q(x).

Symbolically, ∼(∀x ∈ D, Q(x)) ≡ ∃x ∈ D such that ∼Q(x). Not of a universally quantified statement is equivalent to the existence of an x that negates the statement Q(x). ~∃x ∈ D such that Q(x) ≡ ∀x ∈ D, ~Q(x) Similarly- Negating an existential quantifier is equivalent to the a universally quantified Statement that negates the statement Q(x).

What is an Existential Quantifier?

e.g. = There exists a patient that is an infant and has the flu. ∃x Infant(x) /\ HasFlu(x) read as "there exists an x" x is restricted to a domain (patients) Read as "There exists an x, where x is a patient, such that x is an infant and x has the flu."∈ D

Universal statement

"∀x ∈ D, Q(x)." where Q(x) is true for all values of x in the domain D. It's false only when 1 value of x makes Q(x) false-- the counterexample to the universal statement.

The negation of a universal statement ("all are") is logically equivalent to an existential statement...

("some are not" or "there is at least one that is not").

∀x is a Universal Quantifier: "For all x"

Read as "for all x" x is restricted to a "domain of discourse"- set of all possible patients.

If the patient is an infant, then the patient has no children. Translate to the predicate

Assume "the patient" = "Alex" AlexIsInfant --> ~AlexHasChild "Proposition AlexIsInfant implies not AlexHasChild" Predicate = Infant(Alex) --> ~ HasChild(Alex) Proposition "Alex" is based on predicate Infant(x). HasChild(alex) is a proposition "alex" based on predicate HasChild(x). How do we Make an assertion about all patients- "if any patient is an infant, then that patient has no children." - use a predicate. If the statement is ever violated- "If the patient is an infant, then the patient has no children" the database will alert that there's problem with your data. (real life scenario is for hospitals)

Translate the following statement into logical expressions involving quantifiers for each of the following domains of discourse: Domain 1: All people in your school Domain 2: All people No one in your school owns both a motorcycle and a bicycle

Domain 1: ~∃x s ( Owns(x, m) /\Owns (x, b) ) or ∀x ~ (Own (x, m) ./\ (Owns x, b) Domain 2: ∀x S (x) --> ~ (Own x, m) /\ (Own, x b) Equivalent to there exists someone who owns either a motorcycle or a bicycle.

Translate the following statement into logical expressions involving quantifiers for each of the following domains of discourse: Domain 1: All people in your school Domain 2: All people Everyone in your class has studied calculus or programming.

Domain 1: ∀x Study (x, calculus) \/ B(x, programming) Domain 2: ∀x P(x) If they're in the class. If they are in your class then they studied calculus or programming. ∀x P(x) --> B(x, studied calculus) \/ B(x, studied programming)

Translate the following statement into logical expressions involving quantifiers for each of the following domains of discourse: Domain 1: All people in your school Domain 2: All people There is a person in your school who is not happy.

Domain 1: ∃x ~Happy(x) Domain 2: ∃x s (x) /\ ~ Happy(x)

Domain

Domain of a predicate variable is the set of all values that may be substituted in place of the variable.

Write an English sentence corresponding to the following logic expressions assume the domain of discourse is all people. P(x) : x is a professional basketball player B(x) : x plays basketball ∀x (P(x) /\B (x)) English Translation

Every person is a professional basketball player and plays basketball.

∀x ∈ R, x2 ≥ 0

Every real number has a nonnegative square.

Write an English sentence corresponding to the following logic expressions assume the domain of discourse is all people. P(x) : x is a professional basketball player B(x) : x plays basketball ∀x P(x) \/B (x) English translation

Everyone is either a professional basketball player or plays basketball.

P(x) : x is a professional basketball player B(x) : x plays basketball Write an English sentence corresponding to the following logic expressions assume the domain of discourse is all people. ∀x P(x) --> B (x)

For all x P of (x) implies B(x) (conditional statement) True to the form of quantifier: For every person, if that person is a professional basketball player then they must play basketball. English: Every professional basketball player plays basketball.

∀x ∈ H, x is mortal

For all x in the set of all human beings, x is mortal

No politicians are honest. (Write the negation)

Formal version: ∀ politicians x, x is not honest. Formal negation: ∃ a politician x such that x is honest. Informal negation: Some politicians are honest.

Make this statement possible for any patient in a hospital. If Alex is an infant, Alex has no children.

If any patient is an infant, then the patient has no children. ∀x Infant(x) --> ~ HasChildren(x) X is a variable- an arbitrary patient. Reads also as "For all x, where x is a patient, if x is an infant, then x does not have a child."

Negating Quantifiers

Not all patients are infants. ~ (∀x Infant(x)) There exists a patient that is not an infant. ∃x ~Infant(x) Logically equivalent? Yes. ~ (∀x Infant(x)) - means there has to be some patient that is not an infant. ∃x ~Infant(x) - means there exists one patient that is not an infant.

What qualifies as a universal statement.

The only clue to indicate its universal quantification comes from the presence of the indefinite article a. "If a number is an integer, then it is a rational number."

P(x) : x is a professional basketball player B(x) : x plays basketball Write an English sentence corresponding to the following logic expressions assume the domain of discourse is all people. ∃x P(x) --> B(x) (rarely see implications with existential quantifiers)

There exists a person such that if the person is a professional basketball player then they play basketball.

Write an English sentence corresponding to the following logic expressions assume the domain of discourse is all people. P(x) : x is a professional basketball player B(x) : x plays basketball ∃x P(x) /\ B(x) (Existential quantifier and conjuctive sentence more common)

There exists a person that is a professional bball player and plays basketball.

Predicate definition.

There is no way in propositional logic to capture an arbitrary element = you can with a predicate. "Propositional function" with one or more arguments. A function that takes an argument as input- e.g. a patient, and returns T/F. Infant (x) is true if an only if x is an infant HasChild(x) is true if and only if x has a child. Argument can be instantiated by an object (patient)

What's a statement

When the predicate is the part of the sentence from which the subject has been removed. Eg. "James is a student at Bedford College." P = "is a student at Bedford College." Q = "is a student at". P and Q are predicate symbols. "X is a student at Y" are symbolized as P(x) and Q(x, y). The truth value depends on variables x and y.

A prime number is an integer greater than 1 whose only positive integer factors are itself and 1. Consider the statement "There is an integer that is both prime and even." Let Prime(n) be "n is prime" and Even(n) be "n is even." Use the notation Prime(n) and Even(n) to rewrite this statement in the following two forms: a. ∃n such that ∧ . b. ∃ n such that .

a. ∃n such that Prime(n)∧ Even(n). b. Two answers: ∃ a prime number n such that Even(n). ∃ an even number n such that Prime(n).

for all

for every, for arbitrary, for any, for each, given any.

There does not exist a patient that is an infant. For all patients, none of them are infants. Are the equivalent?

~ (∃x Infant(x)) ∀x ~Infant(x) Yes.

Translate the following statement into logical expressions involving quantifiers for each of the following domains of discourse: Domain 1: All people in your school Domain 2: All people Everyone in your school was born in the 20th century.

∀x B (x, 20th century) /\ P(x) Domain 1: ∀x B(x, born in 20th c) Domain 2: ∀x S(x) ∀x S(x) --> ∀x B(x, born in 20th c) Re-write sentence - If they are in your school then they are born in the 20th century.

Rewrite the following statement in the two forms "∀x, if then " and "∀ x, ": All squares are rectangles.

∀x, if x is a square then x is a rectangle. ∀ squares x, x is a rectangle.

There is a positive integer whose square is equal to itself.

∃m ∈ Z+such that m2 = m.

Translate the following statement into logical expressions involving quantifiers for each of the following domains of discourse: Domain 1: All people in your school Domain 2: All people Someone in your school has visited Disneyland.

∃x S(x) /\ Visited (x, Disney) Domain 1: Visited (x, y) = X visited Y. Domain 2: S(x) = x is in your school.


Ensembles d'études connexes

Fruit and Vegetable Classification

View Set

Unit 4: Session 1: Type of Client

View Set

Gateway A2. Unit 5. Grammar revision

View Set