Discussion:
Questions for Set Theory
(too old to reply)
Steven Nieh
2009-04-12 20:24:55 UTC
Permalink
I got some questions about Set Theory for the 2005 and 2003 Final. I came
up with different solutions compared to the sample solutions given. Please
tell me if they are correct.

2005:
1. Ran (Canadians DomainRestriction vacation) - Ran(Canada
DomainRestriction live) = Empty Set

2. Ran(Vacation) Intersection CitiesInEurope = Empty Set

3. Canadians ⊆ dom( (Canadians DomainRestriction vacation)
RangeRestriction CitiesInEurope)

Also, what would be the meaning of relation (vacation-live)?

2003:

1. Ran (Children DomainRestriction get) - Ran ( Children DomainRestriction
want) != EmptySet

2. !( children DomainRestriction fromSanta) = EmptySet

Thanks!
Steve
Nancy Day
2009-04-12 20:48:00 UTC
Permalink
Post by Steven Nieh
I got some questions about Set Theory for the 2005 and 2003 Final. I
came up with different solutions compared to the sample solutions given.
Please tell me if they are correct.
1. Sentence is: Every Canadian has taken a vacation somewhere that they
do not live.
Post by Steven Nieh
1. Ran (Canadians DomainRestriction vacation) - Ran(Canada
DomainRestriction live) = Empty Set
Not correct. There's nothing in this to refer to "all Canadians"
"ran (Canadians Domain Restriction vacation)" are the places that
Canadians go on vacation for those Canadians who do go on vacation.
Also remember that the sentence says "they do not live".

If the above had been:

Ran (Canadians DomainRestriction vacation) - Ran(Canada DomainRestriction live) NOT= Empty Set

it would mean "Some Canadians have taken a vacation someplace they do
not live."


2. Sentence is: Every person has taken a vacation somewhere other than
a city in Europe.
Post by Steven Nieh
2. Ran(Vacation) Intersection CitiesInEurope = Empty Set
Not correct. The formalization above means "No vacations are
taken in cities in Europe."


3. Sentence is: Some Canadians have taken a vacation in cities
in Europe.
Post by Steven Nieh
3. Canadians ⊆ dom( (Canadians DomainRestriction vacation)
RangeRestriction CitiesInEurope)
Not correct. The above formalization means "All Canadians
have taken a vacation in a city in Europe."
Post by Steven Nieh
Also, what would be the meaning of relation (vacation-live)?
This the relation between People and Places for people who have
vacationed somewhere that they do not live.
1. Sentence is: It is not the case that every child gets all the gifts
that they want.
Post by Steven Nieh
1. Ran (Children DomainRestriction get) - Ran ( Children
DomainRestriction want) != EmptySet
Not correct. The following variation would be correct:

Ran (Children DomainRestriction want) - Ran ( Children DomainRestriction get) != EmptySet


2. Sentence is: Every child gets a gift from Santa.
Post by Steven Nieh
2. !( children DomainRestriction fromSanta) = EmptySet
Assuming you mean "!( (children DomainRestriction fromSanta) = EmptySet)",
this means "Some children get a gift from Santa", so this is not correct.


cheers, nancy
--------------------------------------------------------------------
Nancy Day, Associate Professor
CS245 Winter 2009 Instructor
http://www.student.cs.uwaterloo.ca/~cs245
David R. Cheriton School of Computer Science, University of Waterloo
Steven Nieh
2009-04-12 21:15:09 UTC
Permalink
Hi Nancy,


Thanks for your reply. Another quick question,

In the solution 3) for 2003 final, we have

((People-Children) RangeRestriction fromSanta) Intersection want =
EmptySet

Here, both ((People− Children) RangeRestriction fromSanta) and want are
relations, why we use Intersection instead of -?

Why we use "-" in relation (vacation-live) in 2005 final?

