Foundations1

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

Commutative Laws:

p ∨ q ⇔ q ∨ p p ∧ q ⇔ q ∧ p

What is the value of 10 3  ? What is the value of 10 7

10 3  = 10! 3!7! = 10×9×8 3×2×1 = 5 × 3 × 8 = 120.

Does K5 have an Eulerian cycle? Does it have a Hamiltonian cycle?

Recall that K5 is the complete graph with 5 vertices. The degree of every vertex in K5 is even. A theorem we learned in class states that a connected undirected graph has an Euler cycle iff the degree of every vertex is even. Therefore K5 has an Euler cycle. K5 also has a Hamilton cycle. To see this, simply label the vertices v1, v2, v3, v4and v5. Since every vertex shares an edge with every other vertex in a complete graph, v1v2v3v4v5v1 is clearly a Hamilton cycle.

Implication Law:

(p → q) ⇔ (¬p ∨ q)

A - B

"A minus B", or "A complement B" everything in A except for anything in its overlap with B

Contrapositive: If I go to the party then either Bob or Mary will go too.

"If Bob doesn't go to the party and Mary doesn't go to the party, then I don't go either."

State the contrapositive of the following proposition (3 pts) : "If today is Thanksgiving, then it is Thursday"

"If today is not Thursday, then today is not Thanksgiving."

Contrapositive Law:

(p → q) ⇔ (¬q → ¬p)

Associative Laws:

(p ∨ q) ∨ r ⇔ p ∨ (q ∨ r) (p ∧ q) ∧ r ⇔ p ∧ (q ∧ r)

Write the following conjecture using quantifiers: "Every even integer greater than 2 is the sum of two primes."

(∀ even integers x > 0)(∃ prime number y)(∃ prime number z)(x = y + z).

Is the following a tautology, contradiction or contingency? (p ↔ q) ∧ (¬p ∧ q)

: This is a contradiction. One way to see this is to build a truth table. Another way is to observe that (p ↔ q) is true in exactly two cases (i) both p and q are True and (2) both p and q are False. In both case (¬p ∧ q) is False, so the proposition as a whole is always False.

connected

A graph is connected is there is a path between every pair of vertices in the graph

A ⊆ B,

A is a subset of (or is included in) B, denoted by A ⊆ B, or equivalently

a simple path

A path in an undirected graph is a simple path if no vertices are repeated in the sequence. That is, no vertex is visited twice.

tautology

A statement which is always true because of its logical structure. p ∨ ¬p

A ⇔ B is true only if both A and B are false, or both A and B are true.

incident.

An edge and a vertex on that edge are called

B ⊇ A.

B is a superset of (or includes) A, denoted by B ⊇ A.

Horseshoe Material Implication if.....then....only if superset

contrapositive

If not q then not p

converse

If q, then p

Contrapositive: If x and y are both even numbers, then their sum is even.

If the sum of x and y is not even, then either x is not even or y is not even".

How many boolean functions of n variables are there?

If there are n variables, then the truth table for the function will have 2n rows. The value of the function for each row can be either True or False, so there are two possible values for each of the 2n rows. The answer is therefore: 2(2n) .

Negate the following propositional form and simplify: (¬r ∨ q) → p

Recall that a → b is logically equivalent to ¬a∨b. Using this rule, we can rewrite (¬r∨q) → p as ¬(¬r∨q)∨p. Then we can apply DeMorgan's Law to get (r∧ ¬q)∨p. We then negate this proposition to get ¬((r ∧ ¬q)∨p). By DeMorgan's Law, this is equivalent to (¬(r ∧ ¬q)∧ ¬p). Another application of DeMorgan's Law results in (¬r ∨ q) ∨ p

How many rows does a truth table with n variables have?

Since each of the n variables can take on two values, the answer is 2n

Let A = {∅, 1, {1, 2}} What is |P OW(A)|?

Solution: 2 3 = 8

Let A = {∅, 1, {1, 2}} What is |A|?

Solution: 3

(i) (∃x)(∀y)(P(x, y)) (ii) (∀y)(∃x)(P(x, y)) (c) Give a predicate P(x, y) that makes both (i) true and (ii) false In all solutions, assume the universe of discourse is the natural numbers.

