In a remote village, there are 100 houses arranged in a circle. The village elder wants to place guards at some of these houses such that:
1. Every house either has a guard or is adjacent to at least one house with a guard
2. No two adjacent houses both have guards
What is the minimum number of guards needed?
Enter a positive integer
Show solution
This is a minimum dominating set problem on a cycle graph C100.
**Step 1: Understanding the constraints**
- Constraint 1 means every house is "covered" (either has a guard or is next to one)
- Constraint 2 means no two guards are adjacent (independent set)
This is equivalent to finding a minimum independent dominating set.
**Step 2: Pattern for cycles**
For a cycle of length n, we can place guards in a repeating pattern. Consider placing guards at positions following the pattern: guard, no guard, no guard, guard, no guard, no guard, ...
This pattern "GNN" (Guard, No guard, No guard) repeats every 3 houses:
- The guard at position i covers itself and positions i−1 and i+1
- With this pattern, every house is covered
- No two guards are adjacent
For n=100: We can fit ⌊100/3⌋=33 complete GNN patterns, using 99 houses with 33 guards.
This leaves 1 house. Let's verify the pattern works:
- Houses 1, 4, 7, 10, ..., 97, 100 have guards (this would be 34 guards)
- Wait, we need to reconsider.
**Step 3: Careful analysis**
Actually, for a cycle Cn, the minimum independent dominating set has size ⌈n/3⌉ when n≡0(mod3), but we must verify this works for the circular constraint.
Since 100=3×33+1, we cannot perfectly tile with GNN pattern.
The optimal pattern for Cn when n≡1(mod3):
- We need ⌈100/3⌉=34 guards
To verify: Place guards at positions 1,4,7,10,...,97,100.
- Position 100 is a guard, covering 99 and 1
- Position 1 is a guard, covering 100 and 2
- This violates the non-adjacency since houses 1 and 100 would need guards too close if we follow strict GNN.
Let's use the pattern: G at 1, NN at 2-3, G at 4, NN at 5-6, ..., G at 97, NN at 98-99, then house 100.
- 33 complete GNN patterns cover houses 1-99 with 33 guards
- House 100 is adjacent to houses 99 (no guard) and 1 (guard), so house 100 is covered
But wait - house 99 needs to be covered. It's between guard at 97 and house 100.
- Guard at 97 doesn't cover 99 (they're not adjacent in the GNN pattern)
Correct approach: For C100, the minimum is indeed ⌈100/3⌉=34 guards, achieved by placing one additional guard to handle the remainder when n≡1(mod3).