roles) || in_array('administrator', $user->roles) || in_array('admin', $user->roles ) ) { ?>
probname); ?>
Topic Classification: nid, "Topic Classification"); ?> Tags: nid, "Problem Tag");?>
Topics: nid, "Topics"); ?> Prerequisites: nid, "Prerequisites"); ?>
Supplies: nid, "Supplies"); ?> Pedagogy: nid, "Pedagogy"); ?>
Grade Vs Difficulty:
  EasyModerateChallengingPerplexing
1-2
3-4
5-6
7-8
9-10
11-12
13-14
Solution: nid, "Solution"); ?>
Problem

Tower of Hanoi: Arrange the three pegs in a circle. Let $Q_n$ be the number of moves it takes to move a tower of $n$ discs from peg A to peg B with all moves being clockwise, and $R_n$ with all moves being counter-clockwise. Express $Q_n$ and $R_n$ recursively.

Alternatively: prove that $Q_0 = R_0 = 0$ and otherwise $Q_n = 2R_{n-1}$ and $R_n = Q_n + Q_{n-1} + 1$.

Details
Contributer: Josh
Authors
nid); while ($data = db_fetch_object($authorresult)) { $authorfirstname = $data->firstname; $authorlastname = $data->lastname; $authors = $authorfirstname . ' ' . $authorlastname; print $authors; ?>
References
nid); if (mysql_num_rows($refresult) > 0 ) { ?> nmcreferenceid; $referenceauthor = $data->author; $referencetitle = $data->title; $referenceurl = $data->url; ?> 0 ) { print '
Reference Author Reference Title Reference URL
'; } ?>
nid); $totalSets = mysql_num_rows($setsResult); if ($totalSets > 0) { ?>
Problem Sets This Problem Belongs to:
parent_nid; ?> Set:
VARIABLES
nid, 1); while ($data = db_fetch_object($variablesresult)) { $variable = $data->elementdata; ?> •


DEFINITIONS
nid); while ($data = db_fetch_object($defresult)) { $definitionid = $data->nmcdefinitionid; $definition = $data->definition; $definitionname = $data->definitionname; ?> •