Papers by Norman Jacobson
Previous work presented solutions to Lueker's Dilemma [3] and to a variant where damage was deter... more Previous work presented solutions to Lueker's Dilemma [3] and to a variant where damage was determined by a roll of m n-side dice. [4] We build on that work to give a solution to the Dilemma when damage is determined by a roll of m n-side dice adjusted by an integer constant, with the proviso that damage cannot be lower than 0 or, in the alternative, lower than 1. We confirm the dragon is still almost surely defeated, and give new formulas for the expected number of turns the rogue needs to defeat the dragon that take into account the adjustment and minimum damage. We discuss the minor changes needed in the report that presents which of the Dilemma's two weapons the rogue ought to use. We argue it is still that case that, with appropriate pre-computation of intermediate results, a computer program can generate these reports in a reasonable amount of time. For numerous weapons and health point values, we compare the formulas' results against those obtained from simulated combat, and note they are the same, within the simulations' margin of error, and that obtaining results by formula is faster than by simulation.
We motivate the need for, and present a formal solution to, a variant of Lueker's Dilemma where d... more We motivate the need for, and present a formal solution to, a variant of Lueker's Dilemma where damage is determined by the roll of m n-sided dice. We first confirm the dragon is almost surely defeated, and then give a formula for the expected number of turns for the rogue to defeat the dragon. We use that formula to prepare reports showing which of the Dilemma's two weapons the rogue ought to use when the dragon's starting health points are known and unknown, and when switching of weapons during the contest is and is not permitted. We argue that, with appropriate pre-computation of intermediate results, a computer program can generate these reports in a reasonable amount of time. For numerous weapons and health point values, we compare the formula's results against results obtained from simulated combat, and note they are the same, within the simulations' margin of error, and that obtaining the results by formula is much faster than by simulation.
Using the Macintosh version of TURBO PASCAL, this practical guide discusses abstract data types a... more Using the Macintosh version of TURBO PASCAL, this practical guide discusses abstract data types at four levels - abstract, representation, implementation and packaging - in order to reinforce the concept of "information hiding".
Lueker’s Dilemma: A rogue is to fight a dragon that has a known number of health points. The rule... more Lueker’s Dilemma: A rogue is to fight a dragon that has a known number of health points. The rules of combat require the rogue and dragon to take turns attacking each other until one of them is defeated. The rogue has two weapons. Each has a given chance to hit the dragon. If a weapon hits, it delivers a fixed amount of damage, reducing the dragon's health points by that amount. The dilemma: Which weapon should the rogue use to defeat the dragon--to bring its health points to 0 or lower--as quickly as possible? It is a variant of the two-item Unbounded Knapsack Problem.
We present a linear-time algorithm that determines an optimal solution to the Dilemma where the rogue is allowed to switch weapons just before a turn, and constant-time solutions for various special cases of the weapons’ properties, for when switching weapons is not allowed, and for finding a close-to-optimal solution when the dragon’s number of health points is unknown. We show that an optimal solution derived before the contest begins can be relied upon to remain optimal throughout the contest.
Acm Sigcse Bulletin, 2008
... Though not denying its benefits, objectors asserted that certain obstacles doomed pair progra... more ... Though not denying its benefits, objectors asserted that certain obstacles doomed pair programming to failure and so was not worth undertaking. ... A student losing a partner at this time has still done about a week's worth of pair work on the assignment. ...
ACM SIGCSE Bulletin, 2000
ACM SIGCSE Bulletin, 2001
ACM SIGCSE Bulletin, 2006
ACM SIGCSE Bulletin, 2005
ACM SIGCSE Bulletin, 2008
ACM SIGCSE Bulletin, 2004
Abstract The array is typically the first aggregate collection taught in first programming course... more Abstract The array is typically the first aggregate collection taught in first programming courses. Arrays are commonly introduced as a way to implement variable-sized lists, despite their fixed size and, in first courses using Java, the availability of the ArrayList class, which ...
Uploads
Papers by Norman Jacobson
We present a linear-time algorithm that determines an optimal solution to the Dilemma where the rogue is allowed to switch weapons just before a turn, and constant-time solutions for various special cases of the weapons’ properties, for when switching weapons is not allowed, and for finding a close-to-optimal solution when the dragon’s number of health points is unknown. We show that an optimal solution derived before the contest begins can be relied upon to remain optimal throughout the contest.
We present a linear-time algorithm that determines an optimal solution to the Dilemma where the rogue is allowed to switch weapons just before a turn, and constant-time solutions for various special cases of the weapons’ properties, for when switching weapons is not allowed, and for finding a close-to-optimal solution when the dragon’s number of health points is unknown. We show that an optimal solution derived before the contest begins can be relied upon to remain optimal throughout the contest.