Existential and universal quantifiers

  • Context: Undergrad 
  • Thread starter Thread starter bonfire09
  • Start date Start date
  • Tags Tags
    Universal
Click For Summary

Discussion Overview

The discussion revolves around converting a natural language statement involving conditions and quantifiers into logical form. Participants explore existential and universal quantifiers in the context of a quarantine scenario related to measles in a dormitory setting.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant seeks assistance in breaking down the sentence "If anyone in the dorm has the measles, then everyone who has a friend in the dorm will have to be quarantined" into logical form.
  • Another participant suggests identifying phrases that correspond to existential ("there exists") and universal ("for all") quantifiers.
  • Some participants propose various logical expressions, attempting to represent the original sentence using different variables and quantifiers.
  • Concerns are raised about the necessity of variable scope and the correct representation of relationships between individuals in the dorm.
  • One participant introduces the idea of using piecewise functions to represent the conditions, which is challenged by another participant as not being valid predicate logic.
  • There is a discussion about whether the logical statements need to match textbook examples exactly or if conceptual understanding is sufficient.
  • Participants express uncertainty about the correct formulation of logical expressions and the implications of variable scope in their statements.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the correct logical representation of the original statement. Multiple competing views and interpretations of the logical structure remain present throughout the discussion.

Contextual Notes

Participants highlight the importance of variable scope and the need for clarity in logical expressions. There are unresolved questions regarding the necessity of additional variables and the exact formulation of the logical statements.

bonfire09
Messages
247
Reaction score
0
If anyone in the dorm has the measles, then everyone who has a friend
in the dorm will have to be quarantined

I'm supposed to convert this sentence into a logical form. I'm having trouble breaking this sentence apart because I am not sure what to look for. I need help with this thanks?
 
Physics news on Phys.org
Can you see statements similar to as "for all" and "there exists" in the sentence?
 
so you mean like this.
where it says if anyone in the dorm has measles is similar to there exists
and where it say where "everyone who has a friend..." is similar to for all

but what about the if and the then? I tried breaking it apart like that and the answer I got was way off the original answer.
 
OK, so you can already write it like this:

\exists person in dorm who has measles, then \forall person who has a friend will be quarantined.

You're still missing an existential quantifier though. Maybe you can try to write the previous sentence in even more formal notation?
 
well my original answer goes like this

