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

Video generation prompt: The figure shows a min-heap with a pre-order traversal of [3, 37, 91, 44] and an in-order traversal of [91, 37, 3, 44]. Insert a node with the value 1 into the min-heap, and gradually demonstrate the animation process of updating nodes after inserting the node 1.

Evaluation guide:
(i) Target concept: Min-heap insertion with upward percolation to restore the heap invariant.
Minimum mechanism: Binary tree structure where each node stores a numeric value and the root always holds the minimum value in the tree; insertion follows array-index logic (new node placed at the next open position in the complete tree); a comparison-driven swap happens only when a child's value is smaller than its parent's; swaps propagate strictly upward along parent links until the root is reached or a parent is no longer larger than the new node.
(ii)Storyline: Frame 1–2: Static display of the initial 4-node min-heap (root 3, left child 37, 37's left child 91, right child of root 44) with labeling and layout matching the given traversals. Frame 3: Node 1 appears at the next open position, as the right child of node 37. Frame 4–5: Node 1 smoothly swaps with its parent, node 37, moving up one level. Frame 6–7: Node 1 swaps with its new parent, the root node 3, moving up to become the new root. Frame 8: Stable final 5-node min-heap with root=1, node 3 as its left child, nodes 91 and 37 as 3's children, and node 44 unchanged as the root's right child; no further motion; all edges re-rendered to reflect the new parent-child links.

Manual:
Experimental Procedure
1. Display initial min-heap: root=3, left child=37, 37's left child=91, right child of root=44 — matching pre-order [3,37,91,44] and in-order [91,37,3,44].
2. Insert node 1 at the next open position: the right child of node 37.
3. Percolate up: swap 1↔37, then 1↔3.
4. Final heap root=1, with left child 3 and right child 44 (unchanged); node 3's children are 91 and 37.
Observation of Experimental Phenomena
- Initial heap shows four labeled nodes in correct relative positions.
- Node 1 appears as the right child of node 37, then moves stepwise upward along parent links.
- After two swaps, node 1 resides at the root; every parent is less than or equal to its children.
Summary of Experimental Principles
- Min-heap property: each node's value is less than or equal to both of its children.
- Array-based heap insertion places the new element at the next open position, then repeatedly swaps it with its parent while it is smaller than that parent.
- Pre-order and in-order traversals verify the tree's structural correctness before and after insertion.

Prompt Grounding rubric:
level_1: No min-heap-like tree is shown; the pre-order sequence [3, 37, 91, 44] and the in-order sequence [91, 37, 3, 44] are not displayed as node labels anywhere; node 1 is never introduced; no insertion action is shown.
level_2: A tree-like structure appears, but its root is not 3; only part of the pre-order or in-order sequence is legible (for instance, just two of the four values appear in the right order); node 1 appears somewhere on screen but is not placed into the tree; no insertion animation is shown.
level_3: The pre-order sequence [3, 37, 91, 44] is fully and correctly shown as node labels in root-left-right order, and the in-order sequence [91, 37, 3, 44] is fully and correctly shown as node labels in left-root-right order; node 1 is introduced and placed at the next open position, as the right child of node 37; no upward-swapping animation is shown yet.
level_4: Everything in the 3-point level is present, and additionally: node 1 visibly moves upward, first swapping with its parent 37, then swapping with the root, node 3; the final root is node 1; both intermediate positions are shown occupied by node 1 in sequence; no swap is skipped and no extra node appears.
level_5: Everything in the 4-point level is present, and additionally: each swap happens only because the moving child's value is smaller than its parent's; after each swap, the affected local pair and its subtree satisfy the min-heap property; the final tree has exactly five nodes (the original four plus node 1) with no duplicate or misplaced labels; the final pre-order labeling reads 1, 3, 91, 37, 44, matching the corrected post-insertion structure exactly.

Scientific and Causal Correctness rubric:
level_1: The final root is not 1; node 1 stays at its starting leaf position without ever moving; a swap occurs where the child ends up larger than its new parent, violating the min-heap rule; or the final structure has a parent larger than one of its children anywhere in the tree (for example, node 37 shown as parent of node 3).
level_2: Node 1 moves upward at least once but stops before reaching the root: for example, it swaps with 37 but is left as a child of node 3 even though 1 is smaller than 3; the final root is not 1; at least one parent-child pair in the final state has the parent larger than the child.
level_3: Node 1 moves upward in the correct order: it first swaps with its parent, node 37 (since 37 is larger), then swaps with the new parent, node 3 (since 3 is larger); the final root is node 1; every parent-child pair in the final heap has parent less than or equal to child; no swap occurs where the child was already the smaller value.
level_4: Everything in the 3-point level holds, and additionally: after each swap, the min-heap property is restored for the nodes involved with no lingering violation left on screen; node 44, the root's other child, never moves or changes value throughout the whole animation, since it is untouched by the percolation path.
level_5: Everything in the 4-point level holds, and additionally: every intermediate state after each swap satisfies the min-heap property for the whole tree, not just the swapped pair; no node other than node 1 changes position during the animation; there is never any ambiguity between a node's displayed value and its position in the tree; the final structure exactly matches the correct post-insertion min-heap: root 1, left child 3 (with children 91 and 37), right child 44.

Spatiotemporal Consistency rubric:
level_1: Node 1 appears or disappears abruptly with no motion; heap nodes change position with no visible path connecting old and new locations; labels flicker or vanish partway through the animation; the root node jumps to a new spot with no connected movement shown; two nodes occupy the same location on screen at once.
level_2: Node 1 moves along a path that skips over intermediate positions rather than passing through them continuously; at least one swap shows two nodes instantly trading labels with no positional movement at all; the background or node colors shift abruptly between frames; the tree's edges break apart and then reappear.
level_3: Node 1 moves continuously from its starting position, as the right child of 37, up to the root along a clear, connected path; both swaps show a smooth, connected transition rather than an instant jump; the edges between nodes stay intact and unbroken throughout; no node overlaps another at any point; the camera viewpoint stays fixed.
level_4: Everything in the 3-point level holds, and additionally: the two swaps happen at a similar, steady pace with no jarring speed-up or slow-down; the edge lines stretch and shrink smoothly as nodes move, keeping a continuous connection; node labels stay upright, aligned, and readable throughout the motion.
level_5: Everything in the 4-point level holds, and additionally: the motion across all frames looks fully fluid, with no strobing, ghosting, or stutter; every node stays sharply legible and cleanly rendered against the background throughout, with no blurring or flicker; the tree's proportions and vertical spacing between levels stay consistent before, during, and after the animation.