Mathematica work

This page presents a curated selection of advanced Mathematica and Wolfram Language resources, including a sophisticated teaching package for network flow algorithms, a custom Mathematica palette for monadic concurrency notations, and a comprehensive notebook modeling the Alternating Bit Protocol (ABP) using process algebraic techniques. Each resource is described below, highlighting its purpose, structure, and example usage to help both educators and researchers leverage these tools in their own computational explorations.

EWTC-presentation-2015.m: Network Flow Teaching Package

Function: This Mathematica package is a comprehensive toolkit for teaching and exploring algorithms related to network flows, such as the maximum flow and minimum cut problems. It defines a custom graph structure (mG) with attributes for edges, vertices, capacities, flows, and coordinates, and provides a suite of utility functions for manipulating and visualizing flow networks.

Key Features:

  • Custom graph data structure with overloaded functions for edge and vertex management.
  • Functions for generating random connected graphs and assigning random capacities.
  • Step-by-step simulation of flow-augmenting algorithms, including bottleneck detection and residual graph construction.
  • Support for interactive teaching: vertex and edge manipulation, dynamic labeling, and visual feedback for algorithm stages.
  • Predefined examples (“janka” and “matthew”) with specific network topologies, used to illustrate the flow algorithm stages and outcomes.

Example Usage: The package includes two detailed example networks, each with stepwise computation of flow sequences, edge flows, bottleneck values, and cut sets. These examples are used in teaching environments to help students visualize and understand the progression of the maximum flow algorithm, with interactive controls for exploring each stage. The package also provides graphical elements and color-coded feedback to distinguish between different edge statuses (e.g., normal, saturated, augmenting path, or cut edges).

Intended Audience: This package is ideal for educators and students in graph theory or algorithms courses, as well as researchers interested in algorithm visualization and interactive exploration of flow networks.

MonadConcurrencyPalette.nb: Mathematica Palette for Monadic Concurrency Notation

Function: This Mathematica notebook defines a custom palette designed to facilitate the entry and manipulation of monadic concurrency and process algebra notations. The palette provides a graphical interface with buttons and tooltips for inserting a wide variety of specialized symbols and constructs used in concurrency theory and process calculi.

Key Features:

  • Buttons for list and set comprehensions, parallel and sequential composition, field extraction, and structure manipulation.
  • Support for process algebraic constructs such as action prefixing, choice, parallel composition, restriction, relabeling, recursion, and silent actions.
  • Tooltips and annotations for each button, aiding users in understanding the purpose and usage of each symbol.
  • Immediate insertion of both atomic symbols (e.g., $$CirclePlus], $$Wedge], $$Mu]) and complex templates (e.g., recursive agent definitions, transition relations) into the active notebook.

Example Usage: The palette streamlines the creation of complex process algebra expressions in Mathematica, supporting teaching, research, and publication in the field of concurrency theory. Users can quickly build and manipulate expressions for agents, actions, and transitions, making it easier to prototype and document formal models.

Intended Audience: This tool is especially useful for researchers, educators, and students working in theoretical computer science, particularly those studying or teaching process calculi, concurrency, and formal verification.

RCA_portfolio_v10.nb: Alternating Bit Protocol (ABP) Model in Process Algebra

Function: This Mathematica notebook provides a detailed, executable model of the Alternating Bit Protocol (ABP) using process algebraic notation. The model captures the behavior of the protocol’s sender, receiver, and communication channels, including the handling of message delivery, acknowledgments, retransmissions, and possible message loss or duplication.

Key Features:

  • Formal specification of protocol components using recursive process definitions, action prefixing, choice, parallel composition, and restriction.
  • Symbolic representation of protocol actions (e.g., send, ack, trans, reply, deliver) with input/output annotations.
  • Stepwise transformation and simulation of protocol behavior, including the application of process algebraic laws and simplifications.
  • Dynamic modules for protocol simulation, allowing users to interactively explore protocol executions and observe the effects of internal (silent) actions and external message exchanges.

Example Usage: The notebook includes a sequence of input and output cells demonstrating the transformation of protocol definitions, the computation of transition relations, and the simulation of the protocol as a whole. These examples illustrate both the theoretical underpinnings and the practical execution of the ABP, making the notebook a valuable teaching and research resource.

Intended Audience: This resource is aimed at advanced students, educators, and researchers in formal methods, protocol verification, and concurrency theory, providing both a reference implementation and an interactive environment for protocol analysis.