Docsity

Discrete Math Homework 2: 'There is Exactly One' Problem, Assignments of Discrete Structures and Graph Theory

Toggle sidebar
bg1
CMSC 250 - Summer 2008 - Homework 2
Due Tuesday June 10, 2008
Issued June 6, 2008
For the *Guided Question with Prof. D. Math* Iencourage (but do not mandate) you to let Prof
D. Math guide you, and to limit collaboration to understanding the “There are exactly two” handout and
only seeing the Instructor or the TA if you are further lost.
1. (10 points) *Guided Question with Prof. D. Math*
Hi! I’m Prof. D. Math (My name is “Discrete” in more ways than one ,), and I’m here to help you
learn Discrete Math! Your mission, should you choose to accept it, is to write a First Order Logic
formula for “There is exactly one element in D that makes P(x)true.” (“There is exactly
one.”)
A skill to learn is to recognize when a problem is similar to others done in class or in the book and to
imitate the solution for the one that you know to solve the other. I’ll guide you through applying this
skill. Hopefully by the end of this problem you will know this skill a little better!
Now, in class Peter did the example ‘‘There are exactly two elements in Dthat make P(x)
true.’’ He also provided the solution in an handout There are Exactly Two (If you don’t have it see
Peter or the TA for it now ! I cannot fully help you until you have the handout.) This problem is a
similar problem to the one you have to solve.
The key to solving a problem similar to one you have:
(a) Understand the problem you are given/have.
(b) Recognize the similarities between the two problems.
(c) Discover what you must do differently to solve the one you have to solve. (Sometimes the
differences are slight, sometimes not).
It’s OK to be doing them all at once! In fact, I’ll ask you a series of questions that will help you do all
three of once. I have talked to Peter and you must answer all these questions to get full credit
on this problem. Ready? Let’s go!
First, when he solved “There are exactly two”, he broke it up into two parts and ∧’ed them together.
The two parts were “There are at least two.” and “There are not at least three.” The problem we are
trying to solve can also be broken up into two components similar to these
•What are the two components for your problem (‘‘There is exactly one’’)? Write them
down in English .
•What is a difference between your components and the components for ‘‘There are exactly
two’’?
In “There are exactly two”, Peter used two quantifiers (to get two variables) for “at least two” and
three quantifiers (to get three variables) for “there are not at least three”
•How many quantifiers do you need for each of the components in your problem?
1
pf2

Partial preview of the text

Download Discrete Math Homework 2: 'There is Exactly One' Problem and more Assignments Discrete Structures and Graph Theory in PDF only on Docsity!

CMSC 250 - Summer 2008 - Homework 2

Due Tuesday June 10, 2008

Issued June 6, 2008

For the Guided Question with Prof. D. Math I encourage (but do not mandate) you to let Prof D. Math guide you, and to limit collaboration to understanding the “There are exactly two” handout and only seeing the Instructor or the TA if you are further lost.

  1. (10 points) Guided Question with Prof. D. Math Hi! I’m Prof. D. Math (My name is “Discrete” in more ways than one ,), and I’m here to help you learn Discrete Math! Your mission, should you choose to accept it, is to write a First Order Logic formula for “There is exactly one element in D that makes P(x) true.” (“There is exactly one.”) A skill to learn is to recognize when a problem is similar to others done in class or in the book and to imitate the solution for the one that you know to solve the other. I’ll guide you through applying this skill. Hopefully by the end of this problem you will know this skill a little better! Now, in class Peter did the example ‘‘There are exactly two elements in D that make P (x) true.’’ He also provided the solution in an handout There are Exactly Two (If you don’t have it see Peter or the TA for it now! I cannot fully help you until you have the handout.) This problem is a similar problem to the one you have to solve. The key to solving a problem similar to one you have:

(a) Understand the problem you are given/have. (b) Recognize the similarities between the two problems. (c) Discover what you must do differently to solve the one you have to solve. (Sometimes the differences are slight, sometimes not).

It’s OK to be doing them all at once! In fact, I’ll ask you a series of questions that will help you do all three of once. I have talked to Peter and you must answer all these questions to get full credit on this problem. Ready? Let’s go!

First, when he solved “There are exactly two”, he broke it up into two parts and ∧’ed them together. The two parts were “There are at least two.” and “There are not at least three.” The problem we are trying to solve can also be broken up into two components similar to these

  • What are the two components for your problem (‘‘There is exactly one’’)? Write them down in English.
  • What is a difference between your components and the components for ‘‘There are exactly two’’?

In “There are exactly two”, Peter used two quantifiers (to get two variables) for “at least two” and three quantifiers (to get three variables) for “there are not at least three”

  • How many quantifiers do you need for each of the components in your problem?

It’s never good to copy things blindly, but to understand. Now, in “There are exactly two” Peter used 6 = and = (such as x 6 = y) within his solution.

  • Do you need to use 6 = and = (such as x 6 = y) in yours? If so, in which components and why? If not, why not?

Note: While you are doing this problem, feel free to revisit the handout and re-read sections as appropriate. That is what you are supposed to do. And if you do not understand the handout, feel free to ask Peter or the TA - they’ll be happy to help you understand it! Now look again at the two parts of the formula “there are exactly two.” Try to see the similarities and differences.

  • Now write the formulas for the two components. Leave any negations (∼) on the outside for now. (Hint: you should have at least one for at least one of the two components)

You are almost done!

  • Now bring in all negations (∼) as far in as possible. Will you need to use the extended Demorgan’s Laws? (The formulas given in the handout.) Why or Why not?
  • Now present to me the full formula by conjuncting (∧’ing) your two components together. If you did everything correctly, this will be your final answer.
  1. (10 points) Your turn now! Now give me a formula in First Order Logic for “There is exactly one element in D that makes P (x) true or there are exactly two elements in D that makes P (x) true.” You must give the formula in two components. Just taking the disjunction of the formula on the handout and your formula for #1 without simplifying will give you no credit. This is a problem similar to the two you dealt with before, and I want you to try doing it without me. (Prof D. Math) Good Luck!
  2. (20 points) State whether the following formulas are true or false. Justify. Use the following Predicate Definitions:
  • P (x) ⇔ x is odd
  • Q(x) ⇔ x is even
  • R(x, y) ⇔ x + y is even

(a) (10 points) ∀x ∈ { 1 , 2 , 3 , 4 } [ ∀y ∈ { 1 , 2 , 3 , 4 } [ P (x) ↔ Q(y) ] ] (b) (10 points) ∃x ∈ { 1 , 2 } [ P (x) ∧ (∀z ∈ { 1 , 2 } [ ∼ R(x, z) ]) ]

  1. (20 points) Please write the negation of the formulas given in Problem 3. You must bring the negation ∼ inside as much as possible (The ∼ should be next to predicates only).
  2. (20 points) Let’s look at the Phrase “All Roads lead to Rome” for inspiration. So Assume a domain of Roads R and a domain of cities C. Now consider the following predicate definitions: - Rm(r) ⇔ r leads to Rome. - P s(r) ⇔ r leads to Paris. - T (r, c) ⇔ road r passes through city c.

Now write ‘‘If some road leads to Paris, then all roads that lead to Rome do not pass through any city.’’ in First Order Logic.

  1. (20 points) Using the Predicates given in Problem #5, translate the following first order logic formula to English: ∃r 1 ∈ R [ ∼ P s(r 1 ) ∧ T (r 1 , Rome) ]