<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://arnaudcasteigts.net/feed.xml" rel="self" type="application/atom+xml" /><link href="https://arnaudcasteigts.net/" rel="alternate" type="text/html" /><updated>2026-11-04T16:55:41+01:00</updated><id>https://arnaudcasteigts.net/feed.xml</id><title type="html">Arnaud Casteigts</title><subtitle>nothing special</subtitle><entry><title type="html">Open questions in temporal graphs</title><link href="https://arnaudcasteigts.net/blog/open-problems.html" rel="alternate" type="text/html" title="Open questions in temporal graphs" /><published>2026-09-21T13:44:46+02:00</published><updated>2026-09-21T13:44:46+02:00</updated><id>https://arnaudcasteigts.net/blog/open-problems</id><content type="html" xml:base="https://arnaudcasteigts.net/blog/open-problems.html"><![CDATA[<p>(Last updated: Sep 22, 2026.)</p>

<p>This page lists a few open questions in temporal graphs that (so far) humans and LLMs couldn’t solve.</p>

<h1 id="problem-1-spanners-of-size-2n-3-in-temporal-cliques">Problem 1: Spanners of size 2n-3 in temporal cliques</h1>

<p>A temporal clique is a temporal graph whose footprint is a complete graph. Given a temporal clique in which every edge has exactly one time label, the question is whether, for all labelings, it always admits a spanner of size \(2n-3\) (subset of edges that preserves temporal reachability for all pairs).</p>

<p>The following formulations are equivalent for this problem (pick your preferred option):</p>
<ol>
  <li>The labeling is arbitrary and temporal path are non-strict (non-decreasing).</li>
  <li>The labeling is proper (adjacent edges have a different label) and temporal paths are increasing.</li>
  <li>The labeling is an arbitrary permutation of the edges (in \([1,{n \choose 2}]\)) and temporal paths are increasing.</li>
</ol>

<p>Here is an example with \(2n-3\) edges (using the third formulation):</p>
<center>
  <img src="/assets/blog/clique-before.png" alt="Temporal clique" />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <img src="/assets/blog/clique-after.png" alt="Temporal spanner" />
  <p></p>
  <p class="caption">Example of a temporal clique and one of its spanners (of size 2n-3).</p>
</center>

<p>In [CPS19&amp;21], Joseph Peters, Jason Schoeters and I showed that spanners of size \(O(n \log n)\) always exist in temporal cliques. We had two main open questions:</p>
<ul>
  <li>Weak conjecture (Question 1 in [CPS21]): Do spanners of size \(O(n)\) always exist?</li>
  <li>Strong conjecture (Question 2 in [CPS21]): Do spanners of size \(2n-3\) always exist?</li>
</ul>

<p>The weak conjecture has been solved by Júlia Baligács [B26]. Namely, temporal cliques always admit spanners of size \(7n\).
With the help of AI, the analysis in this paper can be refined to \(6n\) (perhaps slightly less), which is anecdotal as it uses the same algorithm.</p>

<p>The main question is now whether \(2n-3\) is always achievable. Presumably, this will require new ideas. So far, no counter-example was found, and we know experimentally that no counter-example exists up to \(n=8\) included. Precisely, all temporal cliques on \(\le 8\) vertices admit spanners of size \(2n-4\) or \(2n-3\).</p>

<h2 id="call-for-contributors">Call for contributors</h2>

<p>If you have partial results in this direction, please feel free to contact me.</p>

<h2 id="references">References</h2>

<ul>
  <li>A. Casteigts, J. Peters, J. Schoeters, Temporal cliques admits sparse spanners (ICALP 2019, JCSS 2021) – <a href="https://arxiv.org/pdf/1810.00104">[arxiv]</a></li>
  <li>J. Baligács, Temporal cliques admits linear spanners (2026) – <a href="https://arxiv.org/pdf/2606.05156">[arxiv]</a></li>
  <li>S. Angrick, B. Bals, T. Friedrich, H. Gawendowicz, N. Hastrich, N. Klodt, P. Lenzner, J. Schmidt, G. Skretas, A. Wells, How to reduce temporal cliques to find sparse spanners (ESA 2024) – <a href="https://arxiv.org/pdf/2402.13624">[arxiv]</a></li>
  <li>A. Casteigts, D. Carnevale, T. Corsini, Dismountability in temporal cliques revisited (SAND 2025) – <a href="https://arxiv.org/pdf/2502.01321">[arxiv]</a></li>
  <li>D. Bilò, G. D’Angelo, L. Gualà, S. Leucci, M. Rossi, Sparse temporal spanners with low stretch (ESA 2022) – <a href="https://arxiv.org/pdf/2206.11113">[arxiv]</a></li>
</ul>

<hr />

<h1 id="problem-2-shortest-temporal-exploration-problem">Problem 2: Shortest temporal exploration problem</h1>

<p>The input to this problem is a temporal graph whose snapshots are all connected (class \(\texttt{AC}\): Always-Connected).
The input is entirely known before hand. An agent is placed at one of the vertices adversarially. 
In each snapshot \(G_i\), we can move the agent from its current location to a neighbor vertex in \(G_i\), or leave it in place. 
There is at most one move per snapshot. The goal is to visit all the vertices (i.e. explore the graph) using <strong>as few moves</strong> as possible.</p>

<p>Example of a graph \(\mathcal{G} \in \texttt{AC}\):</p>
<center>
  <img src="/assets/blog/always-connected.png" alt="Always-connected graph" />
</center>
<p><br /></p>

<p>This problem was introduced by Balev, Sanlaville, and Toullalan [BST25]. They showed that an exploration with \(O(n^{1.5})\) moves always exist if the lifetime \(L\) (number of snapshots) of the graph is at least \(\Theta(n^{3.5})\). In the journal version [BST26], they improve this result to requiring only lifetime \(\Theta(n^{2})\). The main questions in this work are the following:</p>

<ul>
  <li>Weak conjecture (Conjecture 1 in [BST26]): Does an exploration of \(O(n)\) moves exist when \(L=\Theta(n^2)\)?</li>
  <li>Strong conjecture (Conjecture 2 in [BST26]): Does an exploration of \(2n-3\) moves exist when \(L={n \choose 2}\)?</li>
</ul>

<p>Funnily enough, the two bounds in these questions are the same as in Problem 1 above. However, this seems to be accidental, as both problems are quite different. Note that, so far, even an exploration with \(O(n \log n)\) moves is not known to be guaranteed.</p>

<h2 id="some-comments">Some comments</h2>
<ul>
  <li>If the graph is static (i.e. all \(G_i\)s are the same), then there exists a \(2n-3\) solution – essentially a DFS in the graph without the last return to the initial vertex.</li>
  <li>If the graph has a sufficiently large lifetime, then at least one graph must repeat at least \(2n-3\) times, so we could decide to move only when the snapshot is \(G_i\), so a solution of length \(2n-3\) also exists.</li>
  <li>The \(\Theta(n^2)\) bound on the lifetime is natural, as it guarantees that an exploration exists. The argument is simple: for any \(u,v \in V\), the agent can move from \(u\) to \(v\) in at most \(n-1\) time steps, then we can compose such movements along an arbitrary permutation of the vertices.</li>
  <li>More edges gives more power, so one may assume wlog for this problem that all the snapshots are trees.</li>
</ul>

<h2 id="references-1">References</h2>
<ul>
  <li>S. Balev, E. Sanlaville, A. Toullalan, The Shortest Temporal Exploration Problem (SAND 2025, TCS 2026) – <a href="https://arxiv.org/abs/2504.06652">[arxiv (conf)]</a> – <a href="https://www.sciencedirect.com/science/article/pii/S0304397526004196">[journal version]</a></li>
</ul>]]></content><author><name></name></author><category term="blog" /><summary type="html"><![CDATA[(Last updated: Sep 22, 2026.)]]></summary></entry><entry><title type="html">Langages formels (11X003)</title><link href="https://arnaudcasteigts.net/teaching/langages-formels/" rel="alternate" type="text/html" title="Langages formels (11X003)" /><published>2026-09-15T14:44:46+02:00</published><updated>2026-09-15T14:44:46+02:00</updated><id>https://arnaudcasteigts.net/teaching/langages</id><content type="html" xml:base="https://arnaudcasteigts.net/teaching/langages-formels/"><![CDATA[<p>Enseignant : Arnaud Casteigts<br />
Assistant : Ethan Arm et Margaux Marseloo<br />
Monitrices : Anna Hugener et Oriance Oternaud</p>

