Domain: Engineering — Computer Science
Target concept: Max-Heap

Video generation prompt: The figure shows a max heap with a pre-order traversal of [88, 66, 44, 55] and an in-order traversal of [44, 66, 88, 55]. Insert a node with the value 99 into the max heap, and gradually display the animation process of updating nodes after inserting the node 99.

Evaluation guide:
(i) Target concept: Max-heap insertion and percolate-up restoration of the heap invariant, illustrated on the four-node max-heap with root 88, left child 66, right child 55, and 66's left child 44.
Minimum mechanism: The tree must stay a complete binary tree at every step; the new node 99 must first appear at the next available leaf slot, which is 66's empty right child, not at the root and not next to 88; from that entry point 99 must be compared and swapped only with its current parent, moving up exactly one level at a time; the heap property (every parent's value at least as large as each child's) must hold after every swap and at the end.
(ii) Storyline: Frame 1-2: Static initial heap displayed with nodes 88 (root), 66 (left child of 88), 44 (left child of 66), 55 (right child of 88) -- the unique tree consistent with the given pre-order [88, 66, 44, 55] and in-order [44, 66, 88, 55]. Frame 3: Node 99 appears as the new right child of 66, the next open slot for a five-node complete tree. Frame 4: 99 is compared with its parent 66; since 99 is larger, they swap -- 99 moves up into 66's former slot and 66 moves down into the slot 99 just vacated. Frame 5: 99, now at 66's former position, is compared with its parent 88; since 99 is larger, they swap -- 99 becomes the new root and 88 moves down into 99's former slot. Frame 6: Final state shows 99 at the root with children 88 (left) and 55 (right); 88's children are 44 (left) and 66 (right); all five nodes remain labeled and the tree stays complete. Perspective: Fixed overhead 2D schematic view; all nodes and edges fully visible; no occlusion; labels always upright and centered.

Manual:
Experimental Procedure
1. Display the initial max heap: root 88, left child 66, right child 55, and 66's left child 44 -- matching pre-order [88, 66, 44, 55] and in-order [44, 66, 88, 55].
2. Insert node 99 as the new leaf at the next available position: the empty right-child slot of 66.
3. Animate the percolate-up swaps: first 99 swaps with its parent 66 (99 moves up, 66 moves down into 99's old slot), then 99 swaps with its new parent 88 (99 becomes root, 88 moves down into 99's old slot).
Observation of Experimental Phenomena
- The initial heap shows four labeled nodes in the positions above.
- Node 99 appears at 66's right-child slot and then moves upward in two visible steps, first swapping with 66, then with 88.
- 66 and 88 each relocate downward exactly once, into the slot 99 just vacated at that step.
- The final heap has five nodes: root 99, with children 88 (left) and 55 (right); 88's children are 44 (left) and 66 (right); every parent-child pair satisfies the max-heap property.
Summary of Experimental Principles
- A max heap requires every node's value to be at least as large as each of its children's values.
- Insertion adds the new node at the next leaf position of the complete binary tree, then percolates it up by repeatedly swapping with its parent while the parent is smaller, stopping once the parent is at least as large or the node reaches the root.

