The Student Room Group

2 Questions: Java & Set Theorom

1) How do I javac in the command prompt (running Vista).

2) I have an exam on Wednesday, but i'm stuck with this question (just below), can someone answer it for me explaining?



Determine the relation R on S = {1,2,3,4} represented by the matrix:

M= F T T T
F T F F
T F F T
F F T F

Determine the matrix representing RoR. Write down the set of ordered pairs in RoR.




Thanks for all the help!
Reply 1
If the right Java folder is in your path just using javac as normal should work, ie. javac myclass.java
Reply 2
The path? I don't know which one to change incase I do something I shouldn't.

I know it's in CP>System>Advance>Variable Environment>Path is it? or something else?

Any idea about the question by the way?
Reply 3
loadmalz
The path? I don't know which one to change incase I do something I shouldn't.

I know it's in CP>System>Advance>Variable Environment>Path is it? or something else?

Yeah that's the one. As long as you only add to it and don't remove anything that's there you can't mess anything up.

Sorry can't really help on the other question. I probably should be able to do it, but I seem to have forgotten it all:p:
Reply 4
Haha, see I wish I was in your position.
Thanks for the help though!
Reply 5
with the matrix question: start by looking at it as M = SxS with all members of SxS mapped by a function to a truth value then the matrix represents all possible ordered pairs (where the first element in the pair is the row number in M and the second is the row number), so where you have T (true) you have a member of the relation R (i.e. R = {(1,2),(1,3),(1,4),(2,2),(3,1),(3,1),(3,4),(4,3)} in the case of your question).)
Reply 6
F T T T
F T F F
T F F T
F F T F


The first part is really easy. You just think of it like in the thing below, and then pick out the pairs that have a T or a 1 or whatever.

(1, 1) (1, 2) (1, 3) (1, 4)
(2, 1) (2, 2) (2, 3) (2, 4)
(3, 1) (3, 2) (3, 3) (3, 4)
(4, 1) (4, 2) (4, 3) (4, 4)


Composition is a bit of a bitch to explain. Wikipedia does an okay job. The gist of it that for a relation G, whose matrix representation looks like this, and a relation H, whose matrix representation looks like this, G o H looks like this.
Reply 7
Thanks for all the responses guys, big help :-)

Latest

Trending

Trending