<h1 id="autres-pages-du-cours">Autres pages du cours</h1>
<ul>
  <li><a href="https://moodle.unige.ch/course/view.php?id=5946">Moodle</a> (supports, informations, modalités d’examens, etc.)</li>
  <li><a href="https://pgc.unige.ch/main/teachings/details/2026-11X003">Unige</a> (informations administratives)</li>
</ul>

<h1 id="notes-de-cours">Notes de cours</h1>

<p>Les notes de cours sont déposées ici (et sur Moodle) au fur et à mesure du semestre. Les séries d’exercices ne sont que sur Moodle.</p>

<ul>
  <li>Préambule au module <a href="/files/langages-1-slides-2026.pdf">[slides]</a></li>
  <li>Cours 1 : Concepts de base <a href="/files/langages-1-cours-2026.pdf">[notes de cours]</a> - <a href="/files/langages-1-quiz-2026.pdf">[quiz]</a></li>
  <li>Cours 2 : Automates finis déterministes <a href="/files/langages-2-cours-2026.pdf">[notes de cours]</a> - <a href="/files/langages-2-quiz-2025.pdf">[quiz]</a> - <a href="/files/langages-2-slides-2026.pdf">[personnage du jour]</a></li>
  <li>Cours 3 : Non-déterminisme <a href="/files/langages-3-cours-2026.pdf">[notes de cours]</a> - <a href="/files/langages-3-quiz-2026.pdf">[quiz]</a> - <a href="/files/langages-3-slides-2026.pdf">[personnage du jour]</a></li>
  <li>Cours 4 : Expressions régulières <a href="/files/langages-4-cours-2026.pdf">[notes de cours]</a> - <a href="/files/langages-4-slides-2026.pdf">[personnage du jour]</a></li>
  <li>Cours 5 : Lemme de l’étoile <a href="/files/langages-5-cours-2026.pdf">[notes de cours]</a> - <a href="/files/langages-5-slides-2026.pdf">[personnage du jour]</a></li>
  <li>Cours 6 : Grammaires formelles <a href="/files/langages-6-cours-2026.pdf">[notes de cours]</a> - <a href="/files/langages-6-slides-2026.pdf">[personnage du jour]</a></li>
  <li>Cours 7 : Automates à pile <a href="/files/langages-7-cours-2026.pdf">[notes de cours]</a></li>
</ul>

<h1 id="organisation-des-exercices">Organisation des exercices</h1>

<p>Les séries d’exercices sont publiées sur Moodle après chaque cours. Vous êtes censés la faire entre le cours (le mercredi) et la séance d’exercices (le lundi). Lors des séances d’exercices, la série est corrigée.</p>

<h1 id="evaluation">Evaluation</h1>

<p>Contrôle continu (1/6) et examen final (5/6). Le contrôle continu comprendra deux QCMs (en séances d’exercice) et un examen partiel sur le créneau du cours (le 21 octobre 2026).</p>

<p>Le contenu de l’examen sera très semblable à celui des séries d’exercices.</p>

<h1 id="pour-aller-plus-loin">Pour aller plus loin</h1>
<p>Une partie du cours s’inspire de “Introduction to the Theory of Computation (Michael Sipser)”. D’autres parties sont composées à partir de ressources variées, dont certains articles Wikipédia. Vous pouvez aussi consulter les notes de cours des années précédentes sur <a href="/teaching/langages-formels-archive/">cette page</a>.</p>]]></content><author><name></name></author><category term="Teaching" /><category term="LF" /><summary type="html"><![CDATA[Enseignant : Arnaud Casteigts Assistant : Ethan Arm et Margaux Marseloo Monitrices : Anna Hugener et Oriance Oternaud]]></summary></entry><entry><title type="html">STGen: A generator of simple and proper temporal graphs</title><link href="https://arnaudcasteigts.net/blog/stgen.html" rel="alternate" type="text/html" title="STGen: A generator of simple and proper temporal graphs" /><published>2024-07-02T13:44:46+02:00</published><updated>2024-07-02T13:44:46+02:00</updated><id>https://arnaudcasteigts.net/blog/stgen</id><content type="html" xml:base="https://arnaudcasteigts.net/blog/stgen.html"><![CDATA[<p>(Last updated: July 15, 2024.)</p>

<h1 id="table-of-content">Table of content</h1>
<p><a href="#overview-of-stgen">Overview</a>  |  <a href="#how-to-use-stgen">How to use STGen</a>  |  <a href="#parallel-iterators">Parallel iterators</a>  |  <a href="#the-tgraph-class">The TGraph class</a>  |  <a href="#how-to-cite-stgen">How to cite STGen</a></p>

<h1 id="overview-of-stgen">Overview of STGen</h1>

<p>A temporal graph is <em>simple</em> if every edge has a single time label. It is <em>proper</em> if two edges incident to a same vertex have different time labels. If a graph is both proper and simple, we call it <em>happy</em>.</p>

<center>
  <img src="/assets/blog/simple-proper.png" alt="Simple and proper" />
  <p class="caption">Fig. 1. From left to right: Non-proper and non-simple; Proper and non-simple; Simple and non-proper; Simple and proper (happy).</p>
</center>

<p>STGen enumerates all happy temporal graphs, up to isomorphism. The notion of isomorphism here also considers as identical all the graphs whose <em>local ordering</em> of the edges is the same. For example, in Fig. 2, the left and middle graphs are equivalent in the sense that their temporal paths are in bijection.</p>

<center>
  <img src="/assets/blog/representative.png" alt="Representative of isomorphism types" />
  <p class="caption">Fig. 2. Canonical representatives of happy temporal graphs.</p>
</center>

<p>The graph on the right is, among all the graphs in the same equivalence class, the one that uses the lowest possible time labels. Up to standard (i.e. static) isomorphism of labeled graphs, this graph is unique, and can thus be seen as the canonical <em>representative</em> of this class of happy graphs.</p>

<p>STGen actually generates all (and only) such canonical representatives. For a fixed number of vertices n, these graphs are in finite number and can be enumerated. Unfortunately, their number still grows essentially like \({n \choose 2}!\). One may hope for manipulating graphs of order up to 7 (or perhaps 8, if complete enumeration is not required), but enumerating significant fractions of larger graphs seems out of reach.</p>

<p>To get an idea of the growth, here are the numbers of representatives on 3, 4, 5, 6, and 7 vertices:</p>

<table>
  <thead>
    <tr>
      <th>n</th>
      <th># Happy graphs (representatives)</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>3</td>
      <td>4</td>
    </tr>
    <tr>
      <td>4</td>
      <td>62</td>
    </tr>
    <tr>
      <td>5</td>
      <td>15378</td>
    </tr>
    <tr>
      <td>6</td>
      <td>89769096</td>
    </tr>
    <tr>
      <td>7</td>
      <td>13725757879376</td>
    </tr>
  </tbody>
</table>

<p><br />
Number of <em>temporal cliques</em> (complete happy graphs on n vertices):</p>

<table>
  <thead>
    <tr>
      <th>n</th>
      <th># Happy cliques (representatives)</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>3</td>
      <td>1</td>
    </tr>
    <tr>
      <td>4</td>
      <td>20</td>
    </tr>
    <tr>
      <td>5</td>
      <td>4524</td>
    </tr>
    <tr>
      <td>6</td>
      <td>23218501</td>
    </tr>
    <tr>
      <td>7</td>
      <td>3106952711040</td>
    </tr>
  </tbody>
</table>

<p><br />
The numbers for n=8 are unknown. Still, some properties on happy graphs of order 8 can be tested exhaustively, thanks to a branch-cutting mechanism in the generation (see below).</p>

<h1 id="the-generation-tree">The generation tree</h1>

<p>STGen relies on a generation tree, each node of which is a happy graph that contains its parent as a proper subgraph. The root of the tree is the empty graph on n vertices. The set of successors of a graph corresponds to all the possible ways to add the next time label to this graph, up to isomorphism (see Figure 2), while remaining a valid representative – among other things, this implies that edge can receive label t <em>only if</em> it is adjacent to an edge having label t-1 (contiguity lemma).</p>

<center>
  <img src="/assets/blog/generation.png" width="90%" alt="Simple and proper" />
  <p class="caption">Fig. 3. (Top of) the generation tree for n=4.</p>
</center>

<p>This monotonous assignment of time labels is what guarantees that isomorphism types are separated forever down the tree (green separation lines on the Figure). Indeed, if two graphs are different at a certain stage, then their successors will always remain separated due to the already assigned labels.</p>

