{ "cells": [ { "cell_type": "markdown", "id": "d0c9c1d0-ee11-48e5-9415-90d10b24d1fb", "metadata": {}, "source": [ "# First Steps" ] }, { "cell_type": "markdown", "id": "04e625a1-530d-4330-887b-aa9d4f364e81", "metadata": {}, "source": [ "## Categorizing graphs by kernel" ] }, { "cell_type": "markdown", "id": "db0a37bc-e51d-4463-b44e-991191bcbc43", "metadata": {}, "source": [ "A matching model is primarly defined by its compatibility graph $G$.\n", "\n", "[Stochastic Matching](https://balouf.github.io/stochastic_matching/index.html) can categorize the type of graph by looking at the kernels of its incidence matrix. One can check the four categories from the paper." ] }, { "cell_type": "markdown", "id": "5d9b041f-3807-4e76-98c3-68171ddf2b28", "metadata": {}, "source": [ ":::note\n", "A model graph can be built using the adjacency or incidence matrix, for graphs and hypergraphs respectively.\n", "\n", "[Stochastic Matching](https://balouf.github.io/stochastic_matching/index.html) also provide a graph library.\n", ":::" ] }, { "cell_type": "markdown", "id": "8ff1eb6e-67a5-4588-8e6c-55531144b45d", "metadata": {}, "source": [ "### Bijective case" ] }, { "cell_type": "markdown", "id": "743488b3-fe38-40d2-80ce-10a50588f9aa", "metadata": {}, "source": [ ":::tip\n", "The method `show_graph` represents the nodes with their label, which default to their indices (integers).\n", ":::" ] }, { "cell_type": "code", "execution_count": 1, "id": "75d09de6-0b8d-484f-a0e4-40f2d46b2601", "metadata": { "execution": { "iopub.execute_input": "2025-09-23T08:36:32.652267Z", "iopub.status.busy": "2025-09-23T08:36:32.650968Z", "iopub.status.idle": "2025-09-23T08:36:33.800145Z", "shell.execute_reply": "2025-09-23T08:36:33.800145Z", "shell.execute_reply.started": "2025-09-23T08:36:32.652267Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "