Logo of ETH Zurich
Logo of Algorithms and Didactics

News Blog of Dennis Komm

DBLP ORCiD Google Scholar LinkedIN

Recent Activities main website

2026
05-04

Tokenization is NP-Hard Even When Considering Smallest Possible Alphabets

ICLR 2026 One of the first things we teach in highschool CS are number representations. Students should get a good idea of how numbers can be represented before diving into topics like error-correcting codes, compression, cryptography, or even algorithm design. Probably the best access to the idea of presenting a number with respect to some base was already presented in the textbooks of Juraj Hromkovič for primary school students: coin systems.

There is an interesting piece of history here in that almost all coin systems that ever existed and exist are canonical, which means that they have the property that, for any price x you want to pay, a simple greedy approach results in the smallest possible number of coins to use: take the largest coin of value at most x as often as possible; continue with the second-largest coin of value at most x; and so on. One can come up with some coin system for which this is not the case. (You may want to pause and think about one; three coin types suffice.) As a matter of fact, people did, for instance, when designing the British pre-decimal coin system (which was used until 1971) and which contained denominations (coin types) 1/2, 1, 3, 6, 12, 24, 30, 60, and 240. If you want to pay a price of, say, 48, the greedy approach takes one coin of value 30, then one of value 16, and then one of value 2, while there is an optimal solution that uses two coins of value 24.

How full of joy I was to find out (well, being told by my student Philip Whittington, that is) that this problem is actually very closely connected to a very important one in the large-language-model pipeline: Tokenization is the problem of defining a set of tokens (the smallest units on which to work on in what follows) that can be used to represent a given text over characters in, say, a way that is compressed best possible.

Using some beautiful gadgets and reductions—just like in the good old days—, Philip, Violeta Kastreva (who was visiting our group as part of the ETH Summer School Research fellowship program, SSRF), Tiago Pimentel, and I were able to show that different variants of this problem are APX-hard, even if we only consider binary alphabets over which the original strings are defined. If the alphabet is unary, the problem is still NP-hard. And exactly this problem corresponds to computing a best coin system.

Tags

#Theory
2026
04-30

Swiss Day for Computer Science Education 2026

STIU 2026I am happy to share that registration is now open for the 15th Swiss Day for Computer Science Education (“Schweizer Tag für Informatik­unterricht,” STIU), taking place on June 19 at ETH. Note that this is a Friday this year.

STIU 2026

This year's edition will feature 11 workshops for prospect or in-service teachers, or anyone else who is interested in teaching Computer Science in K-12. Topics covered include programming education, STEAM, unplugged activities, cybersecurity, and artificial intelligence.

I am honored to welcome our special guests Andreas Bollin and Roderick Bloem from Austria, who played a pivotal role in establishing the new subject "Informatik und künstliche Intelligenz," and Michael E. Caspersen from Denmark, where 51 pilot schools (and thus 280 classes) will integrate CS into their curricula.

For the fifth time, the finals of the Swiss CS Beaver Competition together with the award ceremonies will be a part of STIU, and we will award the rector's STEM prize and the ABZ medal of honor to individuals and institutions that have made a special contribution to sustainable computer science education.

Photo of Computer Science Beaver Participants

I am looking forward to welcoming you at STIU 2026 in a little more than one and a half months.

Tags

#ABZ #Informatikbiber #STIU
2026
03-31

A Monthly “Stammtisch” for Zurich Computer Science Teachers

Are you a Computer Science teacher in the greater Zurich area, looking for peers to talk about your lessons, Computer Science education in general, to get inspiration on how to teach a certain topic, or simply to expand your network?

Of course you are! Then I am happy to point you to a fantastic initiative of two of our former students, Rob Branchat and Patric Rousselot, who organize a monthly get-together (“Stammtisch”) in central Zurich. The dates are already fixed and announced for May through August, and a registration would be welcome to make planning easier. I will, of course, try to show up on some of these dates.

.