<p>Interestingly, the same property also guarantees that once a graph becomes <em>rigid</em>, i.e., it has no non-trivial automorphisms, then none of its successors will be symmetric again. Thus, there is an irrevocable boundary in the generation tree between symmetric graphs (in the top of the tree) and rigid graphs (below the boundary) – see the red line in Figure 3.</p>

<p>In both cases, each successor is characterized by a unique set of independent new edges (a matching in the complement graph) to which the next label is assigned. (Why a matching? because happy graphs are proper!) When the graph is symmetric, STGen ensures that no two such matchings are equivalent up to automorphisms (in the parent graph), which guarantees unicity among the successors. For rigid graphs, this property is ensured without caring about automorphisms, making the generation very fast.</p>

<h1 id="how-to-use-stgen">How to use STGen</h1>

<h2 id="installation">Installation</h2>

<p>You can download STGen as a single <a href="/files/stgen-with-example.zip">zip file</a> or clone it from its <a href="https://github.com/acasteigts/STGen">github repository</a>. The folder contains a minimal working example (in the <code class="language-plaintext highlighter-rouge">main.cpp</code> file) described next. You need to have a reasonably recent C++ compiler (e.g. at least g++-11). If you want to use the parallel iterators, you also need to have a TBB implementation installed in your system (e.g. <code class="language-plaintext highlighter-rouge">sudo apt install libtbb12</code> or <code class="language-plaintext highlighter-rouge">sudo apt install libtbb2</code> depending on your version of C++, as well as <code class="language-plaintext highlighter-rouge">sudo apt install libtbb-dev</code>). The suggested compilation line, also present in the Makefile, is:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>g++ <span class="nt">-O3</span> main.cpp <span class="nt">-o</span> main <span class="nt">-ltbb</span> <span class="nt">-march</span><span class="o">=</span>native
</code></pre></div></div>
<p>The last two arguments are optional: <code class="language-plaintext highlighter-rouge">-ltbb</code> if you want STGen to use parallelism, <code class="language-plaintext highlighter-rouge">-march=native</code> for better performance (but less portability).</p>

<h2 id="basic-examples">Basic examples</h2>
<p>Using STGen is pretty straightforward. You must declare a <code class="language-plaintext highlighter-rouge">TGraphIterator</code>, giving as template parameter the desired number of vertices and as argument a user-defined function to which STGen will pass every generated graph.
Here is a complete example that simply counts the number of happy graphs on 6 vertices:</p>

<div class="language-cpp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp">#include</span> <span class="cpf">"stgen/stgen.h"</span><span class="cp">
</span>
<span class="k">const</span> <span class="kt">int</span> <span class="n">N</span> <span class="o">=</span> <span class="mi">6</span><span class="p">;</span>

<span class="k">using</span> <span class="k">namespace</span> <span class="n">stgen</span><span class="p">;</span>

<span class="kt">bool</span> <span class="nf">count_all</span><span class="p">(</span><span class="k">const</span> <span class="n">TGraph</span><span class="o">&lt;</span><span class="n">N</span><span class="o">&gt;&amp;</span> <span class="n">g</span><span class="p">,</span> <span class="kt">int64_t</span><span class="o">&amp;</span> <span class="n">nb</span><span class="p">){</span>
    <span class="n">nb</span><span class="o">++</span><span class="p">;</span> <span class="c1">// count this graph</span>
    <span class="k">return</span> <span class="nb">true</span><span class="p">;</span> <span class="c1">// generate the successors</span>
<span class="p">};</span>

