matrix representation of relations over
I have an exercise in discrete math about matrix representation of relations that I want to be sure I have solved properly:
How many non-zero entries does the matrix representing the following relations on consisting of the first 1000 positive integers have if R is:
In the c case, one million since every entry will be 1.
In the a case, every entry, from the first one to the 999-th one, excluding the 1000th row, will have one non-zero entry, so 999
In the b case the whole first row satisfies the condition, the whole second row satisfies the condition and in the third row everything but the entry (3,999) satisfies the condition. In the fourth, everything but (4,999) and (4,998) satisfies the condition.
So we will have non-zero entries in the matrix representing the relation.
So we have non zero-entries.
Is this the right way to solve the exercise?