It indeed seems that recently at least some parts of Computer Science education are becoming a fast-moving target. Large Language Models, interdisciplinarity, potential focus subjects, and so many other topics pose questions to which no one knows all the answers. Let us try to approach them together; in an informal setting, with a cold beverage.

Tags

#Lehrdiplom
2026
02-28

The “Informatiktage 2026” and a Long-Overdue Addition to WebTigerPython

This year's “Informatiktage” will take place from March 16 to March 21 and feature three ABZ workshops, all dedicated to programming education. As last year, Joël Lindegger will offer a creative way into coding with XLogoOnline–this time focussing on adults, who maybe want to get a glimpse of what their kids are doing in primary school (or so I hope).

Clemens Bachmann will introduce a new WebTigerPython feature implemented by Joël and him, namely a browser-based implementation of GameGrid, with two workshops aimed and students and their teachers, respectively. The original GameGrid was written in Java and very popular among teachers as it allows a comprehensive introduction to object-oriented programming. Of course, simply porting such a Java library with all its asynchronicity to run in the browser is far from trivial, which is why it had to be rewritten from scratch and uses PyGame under the hood.

Example of a game built in WebTigerPython with GameGrid

WebTigerPython now supports a majority of the PyGame features, with more to come. Actually, if you have any particular feature requests, please let us know.

Tags

#ABZ #Informatiktage #TigerPython #XLogoOnline
2025
12-29

Computer Science Beaver Competition 2025

Also this year, the CS Beaver Competition was attended by an unprecedented number of students from all of Switzerland, namely more than 53'000. This means that the number of participants (1) increased by more than 3000 compared to last year, and that it (2) continues to increase since the Swiss Beaver was launched 15 years ago.

Statistics of Computer Science Beaver

Like every year, we will organize the finals at ETH together with the “Schweizer Tag für Informatikunterricht.”

Tags

#Informatikbiber
2025
12-06

“ETH unterwegs” in Schaffhausen

With “ETH Unterwegs” (ETH on the move) ETH regularly visits high schools in Switzerland to introduce the university as a whole and in particular, what it means to study in its different programs. This week we visited the “Kantonsschule” in Schaffhausen. There are no entrance exam for most programs at ETH Zurich; anyone holding a Swiss “Matura” is admitted and can enroll. This includes the Bachelor's degree program in Computer Science.

ETH unterwegs in Schaffhausen

I was very happy to meet some old friends there, including two former students who now work as computer science teachers. In order to give the students a flavor of what makes computer science a scientific discipline and not just a collection of digital tools, I talked about one of the things I like to talk about most: computability and the roots of computer sciene.

Tags

#K-12 #Talk
2025
11-18

National Future Day 2025

November 13 was the 2025 National Future Day (the “Nationaler Zukunftstag”) in Switzerland, a day where thousands of children accompany their parents to work, or can join different companies and educational institutions including ETH. This is obviously an event worth supporting in the strongest possible way; so just like in the last years, the ABZ contributed with a workshop Code Artists, organized by Joel Lindegger, on Python programming (using WebTigerPython), and that was a full success.

At the same time, our colleagues at PH Bern conducted a workshop Creative Robotics For Girls, led by Urs Wildeisen, that used XLogoOnline and the Swiss-made xBot. The latter can carry a pen and thus be used to draw on paper.

National Future Day 2025 National Future Day 2025 National Future Day 2025

What made this workshop special, however, was the integration of the Arts aspect by not only allowing the robot to draw, but to use its LED lights in combination with bulb exposure photography to create some fantastic pictures. I would conjecture that this a great way to experience self-efficacy.

Tags

#XLogoOnline
2025
11-15

Congrats Magnus!

Yesterday I visited Denmark's beautiful Odense to join the doctoral committee of Magnus Berg Møhring together with Rob van Stee and Lars Rohwedder. Magnus has done some fantastic work on online algorithms with predictions, advised by Kim Skak Larsen, Lene M. Favrholdt, and Joan Boyar.

Magnus Berg

