Slotted ALOHA Simulation
Created by Julio Aráuz, Copyright 2025
McClure School
Ohio University
Instructions:
Use the sliders to change the probability of transmission and the number of nodes in the simulation.
When a node transmits, a green circle is present.
Each slot is marked as being (
E
)mpty, (
S
)uccessful transmission, (
C
)ollision.
The reset count sets all metrics back to zero.
The figure shows the efficiency of slotted ALOHA for the selected parameters.
The moving green dot on the figure displays the current value of the efficiency.
Efficiency $=N \times p \times {(1-p)}^{N-1}$
The maximum efficiency for a given $N$, ocurrs when
$p=\frac{1}{N}$
. When $N \rightarrow \infty$, the maximum efficiency approaches $\frac{1}{e}$.
The simulation can be paused and restarted by pressing the space bar.
Assumptions:
All nodes have frames ready to be sent.
All frames have the same size
Nodes transmit frames at the beginning of a slot.
The number of nodes in the simulation is $N$.
Nodes transmit a frame with probability $p$.
If a collision occurs, all nodes learn about it.
An excellent discussion of slotted and unslotted ALOHA can be found in
Computer Networking by J. Kurose and K. Ross