-

@ Tony Acid
2025-05-14 16:48:59
Ok, so I asked AI a question to figure out percentage of filtering nodes required to be effective. The answer is 88.88%, see below 👇
Also let me know if I'm doing this wrong.
Q: We have 20000 nodes, every node has 8 connections to other nodes. Nodes A relay red packets only, nodes B green packets only.
What needs to be min percentage of B nodes in the network, so the random two A relays are not able to exchange red packets?
A: To ensure that any two node A relays cannot exchange red packets, we need to place node B relays in such a way that there is no direct or indirect path of red packets between any two node A relays. This means that every path between any two node A relays must include at least one node B.
Given:
- Total nodes: 20,000
- Each node has 8 connections.
- Node A relays only red packets.
- Node B relays only green packets.
### Step-by-Step Analysis:
1. **Total Nodes and Connections**:
- Total nodes: 20,000
- Each node has 8 connections.
2. **Isolation Requirement**:
- We need to ensure that no two node A relays can exchange red packets directly or indirectly.
### Strategy:
To achieve this, we can use a strategy where we place node B relays in such a way that they act as barriers between node A relays. One effective way to do this is to ensure that every node A relay is surrounded by node B relays, creating isolated clusters of node A relays.
### Calculation:
1. **Cluster Size**:
- Let's consider a cluster where each node A relay is surrounded by node B relays. The simplest cluster would be a node A relay connected to 8 node B relays.
2. **Total Clusters**:
- If we have \( N_A \) node A relays, each surrounded by 8 node B relays, the total number of node B relays needed is \( 8 \times N_A \).
3. **Total Nodes**:
- The total number of nodes is the sum of node A relays and node B relays:
\[
N_A + 8N_A = 9N_A
\]
- Given that the total number of nodes is 20,000:
\[
9N_A = 20,000
\]
\[
N_A = \frac{20,000}{9} \approx 2,222.22
\]
Since we cannot have a fraction of a node, we round down to 2,222 node A relays.
4. **Number of Node B Relays**:
- The number of node B relays needed is:
\[
8 \times 2,222 = 17,776
\]
5. **Percentage of Node B Relays**:
- To find the percentage of node B relays in the network:
\[
\text{Percentage of node B relays} = \left( \frac{17,776}{20,000} \right) \times 100 = 88.88\%
\]
Therefore, the minimum percentage of node B relays in the network to ensure that no two node A relays can exchange red packets is approximately **88.88%**.