Thanks!
Post by Nancy Day
Post by Steven Nieh
I got some questions about Set Theory for the 2005 and 2003 Final. I came
up with different solutions compared to the sample solutions given. Please
tell me if they are correct.
1. Sentence is: Every Canadian has taken a vacation somewhere that they
do not live.
Post by Steven Nieh
1. Ran (Canadians DomainRestriction vacation) - Ran(Canada
DomainRestriction live) = Empty Set
Not correct. There's nothing in this to refer to "all Canadians"
"ran (Canadians Domain Restriction vacation)" are the places that
Canadians go on vacation for those Canadians who do go on vacation.
Also remember that the sentence says "they do not live".
Ran (Canadians DomainRestriction vacation) - Ran(Canada DomainRestriction
live) NOT= Empty Set
it would mean "Some Canadians have taken a vacation someplace they do
not live."
2. Sentence is: Every person has taken a vacation somewhere other than
a city in Europe.
Post by Steven Nieh
2. Ran(Vacation) Intersection CitiesInEurope = Empty Set
Not correct. The formalization above means "No vacations are
taken in cities in Europe."
3. Sentence is: Some Canadians have taken a vacation in cities
in Europe.
Post by Steven Nieh
3. Canadians ⊆ dom( (Canadians DomainRestriction vacation)
RangeRestriction CitiesInEurope)
Not correct. The above formalization means "All Canadians
have taken a vacation in a city in Europe."
Post by Steven Nieh
Also, what would be the meaning of relation (vacation-live)?
This the relation between People and Places for people who have
vacationed somewhere that they do not live.
1. Sentence is: It is not the case that every child gets all the gifts
that they want.
Post by Steven Nieh
1. Ran (Children DomainRestriction get) - Ran ( Children DomainRestriction
want) != EmptySet
Ran (Children DomainRestriction want) - Ran ( Children DomainRestriction get) != EmptySet
2. Sentence is: Every child gets a gift from Santa.
Post by Steven Nieh
2. !( children DomainRestriction fromSanta) = EmptySet
Assuming you mean "!( (children DomainRestriction fromSanta) = EmptySet)",
this means "Some children get a gift from Santa", so this is not correct.
cheers, nancy
--------------------------------------------------------------------
Nancy Day, Associate Professor
CS245 Winter 2009 Instructor
http://www.student.cs.uwaterloo.ca/~cs245
David R. Cheriton School of Computer Science, University of Waterloo
Nancy Day
2009-04-12 21:34:32 UTC
Permalink
Post by Steven Nieh
In the solution 3) for 2003 final, we have
((People-Children) RangeRestriction fromSanta) Intersection want = EmptySet
^^ this should be NOT=
Post by Steven Nieh
Here, both ((People− Children) RangeRestriction fromSanta) and want are
relations, why we use Intersection instead of -?
Why we use "-" in relation (vacation-live) in 2005 final?
"intersection" is the elements that are in both sets.
"-" is the elements that are in the first operand and not the second.

To use "-" as in

((People-Children) RangeRestriction fromSanta) - want != EmptySet

Would mean: "Some adults get something from Santa that they do NOT want.

((People-Children) RangeRestriction fromSanta) - want = EmptySet

Would mean: All the gifts that adults get from Santa were gifts that they wanted.

The correct answer is:

((People-Children) RangeRestriction fromSanta) Intersection want != EmptySet

Some pair (adult, gift) is in both the relations of adults to gifts they got
and adults to gifts they wanted, i.e., some adult gets something from Santa
that they want.

(vacation-live) is the set of pairs of People to Places where the person
vacations in a place they do not live.

(vacation intersect live) would be the set of pairs of People to Places where
the person vacations in a place they live.

cheers, nancy
--------------------------------------------------------------------
Nancy Day, Associate Professor
CS245 Winter 2009 Instructor
http://www.student.cs.uwaterloo.ca/~cs245
David R. Cheriton School of Computer Science, University of Waterloo
Loading...