Rapid-fire questions an interviewer asks around Randomization & Constraint Puzzles. Answer out loud, then check yourself.
Answer: Convert constraints to legal tuple counts first, then apply dist weights and normalize. This separates legality from bias and prevents common mistakes about procedural ordering.
Trap: Trying to reason variable-by-variable without counting the joint solution space.
Answer: It does not change legal solutions by itself; it changes solver decision order and therefore can change observed distributions significantly.
Trap: Saying solve-before is equivalent to procedural execution order in simulation time.
Answer: := applies weight per listed item/range element, while :/ applies total weight to the set and divides it across that set's elements.
Trap: Treating both operators as identical per-value weights regardless of range size.
Answer: pre_randomize runs first, then class and inline constraints are solved together (logical AND), and post_randomize runs only if solving succeeds.
Trap: Believing inline constraints override class constraints or that post_randomize can repair failed solves.