Solution: Not possible! For all predicates P(x, y), (∃x)(∀y)(P(x, y)) → (∀y)(∃x)(P(x, y))

Does K4,6 have an Eulerian cycle? Does it have a Hamiltonian cycle?

Solution: Recall that a graph has an Eulerian cycle iff the degree of every vertex is even. In K4,6, the vertices can be partitioned into two sets V1, with 4 vertices, and V2, with 6 vertices. Every vertex in V1 shares an edge with each of the 6 vertices in V2 and with no other vertices, and thus the degree of every vertex in V1 is even. Every vertex in V2 shares an edge with each of the 4 vertices in V1 and with no other vertices, and thus the degree of every vertex in V2 is also even. Since the degree of every vertex in the graph is even, it has an Eulerian cycle. K4,6 does not have a Hamilton cycle. You should try writing up a proof for this, and we will go over it in class on Wednesday. The proof idea the vertices of the cycle must alternate between a vertex in V1 and a vertex in V2 and since the number of vertices in the two sets differ, the path will get "stuck" on one side or the other.

(i) (∃x)(∀y)(P(x, y)) (ii) (∀y)(∃x)(P(x, y)) (d) Give a predicate P(x, y) that makes both (i) false and (ii) true. In all solutions, assume the universe of discourse is the natural numbers.

Solution: x > y

(i) (∃x)(∀y)(P(x, y)) (ii) (∀y)(∃x)(P(x, y)) (b) Give a predicate P(x, y) that makes both (i) and (ii) false. In all solutions, assume the universe of discourse is the natural numbers.

Solution: x > y and x < y

(i) (∃x)(∀y)(P(x, y)) (ii) (∀y)(∃x)(P(x, y)) In all solutions, assume the universe of discourse is the natural numbers. (a) Give a predicate P(x, y) that makes both (i) and (ii) true.

Solution: x > y or x ≤ y

simple graph