Prompt Grounding rubric:
level_1: No tree of any kind is shown; the four starting values 88, 66, 44, 55 never appear together in a heap layout; node 99 never appears; no insertion or update animation plays.
level_2: A binary tree appears but the four starting nodes are mislabeled or mis-arranged (e.g., 44 and 55 swapped, or 66 missing); or 99 appears only as a static, disconnected label with no motion toward the tree; no node repositioning is shown.
level_3: The tree is shown with 88 at the root, 66 as its left child, 55 as its right child, and 44 as 66's left child, matching the given pre-order [88, 66, 44, 55] and in-order [44, 66, 88, 55]; node 99 then appears and moves toward the tree, and at least one upward swap is shown (a node exchanges places with the node above it); all four original values remain visible and correctly labeled throughout.
level_4: Everything required for the 3-point level is present, and in addition 99 first appears specifically as the new right child of 66 (not at the root, not next to 88, and not replacing 44), then visibly swaps upward one level at a time -- first with 66, then with 88 -- with each swap shown as two nodes exchanging positions rather than one node vanishing while a value elsewhere changes; no extra nodes or values appear anywhere in the tree.
level_5: Everything required for the 4-point level is present, and in addition: (i) the initial heap is drawn exactly as 88 (root) / 66 (left) / 55 (right) / 44 (66's left child); (ii) 99 enters at 66's empty right-child slot; (iii) 99 swaps with 66 first, then with 88, becoming root; (iv) 66 and 88 each end up exactly one level lower than where 99 passed them, with 88 landing as the root's left child and 66 landing as 88's right child; (v) the final tree's pre-order reads [99, 88, 44, 66, 55] and its in-order reads [44, 88, 66, 99, 55], with every label remaining legible and unoccluded throughout.

Scientific and Causal Correctness rubric:
level_1: The finished tree breaks the max-heap rule somewhere (a child is drawn larger than its parent); one of the original values 88, 66, 44, or 55 changes to a different number partway through; inserting 99 causes another node to disappear or a value to be duplicated; 99's arrival has no visible effect on the rest of the tree.
level_2: A swap happens but violates the correct comparison order -- e.g., 99 swaps directly with 88 while skipping 66, or 99 stops moving while still below a smaller ancestor (such as stopping as 66's child without ever comparing to 88); or the finished tree does not have 99 at the root even though 99 is the largest value; or the four original values end up attached to the wrong parent-child pairs.
level_3: 99 enters as 66's new right-child leaf, then swaps upward exactly twice: first with 66 (99 takes 66's former slot, 66 drops into 99's old slot), then with 88 (99 becomes root, 88 drops into 99's old slot); every other node (44, 55, and the relocated 66/88) keeps its original value; the finished tree has 99 at the root with every parent's value at least as large as its children's.
level_4: Everything required for the 3-point level is present, and in addition each swap only ever moves 99 toward a strictly smaller parent (never sideways or toward a smaller value elsewhere); after each swap, the displaced parent (66, then 88) occupies exactly the slot 99 just left, with no other node's position disturbed; the finished tree satisfies the max-heap rule at every parent -- 99 over 88 and 55; 88 over 44 and 66 -- with no value drawn out of place, such as 55 appearing above 88.
level_5: Everything required for the 4-point level is present, and in addition the whole cause-and-effect chain is visible frame by frame: 99's appearance at 66's slot triggers the first swap, which places 99 next to 88 and triggers the second swap, after which no further movement occurs because 99 has no larger ancestor left; 66 and 88 each move to exactly one vacated slot and no other; the completed tree remains a valid complete binary tree whose pre-order [99, 88, 44, 66, 55] and in-order [44, 88, 66, 99, 55] both hold in the final frame.

Spatiotemporal Consistency rubric:
level_1: The tree jumps to a different arrangement between shots with no visible transition (e.g., 99 is suddenly at the root with no motion shown); node 66 or 88 vanishes and reappears in a new spot instead of visibly moving there; the whole tree suddenly changes size or rotates with no onscreen cause; edges connecting parent and child snap onto new nodes with no drawing animation.
level_2: 99's move from 66's slot up to 88's old slot happens as an instant cut with no in-between frames; 66 or 88 briefly disappears mid-swap before reappearing in its new slot; the vertical alignment between a node and its parent briefly breaks (e.g., 44 drifts away from directly under 88) before resettling; the diagram's on-screen brightness changes noticeably partway through with no cause.
level_3: All five nodes keep the same size, font, and color throughout; 99's two upward moves (past 66, then past 88) are shown as continuous motion rather than instantaneous jumps; every parent stays directly above its children throughout the animation; the tree's connecting edges never detach or cross incorrectly.
level_4: Everything required for the 3-point level is present, and in addition each of 99's two swaps proceeds smoothly in one direction without backtracking or pausing partway; no two nodes' shapes overlap while they exchange positions; each node's label stays centered on it during motion; the tree keeps the same top-to-bottom depth ordering, with no child ever appearing to float above its own parent.
level_5: Everything required for the 4-point level is present, and in addition both of 99's swaps play out with fully smooth motion and no dropped or frozen frames; at no point do 99 and 66, or 99 and 88, visually overlap while trading places; every label (88, 66, 44, 55, 99) stays fully readable and centered on its node for the entire clip; the final tree keeps the root strictly above its two children and each of those strictly above their own children, with no node shape stretched, tilted, or distorted at any frame.