| Algorithm 1. Detection Period. |
| Input: , , , , |
| Output: |
| 1. |
| 2. if |
| 3. then ; |
| 4. ; |
| 5. if (n>1) |
| 6. then ; |
| 7. else if |
| 8. then ; |
| 9. else |
| 10. ; |
| 11. end if |
| 12. end if |
| 13. else |
| 14. ; |
| 15. end if |
| Algorithm 1. Detection Period. |
| Input: , , , , |
| Output: |
| 1. |
| 2. if |
| 3. then ; |
| 4. ; |
| 5. if (n>1) |
| 6. then ; |
| 7. else if |
| 8. then ; |
| 9. else |
| 10. ; |
| 11. end if |
| 12. end if |
| 13. else |
| 14. ; |
| 15. end if |