Ackermann function
Follow recursive calls and stack depth as a few simple rules produce explosive growth. Explore a growth matrix and the limits of direct computation.
Computer scienceTry itVisuApps
Understand algorithms and data structures step by step
Apps
Follow recursive calls and stack depth as a few simple rules produce explosive growth. Explore a growth matrix and the limits of direct computation.
Computer scienceTry itTwo elevator strategies compete in a duel on the same call stream — FCFS, SSTF, SCAN, LOOK, zoning or destination dispatch. Metrics and histograms expose the trade-off between mean and longest wait, and a click on a bar shows the passenger who lived it.
Computer scienceTry itPlace values you can touch: flip bits and watch the decimal, hex and octal values emerge — including the remainder algorithm. In complement mode the MSB visibly weighs negative (−128 + 8 + 2 = −118); in addition mode the carries travel like in column addition — including overflow when the carry out of the MSB is lost.
Computer scienceTry itRun both searches on the same sorted array and compare step counts. See how halving the search space changes growth from linear to logarithmic.
Computer scienceTry itTrace the halve-or-3n+1 rule in 2D and compare neighbouring starting values as 3D trajectories. Explore the still-unproved conjecture behind their behaviour.
Computer scienceTry itFollow data between registers, ALU, caches, memory and storage. Explore cache misses, addition, DMA, memory protection and pipelining with cycle counts.
Computer scienceTry itA training log with an interface (eintragen, gesamtstrecke) and an X-ray view of its inside: three versions store the runs in completely different ways. The program that only uses the methods works in all three versions; the program that reaches into the inside breaks with the first rebuild. The underscore does not protect either; it is a request.
Computer scienceTry itA courtyard is rendered pass by pass as in modern real-time engines: geometry, depth, G-buffer, shadow map, per-pixel lighting, occlusion, reflections, bloom, tonemapping, anti-aliasing. Every intermediate image is computed from the scene; a time budget shows what 16.7 ms at 60 fps means. Recreated for illustration, not Unreal Engine software.
Computer scienceTry itEnter Python code or pick an example — every function call builds its own room: a code board shows the running line and plugs in values, crates hold the local variables, value orbs fly along cables and back. Recursion grows a tree of rooms; scrub the timeline or step through.
Computer scienceTry itSign, exponent, mantissa — clickable bit by bit, with the exactly decoded value. The number line shows every representable number as a tick: the gaps double at each power of two. Store 0.1 and see the rounding error — and the demo panel recomputes 0.1 + 0.2 ≠ 0.3 in the mini format.
Computer scienceTry itHeapsort step by step — build the heap, restore the heap property and sort step by step.
Computer scienceTry itThe Huffman tree grows from the character frequencies of a text: the two lightest nodes leave the heap, fly under a new node carrying their sum, and the new node returns via heappush. The app computes exactly like the slide code (heapq with __lt__), also for your own text. Then read the codes, see 61 instead of 133 bits for KLEINERBEISPIELTEXT, and decode the bit stream without separators bit by bit through the tree. With a prediction question and a switch for a different choice on ties.
Computer scienceTry itToggle inputs to AND, OR, NOT, XOR, NAND and NOR gates. Follow illuminated wires and truth tables, then combine gates into a half adder.
Computer scienceTry itA room with a window, a red and a green wall, rendered by path tracing: with 0 bounces only a hard patch of light, from one bounce the room brightens and the floor takes on the wall colours. Trace rays with a tap, change the sun and wall colours, noise versus averaging over time, proxy scene as a principle picture. Recreated, not Unreal Engine software.
Computer scienceTry itAssignment does not copy: Python programs run line by line, the names are in the middle and the objects on the right, and arrows show which name points to which object. After a = l1 there is one card and two arrows; a function call opens a frame with a third arrow to the same card. Five examples (two names, lists, rebinding, numbers, a real copy), and before every print the question “What does Python print?”.
Computer scienceTry itA rock with 12.6 million triangles, split into clusters of 128 triangles: each cluster is drawn just fine enough that its error stays below one pixel. As you fly closer the coloured clusters break into finer ones live; roughly as many triangles are drawn as there are pixels. Comparison with classic LOD, seams, frozen selection. Principle recreated, not Unreal Engine software.
Computer scienceTry itClass as a blueprint, objects as cards: create runs, set attributes by hand and compute the total distance. A typo silently creates a new attribute; Python only complains when it is read (with “Did you mean”). The __init__ switch shows how a constructor guarantees complete objects. The generated program behaves the same in real Python; four tasks.
Computer scienceTry itWhich method does a * b call? A flow diagram shows the two stations a.__mul__(b) and b.__rmul__(a) with the exits result, NotImplemented and error. With numbers, strings, lists, fractions in four stages (isinstance, __rmul__, __eq__) and runs with and without __lt__: why 3 * Bruch(1, 2) first fails at the int and then ends up in __rmul__.
Computer scienceTry itPython expressions step by step: the expression tree hangs right below the expression — what goes first sits at the bottom — and the 14-level precedence ladder shows why. Values fly up, the intermediate state substitutes sub-expressions, and/or short circuits stay visibly unevaluated. 17 examples from the lecture notes (a += a == 2, -2 ** 2, 3 > 2 > 1 …), your own expressions, a guess beforehand and a “misconception” reading (strictly left to right, times before divided, powers from the left …) to compare.
Computer scienceTry itCompare finding a clique with checking a certificate. Explore polynomial and exponential growth and the possible relationships between P, NP and NP-complete problems.
Computer scienceTry itQuicksort step by step — follow pivot choice, partitioning and swap operations interactively.
Computer scienceTry itRegular expressions with instant feedback: type a pattern and watch live what re.finditer grabs in the text — matches glow in alternating colours, the match list shows positions and groups. Five tasks (numbers, emails, dates, backreferences …) with target checking, hints and an insertable solution, plus flags (re.I/M/S) and a cheat sheet.
Computer scienceTry itElementary cellular automata with all 256 rules: rule 90 jumps to any generation by formula, rule 30 must compute every step (irreducibility); plus a prediction game and an LLM's compute budget per token.
Computer scienceTry itThe same sequence of push and pop on a stack and in a queue: what comes out? The inside view shows what the construction costs: as a Python list every cell moves up one by one on pop(0), the counter reaches n(n−1)/2; the list with an index keeps everything; the linked list only rewires first, last and next. Ten examples from the slides with real Python runs, including undo, bracket checking, swapped lines with a self-loop and duck typing.
Computer scienceTry itInsert, search and delete numbers in a binary search tree: the comparison path lights up node by node with the sentence from the slides (‘22 > 21: right’). Below, the pointer of a sorted linked list runs along, and two counters compare tree and list. Nodes stand in inorder sequence and only move sideways on insertion. 1 2 3 4 5 makes the tree degenerate into a list (depth 5 instead of 3). Plus the three deletion cases, an object view with node cards and the exercises max, depth and search tree by hand.
Computer scienceTry itFollow a tape, read/write head and transition table through binary increments, unary addition, palindrome tests and Busy Beaver examples, one rule at a time.
Computer scienceTry itThe classic recursion puzzle in space: choose the number of disks, let the algorithm solve it optimally (2ⁿ−1 moves) or move them yourself — peg by peg the recursive idea T(n)=2·T(n−1)+1 becomes visible.
Computer scienceTry itbuilt yourself in five stages — a NAND from two transistors, an XOR from NANDs, then half and full adder and finally a 4-bit adder computing 7 + 9. The carry ripples through visibly, and you can zoom in all the way to the transistor.
Computer scienceTry itSlow motion for Lauf(8.5, 53.5) and l.tempo(): the rewrite strip turns l.tempo() into Lauf.tempo(l); the object before the dot slides into the parentheses and becomes self. The constructor first creates an empty object and fills it through self; whatever is not attached to self disappears with the frame. Methods live only on the class card and two objects share them. Plus self passed in the call (TypeError) and the forgotten self. (AttributeError).
Computer scienceTry itA tower of object, Wettkampf, Lauf and object: for w.tempo(), print(w) or l.platz a search beam climbs station by station, and the first match wins. tempo lives only in Lauf, all attributes sit in the one object, and super() continues the search one level up. Switching methods off shows which version of __str__ takes over, all the way up to object.
Computer scienceTry itDeep inside, an exception arises and visibly rises frame by frame through the call stack until a matching except catches it or the program aborts. Every frame it leaves writes its line into the growing traceback; at each net the app checks the type (“ValueError matches except ValueError: yes”). Four programs from real Python 3.13 (price list, order, run, missing file), switches for try, else/finally and where to catch, and first the question “Who catches the exception?”.
Computer scienceTry itStep by step: one's complement, +1, computing subtraction as addition — with freely chosen numbers and 4-/8-/16-bit display.
Computer scienceTry itWant to use these apps in your courses? Let’s find out what works for you.
One form, three matters. We answer personally.
We show heyprof on your own material. Tell us what you teach and we will prepare the conversation around it.