<span class="kt">int</span> <span class="n">main</span><span class="p">(){</span>
    <span class="n">TGraphIterator</span><span class="o">&lt;</span><span class="n">N</span><span class="o">&gt;</span> <span class="n">iter</span><span class="p">(</span><span class="n">count_all</span><span class="p">);</span>
    <span class="kt">int64_t</span> <span class="n">nb</span> <span class="o">=</span> <span class="n">iter</span><span class="p">.</span><span class="n">execute</span><span class="p">();</span>
    <span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="n">nb</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">time</span> ./main 
89769096

real	0m2,647s
</code></pre></div></div>

<p>In this case, we implemented a basic function called <code class="language-plaintext highlighter-rouge">count_all()</code> (it could have any name) that consists of counting every graph and doing nothing else. More generally, the arguments of this function are the graph being visited (<code class="language-plaintext highlighter-rouge">const TGraph&lt;N&gt;&amp; g</code>) and a number (<code class="language-plaintext highlighter-rouge">int64_t&amp; nb</code>) that can be incremented or not depending on what we want to count (you can ignore it, if you don’t want to count anything). Your return value must indicate to STGen whether it should generate the successors of that graph (<code class="language-plaintext highlighter-rouge">true</code>) or cut this branch of the tree (<code class="language-plaintext highlighter-rouge">false</code>). Cutting branches is crucial if you manipulate happy graphs on more than 6 vertices.</p>

<p>Here is another example that counts all happy <em>cliques</em>:</p>

<div class="language-cpp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp">#include</span> <span class="cpf">"stgen/stgen.h"</span><span class="cp">
</span>
<span class="k">const</span> <span class="kt">int</span> <span class="n">N</span> <span class="o">=</span> <span class="mi">6</span><span class="p">;</span>
<span class="k">const</span> <span class="kt">int</span> <span class="n">M</span> <span class="o">=</span> <span class="p">(</span><span class="n">N</span><span class="o">*</span><span class="p">(</span><span class="n">N</span><span class="o">-</span><span class="mi">1</span><span class="p">))</span><span class="o">/</span><span class="mi">2</span><span class="p">;</span>

<span class="k">using</span> <span class="k">namespace</span> <span class="n">stgen</span><span class="p">;</span>

<span class="kt">bool</span> <span class="nf">count_cliques</span><span class="p">(</span><span class="k">const</span> <span class="n">TGraph</span><span class="o">&lt;</span><span class="n">N</span><span class="o">&gt;&amp;</span> <span class="n">g</span><span class="p">,</span> <span class="kt">int64_t</span><span class="o">&amp;</span> <span class="n">nb</span><span class="p">){</span>
    <span class="k">if</span> <span class="p">(</span><span class="n">g</span><span class="p">.</span><span class="n">nb_edges</span> <span class="o">==</span> <span class="n">M</span><span class="p">){</span>
        <span class="n">nb</span><span class="o">++</span><span class="p">;</span>
    <span class="p">}</span>
    <span class="k">return</span> <span class="nb">true</span><span class="p">;</span>
<span class="p">};</span>

<span class="kt">int</span> <span class="n">main</span><span class="p">(){</span>
    <span class="n">TGraphIterator</span><span class="o">&lt;</span><span class="n">N</span><span class="o">&gt;</span> <span class="n">iter</span><span class="p">(</span><span class="n">count_cliques</span><span class="p">);</span>
    <span class="kt">int64_t</span> <span class="n">nb</span> <span class="o">=</span> <span class="n">iter</span><span class="p">.</span><span class="n">execute</span><span class="p">();</span>
    <span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="n">nb</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">time</span> ./main 
23218501

real	0m2,541s
</code></pre></div></div>

<p>Let’s say we now want all the cliques whose lifetime (i.e. maximum label) is at most 8. The corresponding function could be as follows:</p>

<div class="language-cpp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">bool</span> <span class="nf">count_cliques_lifetime_at_most_8</span><span class="p">(</span><span class="k">const</span> <span class="n">TGraph</span><span class="o">&lt;</span><span class="n">N</span><span class="o">&gt;&amp;</span> <span class="n">g</span><span class="p">,</span> <span class="kt">int64_t</span><span class="o">&amp;</span> <span class="n">nb</span><span class="p">){</span>
    <span class="k">if</span> <span class="p">(</span><span class="n">g</span><span class="p">.</span><span class="n">lifetime</span> <span class="o">&gt;</span> <span class="mi">8</span><span class="p">){</span>
        <span class="k">return</span> <span class="nb">false</span><span class="p">;</span> <span class="c1">// cut the subtree</span>
    <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
        <span class="k">if</span> <span class="p">(</span><span class="n">g</span><span class="p">.</span><span class="n">nb_edges</span> <span class="o">==</span> <span class="n">M</span><span class="p">){</span>
            <span class="n">nb</span><span class="o">++</span><span class="p">;</span> <span class="c1">// or do anything else here on those cliques</span>
        <span class="p">}</span>
        <span class="k">return</span> <span class="nb">true</span><span class="p">;</span>
    <span class="p">}</span>
<span class="p">};</span>

<span class="kt">int</span> <span class="n">main</span><span class="p">(){</span>
    <span class="n">TGraphIterator</span><span class="o">&lt;</span><span class="n">N</span><span class="o">&gt;</span> <span class="n">iter</span><span class="p">(</span><span class="n">count_cliques_lifetime_at_most_8</span><span class="p">);</span>
    <span class="kt">int64_t</span> <span class="n">nb</span> <span class="o">=</span> <span class="n">iter</span><span class="p">.</span><span class="n">execute</span><span class="p">();</span>
    <span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="n">nb</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">time</span> ./main 
134764

real	0m0,533s
</code></pre></div></div>

<p>As we can see here, the generation is faster, because all the graphs whose lifetime exceed 8 have been cut off (together with their subtrees).</p>

<h1 id="parallel-iterators">Parallel iterators</h1>

<p>STGen offers two parallel iterators, depending on your needs: <code class="language-plaintext highlighter-rouge">TGraphParIterator</code> (basic) and <code class="language-plaintext highlighter-rouge">TGraphBatchIterator</code> (advanced). Both are similar in terms of performance, their differ only in their simplicity (versus scaling abilities). The basic version is appropriate if you are targetting graphs of up to 7 vertices and intend to run the experiment in one shot on a single computer. In contrast, the batch iterator allows you to split the work into several batches to be executed independently on several computers (possibly at different times), which is often necessary if you target graphs of 8 or more vertices. It may also be more appropriate for some experiments on 7 vertices, if your computation is heavy and/or does not cut many branches.</p>

<h2 id="the-tgraphpariterator-iterator">The <code class="language-plaintext highlighter-rouge">TGraphParIterator</code> iterator</h2>

<p>This iterator is used exactly in the same way as the standard <code class="language-plaintext highlighter-rouge">TGraphIterator</code>. Simply replace the type in the declaration. For example,</p>

<div class="language-cpp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="nf">main</span><span class="p">(){</span>
    <span class="n">TGraphParIterator</span><span class="o">&lt;</span><span class="n">N</span><span class="o">&gt;</span> <span class="n">iter</span><span class="p">(</span><span class="n">count_cliques_lifetime_at_most_8</span><span class="p">);</span>
    <span class="kt">int64_t</span> <span class="n">nb</span> <span class="o">=</span> <span class="n">iter</span><span class="p">.</span><span class="n">execute</span><span class="p">();</span>
    <span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="n">nb</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">time</span> ./main 
134764

real	0m0,150s
</code></pre></div></div>
<p>Using this iterator gives a much faster execution (here, on my 6-core computer). You need not worry about race conditions for the function parameters. In particular, the <code class="language-plaintext highlighter-rouge">nb</code> variable is local to each subtree and never shared among threads.</p>

<p>You probably do not need to understand how this iterator works internally. But since you are curious: First, the top of the tree (part above the red line in Figure 3) is processed on a single cpu, storing the boundary graphs (first graphs to be rigid) in a collection. Then, the subtrees of each of these graphs are processed in parallel and independently, exploiting whichever cpu is available on your computer (summing up the resulting <code class="language-plaintext highlighter-rouge">nb</code> variables in a map reduce fashion). Note that, up to 7 vertices, the top of the tree is computed almost instantaneously, but this is not the case for 8 vertices.</p>

<h2 id="the-tgraphbatchiterator-iterator">The <code class="language-plaintext highlighter-rouge">TGraphBatchIterator</code> iterator</h2>

<p>An experiment on graphs of 8 or more vertices is likely to be impractical on a single computer, even if it has many cores. The batch iterator makes it possible to split the work into a collection of batches, each of which can be executed independently and at different times.</p>

<p>Technically, the work is split according to a two-level hierarchy. First, a small subset of the top of the tree is generated using a single thread. Each graph along the resulting boundary (this time, higher than the red line in Figure 3) is seen as a separate batch, with a unique batch number. Every batch can then be executed independently, by specifying the batch number. The execution of an individual batch follows the same mechanism as the basic parallel iterator: the top of the batch is executed on a single thread until some depth is reached, then the graphs along this second boundary (and their subtrees) are explored in parallel.</p>

<p>This behavior is mostly transparent to the user. What you need to know is that the number of batches is automatically determined by STGen (you do not control it). It is computed upon creation of the iterator and you can access it as follows:</p>

<div class="language-cpp highlighter-rouge"><div class="highlight"><pre class="highlight"><code>    <span class="n">TGraphBatchIterator</span><span class="o">&lt;</span><span class="n">N</span><span class="o">&gt;</span> <span class="n">iter</span><span class="p">(</span><span class="n">my_function</span><span class="p">);</span>
    <span class="kt">int</span> <span class="n">nb_batches</span> <span class="o">=</span> <span class="n">iter</span><span class="p">.</span><span class="n">number_of_batches</span><span class="p">();</span>
</code></pre></div></div>

<p>You can then execute a given batch as follows:</p>

<div class="language-cpp highlighter-rouge"><div class="highlight"><pre class="highlight"><code>    <span class="kt">int64_t</span> <span class="n">nb</span> <span class="o">=</span> <span class="n">iter</span><span class="p">.</span><span class="n">execute</span><span class="p">(</span><span class="n">BATCH_NUM</span><span class="p">);</span>
</code></pre></div></div>
<p>where <code class="language-plaintext highlighter-rouge">BATCH_NUM</code> is the batch that you want to execute (between <code class="language-plaintext highlighter-rouge">0</code> and <code class="language-plaintext highlighter-rouge">nb_batches-1</code>).</p>

<p>It is your job to sum up the resulting numbers if you want to count something over the entire experiment. For the sake of example, here is a program that executes all the batches on a single computer, it is unlikely that you want to use the batch iterator in this way (unless you want to monitor the progress and/or be able to resume execution after an interruption):</p>

<div class="language-cpp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">int</span> <span class="nf">main</span><span class="p">(){</span>
    <span class="n">TGraphBatchIterator</span><span class="o">&lt;</span><span class="n">N</span><span class="o">&gt;</span> <span class="n">iter</span><span class="p">(</span><span class="n">my_function</span><span class="p">);</span>
    <span class="kt">int</span> <span class="n">nb_batches</span> <span class="o">=</span> <span class="n">iter</span><span class="p">.</span><span class="n">number_of_batches</span><span class="p">();</span>
    <span class="kt">int64_t</span> <span class="n">nb</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
    <span class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span class="n">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="n">nb_batches</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">){</span>
        <span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="s">"processing batch "</span> <span class="o">&lt;&lt;</span> <span class="n">i</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
        <span class="n">nb</span> <span class="o">+=</span> <span class="n">iter</span><span class="p">.</span><span class="n">execute</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
    <span class="p">}</span>
    <span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="n">nb</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>

<p>Here is the outcome for <code class="language-plaintext highlighter-rouge">N=6</code> with the <code class="language-plaintext highlighter-rouge">count_all()</code> function:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>./main 
processing batch 0
processing batch 1
...
processing batch 2243
processing batch 2244
89769096
</code></pre></div></div>

<p>So, here, the work was split into 2245 batches. Note that the very top of the tree (the part higher than the batches) may itself result in some increments of the <code class="language-plaintext highlighter-rouge">nb</code> variable in your function. For convenience, this quantity is added to the result of the first batch, so that the sum of all the batches corresponds indeed to the entire tree.</p>

<h1 id="the-tgraph-class">The <code class="language-plaintext highlighter-rouge">TGraph</code> class</h1>

<p>STGen is shipped with a default type of temporal graph, which is very basic. It is given in the <code class="language-plaintext highlighter-rouge">tgraph.hpp</code> file, and provides the following members:</p>

<div class="language-cpp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">template</span><span class="o">&lt;</span><span class="kt">int</span> <span class="n">N</span><span class="p">,</span> <span class="kt">int</span> <span class="n">M</span><span class="o">=</span><span class="p">(</span><span class="n">N</span><span class="o">*</span><span class="p">(</span><span class="n">N</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="o">/</span><span class="mi">2</span><span class="p">)&gt;</span>
<span class="k">struct</span> <span class="nc">TGraph</span> <span class="p">{</span>
    <span class="n">std</span><span class="o">::</span><span class="n">bitset</span><span class="o">&lt;</span><span class="n">M</span><span class="o">&gt;</span> <span class="n">edges</span><span class="p">;</span>
    <span class="n">std</span><span class="o">::</span><span class="n">bitset</span><span class="o">&lt;</span><span class="n">M</span><span class="o">&gt;</span> <span class="n">max_edges</span><span class="p">;</span>
    <span class="n">TEdge</span><span class="o">&lt;</span><span class="n">N</span><span class="o">&gt;</span> <span class="n">tedges</span><span class="p">[</span><span class="n">M</span><span class="p">];</span>
    <span class="kt">int</span> <span class="n">nb_edges</span><span class="p">;</span>
    <span class="kt">int</span> <span class="n">lifetime</span><span class="p">;</span>

    <span class="p">...</span>
<span class="p">}</span>
</code></pre></div></div>

<p>For performance reasons, this class is templated with parameters <code class="language-plaintext highlighter-rouge">N</code> and <code class="language-plaintext highlighter-rouge">M</code>, where <code class="language-plaintext highlighter-rouge">N</code> is the number of vertices that the user specifies when an iterator is created (as in the examples above). The value of <code class="language-plaintext highlighter-rouge">M</code> is automatically instantiated to \({N \choose 2}\), the maximum number of edges in a graph of that size. The <code class="language-plaintext highlighter-rouge">edges</code> member is a bitset that indicates which edge is present in the footprint (edges without time information), ordered lexicographically by the corresponding pairs of vertices. The <code class="language-plaintext highlighter-rouge">max_edges</code> member is a bitset that indicates which of these edges currently hold maximum time labels, ordered similarly. <strong>These two members are required for generation, you should not touch them</strong>. The other three members are provided for your manipulations in the user function: <code class="language-plaintext highlighter-rouge">tedges</code> is an array containing <code class="language-plaintext highlighter-rouge">M</code> triplets (u,v,t). Among them, only the first <code class="language-plaintext highlighter-rouge">nb_edges</code> entries are meaningful. Here, the ordering is done according to <em>time</em> (not lexicography). Thus, if you iterate over the first <code class="language-plaintext highlighter-rouge">nb_edges</code> entries of the <code class="language-plaintext highlighter-rouge">tedges</code> array, concretely, you are iterating over all the time edges of the temporal graph in chronological order. Finally, the maximum time label among these edges is stored in the <code class="language-plaintext highlighter-rouge">lifetime</code> member.</p>

<p>Apart from its constructors, this class only provides a single member function <code class="language-plaintext highlighter-rouge">is_tc()</code>, which allows you to test if the given graph is temporally connected, and a function that overrides the <code class="language-plaintext highlighter-rouge">&lt;&lt;</code> operator for printing the edges using <code class="language-plaintext highlighter-rouge">cout &lt;&lt; my_graph</code>. The code of the <code class="language-plaintext highlighter-rouge">is_tc()</code> function is as follows:</p>

<div class="language-cpp highlighter-rouge"><div class="highlight"><pre class="highlight"><code>    <span class="kt">bool</span> <span class="n">is_tc</span><span class="p">()</span> <span class="k">const</span><span class="p">{</span>
        <span class="n">bitset</span><span class="o">&lt;</span><span class="n">N</span><span class="o">&gt;</span> <span class="n">predecessors</span><span class="p">[</span><span class="n">N</span><span class="p">];</span>
        <span class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span class="n">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span> <span class="n">i</span><span class="o">&lt;</span><span class="n">N</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span> <span class="p">{</span>
            <span class="n">predecessors</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">set</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
        <span class="p">}</span>
        <span class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span class="n">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span> <span class="n">i</span><span class="o">&lt;</span><span class="n">nb_edges</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">){</span>
            <span class="n">TEdge</span><span class="o">&lt;</span><span class="n">N</span><span class="o">&gt;</span> <span class="n">e</span> <span class="o">=</span> <span class="n">tedges</span><span class="p">[</span><span class="n">i</span><span class="p">];</span>
            <span class="n">predecessors</span><span class="p">[</span><span class="n">e</span><span class="p">.</span><span class="n">u</span><span class="p">]</span> <span class="o">|=</span> <span class="n">predecessors</span><span class="p">[</span><span class="n">e</span><span class="p">.</span><span class="n">v</span><span class="p">];</span>
            <span class="n">predecessors</span><span class="p">[</span><span class="n">e</span><span class="p">.</span><span class="n">v</span><span class="p">]</span> <span class="o">=</span> <span class="n">predecessors</span><span class="p">[</span><span class="n">e</span><span class="p">.</span><span class="n">u</span><span class="p">];</span>
        <span class="p">}</span>
        <span class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span class="n">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span> <span class="n">i</span><span class="o">&lt;</span><span class="n">N</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">){</span>
            <span class="k">if</span> <span class="p">(</span><span class="o">!</span> <span class="n">predecessors</span><span class="p">[</span><span class="n">i</span><span class="p">].</span><span class="n">all</span><span class="p">()){</span>
                <span class="k">return</span> <span class="nb">false</span><span class="p">;</span>
            <span class="p">}</span>
        <span class="p">}</span>
        <span class="k">return</span> <span class="nb">true</span><span class="p">;</span>
    <span class="p">}</span>
</code></pre></div></div>

<h2 id="using-your-own-tgraph-class">Using your own <code class="language-plaintext highlighter-rouge">TGraph</code> class</h2>

<p>It is perfectly possible (and even encouraged) to enrich the <code class="language-plaintext highlighter-rouge">TGraph</code> class by adding further member variables and functions to this class according to your needs. So long as you do not touch the <code class="language-plaintext highlighter-rouge">edges</code> and <code class="language-plaintext highlighter-rouge">max_edges</code> member variables (nor their processing in the constructors), STGen will continue to work just fine and deliver to the user function your custom type of graph. If you want to do so, simply replace the <code class="language-plaintext highlighter-rouge">tgraph.hpp</code> file in the directory with your own version, whose type must also be called <code class="language-plaintext highlighter-rouge">TGraph</code> – this is a bit artisanal, but simple.</p>

<p>In way of an example, there is another file in the directory called <code class="language-plaintext highlighter-rouge">tgraph_min</code>, which corresponds to the bare minimum that STGen needs. If your goal is only to count the number of happy graphs (or happy cliques), this class is sufficient and will result in significant performance gain compared to the default <code class="language-plaintext highlighter-rouge">TGraph</code> version presented above (mostly, because the <code class="language-plaintext highlighter-rouge">tedges</code> array is not required for generation). Note that you can still test if a graph <code class="language-plaintext highlighter-rouge">g</code> is a clique using <code class="language-plaintext highlighter-rouge">g.edges.all()</code> instead of <code class="language-plaintext highlighter-rouge">g.nb_edges == M</code> in the above examples, or more generally, count the number of edges with <code class="language-plaintext highlighter-rouge">g.edges.count()</code> (just a bit slower).</p>

<p>Other versions of the <code class="language-plaintext highlighter-rouge">TGraph</code> class exist, which are not public yet. These classes will be made public later, together with a blog post dedicated to specific experiments.</p>

<h1 id="how-to-cite-stgen">How to cite STGen</h1>

<p>If you are using STGen in your experiments, please cite it as follows:</p>

<div class="language-bibtex highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">@misc</span><span class="p">{</span><span class="nl">stgen</span><span class="p">,</span>
  <span class="na">author</span> <span class="p">=</span> <span class="s">{Arnaud Casteigts}</span><span class="p">,</span>
  <span class="na">title</span> <span class="p">=</span> <span class="s">{Efficient generation of simple and proper temporal graphs up to isomorphism}</span><span class="p">,</span>
  <span class="na">note</span> <span class="p">=</span> <span class="s">{\texttt{https://arnaudcasteigts.net/blog/stgen.html}}</span><span class="p">,</span>
  <span class="na">year</span> <span class="p">=</span> <span class="m">2024</span><span class="p">,</span>
<span class="p">}</span>
</code></pre></div></div>
<p>(replace <code class="language-plaintext highlighter-rouge">\texttt</code> with <code class="language-plaintext highlighter-rouge">\url</code> if you are using the url package)</p>

<p>A paper with the same title will eventually appear, more focused on the theoretical aspects of the generation. Part of its content is cover in <a href="https://www.youtube.com/watch?v=pgRBl--JJVc">this talk</a> presented at the AATG workshop of ICALP 2020.</p>

<h1 id="other-versions-of-stgen">Other versions of STGen</h1>

<p>There exist other versions of STGen, in Java, Python, Julia, and Rust. Most of them are outdated and/or have poorer performance. The Rust version is perhaps the second-best (and less outdated) after the official C++ version presented here. If you don’t like C++, feel free to contact me to talk about the other versions.</p>]]></content><author><name></name></author><category term="blog" /><summary type="html"><![CDATA[(Last updated: July 15, 2024.)]]></summary></entry><entry><title type="html">Temporal graphs - selected chapters (14X060)</title><link href="https://arnaudcasteigts.net/teaching/temporal-graphs/" rel="alternate" type="text/html" title="Temporal graphs - selected chapters (14X060)" /><published>2024-04-01T16:44:46+02:00</published><updated>2024-04-01T16:44:46+02:00</updated><id>https://arnaudcasteigts.net/teaching/temporal-graphs</id><content type="html" xml:base="https://arnaudcasteigts.net/teaching/temporal-graphs/"><![CDATA[<p>Teacher: Arnaud Casteigts<br /></p>

<p>This short course is part of the “selected chapter” series for Masters students. Checkout the general web pages for the rest of the series:</p>
<ul>
  <li>on <a href="https://moodle.unige.ch/course/view.php?id=6641">moodle</a></li>
  <li>on <a href="https://pgc.unige.ch/main/teachings/details/2024-14X060">unige</a> (administrative information)</li>
</ul>

<h1 id="course-notes">Course notes</h1>

<ul>
  <li>1- Recaps of graph theory: <a href="/files/tgraphs-1-cours.pdf">[notes + exercises]</a></li>
  <li>2- Basic definitions on temporal graphs: <a href="/files/tgraphs-2-cours.pdf">[notes + exercises]</a></li>
  <li>3- Some facts about temporal graphs: <a href="/files/tgraphs-3-cours.pdf">[notes + exercises]</a></li>
</ul>]]></content><author><name></name></author><category term="Teaching" /><category term="LF" /><summary type="html"><![CDATA[Teacher: Arnaud Casteigts]]></summary></entry><entry><title type="html">Complexité et Calculabilité (11X008)</title><link href="https://arnaudcasteigts.net/teaching/calculabilite-complexite/" rel="alternate" type="text/html" title="Complexité et Calculabilité (11X008)" /><published>2024-02-01T15:44:46+01:00</published><updated>2024-02-01T15:44:46+01:00</updated><id>https://arnaudcasteigts.net/teaching/complexite</id><content type="html" xml:base="https://arnaudcasteigts.net/teaching/calculabilite-complexite/"><![CDATA[<p>Enseignant : Arnaud Casteigts<br />
Assistants : Matteo de Francesco et Margaux Marseloo<br />
Monitrice : Elie Bussod et Naziha Beghdadi<br />
Préambule : <a href="/files/complexite-preambule.pdf">[slides]</a></p>