The edges are undirected. (they don't have arrow-heads) • There is at most one edge between each pair of vertices. • There are no edges between a vertex and itself. (no "self loops")

If a bipartite graph has a total of 10 vertices, what is the maximum number of edges it can have?

The maximum number will be 5 × 5 = 25. In general, the maximum number of edges a bipartite graph with n vertices can have is bnc × dxe. Note: bnc is read "the floor of n" and equals the largest integer that is less than or equal to n. dne is read "the ceiling of n" and equals the smallest integer that is greater than or equal to n.

Contrapositive: I will get an A only if I study.

The original statement is equivalent to "If I get an A, then I studied." The contrapositive is: "If I don't study, then I won't get an A".

The statement A ∨ B is true if A or B (or both) are true; if both are false, the statement is false

¬

The statement ¬A is true if and only if A is false.

Prove that n r  = n n−r  .

Theorems about binomial coefficients can generally be proven in two different ways, either using the algebraic definition or by using the fact that the represent "choosing". Proof 1: n n−r  = n! ((n−(n−r))!(n−r)! = n! r!(n−r)! = n r  Proof 2: n r  represents the number of ways to choose subsets of r elements from a set of n elements. By symmetry, choosing a subset to r elements is equivalent to not choosing a subset of the other n − r elements.

t/f (∀y ∈ N)(∃x ∈ N)(x < y)

This is false. If y = 1, then there does not exist a natural number x such that x < y

True or false: For all sets A, {∅} ⊆ A.

This is false. It is true that ∅ ⊆ A for all A. Note though that {∅} 6= ∅.

t/f (∀x ∈ N)(∃y ∈ N)(y < x)

This is false. it says the same thing as (b).

T/F (∀x ∈ N)(∃y ∈ N)(x < y)

This is true, since there is no largest natural number.

adjacent.

Two vertices that share an edge are called

We have shown that {AND, OR, NOT} is universal. Is {AND, NOT} universal?

Yes. By DeMorgan's Laws, ¬(A ∨ B) = (¬A ∧ ¬B). Negating both sides of this equation gives us A ∨ B = ¬(¬A ∧ ¬B). This shows that OR can be replaced with an expression made up of AND and NOT.

Euler cycle

a cycle that traverses each edge of a graph once and only once.

contradiction

a proposition that is always false. p ∧ ¬p

contingency

a proposition that is neither a tautology nor a contradiction. p ∨ q → ¬r

proposition

a statement that is either true or false.

path

an undirected graph is a sequence of vertices v1v2v3...vn such that there is an edge between every consecutive pair of vertices in the sequence.

complete bipartite graph

bipartite graph such that for all v ∈ V1 and all u ∈ V2, there is an edge between v and u. Km,n denotes the complete bipartite graph with m and n vertices in V1 and V2 respectively. Km,n has a total of m × n edges.

A U B

everything that is in either of the sets

he statement A ∧ B is true if A and B are both true; else it is false.

⊕, xor

he statement A ⊕ B is true when either A or B, but not both, are true. A ⊻ B means the same.

Hamilton cycle

is a cycle that visits each vertex in a graph exactly once, except that the starting and ending vertices are the same.

A intersect B

only the things that are in both of the sets

Absorption Laws:

p ∧ (p ∨ q) ⇔ p p ∨ (p ∧ q) ⇔ p

Identity Laws

p ∧ T ⇔ p p ∨ F ⇔ p

Distributive Laws:

p ∨ (q ∧ r) ⇔ (p ∨ q) ∧ (p ∨ r) p ∧ (q ∨ r) ⇔ (p ∧ q) ∨ (p ∧ r)

Domination Laws:

p ∨ T ⇔ T p ∧ F ⇔ F

Idempotent Laws:

p ∨ p ⇔ p p ∧ p ⇔ p

bipartite graph

s a simple graph in which the set of vertices V can be partitioned into two set of vertices V1 and V2 such that every edge is incident to a vertex in V1 and a vertex in V2. In other words, all edges go between the two sets, and there are no edges connecting two vertices that are in the same set.

complete graph

simple graph with an edge between every pair of vertices. A complete graph with n vertices has n(n−1) 2 edges. We can derive this in a few different ways: • Each of the n vertices are adjacent to each of the other vertices, so there are n − 1 edges incident to each vertex. A common error is to think that there are thus n(n − 1) edges, but we need to remember each edge is double-counted so we need to divide by 2. • Think about drawing in the edges methodically, vertex by vertex. The first vertex we pick can be connected to n - 1 vertices by edges. When we are done with the first vertex, we move onto the second vertex. This vertex is already adjacent to the first vertex, so we need to add (n - 2) edges to make it adjacent to the other vertices. Continuing this pattern, we can see that there are 1 + 2 + 3 + 4 + ... + (n − 1) edges. This arithmetic sum is n(n−1) 2 . • Each pair of vertices has an edge between it. There are n 2  ways to pick pairs of vertices. n 2  = n! (n−2)!2! = n(n−1) 2 .

List all of the partitions of the set {A, B, C}

{{A},{B},{C}} {{A},{B, C}} {{B},{A, C}} {{C},{A, B}} {{A, B, C}} NO NULLS

What is P OW(A)?

{∅, {∅}, {1}, {{1, 2}}, {1, {1, 2}}, {∅, {1, 2}}, {∅, 1}, {∅, 1, {1, 2}}}

De Morgan's Laws:

¬(p ∧ q) ⇔ ¬p ∨ ¬q ¬(p ∨ q) ⇔ ¬p ∧ ¬q

Double Negation Law:

¬(¬p) ⇔ p

∀ x: P(x) or (x) P(x) means P(x) is true for all x.

∃ x: P(x) means there is at least one x such that P(x) is true.


Ensembles d'études connexes

teas - science practice questions

View Set

chapter 18 potatoes and 28 food prep and garnish

View Set

Applications with Standard Normal Distribution Assignment and Quiz 80%

View Set

Chapter 30 - China: The World's Most Populous Country

View Set

DECA Finance Cluster Exam #1 Corrections

View Set

Electromagnetic spectrum and light

View Set

Chapter 41: The Child with an Integumentary Disorder/Communicable Disease - ML5

View Set