| Process. |
| 1. if size (event) ≥ 3 then//size(∙) calculates the number of members in a set. |
| 2. if si, si?1 and si?2 are same then |
| 3. S←L |
| 4. endif |
| 5. if si and si?2 are same then |
| 6. S←P |
| 7. endif |
| 8. else |
| 9. S←R |
| 10. endif |
| 11. return(S) |