<h1 id="pages-du-cours">Pages du cours</h1>
<ul>
  <li>sur <a href="https://moodle.unige.ch/course/view.php?id=6664">moodle</a> (supports, informations, modalités d’examens, etc.)</li>
  <li>sur <a href="https://pgc.unige.ch/main/teachings/details/2025-11X008">unige</a> (informations administratives)</li>
  <li>années <a href="/teaching/calculabilite-complexite-archive/">précédentes</a> (attention : contenu potentiellement différent)</li>
</ul>

<h1 id="notes-de-cours">Notes de cours</h1>

<ul>
  <li>Introduction du module : <a href="/files/complexite-1-slides.pdf">[slides]</a></li>
  <li>Cours 1 : Problèmes &amp; Machines <a href="/files/complexite-1-cours.pdf">[notes de cours]</a></li>
  <li>Cours 2 : Simulation et opération sur les langages <a href="/files/complexite-2-cours.pdf">[notes de cours]</a></li>
  <li>Cours 3 : Réductions entre langages <a href="/files/complexite-3-cours.pdf">[notes de cours]</a> <a href="/files/complexite-3-slides.pdf">[Church]</a></li>
  <li>Cours 4 : Théorème de Rice, Degrés de Turing, Diagonalisation <a href="/files/complexite-4-cours.pdf">[notes de cours]</a></li>
  <li>Cours 5 : Notations asymptotiques &amp; classes de complexité <a href="/files/complexite-5-cours.pdf">[notes de cours]</a></li>
  <li>Cours 6 : Relation entre classes : <a href="/files/complexite-6-cours.pdf">[notes]</a> - <a href="/files/complexite-6-slides.pdf">[Hartmanis, Stearns, Williams]</a></li>
  <li>Cours 7 : Non-déterminisme <a href="/files/complexite-7-cours.pdf">[notes de cours]</a></li>
  <li>Cours 8 : Classe NP <a href="/files/complexite-8-cours.pdf">[notes de cours]</a></li>
  <li>Cours 9 : Réductions polynomiales <a href="/files/complexite-9-cours.pdf">[notes de cours]</a></li>
  <li>Cours 10 : NP-complétude <a href="/files/complexite-10-cours.pdf">[notes de cours]</a></li>
  <li>Cours 11 : Théorème de Cook-Levin <a href="/files/complexite-11-cours.pdf">[notes de cours]</a></li>
  <li>Cours 12 : Compléments et ouverture <a href="/files/complexite-12-cours.pdf">[notes de cours]</a></li>