∃ x(D(x,y)^M(x)) → ∀y((F(y,x)^Q(y))

where D(x,y) is where x is anyone who lives in the dorm y
M(x) is where x has measles
followed by
F(y,x) where y is the friend of x who has measles
Q(y)- y the friend has to get quarantened
 
bonfire09 said:
well my original answer goes like this

∃ x(D(x,y)^M(x)) → ∀y((F(y,x)^Q(y))

where D(x,y) is where x is anyone who lives in the dorm y
M(x) is where x has measles
followed by
F(y,x) where y is the friend of x who has measles
Q(y)- y the friend has to get quarantened

This can be improved. You have only two variables right now x and y. But you need much more. First, you use x for the person who live in the dorm and the friend who lives in the dorm (who are not necessarily the same person), you need to use separate variables.
You use y for the person who has the friend and for the dorm. These require separate variables (logically, you don't need an extra variable, but increases readability a lot). Furthermore, I'm not sure if you need a variable for the dorm.
 
∃ x(F(x,y)^D(x,z)^E(y,z)^M(x)) → ∀y((F(y,x)^Q(y))


where F(x,y) is where x is friend of y
D(x,z) is where x friend lives in dorm z
E(y,z)- is where y lives in a dorm as well z
M(y)- is where y has measles
F(y,x) where y is the friend of x who has measles
Q(y)- y the friend has to get quarantined

Am i doing this right now?
 
Yeah I'm not able to figure this one out. I tried to break apart like this

∃ x(If Someone has measles then their friends will all be quarantined)
∀ z(If z is a friend of x and lives in the dorm then z would have to be quarantined)


is there something free online that would help me figure this out?
 
bonfire09 said:
∃ x(F(x,y)^D(x,z)^E(y,z)^M(x)) → ∀y((F(y,x)^Q(y))


where F(x,y) is where x is friend of y
D(x,z) is where x friend lives in dorm z
E(y,z)- is where y lives in a dorm as well z
M(y)- is where y has measles
F(y,x) where y is the friend of x who has measles
Q(y)- y the friend has to get quarantined

Am i doing this right now?

No, it isn't correct yet. If you are writing a statement (as opposed to a statement-expressions) every variable should be in the "scope" of some quantifier. If you examine what you have written, the variable "z"is not in the scope of any quantifier. So you haven't written a statement.

To express "if anyone in the dorm has measles", think of it as "if there exists a person who is both in the dorm and has measles". You only need one variable to express this.

D(x) : x lives in the dorm
M(x): x has measles

To express "Everyone who has a friend in the dorm will have to be quarantined", I think you only need two variables.

F(x,y) : y is a friend of x
As above, D(y): y lives in the dorm
Q(x): x must be quarantined

Think of it as saying: For each person x, if there is some y who is a friend of x and who lives in the dorm then x must be quarantined.

The statement does not say that y must have measles.
 
  • #10
do these statements have to look exactly the same as the ones in the book? Mine are coming out pretty similar but a little bit off. I may add an extra variable like q(x) to it for example. Should I worry about that or as long I am getting the concepts that's fine? and thanks a lot for your guys help!
 
  • #11
bonfire09 said:
do these statements have to look exactly the same as the ones in the book?
That's a question only your instructor can answer.
Mine are coming out pretty similar but a little bit off. I may add an extra variable like q(x) to it for example.
g(x) isn't a variable. 'x' is a variable. What do your text materials call expressions like "g(x)"?
Should I worry about that or as long I am getting the concepts that's fine?
You have to get the concepts to the extent that your answers are correct. Can you give a correct answer to this problem?
 
  • #12
Why not use piecewise functions:

H(x)=0 if no one has measles, or H(x)=1 if at least one person does.
F(y)=1 if person y has a friend in the dorm, or 0 if they don't.
Q(y)=1 if person y must be quarantined, or 0 if they don't.

Therefore, if \exists y_0<img src="/styles/physicsforums/xenforo/smilies/arghh.png" class="smilie" loading="lazy" alt=":H" title="Gah! :H" data-shortname=":H" />(x)F(y_0)=1 =&gt; Q(y_0)=1
 
  • #13
meldraft said:
Why not use piecewise functions:

H(x)=0 if no one has measles, or H(x)=1 if at least one person does.
F(y)=1 if person y has a friend in the dorm, or 0 if they don't.
Q(y)=1 if person y must be quarantined, or 0 if they don't.

Therefore, if \exists y_0<img src="/styles/physicsforums/xenforo/smilies/arghh.png" class="smilie" loading="lazy" alt=":H" title="Gah! :H" data-shortname=":H" />(x)F(y_0)=1 =&gt; Q(y_0)=1

This is not valid predicate logic and totally not the point of the exercise.
 
Last edited:
  • #14
Stephen Tashi said:
That's a question only your instructor can answer.

I'm actually trying to learn this stuff on my own right now. P(x) represents a statement. Yeah I can try to give the correct answer now.


∃x (D(x)^M(x))→∀y(F(y,x)^D(y))→q(y)

D(x)- x lives in a dorm
M(x)- x has the measles
F(y,x)-y is a friend of x
D(y)-y lives in a dorm
q(y)- y needs to quarantined
 
  • #15
bonfire09 said:
I'm actually trying to learn this stuff on my own right now. P(x) represents a statement. Yeah I can try to give the correct answer now.∃x (D(x)^M(x))→∀y(F(y,x)^D(y))→q(y)

D(x)- x lives in a dorm
M(x)- x has the measles
F(y,x)-y is a friend of x
D(y)-y lives in a dorm
q(y)- y needs to quarantined

Two remarks. You have something of the form A\rightarrow B\rightarrow C right now. It would be better to add some brackets here. So I think you mean:

∃x (D(x)^M(x))→(∀y(F(y,x)^D(y))→q(y))

Anyway. You say F(y,x), which means that y is a friend of x. But this x does not need to be the same x that has measles! The statement here is:

If anyone in the dorm has the measles, then everyone who has a friend in the dorm will have to be quarantined.

So let's say John has measles and let's say Robert lives in the same dorm. Then any friend of Robert needs to be quarantined. This is how I interpret the sentence.
What you wrote is that only the friends of John need to be quarantined.

So you can not use F(y,x). You need to introduce a new variable z somehow and write F(y,z).
 
  • #16
∃x (D(x)^M(x))→∀y(F(y,x)^D(y))→q(y)

You have to pay attention to the "scope" of the quantifiers. How to define "scope" formally may be in the materials you are studying or it may only be treated informally. I can only explain it informally!

We already know that on a page in a math book, that a variable like 'x' may mean one thing in one paragraph and something different in the next. For example, in problem 1, 'x' may stand for one thing and in problem 23, 'x' may mean something different. This similar to the "scope" of variable in computer programming. The value of 'x' in the code for one function doesn't determine the value of 'x' in the code for another function, unless 'x' is variable whose "scope" includes both functions (such as a "global" variable).

When you use a quantifer "there exists" on the variable 'x' in an exression that contains lot's of x's, the "there exists" may only apply to a few of them. The way to be unambiguous about this is to use parentheses or brackets to show what a quantifier applies to.

For example:

"There is person in class who is smart and everyone in class is has limited abilities".

S(x): x is smart
L(x) : x has limited abilities
C(x): x is in class

\exists x \{ C(x) \wedge S(x) \} \wedge \forall x \{ C(x) \rightarrow L(x) \}

It is clearer to most human minds to write the above as:

\exists x \{ C(x) \wedge S(x) \} \wedge \forall y \{ C(y) \rightarrow L(y) \}

but it is not necesary to introduce the symbol 'y'. The symbol 'x' can be re-used by putting it in the scope of different quantifiers.

Someone reading your answer would have to interpret all the x's as being in the scope of the "there exists" and your answer, as I read it, claims: "There is a person with the property that if that person lives in the dormitory and has measels then all friends of that person who live in the dormitory must be quarantined."

You need to introduce another quantifier on the right hand side of the \rightarrow. The idea you need to express is that "for each y { if ( there is some x who lives in the dormitory and y is a friend of x) then (y must be quarantined)}.
 
  • #17
∃x (D(x)^M(x))→ ∃y((∀z F(y,z))^D(y))→q(y)

I think now it reads right ."For someone x if x lives in a dorm and has the measles then everyone z who has a friend y and lives in the dorm has to get quarantined."
 
Last edited:
  • #18
bonfire09 said:
∃x (D(x)^M(x))→ ∃y((∀z F(y,z))^D(y))→q(y)

That says "If there is some x who lives in the dorm and has measles then there is some y such that if y is a friend of everything and y lives in the dorm then y must be quarantined"

You need to change the order of the \exists y and \forall z and get z quarantined instead of y.

\exists x \{ D(x) \wedge M(x)\} \rightarrow \forall z \{ \exists y\{ ... etc.
 
  • #19
∃x (D(x)^M(x))→ ∀z((∃y F(y,z))^D(z))→q(z)

so every y who has a friend z where z lives in the dorm? Is this right?
 
Last edited:
  • #20
bonfire09 said:
∃x (D(x)^M(x))→ ∀z((∃y F(y,z))^D(z))→q(z)

so every y who has a friend z where z lives in the dorm? Is this right?

The last part of what you wrote needs a minor fix. Put y in the dorm, not z. The last part should apply to every z who has a friend y with the property that y lives in the dorm.
 
  • #21
micromass said:
This is not valid predicate logic and totally not the point of the exercise.

Oooops, sorry! The engineer inside me is to blame :biggrin:
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 33 ·
2
Replies
33
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 23 ·
Replies
23
Views
5K
  • · Replies 10 ·
Replies
10
Views
7K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 82 ·
3
Replies
82
Views
9K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K