Domain: Engineering — Computer Science
Target concept: Deletion of a Node in a Binary Search Tree

Video generation prompt: Visualize the adjustment and reconstruction process of a binary search tree — root node 2 with left child 1 and right child 3 — after deleting node 2.

Evaluation guide:
Target concept: BST deletion preserves the ordering invariant via successor promotion when removing a two-child node. Minimum mechanistic assumptions: (1) BST validity is defined by value-based left/right subtree constraints, not by on-screen geometry; (2) This task specifically evaluates the inorder-successor convention for deleting a two-child node: node 3 (the minimum of node 2's right subtree {3}) is promoted to root. Note that inorder-predecessor promotion (node 1 becomes root, with node 3 reattached as its right child) is an equally valid BST-deletion convention in general; this rubric scopes the expected demonstration to successor promotion specifically, as posed, rather than claiming it is the only correct result; (3) The subtree rooted at node 1 is preserved intact and reattached under the promoted successor. Phased storyline: (Phase 1) Stable initial BST: 2 (root)–1 (left)–3 (right), all labels visible, edges present. (Phase 2) Target identification: node 2 is highlighted (e.g., red pulse or glow) with an unambiguous visual cue. (Phase 3) Removal: node 2 fades out smoothly, with no jump or disappearance. (Phase 4) Promotion: node 3 rises to the root position, keeping its size and style. (Phase 5) Reconnection: a new edge draws from node 3 to the still-stationary node 1, establishing the left-child relationship. (Phase 6) Validation: the final tree displays only nodes 1 and 3, with 3 at the top and 1 at the bottom-left, no node 2, and no extra nodes or edges, satisfying BST ordering by both layout and label. Visibility constraints: all labels must be legible and high-contrast; nothing may be occluded; the view stays a fixed, front-facing 2D perspective with no rotation or added depth/shading, a plain schematic representation throughout.

Manual:
I. Basic Demonstration Information
Demonstration Title: Deletion of Root Node 2 in Binary Search Tree (2→1→3) Visualization
Subject: Engineering - Computer Science - Data Structures
Demonstration Purpose: To visually demonstrate the structural adjustment process when deleting the root node (2) from a 3-node BST with inorder sequence 1–2–3; illustrate the BST preservation principle via successor promotion (3 becomes new root) and subtree reattachment (1 becomes left child of 3); train recognition of BST validity conditions before/after deletion.
II. Demonstration Carrier/Equipment
Core Carrier: Animated interactive BST diagram (SVG-based or vector-rendered), with three circular nodes labeled "1", "2", "3"; edges as thin black straight lines; white background; fixed hierarchical layout (2 at top-center, 1 bottom-left, 3 bottom-right).
Auxiliary Equipment: None (fully self-contained animation); optional silent on-screen text labels for key steps.
III. Demonstration Content Description
Layout: Initial state shows BST with root=2 (centered, y=0), left child=1 (x=−120, y=+80), right child=3 (x=+120, y=+80); all nodes white fill, black 2px border, bold black numeric labels.
State Control: Animation runs once, linearly, 10 seconds max: (0–1.5s) node 2 pulses red; (1.5–2.5s) node 2 fades out; (2.5–4.0s) node 3 moves vertically upward to (0,0); (4.0–5.2s) new edge draws from 3 to 1; (5.2–6.0s) stabilization pause; final state held until 10s.
Comparison Baseline: Initial and final trees are both valid BSTs — verified by node value ordering and parent–child spatial relations (left child always left/down-left, right child right/down-right).
IV. Observation of Core Phenomena
Initial BST Configuration: Node 2 is root; node 1 is direct left child (value 1 < 2); node 3 is direct right child (value 3 > 2); no other nodes or edges.
Deletion Trigger: Node 2 is distinctly highlighted (red pulse + tooltip "Delete root") before fade.
Reconstruction Process: Node 2 disappears; node 3 ascends smoothly to root position; node 1 remains stationary; new edge forms from node 3 to node 1 (left-down orientation); no intermediate states show disconnected nodes or invalid edges.
Final BST Validation: Final tree has root=3, left child=1, no right child; satisfies BST property (1 < 3, no conflicting values); spatial layout matches canonical BST drawing convention.
V. Summary of Key Knowledge Points and Principles
Core Concept Definition: BST deletion requires maintaining the binary search property: for every node, all values in left subtree ≤ node value < all values in right subtree. When deleting a node with two children, the inorder successor (smallest in right subtree) replaces it.
Mechanism for Node 2: As root with both children, its inorder successor is 3 (smallest in {3}); 3 promotes to root; 1 (entire left subtree of 2) becomes left child of 3 — preserving order since 1 < 3.
Visual Recognition Features: (1) Spatial hierarchy (top-down, left-right); (2) Numeric label consistency (no value change); (3) Edge continuity (no broken/dangling edges); (4) Temporal causality (removal → promotion → reconnection, no reversals or skips).

Prompt Grounding rubric:
level_1: No tree-like structure with nodes labeled 1, 2, and 3 appears; no deletion action is shown at all; the clip shows something unrelated (plain text, a different diagram, or random shapes).
level_2: Three nodes appear in a tree-like arrangement, but their labels are missing, wrong (e.g., 2, 4, 3 instead of 2, 1, 3), or unreadable; node 2 is never marked as the node being deleted; there is no fade, removal, or reconnection animation at all; or the layout itself violates BST placement (e.g., node 1 drawn to the right of node 2).
level_3: The BST starts out correctly labeled with 2 at the root, 1 as its left child, and 3 as its right child; node 2 is marked in some way (e.g., outlined or highlighted) as the node about to be deleted; a removal animation begins (node 2 fading or disappearing), but node 3's promotion to root and node 1's reattachment as its left child are missing, incomplete, or shown in the wrong order.
level_4: All the core steps appear in order: the initial tree (2 at root, 1 left, 3 right), node 2 clearly marked before it is removed, a smooth fade-out of node 2, node 3 rising to take the root position, and node 1 correctly reattached as node 3's left child; labels stay legible and consistently styled throughout, but one small flaw remains, such as a leftover ghost edge, a brief stutter during reconnection, or a short pause between node 2's removal and node 3's promotion that feels disconnected.
level_5: The clip matches the prompt with clean, unambiguous staging: the initial tree shows a centered root labeled '2', a left child labeled '1', and a right child labeled '3', all as uniform circles with clear numeric labels; node 2 is visibly marked as the target, then fades out smoothly with no jump or flicker; node 3 rises directly to the root position while keeping its size and style; the old edge from 2 to 1 disappears and a new edge is drawn from 3 down to 1; the final frame shows only nodes 3 (root) and 1 (its left child), with no trace of node 2 and no stray edges; every step happens in clear, unambiguous order with no reversal or repeated action.

Scientific and Causal Correctness rubric:
level_1: The final tree violates BST ordering (e.g., node 1 ends up as a right child of node 3, or node 3 ends up as a left child of node 1); there's no visible reason shown for the restructuring; a node's value changes (e.g., '1' becomes '0'); or the deletion leaves the tree disconnected or empty.
level_2: The starting tree is a valid BST, but the result after deletion is not: node 1 is left orphaned with no parent, or node 3 disappears instead of node 2; the deleted node's color or style contradicts the rest of the animation's convention (e.g., it turns a different color than fading implies); or node 3 relocates with no visible connection to node 2's removal.
level_3: The starting tree is correct (2 at root, 1 left, 3 right); node 2 is removed; node 3 becomes the new root, satisfying the successor-promotion convention being tested, but node 1 is reattached incorrectly (e.g., as node 3's right child, which would violate BST ordering since 1 is less than 3), or node 1's reattachment appears instantly with no visible connecting motion, breaking the sense of cause and effect.
level_4: The causal logic is sound throughout: removing root node 2 triggers promotion of its inorder successor, node 3 (since node 2 has a right subtree); node 3 becomes the new root; node 1 (the entirety of node 2's original left subtree) is preserved and correctly reattached as node 3's left child; the fade, rise, and edge-redraw happen as a clear, ordered sequence with a perceptible gap between each step; only a minor flaw remains, such as the label '1' briefly overlapping the new edge during reattachment.
level_5: The causality is explicit and scientifically sound: node 2 is identified on-screen as the node being removed (e.g., via a highlight or brief label); its fade-out is followed, only after it completes, by node 3 rising into the root position; once node 3 settles, a new edge grows visibly from node 3 down to node 1, completing the left-child relationship; the final tree satisfies BST ordering by both value and layout (node 1, being smaller, sits to the left of node 3 with no right child on that side), with no ambiguity about the order of events and no omitted step.

Spatiotemporal Consistency rubric:
level_1: Nodes jump to new positions with no motion path between the states; edges snap into or out of existence with no drawing animation; node 1 appears or disappears at some point; the final tree is shown before the deletion even starts; or node sizes/colors change inconsistently between frames.
level_2: Node 3 jumps directly from its starting position to the root position with no sense of continuous upward movement; the edge from node 2 to node 1 disappears before node 2 has finished fading; node 1 shifts sideways while node 2 is still fading, with no fixed anchor; or more than a couple of frames show a duplicate node 2 or a stray extra edge.
level_3: Node positions mostly follow a sensible hierarchical layout (root above, children below); node 1 stays horizontally fixed while node 3 rises; the new edge is redrawn in the same plane as the rest of the tree, but a minor inconsistency remains, such as node 1 drifting slightly sideways during reconnection, or a noticeably long, unexplained pause between node 2 finishing its fade and node 3 beginning to rise.
level_4: Motion follows clean, direct vertical and horizontal paths on a consistent layout grid; node 3 rises smoothly along a single upward path from its starting spot to the root position; node 1 stays visually fixed in place throughout; the new edge is drawn at a steady pace from its origin to node 1 with no stutter; playback stays smooth with no visible frame skips; only a minor flaw remains, such as the new edge's endpoint settling slightly off-center on node 1 for an instant before correcting.
level_5: Every transition reads as clean and unambiguous: node 2 fades out in place with no positional change; node 3 then rises directly and smoothly from its starting position to the root position at a steady pace; node 1 remains visually stationary the entire time; the new edge grows visibly from node 3 down to node 1 and finishes right as node 3 settles into place; there are no dropped frames, no overshoot past the final position, no unexpected color changes, and the flat white background and lighting stay the same throughout with no added shadows or reflections.