</ul>

<h1 id="pour-aller-plus-loin">Pour aller plus loin</h1>
<p>Une partie du cours s’inspire de “Introduction to the Theory of Computation (Michael Sipser)”. Une autre s’inspire de “Computational Complexity (Sanjeev Arora et Boaz Barak)”. D’autres parties sont composées à partir de ressources variées, dont certains articles Wikipédia.</p>

<p>Enfin, le livre “Quantum Computing Since Democritus (Scott Aaronson)” est une mine d’information qui recroise une bonne partie du cours (et explore beaucoup d’autres sujets). Sa lecture est exigeante, mais elle en vaut la peine !</p>]]></content><author><name></name></author><category term="Teaching" /><category term="LF" /><summary type="html"><![CDATA[Enseignant : Arnaud Casteigts Assistants : Matteo de Francesco et Margaux Marseloo Monitrice : Elie Bussod et Naziha Beghdadi Préambule : [slides]]]></summary></entry><entry><title type="html">Graph Algorithms (14X061)</title><link href="https://arnaudcasteigts.net/teaching/graphalgo-archive/" rel="alternate" type="text/html" title="Graph Algorithms (14X061)" /><published>2024-02-01T15:44:46+01:00</published><updated>2024-02-01T15:44:46+01:00</updated><id>https://arnaudcasteigts.net/teaching/graphalgo-archive</id><content type="html" xml:base="https://arnaudcasteigts.net/teaching/graphalgo-archive/"><![CDATA[<h1 id="spring-2025">Spring 2025</h1>

<p>Teacher: Arnaud Casteigts<br />
Assistant: Matteo De Francesco<br />
Overview: <a href="/files/graphalgo-preamble.pdf">[slides]</a></p>

<ol>
  <li>Basics of Graph Theory: <a href="/files/graphalgo-1-2025.pdf">[lecture notes]</a></li>
  <li>Traversals, Connectivity, Shortest paths: <a href="/files/graphalgo-2-2025.pdf">[lecture notes]</a></li>
  <li>Minimum Spanning Trees (and Matroid): <a href="/files/graphalgo-3-2025.pdf">[lecture notes]</a></li>
  <li>Basics of Computational Complexity: <a href="/files/graphalgo-4-2025.pdf">[lecture notes]</a> - <a href="/files/graphalgo-4-slides-2025.pdf">[slides]</a></li>
  <li>Graph coloring: <a href="/files/graphalgo-5-slides-2025.pdf">[slides]</a></li>
  <li>Maximum matchings: <a href="/files/graphalgo-6-2025.pdf">[lecture notes]</a></li>
  <li>Approximation algorithms: <a href="/files/graphalgo-7-2025.pdf">[lecture notes]</a></li>
  <li>Random Walks (and Markov chains): <a href="/files/graphalgo-8-slides-2025.pdf">[slides]</a></li>
  <li>Distributed algorithms: <a href="/files/graphalgo-9-slides-2025.pdf">[slides]</a></li>
  <li>Basic concepts of Temporal Graphs: <a href="/files/graphalgo-10-2025.pdf">[lecture notes]</a></li>
  <li>Temporal components and temporal spanners: <a href="/files/graphalgo-11-2025.pdf">[lecture notes]</a></li>
</ol>

<h2 id="mini-class-projects">Mini-class projects</h2>

<h3 id="monday-19th-may-2025">Monday 19th May, 2025</h3>
<p>Morning session (11am):</p>
<ul>
  <li>Shcherbakov: Reconstruction conjecture</li>
  <li>Sutter: A* and related algorithms</li>
  <li>Salane and Thakur: The max-flow min-cut theorem</li>
  <li>Rahman: Auction algorithms for bipartite matching</li>
  <li>Goldfarb: Dynamic Graph algorithms</li>
