need help to implement this lab by java or c, and all information and function in the attached document.
By your program you should solve a congruence equaĕon in order to determine structure of a P2P system based
on this equaĕon.
Suppose we have this equaĕon:
a, b, c, n
n: is number of nodes in each cluster. (up to 10)
Note: we will give you a equaĕon with no more than 10 incongruent answers.
1‐ Solve congruence equaĕon.
2‐ Find out the number of clusters and logical values for each group‐head.
2‐ Assign a specific name for each resource type or cluster (These names could be asked from user to type).
3‐ Assign IP‐address for each group‐head (cluster‐head) and members (nodes). (Use arbitrary IP address and just
care about the syntax of IP address to be 4 bytes)
1‐ Group‐Head Table based on following characterisĕcs.
a‐ Column 1: Resource Type. (R1, R2, R3, ...)
b‐ Column 2: Group‐Head ID.
c‐ Column 3: Logical value of each resource type (congruent answers).
d‐ Column 4: Logical Address of each group head (congruent answers).
e‐ Column 5: IP address of each group‐head.
f‐ Number of rows = Number of clusters.
2‐ Member Table based on following characterisĕcs:
a‐ Column 1: Node ID.
b‐ Column 2: Logical Address (incongruent answers).
c‐ Column 3: IP address.
d‐ Number of rows: Number of nodes in each cluster (Given by user).
e‐ Every member of each cluster should keep this table.