Blacklist Matrix Modeling
Question:
For Instance, A, B, C, D Are All Subscribers.
A Has A Black List, for Instance, Which Includes
Subscribers B, C, D. We call this Blacklist IS
User Width Blacklist. It means That User B, C, D
All have no rights to send message to a.
Vice Versa, User A Also Can't Send To B, C, D.
In Another Words, There Is No Communication
Path Available Between A and B, C, D.
In Following a Series of Figures, Crossing Points
Of A (Line / Column) And B, C, D (Column / Line) Will
Be Marked with x (a). The Reason why there is
(A) Beside X is in Order to Correctly Set x to O
Or not When Removing B, C, D from User A's
Blacklist.
Legend:
v s: system width blacklist flag
IT Means That Subscriber IS
Prohibited by System Whatver
Sender or receiver.
v D: disable flag
IT Means That Subscriber IS
Prohibited, probably temporarily.
Scenario:
1. Firstly, Constructs a Matrix Including All
Users. The Status of All Elements in Matrix is OK.
A
B
C
Di
E
A
O
O
O
O
O
B
O
O
O
O
O
C
O
O
O
O
O
Di
O
O
O
O
O
E
O
O
O
O
O
2. Next, Fills System Width Blacklist InTo Matrix
v d
A
B
C
D (s)
E
A
O
O
O
X
O
B
O
O
O
X
O
C
O
O
O
X
O
D (s)
X
X
X
X
X
E
O
O
O
X
O
3. Next, Fills Disable Users Into Matrix.
V B
A
B (d)
C
D (s)
E
A
O
X
O
X
O
B (d)
X
X
X
X
X
C
O
X
O
X
O
D (s)
X
X
X
X
X
E
O
X
O
X
O
4. Next, Fill in User Lever Blacklist Rules
Focus on line and column:
V A: B, C
v B: a, d
V C: -----
v d: a, e
V E: B, D
A
B (d)
C
D (s)
E
A
O
X (a, b)
X (a)
X (d)
O
B (d)
X (a, b)
X
X
X (b)
X (e)
C
X (a)
X
O
X
O
D (s)
X (d)
X (b)
X
X
X (d, e)
E
O
X (e)
O
X (d, e)
O
All Blacklists' Importing Job Is Done.
Passable Ways All is Marked with O.
A lot of matrix algorithms can be be taken to mailment
Interfaces:
Enable / Disable User
2. INSERT / REMOVE User from System Width Blacklist
3. Add / Remove User B from User A's Blacklist
4. Finding Available Paths .for Example:
E as a sender senends message to b, c, d receivers.
From Above Figure, IT Is So Easy to Draw A Conclusion
Who E CAN Send Message To. But detailed Operations
Can take Following Steps:
vfirstly, Select E'S Blacklist.
First Parameter Is a Vector, Which is buy to record
STATION OF E EEMENT.
| 1 0 0 0 1 |
| 0 0 0 0 0 |
{0, 0, 0, 0, 1} | 0 0 1 0 1 | = {1, 0, 1, 0, 1}
| 0 0 0 0 0 | (Just Last Line)
| 1 0 1 0 1 |
v receivers vector: {0, 1, 1, 1, 0}, blacklist {1, 0, 1, 0, 1},
We can regard the as an in turnr respectively to
Operate bits.
01110 & 10101 = 00100
IT is obvious thing e can only send to C.
WE CAN ONLY FOCUS ON O OR X Elements.
Sparse matrix. Using the cross-chain table implementation.