</ul>

<p>Afternoon session (2pm):</p>
<ul>
  <li>Zebad and Gassilewski: Kuratowski’s and Wagner’s theorem</li>
  <li>Arm: Distributed algorithms in the LOCAL model</li>
  <li>Selvam and Amehunke: Interval graphs (and who killed the Duke of Densmore)</li>
  <li>Zarola and Bolotina: The max-flow min-cut theorem</li>
</ul>

<h3 id="monday-26th-may-2025">Monday 26th May, 2025</h3>
<p>Morning session (11am):</p>
<ul>
  <li>Horvath and Folly-Dogba: Eulers formula</li>
  <li>Mishra and Agarwal: Community detection</li>
  <li>Gay: Quantum random walks on graphs</li>
  <li>Diallo and Nada-Abi: Graph Spanners</li>
  <li>Akoumba: Geometric Routing</li>
</ul>

<p>Afternoon session (2pm):</p>
<ul>
  <li>Maggiorano: Cycle detection for train schedule applications</li>
  <li>Gong and Fang: Graph Isomorphism</li>
  <li>Yang and Bian: Hamiltonian paths</li>
</ul>]]></content><author><name></name></author><category term="Teaching" /><category term="LF" /><summary type="html"><![CDATA[Spring 2025]]></summary></entry><entry><title type="html">Graph Algorithms (14X061)</title><link href="https://arnaudcasteigts.net/teaching/graphalgo/" rel="alternate" type="text/html" title="Graph Algorithms (14X061)" /><published>2024-02-01T15:44:46+01:00</published><updated>2024-02-01T15:44:46+01:00</updated><id>https://arnaudcasteigts.net/teaching/graphalgo</id><content type="html" xml:base="https://arnaudcasteigts.net/teaching/graphalgo/"><![CDATA[<p>Enseignant : Arnaud Casteigts<br />
Assistants : Himika Das<br /></p>

<p>Every Monday, room 301 (Battelle campus) - 11am (course) - 2pm (exercises).</p>

<h1 id="other-pages-for-this-class">Other pages for this class</h1>
<ul>
  <li><a href="https://moodle.unige.ch/enrol/index.php?id=18500">Moodle</a> (all documents + communications)</li>
  <li><a href="https://pgc.unige.ch/main/teachings/details/2025-14X061">Unige</a> (administrative page)</li>
  <li><a href="https://arnaudcasteigts.net/teaching/graphalgo-archive/">Previous years</a> (may differ from this year)</li>
</ul>

<h1 id="lecture-notes">Lecture notes</h1>

<p>This section will be updated after each class.</p>

<ul>
  <li>Preambule: <a href="/files/graphalgo-preamble.pdf">[slides]</a></li>
</ul>

<ol>
  <li>Basics of graph theory: <a href="/files/graphalgo-1.pdf">[lecture notes]</a></li>
  <li>Basic algorithms: <a href="/files/graphalgo-2.pdf">[lecture notes]</a></li>
  <li>Minimum Spanning Trees (and Matroid): <a href="/files/graphalgo-3.pdf">[lecture notes]</a></li>
  <li>Computational complexity: <a href="/files/graphalgo-4-slides.pdf">[slides]</a> - <a href="/files/graphalgo-4.pdf">[lecture notes]</a></li>
  <li>Graph coloring: <a href="/files/graphalgo-5-slides.pdf">[slides]</a></li>
  <li>Maximum Matching: <a href="/files/graphalgo-6.pdf">[lecture notes]</a></li>
  <li>Approximation algorithms: <a href="/files/graphalgo-7.pdf">[lecture notes]</a></li>
  <li>Random Walks (and Markov chains): <a href="/files/graphalgo-8-slides.pdf">[slides]</a></li>
  <li>Distributed Algorithms: <a href="/files/graphalgo-9-slides.pdf">[slides]</a></li>
  <li>Basic Concepts of Temporal Graphs: <a href="/files/graphalgo-10.pdf">[lecture notes]</a></li>
  <li>Temporal components and temporal spanners: <a href="/files/graphalgo-11.pdf">[lecture notes]</a></li>
</ol>

<h1 id="mini-class-projects-in-may-2026">Mini-class projects (in May 2026)</h1>

<p><em>Objective:</em> give a mini-class on a particular topic. Using slides is strongly recommended, possibly with hybrid content on the whiteboard.</p>

<p>Instructions: <a href="/files/graphalgo-miniclass.pdf">[slides]</a></p>

<p>Grading scale: 1/4 for this talk (+3/4 exam).</p>

<p>May 11 (11h15 -&gt; 13h):</p>
<ul>
  <li>Goulard and Papa: Brook’s Theorem</li>
  <li>Lin and Liu: Interval graphs (and who killed the duke of Densmore)</li>
  <li>Kern and Khan: Cops and Robbers</li>
  <li>von Düring: Centroid Decomposition</li>
  <li>Kolikara: Page Rank</li>
</ul>

<p>May 11 (14h15 -&gt; 16h):</p>
<ul>
  <li>Slabe and Rasolfo: Graph Isomorphism</li>
  <li>Zeller: GNN and Kirchoff’s Matrix</li>
  <li>Jain: Ramsey Theory</li>
  <li>Freudiger: Graph coloring metaheuristics for production planning</li>
  <li>Zhang and Yang: Proof of Eulers Formula and degree 5 vertex</li>
</ul>

<p>May 18 (11h15 -&gt; 13h):</p>
<ul>
  <li>Vaskou : Graph Isomorphism</li>
  <li>Alourou : Hamiltonian Path/Cycles</li>
  <li>Amehunke: Proof of Eulers Formula and degree 5 vertex</li>
  <li>Samb : Interval Graphs (and who killed the duke of Densmore)</li>
  <li>Faizan Khan: Random Graph Models</li>
</ul>

<p>May 18 (14h15 -&gt; 16h):</p>
<ul>
  <li>Sedykh and Vanson: Tarjan’s Algorithm for Strong Connectivity</li>
  <li>Assadi: Population protocols</li>
  <li>Camara: The Game of Hex and its connection to graph theory</li>
  <li>Yaghi and Rakotomanana: Perfect Graphs</li>
  <li>Souza Luz and Cavagna: Hamiltonian Paths/Cycles</li>
</ul>

<!-- [[Assignment of the topics for each group]](/files/assigned_project_2026.txt) -->

<!-- **You are required to attend all the talks**. An evaluation form will have to be filled by each participant for all the talks. -->]]></content><author><name></name></author><category term="Teaching" /><category term="LF" /><summary type="html"><![CDATA[Enseignant : Arnaud Casteigts Assistants : Himika Das]]></summary></entry><entry><title type="html">Algorithmique (12X003) - Archives</title><link href="https://arnaudcasteigts.net/teaching/algorithmique-archive/" rel="alternate" type="text/html" title="Algorithmique (12X003) - Archives" /><published>2023-10-15T16:44:46+02:00</published><updated>2023-10-15T16:44:46+02:00</updated><id>https://arnaudcasteigts.net/teaching/algorithmique-archive</id><content type="html" xml:base="https://arnaudcasteigts.net/teaching/algorithmique-archive/"><![CDATA[<p>Cette page contient les ressources pédagogiques du cours de Langages Formels des années précédentes. Pour l’année actuelle, ça se passe <a href="/teaching/algorithmique/">sur cette page</a>.</p>

<h1 id="automne-2025">Automne 2025</h1>
<p>Enseignants : Arnaud Casteigts et Franck Raynaud<br />
Assistant : Brian Pulfer<br />
Monitrice : Théo von Düring et Antoine Maendly</p>

<ul>
  <li>Rappels de complexité algorithmique <a href="/files/rappels-complexite.pdf">[slides]</a></li>
  <li>Algorithmes gloutons (I) <a href="/files/algo-glouton-1.pdf">[notes de cours]</a></li>
  <li>Algorithmes gloutons (II) <a href="/files/algo-glouton-2.pdf">[notes de cours]</a></li>
  <li>Programmation dynamique (I) <a href="/files/algo-prog-dynamique-1.pdf">[notes de cours]</a></li>
  <li>Programmation dynamique (II) <a href="/files/algo-prog-dynamique-2.pdf">[notes de cours]</a></li>
  <li>Algorithmes d’approximation (I) <a href="/files/algo-approx-1.pdf">[notes de cours]</a></li>
  <li>Algorithmes d’approximation (II) <a href="/files/algo-approx-2.pdf">[notes de cours]</a></li>
