• Status: Solved
• Priority: Medium
• Security: Public
• Views: 3260

# pairwise disjointness test

I need to know how to Perform the pairwise disjointness test for the following grammar rules and say if they pass the test or fail the test

A)    A-->aB | b | cBB

B )   B-->aB |bA |aBb

C-)  C-->aaA |b|caB

need correct information
0
SweetsJamRock
• 2
1 Solution

Commented:

remember what you are looking for "two sets A and B are disjoint if their intersection is the empty set" meaning that no Element of set A occurs in set B and vice-versa. Now you have more than two sets, then the definition extends. A collection of sets is pairwise disjoint if any two sets in the collection are disjoint.

look at A):
you have three sets. set 1: aB, set 2: b, set 3: cBB
compare set1 and set 2: do they intersect (do they have same elements)? compare set 1 and set 3: do they intersect? compare set 2 and set 3: do they intersect?

now is the collection of A) pairwise disjoint? (did you answer any of the above comparisons with "no"?)

continue with B and C
0

Commented:
ah - I just realized that these are not 3 different tasks A,B, C, right? these are collections?
then things change slightly... you then compare the collections AB AC and BC...
0

Author Commented:
you have partially gotten the concept right, even though your solution have many flaws.

i will award you some points for your assistance
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

## Featured Post

• 2
Tackle projects and never again get stuck behind a technical roadblock.