Академический Документы
Профессиональный Документы
Культура Документы
Discreta
Ejemplos de Proposiciones:
1. 3 * 4 = 12
2. El sistema binario utiliza dos símbolos para representar los números
3. Un kb tiene 1024 bytes
Ejemplos de No Proposiciones:
1. Coma
2. Corra
3. Hace mucho sol
4. El agua está fría
Existen también las constantes proposiciones (V, F), que representan verdadero y falso,
respectivamente. A cualquier variable proposicional se le puede asignar el valor de verdad de
V o F.
Existen proposiciones:
⎯ Simples,
Una proposición simple o atómica es el menor enunciado con carácter de verdadero o falso.
⎯ Compuestas,
Una proposición compuesta es la formada por dos o más proposiciones simples, unidas
mediante un símbolo llamado conector lógico.
Conectores Lógicos
⎯ Negación (~, ¬)
⎯ Conjunción (∧)
⎯ Disyunción (∨)
⎯ Implicación o Condicional (®)
⎯ Bicondicional («)
Lógica
Proposicional
Negación (~,
P1: 1/1
¬) P2: 1/2 QC: 1/1 T1: 2
CH01-7T Rosen-2311T MHIA017-Rosen-v5.cls May 13, 2011 15:27
Toda proposición se puede negar, anteponiendo a su enunciado: ‘es falso que …’, ‘no es cierto
que…’.
Siendo p una proposición, la negación se representa así: ~p, o por ¬p
4 1 / The Foundations: Logic and Proofs
Tabla de verdad: Table 1 displays the truth table for the negation of a proposition p. This table has a row
TABLE 1 The
Truth Table for for each of the two possible truth values of a proposition p. Each row shows the truth value of
the Negation of a ¬p corresponding to the truth value of p for this row.
Proposition. The negation of a proposition can also be considered the result of the operation of the
negation operator on a proposition. The negation operator constructs a new proposition from
p ¬p
a single existing proposition. We will now introduce the logical operators that are used to form
T F new propositions from two or more existing propositions. These logical operators are also called
F T connectives.
Ejemplos DEFINITION 2 Let p and q be propositions. The conjunction of p and q, denoted by p ∧ q, is the proposition
Encontrar la negación de las siguientes proposiciones:
“p and q.” The conjunction p ∧ q is true when both p and q are true and is false otherwise.
EXAMPLE 5 Find the conjunction of the propositions p and q where p is the proposition “Rebecca’s PC has
more than 16 GB free hard disk space” and q is the proposition “The processor in Rebecca’s
Solution: The conjunction of these propositions, p ∧ q, is the proposition “Rebecca’s PC has
more than 16 GB free hard disk space, and the processor in Rebecca’s PC runs faster than 1
GHz.” This conjunction can be expressed more simply as “Rebecca’s PC has more than 16 GB
Lógica
Proposicional
free hard disk space, and its processor runs faster than 1 GHz.” For this conjunction to be true,
both conditions given must be true. It is false, when one or both of these conditions are false.
▲
Conjunción (∧)Let p and q be propositions. The disjunction of p and q, denoted by p ∨ q, is the proposition
DEFINITION 3
Se puede utilizar cuando se quiere expresar el hecho de que dos proposiciones son verdaderas.
“p or q.” The disjunction p ∨ q is false when both p and q are false and is true otherwise.
Tabla de verdad:
TABLE 2 The Truth Table for TABLE 3 The Truth Table for
the Conjunction of Two the Disjunction of Two
Propositions. Propositions.
p q p∧q p q p∨q
T T T T T T
T F F T F T
F T F F T T
F F F F F F
Ejemplos
p = El sol brilla
q = Está lloviendo
p ∧ q = El sol brilla y está lloviendo
= El sol brilla, pero está lloviendo
Para que esta conjunción sea verdadera, ambas condiciones sean verdaderas. Si una de ellas o
ambas son falsas, la conjunción será falsa.
ree hard disk space, and its processor runs faster than 1 GHz.” For this conjunction to be true,
oth conditions given must be true. It is false, when one or both of these conditions are false.
▲
P1: 1/1 P2: 1/2 QC: 1/1 T1: 2
Lógica
Proposicional
CH01-7T Rosen-2311T MHIA017-Rosen-v5.cls
Let p and q be propositions. The disjunction of p and q, denoted by p ∨ q, is the proposition
“p or q.” The disjunction p ∨ q is false when both p and q are false and is true otherwise.
May 13, 2011 15:27
Disyunción (∨)
Lastheoraciones
Table 3 displays truth table for pque
∨ q. contienen ‘o’ se6 les 1 / Thellama disyunción.
Foundations: Logic and Proofs
QC: 1/1 T1: 2
011 15:27
-2311T Tabla de verdad:
MHIA017-Rosen-v5.cls
TABLE 2 The Truth Table for
May 13, 2011
TABLE 3 The Truth Table for
15:27 TABLE 4 The Truth Table for TABLE 5 The Truth Table for
the Conjunction of Two the Disjunction of Two the Exclusive Or of Two the Conditional Statement
Propositions. Propositions. Propositions. p → q.
p q p∧q p q p∨q p q p⊕q p q p→q
T T T T T T T T F T T T
T F F T F T T F T T F F
F T F F T T F T T F T T
F F F F F F F F F F F T
/ The Foundations: Logic and Proofs
Dos proposiciones p, q, unidas por la disyunción ∨, únicamente es false cuando ambas p, q son falsas, en el
resto de los casos es verdadera. La ‘o’ puede ser incluyente o excluyente.
uth Table for TABLE 5 DEFINITION 4
The Truth Table for
Let p and q be propositions. The exclusive or of p and q, denoted by p ⊕ q, is th
that is true when exactly one of p and q is true and is false otherwise.
f Two Ejemplos TABLE
the 4 The TruthStatement
Conditional Table for TABLE 5 The Truth Ta
the Exclusive
p = Tú puedes comer carne p → q. Or of Two the Conditional Stateme
The truth table for the exclusive or of two propositions is displayed in Table 4.
Propositions.
q = Tú puedes comer pollo p → q.
pp ⊕ qq= Tú puedes comer carne p o pollo. En este
q ejemplo se pdebe →escoger
q una de las dos, pero no ambas. Se
p excluyente. qLa proposiciónpp ⊕ Conditional
hace referencia aquí al ‘o’ qq es verdadera Statements
cuando exactamentep una de q las dos p
es F
verdadera, en los demás cososT
es falsa. T We willTdiscuss several other important ways in which propositions can be com
T T F T T
T
p = El software tiene un error
T F F
T F T T F
q =TEl software tiene una entrada F T
errónea DEFINITION 5 T q be propositions. The conditional statement p → q is the propositi
Let p and
p∨ F T T q.” TheEn conditional statement p →qF is false T
when p is true
oand q isde
false, and tr
F q = El software tiene un error
F o tiene una entrada
F errónea.
In the T
este ejemplo ambas condiciones, una
conditional statement p → q, p is called the hypothesis (or anteceden
las dos, pueden cumplirse,Fy no se excluye
F ninguna de las dos posibilidades.
F and F
q is called the conclusion (or consequence). F
P1: 1/1
CH01-7T Lógica
Proposicional
P2: 1/2 QC: 1/1
Rosen-2311T
T1: 2
MHIA017-Rosen-v5.cls May 13, 2011 15:27
Dos proposiciones p, q, unidas por la condicional ® , únicamente es falsa cuando p es verdadera, y q es falsa,
DEFINITION 4 Let p and q be propositions. The exclusive or of p and q, denoted by p ⊕ q, is the proposition
en el resto de los casos, la implicación es verdadera.
that is true when exactly one of p and q is true and is false otherwise.
Ejemplos
p = María aprende Matemática Discreta (MD) The truth table for the exclusive or of two propositions is displayed in Table 4.
q = María encontrará un buen trabajo
Conditional Statements
p ® q = Si María aprende MD, entonces encontrará un buen trabajo
We will discuss several other important ways in which propositions can be combined.
María encontrará un buen trabajo, a menos que ella no aprenda MD
María encontrará un buen trabajo, siempre que ella aprenda MD
DEFINITION 5 Let p and q be propositions. The conditional statement p → q is the proposition “if p, then
q.” The conditional statement p → q is false when p is true and q is false, and true otherwise.
In the conditional statement p → q, p is called the hypothesis (or antecedent or premise)
and q is called the conclusion (or consequence).
P1: 1/1
CH01-7T Lógica
Proposicional
P2: 1/2 QC: 1/1
Rosen-2311T
T1: 2
MHIA017-Rosen-v5.cls May 13, 2011 15:27
Ejemplos
Cuáles son las sentencias Contrarrcíproca,
DEFINITION 4
Recíproca e Inversa de la siguiente sentencia condicional?
Let p and q be propositions. The exclusive or of p and q, denoted by p ⊕ q, is the proposition
El equipo local gana siempre que llueve that is true when exactly one of p and q is true and is false otherwise.
q siempre que p, es una forma de expresar la condicional p ® q, por tanto, la sentencia original puede ser
The truth table for the exclusive or of two propositions is displayed in Table 4.
re-‐escrita como: Si llueve, entonces el equipo local gana
p = Llueve
q = El equipo local gana Conditional Statements
We will discuss several other important ways in which propositions can be combined.
Sentencia Contrarrcíproca: Si el equipo local no gana, entonces no llueve
Sentencia Recíproca: Si el equipo local gana, entonces llueve
Sentencia Inversa: Si no llueve,5entonces
DEFINITION Let p andelq equipo local The
be propositions. no conditional
gana statement p → q is the proposition “if p, then
q.” The conditional statement p → q is false when p is true and q is false, and true otherwise.
In the conditional statement p → q, p is called the hypothesis (or antecedent or premise)
and q is called the conclusion (or consequence).
P1: 1/1
CH01-7T Lógica
Proposicional
P2: 1/2 QC: 1/1
Rosen-2311T
T1: 2
MHIA017-Rosen-v5.cls May 13, 2011 15:27
T T F T T T
En este caso, p ® q es verdadero, pero su recíproco
T q ®F p es falso.
T T F F
F T T F T T
F F F F F T
Ejemplos
Sea x un entero. Demuestre p ® q, a partir del siguiente enunciado:
Si x2 es impar, entonces x es impar
DEFINITION 4 Let p and q be propositions. The exclusive or of p and q, denoted by p ⊕ q, is the proposition
that is true when exactly one of p and q is true and is false otherwise.
Demostración a partir de la Contrarrecíproca ~q ® ~p:
Si x es par, x2 es par. La Contrarrecíproca es verdadera.
The truth table for the exclusive or of two propositions is displayed in Table 4.
Sea x un par; entonces, x = 2n (en donde n es un entero), por tanto:
Conditional Statements
X = (2n)(2n) = 2(2n ) … también es par.
2 2
We will discuss several other important ways in which propositions can be combined.
Como la Contrarrecíproca (~q ® ~p), es verdadera y, (~q ® ~p) es
equivalente a (p ® q), entonces, es verdadera.
DEFINITION 5 Let p and q be propositions. The conditional statement p → q is the proposition “if p, then
q.” The conditional statement p → q is false when p is true and q is false, and true otherwise.
In the conditional statement p → q, p is called the hypothesis (or antecedent or premise)
and q is called the conclusion (or consequence).
The truth table for p ↔ q is shown in Table 6. Note that the statem
the conditional statements p → q and q → p are true and is false
Lógica
Proposicional
the words “if and only if” to express this logical connective and
by combining the symbols → and ←. There are some other com
“p is necessary and sufficient for q”
“if p then q, and conversely”
“p iff q.”
La Bicondicional («) The last way of expressing the biconditional statement p ↔ q u
“if and only if.” Note that p ↔ q has exactly the same truth valu
Sean p, q dos proposiciones. La sentencia bicondicional p « q, se Tabla
de
verdad:
le como:
p si y solo si q . TABLE 6 The Truth Table for the
Biconditional p ↔ q.
p es necesaria y suficiente para q
p q p↔q
T T T
T F F
Dos proposiciones p, q, unidas por la bicondicional «, es F T F
verdadera cuando ambas proposiciones tengan igual valor de F F T
verdad, en el resto de los casos, la implicación es falsa.
Ejemplos
p = Tú puedes tomar el vuelo
q = Tú compras un tiquete
Lógica
Proposicional
DEFINITION 2 The compound propositions p and q are called lo 1.1 Proposition
The notation p ≡ q denotes that p and q are logi
Precedence of Logical Operators
Precedencia de los Operadores Lógicos
La expresión p ∨ q ∧ ~r es: TABLE 8
We can construct compound propositions using the negation operator and the logic
defined so far. We will generally use parentheses to specify the order in which logic
Precedence of
(p ∨ q ∧ ~r )
Remark: The symbol ≡ is not a logical connectiv
Logical Operators. in a compound proposition are to be applied. For instance, (p ∨ q) ∧ (¬r) is the
of p ∨ q and ¬r. However, to reduce the number of parentheses, we specify that t
but rather is the statement that p ↔ q is a tautolog
Operator Precedence operator is applied before all other logical operators. This means that ¬p ∧ q is the
of ≡ to denote logicalContradicción
of ¬p and q, namely, (¬p) ∧ q, not the negation of the conjunction of p and q, namel
(p ∨ q) ∧ (~r ) ¬ 1 equivalence.
Another general rule of precedence is that the conjunction operator takes prec
∧ 2 the disjunction operator, so that p ∧ q ∨ r means (p ∧ q) ∨ r rather than p ∧ (q ∨
∨ 3 this rule may be difficult to remember, we will continue to use parentheses so that
(p) ∨ (q ∧ ~r ) One way to determine whether two compound
→ 4 Tautología
the disjunction and conjunction operators is clear.
Finally, it is an accepted rule that the conditional and biconditional operators
La disyunción de p o q ∧ ~r ?
↔ 5
table. In particular, the compound propositions p a
have lower precedence than the conjunction and disjunction operators, ∧ and ∨. Co
p ∨ q → r is the same as (p ∨ q) → r. We will use parentheses when the order
La conjunción de p ∨ q y ~r ? ditional operator and biconditional operator is at issue, although the conditional o
precedence over the biconditional operator. Table 8 displays the precedence levels o
operators, ¬, ∧, ∨, →, and ↔.
Tautologías y Contradicciones TABLE 1 Examples of a Tautology
Logic and Bit Operations
Algunas proposiciones P(p, q, … ) contienen solamente V (T) en la and a Contradiction.
última columna de sus tablas de verdad, es decir, son Computers
verdaderas para
represent information using bits. A bit is a symbol with two possible valu
cualquier valor de verdad de sus variables.
Truth A Bit proposiciones se les meaning
estas
Value 0 (zero) and 1 (one). This p of the¬pword bitpcomes
∨ ¬p from pbinary
∧ ¬p digit, becaus
ones are the digits used in binary representations of numbers. The well-known stati
llama Tautologías. T 1 Tukey introduced this terminology in 1946. A bit can be used to represent a truth va
there are two truth values, namely,
F 0 T true andF false. As Tis customarilyF done, we will u
represent true and a 0 bit to represent false. That is, 1 represents T (true), 0 represents
Así mismo, a las proposiciones P(p, q, … ) que contienenvariable
solamente
is called F en variable
a Boolean F if itsTvalue is either
T true or false.
F Consequently
la última columna de sus tablas de verdad, es decir variable
son falsas para using a bit.
can be represented
Computer bit operations correspond to the logical connectives. By replacing t
cualquier valor de verdad de sus variables, a estas proposiciones se les
and false by a zero in the truth tables for the operators ∧, ∨, and ⊕, the tables show
llama Contradicción. for the corresponding bit operations are obtained. We will also use the notation OR
XOR for the operators ∨, ∧, and ⊕, as is done in various programming languages.
Lógica
Proposicional
Ejemplos
De expresiones lógicas expresadas como sentencias
Sean p y q las siguientes proposiciones:
p = Yo compré un billete de lotería esta semana
q = Yo gané el premio del billón de dólares
Represente:
~p ® ~q
Si no compré un billete de lotería esta semana, entonces no me gané el premió del billón de dólares.
Sea:
p = Tú puedes acceder a Internet desde el campus
q = Tú eres el mejor en Ciencias de la Computación
r = Tú eres un estudiante de primer año
p ® (q ∨ ~r)
Lógica
Proposicional
EXAMPLE 2 important ¬(puseful
Show that and ∨ q) and ¬pequivalence,
logical ∧ ¬q are logically
namely,equivalent.
that of ¬(p ∨ q) with ¬p ∧ ¬q. This logical
equivalence is one of the two De Morgan laws, shown in Table 2, named after the English
Solution: The truth
mathematician tablesDe
Augustus forMorgan,
these compound propositions century.
of the mid-nineteenth are displayed in Table 3. Because
the truth values of the compound propositions ¬(p ∨ q) and ¬p ∧ ¬q agree for all possible
EXAMPLE 2 Show that ¬(pof∨the
combinations q)truth ¬p ∧ ¬q
and values of pare
andlogically equivalent.
q, it follows that ¬(p ∨ q) ↔ (¬p ∧ ¬q) is a tautology
and that these compound propositions are logically equivalent.
▲
Ejemplos Solution: The truth tables for these compound propositions are displayed in Table 3. Because
De construcción de the truth values
tablas of the compound propositions ¬(p ∨ q) and ¬p ∧ ¬q agree for all possible
TABLEde verdad
3 Truth Tables for ¬(p ∨ q) and ¬p ∧ ¬q.
combinations of the truth values of p and q, it follows that ¬(p ∨ q) ↔ (¬p ∧ ¬q) is a tautology
Construir la tabla deand
verdad q para
pthat these p cada
compound una¬(pde∨ q)lasare
propositions siguiente
logically¬q proposiciones
equivalent. compuestas:
▲
∨q ¬p ¬p ∧ ¬q
a. ~(p ∨ q) T T T F F F F
b. ~p ∧ ~q TABLE 3 Truth Tables for ¬(p ∨ q) and ¬p ∧ ¬q.
T F T F F T F
F
p qT p∨Tq ¬(pF∨ q) ¬p
T ¬q
F ¬p ∧
F ¬q
F F F T T T T
T T T F F F F
T F T F F T F
EXAMPLE 3 F that Tp → q and
Show T ¬p ∨ q are
F logicallyTequivalent.
F F
F F F T T T T
Solution: We construct the truth table for these compound propositions in Table 4. Because the
truth values of ¬p ∨ q and p → q agree, they are logically equivalent.
▲
EXAMPLE 3 Show that p → q and ¬p ∨ q are logically equivalent.
a. ~p ∨ q Solution: We construct the truth table for these compound propositions in Table 4. Because the
b. p ® q TABLE 4 Truth Tables for ¬p ∨ q and
truth values of ¬p ∨ q and p → q agree, they are logically equivalent.
▲
p → q.
p q ¬p ¬p ∨ q p→q
TABLE
T 4 TruthFTables forT¬p ∨ q and T
T
p → q.
T F F F F
F
p qT ¬pT ¬p T∨ q p →T q
F F T T T
T T F T T
T F F F F
Ejercicios FWe willT now establish
T a logical equivalence of two compound propositions involving three
T T
different
F propositional
F T variables
T p, q, and
T r. To use a truth table to establish such a logical
a. (p ∧ q) ® (pequivalence,
∨ q) we need eight rows, one for each possible combination of truth values of these
b. (p ® q) ∨ (~p
three® q) We symbolically represent these combinations by listing the truth values of p,
variables.
We will now establish a logical equivalence of two compound propositions involving three
q, and r, respectively. These eight combinations of truth values are TTT, TTF, TFT, TFF, FTT,
different
FTF, FFT,propositional
and FFF; we variables and we
p, q,when
use this order r. To use athe
display truth table
rows to truth
of the establish
table.such
Notea that
logical
we
equivalence, we need eight rows, one for each possible combination of truth values
need to double the number of rows in the truth tables we use to show that compound propositions of these
three variables.for
are equivalent Weeach
symbolically
additional represent thesevariable,
propositional combinations
so that by
16 listing theneeded
rows are truth values of p,
to establish
q, and r, respectively. These eight combinations of truth values are TTT, TTF, TFT,
the logical equivalence of two compound propositions involving four propositional variables, TFF, FTT,
Lógica
Proposicional
Pre-‐Taller 1