Next to studying how well predictions can be utilized for well-studied graph and resource allocation problems, Magnus' main contribution is building up a complexity theory that is centered around a parameterized version of Asymmetric String Guessing and based on a kind of prediction-preserving reduction. Both hardness and membership (and thus completeness) results have been established for a large number of natural problems, introducing some structure into the study of online algorithms with predictions.

Tags

#Defense #Theory
2025
10-30

Building Your Own Blocks in XLogoOnline Midi

One caveat that always killed my enthusiasm about block-based programming was the inability to support the concept of modularity in a meaningful way. One very central part of problem solving or computational thinking, namely problem decomposition, is mentioned more and more explicitly in almost all CS curricula I have had a look at recently.

Of course, this is a good thing. And in my opinion, there are only a few ways to foster problem decomposition in a more tangible way than by defining a subroutine, module, or function when programming. The lack of such a functionality in early block-based programming environments always made me hesitant to be a strong advocate of the paradigm.

Building your own blocks in XLogoOnline Midi

Of course Scratch allows to build one's own blocks for a long time now, and for Snap! this is even a very central theme. I am more than happy that the Midi version of XLogoOnline now also joined the club. Implementation was done by Rafael Fernandes as part of his Master thesis, which I supervised together with Jacqueline Staub from the University of Trier—who is the force behind XLogoOnline, and who should get all the credit together with Rafael.

With this new addition, computational thinking skills, in particular problem decomposition, can be fostered in an even stronger way when primary school students use XLogoOnline Midi.

Tags

#XLogoOnline
2025
10-03

The Future of (Swiss) Schools in the Age of Generative AI </DramaticTitle>

Yesterday I gave a talk about the future of schools, in particular with a focus on the role of generative AI and its impact on how we teach and what we teach. Of course: I don't know, and neither does anyone else.

Still I was very happy to be invited to Fribourg and speak in front of teachers of all kinds of subjects about what I consider to be some reasonable assumptions regarding what some aspects of school may look like in, say, ten or twenty years from now.

Fribourg 2025

First off, I hope that some things will actually not change, for instance, the automony of schools and teachers that we have in Switzerland. Second, teachers do not only have much more freedom in what and how they teach than in many other countries; but the very profession of being a teacher is viewed as a much more worthwhile career choice than at many other places. At least in my personal experience, Switzerland looks up to its teachers—as it should—much more than other countries to theirs. Third, I hope the permeability of the Swiss education system will remain unchanged.

Now of course, things will look different in a decade or two, and recent changes due to the unprecented advances in generative AI will leave a mark. To me personally this first and foremost means to think about whether our curricula should be affected in any way. I am actually rather hesitant with respect to the extent the basics behind, say, transformers or neuronal networks can be didactically reduced in a meaningful way to make them part of K–12 curricula. But I think some central points can indeed become part of school education, and allow the students to take a look behind the scenes of our modern world.

Then of course there are those that, apparently driven by some fear of being left behind, franticly call for abandonning, for instance, programming education all together: “Replace it by prompt engineering, because that is the skill that is from now on essential to software developers,” they say. Frankly, if that is what some people think, then maybe these people wanted to teach programming for (what I consider) the wrong reasons anyway. It was never about making every school student a future software engineer.

But I also understand that for the general public, and for schools and teachers in particular, there are more pressing questions; such as what the future will look like with respect to homework or the “Maturitätsarbeit.” Of course there are very simple answers, most prominently: “It will be more important to assess the students' process, when, say, working on a project, and not just the mere results of their work.” or “We will have to make sure that theses will be defended by more thorough oral presentations and subsequent questions.” Sure, but implementing such changes will cost time and money. Here I do see some potential for new tools that may indeed help future teachers—never to replace them, but to support with, for instance, internal differentiation. The important thing here is that educators should decide where and how they could benefit from such support, and critically evaluate whether technology does offer a real perspective. It must not be the other way around, just using tools because they are there now and it would be a mistake not to use them—for whatever reason.

Tags

#K-12 #Talk
Show more