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 itAggregate the tools table with avg, sum, min, max and count, sort rows into bins with GROUP BY, filter rows with WHERE and whole groups with HAVING, step by step in execution order.
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 itThe MIU system from Gödel, Escher, Bach to touch: the word is made of tiles, four rule cards show where MxI → MxIU, Mx → Mxx, xIIIy → xUy and xUUy → xy fit, and a tap applies the rule. Above it the derivation tree grows level by level as on the slide, optionally as a breadth-first search without repetitions (1, 2, 3, 5, 14, 44, 213 new words). The I counter with the remainder on division by 3 and the five proof cases show why MU never appears.
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 itA concept model of the PHP2Shell use-after-free bugs: a PHP worker shares its memory across requests. When one request runs out of memory and aborts, a global pointer keeps pointing into freed memory; the next request reuses those cells, and the dangling pointer leaks a stranger's password into the PHPSESSID cookie. Step through it and switch the patch on and off.
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 itThe practice database prodat as a pot full of tables: relation, attribute and tuple on the table tools, a relation as a subset of name × tag after Codd, keys as joints (products.tool → tools.id, NULL), plus 100 million rows: a full scan against a B-tree index and an SQL sentence next to a loop.
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 itEvery row of tools is a flat, id its key: unique and never empty, otherwise UNIQUE or NOT NULL constraint failed. products.tool points into the other table as a foreign key, key 2 opens the door to beta for round. When the workshop deletes tool 2, two references point into nothing like a dead link; with a declared foreign key the database refuses: FOREIGN KEY constraint failed.
Computer scienceTry itThe numbers in a[i:j] are cuts between the cells: two handles for start and stop glide along a ruler with positive numbers above and negative ones below, the expression stays in sync, and the result appears exactly as in Python 3.13. a[1:3] gives two cells, a[2:100] is cut off, a[7] is an IndexError, a[5:2] is empty, a[5:1:-1] runs backwards. Plus index and del modes, strings with a TypeError on change, six tasks and predictions.
Computer scienceTry itBubble, Insertion and Selection Sort in a race: three lanes sort the same list at the same tick, one tick being one comparison. Bars glide past each other when they swap, counters show comparisons and swaps. With 5, 2, 9, 1, 7, 3 Insertion is done after 11 comparisons, Bubble and Selection after 15; sorted, Insertion needs 5. Single view with the pseudocode and Python of the slides, predictions, and doubling up to n = 102400 next to the times from the slide.
Computer scienceTry itWHERE as a sieve: the tools table from the lecture is checked row by row, matches move into the result, the rest drops out. The quote trap tag = A shows 'no such column: A', plus price/weight calculated row by row, as and order by … desc with rows visibly changing places.
Computer scienceTry itWritten SELECT … ORDER BY, executed FROM → WHERE → GROUP BY → HAVING → SELECT → ORDER BY: the clauses jump into execution order and the tools table runs station by station along the line (rows, groups, group values, alias). Plus the typical mistakes alias in WHERE and group condition in WHERE.
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 itFive flashlights on the practice database prodat: 17 of 46 deliveries without a value, sum(days)/count(*) = 12 versus avg(days) = 20.55; table aliases c and o that vanish after the statement, and the same statement with join and on; union as the set union {1, 2, 3} ∪ {1, 3, 5} and on X and Y (7 values, union all 10); the customers from Hamburg as a subquery in where (2 customer IDs, 4 order lines, equal to the join) and a subquery in from named T.
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 itJoins and groups on the practice database prodat: tools join products first forms all 9 combinations, on boils them down to 3 (with ambiguous column name and comma + where). customers × orders gives 23 · 184 = 4232 rows, 184 after on. group by order_id turns them into 80 baskets, sum(quantity) counts the items, having keeps 45. Plus: an order as a line or as a basket, monster table versus separate tables, deletion and foreign keys.
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.