</ul>]]></content><author><name></name></author><category term="Teaching" /><category term="Algo" /><summary type="html"><![CDATA[Cette page contient les ressources pédagogiques du cours de Langages Formels des années précédentes. Pour l’année actuelle, ça se passe sur cette page.]]></summary></entry><entry><title type="html">Algorithmique (12X003)</title><link href="https://arnaudcasteigts.net/teaching/algorithmique/" rel="alternate" type="text/html" title="Algorithmique (12X003)" /><published>2023-10-15T16:44:46+02:00</published><updated>2023-10-15T16:44:46+02:00</updated><id>https://arnaudcasteigts.net/teaching/algorithmique</id><content type="html" xml:base="https://arnaudcasteigts.net/teaching/algorithmique/"><![CDATA[<p>Enseignants : Arnaud Casteigts et Franck Raynaud<br />
Assistant : Matteo De Francesco<br />
Monitrice : Esteban Cellier</p>

<p>Les mercredis après-midi à Battelle (Amphi D) - cours à 14h, exercices à 16h.</p>

<h1 id="pages-du-cours">Pages du cours</h1>
<ul>
  <li><a href="https://pgc.unige.ch/main/teachings/details/2025-12X001">Unige</a> (informations administratives)</li>
  <li><a href="https://moodle.unige.ch/course/view.php?id=2661">Moodle</a> (ressources pédagogiques)</li>
</ul>

<h1 id="notes-de-cours">Notes de cours</h1>
<p>Les supports seront déposés sur cette page après chaque cours (ainsi que sur Moodle).</p>

<ul>
  <li>Préambule <a href="/files/algo-slides-intro.pdf">[slides]</a></li>
  <li>Rappels de complexité algorithmique <a href="/files/rappels-complexite.pdf">[slides]</a></li>
  <li>Algorithmes gloutons (I) <a href="/files/algo-glouton-1.pdf">[notes de cours]</a></li>
  <li>Algorithmes gloutons (II) <a href="/files/algo-glouton-2.pdf">[notes de cours]</a></li>
  <li>Programmation dynamique (I) <a href="/files/algo-prog-dynamique-1.pdf">[notes de cours]</a></li>
  <li>Programmation dynamique (II) <a href="/files/algo-prog-dynamique-2.pdf">[notes de cours]</a></li>
</ul>

<h1 id="pour-aller-plus-loin">Pour aller plus loin</h1>

<p>Le contenu de ce cours est assez standard et peut être trouvé via de nombreuses ressources sur Internet. Le livre “Introduction à l’algorithmique” (Cormen, Leiserson, Rivest) couvre également une partie significative du contenu, entre autres sujets.</p>

<p>Vous pouvez aussi consulter les supports de cours de l’<a href="../algorithmique-archive/">an passé</a></p>]]></content><author><name></name></author><category term="Teaching" /><category term="Algo" /><summary type="html"><![CDATA[Enseignants : Arnaud Casteigts et Franck Raynaud Assistant : Matteo De Francesco Monitrice : Esteban Cellier]]></summary></entry><entry><title type="html">Calculabilité et Complexité (11X008) - Archives</title><link href="https://arnaudcasteigts.net/teaching/calculabilite-complexite-archive/" rel="alternate" type="text/html" title="Calculabilité et Complexité (11X008) - Archives" /><published>2023-09-15T16:44:46+02:00</published><updated>2023-09-15T16:44:46+02:00</updated><id>https://arnaudcasteigts.net/teaching/complexite-archive</id><content type="html" xml:base="https://arnaudcasteigts.net/teaching/calculabilite-complexite-archive/"><![CDATA[<p>Cette page contient les ressources pédagogiques du cours de Complexité et Calculabilité des années précédentes. Pour l’année actuelle, ça se passe <a href="/teaching/calculabilite-complexite/">sur cette page</a>.</p>

<h1 id="printemps-2024">Printemps 2024</h1>
<p>Enseignant : Arnaud Casteigts<br />
Assistants : Alexandre-Quentin Berger et Matteo De Francesco<br />
Monitrice : Léa Heiniger</p>

<ul>
  <li>Préambule : <a href="/files/complexite-preambule-2024.pdf">[slides]</a></li>
  <li>Cours 1 : Survol du module : <a href="/files/complexite-1-slides-2024.pdf">[slides]</a>
(pb d’enregistrements, pas de vidéo :-/)</li>
  <li>Cours 2 : Rappels de langages formels : <a href="/files/complexite-2-cours-2024.pdf">[notes de cours]</a></li>
  <li>Cours 3 : Décidable, reconnaissable, simulation : <a href="/files/complexite-3-cours-2024.pdf">[notes de cours]</a></li>
  <li>Cours 4 : Diagonalisation et indécidabilité : <a href="/files/complexite-4-cours-2024.pdf">[notes de cours]</a></li>
  <li>Cours 5 : Théorème de Rice (et degrés de Turing) : <a href="/files/complexite-5-cours-2024.pdf">[notes de cours]</a></li>
  <li>Cours 6 : Introduction à la complexité algorithmique (A. Berger) : <a href="/files/complexite-6-cours-2024.pdf">[notes de cours]</a></li>
  <li>Cours 7 : Classes de complexité basiques : <a href="/files/complexite-7-cours-2024.pdf">[notes de cours]</a></li>
  <li>Cours 8 : Relations connues; non-déterminisme; théorème de Savitch : <a href="/files/complexite-8-cours-2024.pdf">[notes de cours]</a></li>
  <li>Cours 9 : Classe NP : <a href="/files/complexite-9-cours-2024.pdf">[notes de cours]</a></li>
  <li>Cours 10 : NP-complétude : <a href="/files/complexite-10-cours-2024.pdf">[notes de cours]</a></li>
  <li>Cours 11 : Exemples de réductions : <a href="/files/complexite-11-cours-2024.pdf">[notes de cours]</a></li>
  <li>Cours 12 : Théorème de Cook-Levin : <a href="/files/complexite-12-cours-2024.pdf">[notes de cours]</a></li>
</ul>

<h1 id="printemps-2025">Printemps 2025</h1>
<p>Enseignant : Arnaud Casteigts<br />
Assistants : Alexandre-Quentin Berger et Matteo De Francesco<br />
Monitrice : Naziha Beghdadi et Elie Bussod</p>

<ul>
  <li>Préambule : <a href="/files/complexite-preambule-2025.pdf">[slides]</a></li>
  <li>Cours 1 : Survol du module : <a href="/files/complexite-1-slides-2025.pdf">[slides]</a></li>
</ul>

<p>Calculabilité :</p>

<ul>
  <li>Cours 2 : Problèmes, Machine, Simulation : <a href="/files/complexite-2-cours-2025.pdf">[notes]</a> - <a href="/files/complexite-2-slides-2025.pdf">[Alonzo Church]</a></li>
  <li>Cours 3 : Propriétés de clôture et réductions : <a href="/files/complexite-3-cours-2025.pdf">[notes]</a></li>
  <li>Cours 4 : Théorème de Rice, Diagonalisation, Non-reconnaissabilité : <a href="/files/complexite-4-cours-2025.pdf">[notes]</a></li>
</ul>

<p>Complexité :</p>

<ul>
  <li>Cours 5 : Notations asymptotiques &amp; classes de complexité : <a href="/files/complexite-5-cours-2025.pdf">[notes]</a></li>
  <li>Cours 6 : Relation entre classes : <a href="/files/complexite-6-cours-2025.pdf">[notes]</a> - <a href="/files/complexite-6-slides-2025.pdf">[Hartmanis, Stearns, Williams]</a></li>
  <li>Cours 7 : Non-déterminisme : <a href="/files/complexite-7-cours-2025.pdf">[notes]</a></li>
  <li>Cours 8 : Classe NP : <a href="/files/complexite-8-cours-2025.pdf">[notes]</a></li>
  <li>Cours 9 : Réductions polynomiales : <a href="/files/complexite-9-cours-2025.pdf">[notes]</a></li>
  <li>Cours 10 : NP-complétude : <a href="/files/complexite-10-cours-2025.pdf">[notes]</a></li>
  <li>Cours 11 : Theorème de Cook-Levin : <a href="/files/complexite-11-cours-2025.pdf">[notes]</a></li>
</ul>]]></content><author><name></name></author><category term="Teaching" /><category term="LF" /><summary type="html"><![CDATA[Cette page contient les ressources pédagogiques du cours de Complexité et Calculabilité des années précédentes. Pour l’année actuelle, ça se passe sur cette page.]]></summary></entry></feed>