Multiplexing techniques in Computer Networks - Time & Space Complexity
When studying multiplexing techniques, it is important to understand how the processing time grows as more data streams are combined.
We want to know how the time to handle multiple signals changes as the number of signals increases.
Analyze the time complexity of this multiplexing process.
for each time slot in frame:
for each input signal:
read data from input signal
add data to multiplexed output
send multiplexed output
This code combines data from multiple input signals into one output frame by reading each input in every time slot.
Look at what repeats in the code.
- Primary operation: Reading data from each input signal and adding it to the output.
- How many times: For every time slot, the code loops through all input signals once.
As the number of input signals grows, the work grows too.
| Input Size (n signals) | Approx. Operations per time slot |
|---|---|
| 10 | 10 reads and adds per time slot |
| 100 | 100 reads and adds per time slot |
| 1000 | 1000 reads and adds per time slot |
Pattern observation: The number of operations grows directly with the number of input signals.
Time Complexity: O(n)
This means the time to multiplex grows in a straight line as you add more input signals.
[X] Wrong: "Multiplexing time stays the same no matter how many signals there are."
[OK] Correct: Each input signal needs to be processed, so more signals mean more work and more time.
Understanding how multiplexing scales helps you explain how networks handle many users efficiently.
"What if the multiplexing combined signals in parallel instead of sequentially? How would the time complexity change?"