Would you post the answers to the extra problems in practice test?

4 views
Skip to first unread message

Sungjin

unread,
May 14, 2009, 9:35:47 PM5/14/09
to utexas-cs313k-spring2009
R = {<x.y>: ((natp x) != (natp y))}
R = {<x.y>: x in N ^ y in N ^ y < 2*x}
R = {<x.y>: ((natp x) = (natp y))}

These three, and would you give us more examples like this?

David Rager

unread,
May 14, 2009, 11:08:26 PM5/14/09
to Sungjin, utexas-cs313k-spring2009
You can take this as official word from the TAs that you can post them yourselves.

Sungjin

unread,
May 14, 2009, 11:51:31 PM5/14/09
to utexas-cs313k-spring2009
Is this right, then? I'm not really sure.

;R = {<x.y>: ((natp x) = (natp y))}
;1- Is R a relation? yes
;2- Is R a function? no
;3- What is dom(R)? N
;4- What is ran(R)? N
;5- Is R reflexive? yes
;6- Is R irreflexive? no
;7- Is R symmetric? yes
;8- Is R asymmetric? no
;9- Is R antisymmetric? no
;10- Is R transitive? yes
;11- Is R total? yes
;12- Is R connected? yes
;13- Is R an equivalence relation? yes
;14- Is R a partial order? no

;R = {<x.y>: ((natp x) != (natp y))}
;1- Is R a relation? yes
;2- Is R a function? no
;3- What is dom(R)? {v : v in N | v notin N}
;4- What is ran(R)? Write the answer in the set notation without using
R. {v: v in N | v notin N}
;5- Is R reflexive? no
;6- Is R irreflexive? yes
;7- Is R symmetric? no
;8- Is R asymmetric? yes
;9- Is R antisymmetric? yes
;10- Is R transitive? no
;11- Is R total? no
;12- Is R connected? no
;13- Is R an equivalence relation? no
;14- Is R a partial order? no

;R = {<x.y>: x in N ^ y in N ^ y < 2*x}
;1- Is R a relation? yes
;2- Is R a function? no
;3- What is dom(R)? {2v : v in N & v > 0}
;4- What is ran(R)? Write the answer in the set notation without using
R.
; {v: v in N}
;5- Is R reflexive? yes
;6- Is R irreflexive? no
;7- Is R symmetric? no
;8- Is R asymmetric? no
;9- Is R antisymmetric? yes
;10- Is R transitive? no
;11- Is R total? yes
;12- Is R connected? yes
;13- Is R an equivalence relation? no
;14- Is R a partial order? no
> > These three, and would you give us more examples like this?- 원본 텍스트 숨기기 -
>
> - 원본 텍스트 보기 -

Behnam Robatmili

unread,
May 15, 2009, 2:19:26 AM5/15/09
to Sungjin, utexas-cs313k-spring2009
Another example could be this one: R = {<x.y>: ((natp x) -> (natp y))}

Ian W.

unread,
May 15, 2009, 10:19:06 AM5/15/09
to utexas-cs313k-spring2009
I don't think this means what you think it means: (natp x) = (natp y)

Think about that one... Don't let that show up on your exam!

Here are diffs versus your answers.

About R=, assuming by that you mean {<x,y> : x in N and y in N and x =
y}:

It is a function.
It is antisymmetric.
It is neither total nor connected.
Hence, it is also a partial order.

About R!=, assuming by that you mean {<x.y> : x in N and y in N and x !
= y}:

dom(R!=) = ran(!=) = N.
It is symmetric.
It is not asymmetric.
It is connected.

That's all for now. Chew on those, then revise your answers to the
other ones.

Ian

Behnam Robatmili

unread,
May 15, 2009, 12:10:19 PM5/15/09
to Sungjin, utexas-cs313k-spring2009
I probably won't get a chance to review all the answers, but a bunch
of quick comments on your answers:

-For {<x.y>: ((natp x) = (natp y))}, that is right that if x and y are
numbers, they are in relation, but notice that if both x and y are non-
numbers they are also in R. For instance, (natp "ABC") = (natp '(5.6))
so ("ABC".'(5.6)) is in R!

-Why is {<x.y>: ((natp x) != (natp y))} antisymmetric? Let x = 1 and y
= nil for instance. R(x,y) and R(y.x) are both true but 1 != nil!

-For R = {<x.y>: x in N ^ y in N ^ y < 2*x}, why is it reflexive given
that (0.0) is not in R. Also why do you think R is not transitive? Can
you give me a counter example?

Does that make sense?
Behnam

David S.

unread,
May 15, 2009, 1:38:07 PM5/15/09
to utexas-cs313k-spring2009
<2, 2> (R(x, y)) and <4, 4> (R(y, z)) holding gives R(x, z) as R
(2,4) , which is 4<4, which is false.

Therefore the relation is not transitive.

Behnam Robatmili

unread,
May 15, 2009, 2:12:04 PM5/15/09
to David S., utexas-cs313k-spring2009
I'm not sure if understand this example. How come y is 2 in <x.y> and
then is changed to 4 in <y.z>?

Behnam

David S.

unread,
May 15, 2009, 2:33:15 PM5/15/09
to utexas-cs313k-spring2009
ah yes, you got me there!
Reply all
Reply to author
Forward
0 new messages