Counting permitted asynchronous event traces

Two sensors send telemetry to two separate logger instances. Sensor a sends asynchronous message mm to logger b, and sensor c sends asynchronous message nn to logger d. All four participants are distinct. The sequence diagram uses default weak sequencing, with no additional ordering or timing constraints.


Four distinct lifelines exchange two asynchronous messages, with message m drawn above message n.


An event trace is a total ordering of the four send and receive events. Write these events as sms_m, rmr_m, sns_n and rnr_n, where ss denotes sending and rr denotes receiving. Count different total orderings separately and do not include simultaneous events. There are no replies or other events.


Find both quantities as exact integers:

  • The number of valid event traces for the original diagram.
  • The number remaining if an explicit ordering constraint is added requiring receipt of mm before receipt of nn.
Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Sequence Diagrams Questions: