David has a collection of 40 rocks, 30 stones, 20 minerals and 10 gemstones. An operation consists of removing three objects, no two of the same type. What is the maximum number of operations he can possibly perform?

[i]Ray Li[/i]
To solve this problem, we need to determine the maximum number of operations where each operation consists of removing three objects, no two of the same type, from David's collection. Let's break down the steps:

1. **Initial Counts**:
   - Rocks: 40
   - Stones: 30
   - Minerals: 20
   - Gemstones: 10

2. **Operation Definition**:
   Each operation removes one rock, one stone, and one mineral or gemstone. We need to ensure that no two objects of the same type are removed in a single operation.

3. **Balancing the Counts**:
   To maximize the number of operations, we need to balance the counts of the objects as much as possible. The limiting factor will be the type with the smallest count, which is gemstones (10).

4. **Performing Operations**:
   - We can perform 10 operations where we remove one rock, one stone, and one gemstone. After these 10 operations, the counts will be:
     - Rocks: 40 - 10 = 30
     - Stones: 30 - 10 = 20
     - Minerals: 20
     - Gemstones: 10 - 10 = 0

5. **Remaining Counts**:
   After removing all gemstones, we are left with:
   - Rocks: 30
   - Stones: 20
   - Minerals: 20
   - Gemstones: 0

6. **Further Operations**:
   Now, we can only perform operations involving rocks, stones, and minerals. The limiting factor is now the stones (20).

7. **Performing More Operations**:
   - We can perform 20 operations where we remove one rock, one stone, and one mineral. After these 20 operations, the counts will be:
     - Rocks: 30 - 20 = 10
     - Stones: 20 - 20 = 0
     - Minerals: 20 - 20 = 0
     - Gemstones: 0

8. **Final Counts**:
   After all possible operations, we are left with:
   - Rocks: 10
   - Stones: 0
   - Minerals: 0
   - Gemstones: 0

9. **Total Number of Operations**:
   - 10 operations (involving gemstones)
   - 20 operations (involving stones and minerals)

   Therefore, the total number of operations is \(10 + 20 = 30\).

The final answer is \(\boxed{30}\).