Flag: The special pattern is 01111110.
Sender's Rule (Stuffing): To prevent the flag pattern from accidentally appearing in the data, the sender inserts (stuffs) a 0 after any sequence of five consecutive 1s.
Receiver's Rule (Destuffing): The receiver does the opposite. It scans the data, and any time it finds a 0 that follows five consecutive 1s, it removes that 0.
Applying the Rule
We need to perform the receiver's rule (destuffing) on the given output string.
- Stuffed String: 011111011111001
Let's scan the string and look for the pattern 111110:
1. First occurrence:
- 011111011111001
- The scanner sees five 1 s ( 11111 ) followed by a 0.
- This 0 must have been stuffed. The receiver removes it.
- String after first removal: $011111+11111001=01111111111001$
2. Second occurrence:
- Now, the scanner continues its work on the new string: 01111111111001
- It scans past the first set of 1s and finds another group of five 1s.
- 01111111111 0 ** 01
- The scanner sees five 1s (the ones in the middle) followed by a 0.
- This 0 must also have been stuffed. The receiver removes it.
- String after second removal: $01111111111+01=0111111111101$
After removing both stuffed $\theta \mathrm{s}$, the original input string is 0111111111101.
This matches Option B.