1 / 21

Carol Zander University of Washington, Bothell presents Recursion

Carol Zander University of Washington, Bothell presents Recursion. Background. Virtues of active learning Human Tableau (Angelo & Cross), students act out key ideas Kinesthetic Learning (Begel, Garcia, Wolfman), physically engaging exercises

Download Presentation

Carol Zander University of Washington, Bothell presents Recursion

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Carol Zander University of Washington, Bothell presents Recursion

  2. Background • Virtues of active learning • Human Tableau (Angelo & Cross), students act out key ideas • Kinesthetic Learning (Begel, Garcia, Wolfman), physically engaging exercises • Active & Cooperative Learning (McConnell), face-to-face interaction and group process

  3. Background • Colleague was teaching recursion in a CS2-like course • Allowed me to present a problem, solve it, and have the students simulate the run-time stack

  4. The set-up

  5. Problem • Evaluate a prefix expression • valid expression • single digit operands • operators: + - * / • Worked with / * + 9 3 – 4 2 + 5 1 which is (9+3)*(4-2)/(5+1)

  6. Program int evaluate(index in array) { char symbol = expr[++index]; if (symbol is a an operand) return symbol as a digit; // symbol is an operator + int leftOperand = evaluate(index); int rightOperand = evaluate(index); switch (symbol) { case ‘+’: return leftOperand + rightOperand; case ‘-’: return leftOperand – rightOperand; case ‘*’: return leftOperand * rightOperand; case ‘/’: return leftOperand / rightOperand; default: break; } }

  7. The execution

  8. Run-time stack Each student got an index card with one symbol from the prefix expression on it They were to use the board for the rest of the memory of the activation record 3 +

  9. Run-time stack • Idea was that they would form a human run-time stack • Move around • Pop off stack • Push onto stack

  10. The result

  11. Anticipated an ah-ha moment . . . Instead it was an uh-oh moment Actual results were absolute, glorious, complete cluelessness! They had no idea what was going on

  12. The following is a dramatization of the actual event. No students were actually clueless in the making of this presentation.

  13. Such a shame that it was such a dismal failure because ...

  14. It seemed like agood ideaat the time

  15. Lessons Learned

  16. Not a complete failure Besides learning to never try that active learning exercise ...

  17. Recursion is very complex for students. They must fully understand problem-solving recursively first. Executing recursive functions is so different from solving them ...

  18. Is it a chicken-and-egg problem? Perhaps a simple, linear recursive problem in class ... Give the prefix problem for homework. Have them draw an execution tree. Good idea??

More Related