Answers.Body: <p>Sorry for another answer that doesn't fully answer your question, but I have found that the following explanation helps some students so much that they need less practical excercises to understand recursion.</p>
  
  <p>When I explain it as a technique for problem solving I give one riddle as an example, because at least for me and everyone I have talked to this riddle is so complicated to answer that you need to simplify it using recursion.</p>
  
  <p>Maybe you already know it, some people consider it the most difficult riddle there is.</p>
  
  <p>On an island there are 100 people, each with blue eyes. On this island there is the rule that anyone who finds out that they have blue eyes must leave on the next ferry (there's one ferry per day), so each of the 100 inhabitants doesn't know their eye color. Given that they see 99 people with blue eyes everyone must assume that they might be the only one with a different eye color.
  Since you don't speak about eye color on that island the situation stays like that.</p>
  
  <p>Now there is a guest on the island, and since he enjoyed his stay he makes a speech when he is about to leave, and as a joke he thought that he gave them a "hint" that contains only information that they already know, so he tells them that there is at least one person with blue eyes on the island.</p>
  
  <p>The riddle is: What happens next?</p>
  
  <p>Now as I said the only way I can argue about an answer is by using recursion, because for recursion you need two things: a trivial case and a way to deduce a more complicated case from the trivial case.</p>
  
  <p>In this riddle the trivial case would be if there was only one person living on the islane. In that case when they were told that there was at least one person with blue eyes it would have to be that one person and they would leave the island on the next ferry.</p>
  
  <p>The way to deduce fron the simple case to a more complex one is to look at the situation with two people on the island, because each of the two persons is observing one person, so each is looking at the trivial case. In the situation with two people there are two possible outcomes: if one of the two has non-blue eyes then the other person is performing the trivial case, because it doesn't matter whether they are the only person on the island or if there are other persons without blue eyes. Persons without blue eyes change the trivial case as much as stones or trees. One of the two persons will see that there is no person with blue eyes in sight and will have to deduce that they are the one person with blue eyes.</p>
  
  <p>But if the second person also has blue eyes the first person will NOT leave the island on the next ferry. That can only mean that they were seeing a person with blue eyes (otherwise they would have had to behave like the trivial case), so when there are two people with blue eyes they both observe that the other one is not leaving on the next ferry and they are both leaving on the second ferry.</p>
  
  <p>Once you have understood that you can extrapolate to 100 people who will have to leave after 100 days when they observe that no one left after 99 days.</p>
  
  <p>It usually takes quite a while until everyone accepts the solution, but I have received good feedback by many students who agreed that it convinced them that there are cases where recursion makes them able to solve a problem that otherwise they couldn't.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-06T14:11:21.683Z
Answers.Text: This is an excellent answer to a question that I did not ask. Why don't you ask that question and use this answer? (It's okay to answer your own question.)
Answers.UserDisplayName: Ellen Spertus
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-05T09:50:28.087Z
Answers.LastActivityDate: 2017-07-05T09:50:28.087Z
Answers.UserDisplayName: Lars Kokemohr
Answers.Body: <p>This doesn't answer your question, but might be a resource for your course. </p>
  
  <p>Back when (don't ask) Scot Drysdale (Dartmouth) and David Levine (Saint Bonaventure) had a great exercise for assembly language:</p>
  
  <p><strong>Animal</strong></p>
  
  <p>Write an assembly language program whose execution results in writing a true copy of itself elsewhere in memory and then executing the copy. </p>
  
  <p>A refinement is to erase (zero out) the original. </p>
  
  <p>It is recursion without a base case, of course, though you could trick it up. </p>
  
  <p><strong>However</strong> you can also give it a payload, which could be nasty, so beware and discuss. </p>
  
  <p>It is also an example, in assembly, of a <a href="https://en.wikipedia.org/wiki/Quine_(computing)" rel="nofollow noreferrer">Quine</a></p>
  
  <p>Great fun too (sans payload).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-06T14:11:41.383Z
Answers.Text: This is an excellent answer to a question that I did not ask. Why don't you ask that question and use this answer? (It's okay to answer your own question.)
Answers.UserDisplayName: Ellen Spertus
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-03T17:32:58.760Z
Answers.LastActivityDate: 2017-07-03T20:54:36.143Z
Answers.LastEditDate: 2017-07-03T20:54:36.143Z
Answers.UserDisplayName: Buffy
Answers.Body: <p>Recursion is sometimes difficult for students to grasp. It's important to understand the concept before implementing it in any programming language. My college professor said that recursion may not make sense today, next week, or next year. But one day it will come to you, maybe when you least expect it. I show <a href="http://www.itcuties.com/wp-content/uploads/2014/05/ITCuties-Java-recursion-iteration.jpg" rel="nofollow noreferrer">this image</a> to help students think recursively. Next, I'll start with a simple recursive program to calculate the factorial of a number. In class, I simulate recursive calls with pieces of paper. I start by writing fact(10) = 10 * fact(9) on a piece of paper. Then I write fact(9) on a new piece of paper and pass it to a student. The student adds to it by writing fact(9) = 9 * fact(8), writes fact(8) on a new piece of paper, and passes it to another student. This process continues until a student must calculate fact(1), which is simply 1. Then all the papers bubble back up to me, and I calculate the final answer. But even with these relatively simple examples, sometimes it takes time to understand recursion. More simple examples help.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-05T15:31:12.323Z
Answers.Text: It seems as though this doesn't actually address the question asked: *"Can anyone recommend a free online source where she can pick up, and ideally practice, recursion?"*. Could you add some resource from which a student can learn recursion, as the question states?
Answers.UserDisplayName: ItamarG3
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-05T15:25:39.343Z
Answers.LastActivityDate: 2017-07-05T15:25:39.343Z
Answers.UserDisplayName: Edwin Torres
Answers.Body: <p><em>For learning recursion...</em></p>
  
  <p>A student with some programming experience might just need a brief tutorial. Since I teach CS50 AP, I make use of CS50 Study which has a page dedicated to recursion <a href="https://study.cs50.net/recursion" rel="noreferrer">here</a>. There is a slideshow with speaker notes as an overview, tips and tricks for using recursion, and sample problems with solutions. The language in question is C, but any student who knows Java will find the syntax familiar. Additionally, on YouTube the <a href="https://www.youtube.com/watch?v=Mv9NEXX1VHc" rel="noreferrer">Computerphile video on recursion</a> is excellent as a supplement to this page. </p>
  
  <p><em>For practicing recursion...</em></p>
  
  <p>I'm a bit surprised this hasn't come up already, but <a href="http://codingbat.com/java" rel="noreferrer">CodingBat</a> has a handful of recursion exercises in Java ranging from the most basic to some that are quite challenging. There are two sections of problems: <a href="http://codingbat.com/java/Recursion-1" rel="noreferrer">Recursion-1</a> and <a href="http://codingbat.com/java/Recursion-2" rel="noreferrer">Recursion-2</a>. The site doesn't have much in the way of a tutorial (other than solutions to the first two exercises), so it's mainly useful as a practice tool. The nice thing for an instructor is that students can log in to track their progress. If you do want the student to complete <em>x</em> number of problems, you can verify completion by having her either print out her progress while logged in or share her account with you so you can see what has been completed from the teacher view. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-05T23:01:50.693Z
Answers.LastActivityDate: 2017-07-05T23:01:50.693Z
Answers.UserDisplayName: Peter
Answers.Body: <p>Often times, google is our best of friends <sup><sub>(<a href="https://blog.codinghorror.com/trouble-in-the-house-of-google/" rel="noreferrer">I hope</a>)</sub></sup>. A rather simple search leads to a very informative site: </p>
  
  <p><a href="http://introcs.cs.princeton.edu/java/23recursion/" rel="noreferrer">http://introcs.cs.princeton.edu/java/23recursion/</a></p>
  
  <p>It is very thorough, and explains many use-cases for recursion. </p>
  
  <p>Another very handy resource is, inevitably, Stack Overflow: <a href="https://stackoverflow.com/questions/1247945/understanding-recursion-in-java">this question</a> also provides some information, but it is rather specific. Instead of staying there, one can navigate to the Related Questions section, and from there choose a promising question (usually the one with the highest votes, but not always) and reading it. And so on, and so on... (recursively <code>;)</code>). </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-06T11:36:24.790Z
Answers.Text: @nocomprende well the exit statement is a simple check: `student.getLearntSubjects().contains("Recursion");`
Answers.UserDisplayName: ItamarG3
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-03T16:07:52.890Z
Answers.LastActivityDate: 2017-07-03T16:07:52.890Z
Answers.UserDisplayName: ItamarG3
Answers.Body: <p>Eric Roberts wrote a great little book: <a href="http://rads.stackoverflow.com/amzn/click/0471701467" rel="nofollow noreferrer">Thinking Recursively</a>. Hard to do better than that. He's a master. </p>
  
  <p>Whoa. Not cheap. Disclaimer - I'm not him and he doesn't give me kickbacks. </p>
  
  <p>I'll try to add something free, but you, the prof, should get a copy. </p>
  
  <p><a href="https://duckduckgo.com/?q=programming+recursively" rel="nofollow noreferrer">https://duckduckgo.com/?q=programming+recursively</a> may be all you need, actually.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-03T14:23:01.847Z
Answers.Text: I hadn't known about that book, and I'm an Eric Roberts fan. Thanks!
Answers.UserDisplayName: Ellen Spertus
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-03T16:23:57.583Z
Answers.Text: Note, for the record, that the first (classic) version of the book uses Pascal for the examples.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-03T18:37:38.623Z
Answers.Text: Ooh! It's on Safari Books, where I have a subscription.
Answers.UserDisplayName: Ellen Spertus
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-03T13:29:38.480Z
Answers.LastActivityDate: 2017-07-03T13:35:21.793Z
Answers.LastEditDate: 2017-07-03T13:35:21.793Z
Answers.UserDisplayName: Buffy
Body: <p>Normally, Java 2 is a prerequisite for my Computer Architecture course. I gave permission to a strong student who has only taken Java 1 to take Computer Architecture, provided that she learn the basics recursion over the summer. (In Computer Architecture,  the student write recursive programs in assembly language.) Can anyone recommend a free online source where she can pick up, and ideally practice, elementary recursion? The only language she knows is Java.</p>
  
  <p><strong>Update</strong></p>
  
  <p>I modified my question to make more clear that I am only asking about elementary recursion. (I teach about recursion, in depth, in a more advanced course, Programming Languages, in the functional programming unit.)</p>
  
  <p>I ended up recommending to the student:</p>
  
  <ul>
  <li>Any of
  
  <ul>
  <li>The <a href="http://introcs.cs.princeton.edu/java/23recursion/" rel="nofollow noreferrer">Recursion section</a> of <a href="http://introcs.cs.princeton.edu/java/home/" rel="nofollow noreferrer">Introduction to Programming in Java</a> by  Robert Sedgewick and Kevin Wayne, recommended by ItamarG3</li>
  <li>Chapters 17 and 18 of <a href="http://www.toves.org/books/java/index.html" rel="nofollow noreferrer">Programming via Java</a> by Carl Burch</li>
  <li><a href="https://study.cs50.net/recursion" rel="nofollow noreferrer">Recursion</a> in <a href="https://study.cs50.net/" rel="nofollow noreferrer">CS50 Study</a>, recommended by Peter</li>
  </ul></li>
  <li><a href="http://codingbat.com/java/Recursion-1" rel="nofollow noreferrer">Recursion-1 problems</a> from <a href="http://codingbat.com/java" rel="nofollow noreferrer">CodingBat</a>, recommended by Peter</li>
  </ul>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-03T14:24:50.767Z
Comments.Text: Recursion is not a language specific concept. Recursion in java is like recursion in any other procedural language. Have them write a method to compute factorials, as a classical first example. For kicks, have him write a recursive tree walker to display a directory structure, and then componentize it by separating the generic tree walker code from the visitor that operates on the directory structure
Comments.UserDisplayName: pojo-guy
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-03T14:43:38.303Z
Comments.Text: I understand it's not language dependent, but it's easier to learn something in a familiar language and programming environment if possible.
Comments.UserDisplayName: Ellen Spertus
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-03T22:54:08.500Z
Comments.Text: See this question: https://cseducators.stackexchange.com/questions/1380/where-can-a-student-independently-learn-recursion-preferably-in-java
Comments.UserDisplayName: Ellen Spertus
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-04T08:55:56.297Z
Comments.Text: Base case @EllenSpertus, base case. That should be if(you aren't here) {see the question https://cseducators.stackexchange.com/questions/1380/where-can-a-student-independently-learn-recursion-preferably-in-java}
Comments.UserDisplayName: Buffy
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-04T16:38:36.917Z
Comments.Text: Java does not fully support recursion (same for a lot of other languages), as it does not have tail call optimisation. It will not struggle with algorithms where the call depth is O(log n). However infinite recursion is impossible. Check to see if it is possible in scalla. I have heard that the problem is in the JVM, however scalla may get around this by using trampolinning (A technique to simulate tail call recursion).
Comments.UserDisplayName: ctrl-alt-delor
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-06T09:37:15.527Z
Comments.Text: Expose her to functional programming. Not only will she be *forced* to use recursion, she'll also widen her horizon considerably.
Comments.UserDisplayName: Raphael
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-06T14:09:59.940Z
Comments.Text: @Raphael Thanks, but I teach functional programming in depth later in the curriculum. My question is not how to provide a deep understanding of recursion but how to quickly get her up to speed so she can understand a recursive factorial or fibonacci for a sophomore-level course.
Comments.UserDisplayName: Ellen Spertus
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-06T14:12:04.660Z
Comments.Text: @EllenSpertus I don't see how these are different things, but then I don't have experience teaching on that level.
Comments.UserDisplayName: Raphael
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-06T14:20:18.710Z
Comments.Text: @Raphael In the advanced course, they'd learn about tail recursion, the Y-combinator, etc. For computer architecture, I just need them to understand the simplest examples. Knowing tail call optimization (raised by @richard) would be premature, since my purpose of using recursion in computer architecture is for them to see the stack behavior of ordinary recursion in an imperative language.
Comments.UserDisplayName: Ellen Spertus
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-06T15:04:12.190Z
Comments.Text: @EllenSpertus You can learn about functional programming without mentioning these more involved concepts. My point is that by taking away state and loops, you *force* students to think recursively. They can stay with the basic features of, say, Haskell for this lesson. [Try Haskell](https://www.tryhaskell.org/) is a nice enough intro, for instance.
Comments.UserDisplayName: Raphael
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-06T20:36:40.473Z
Comments.Text: @Raphael I have edited the question to make it clearer that I am asking about work a beginning student can do on their own in order to learn the minimum necessary amount of recursion for a sophomore-level course. I encourage you to ask and answer a more general question about learning recursion [in greater depth], as you have some good suggestions.
Comments.UserDisplayName: Ellen Spertus
Tags: <java><resource-request><recursion>
Title: Where can a student independently learn elementary recursion, preferably in Java?
ThreadText: # Where can a student independently learn elementary recursion, preferably in Java?
  
  (Asked by: username_0 on 2017-07-03)
  
  Normally, Java 2 is a prerequisite for my Computer Architecture course. I gave permission to a strong student who has only taken Java 1 to take Computer Architecture, provided that she learn the basics recursion over the summer. (In Computer Architecture, the student write recursive programs in assembly language.) Can anyone recommend a free online source where she can pick up, and ideally practice, elementary recursion? The only language she knows is Java.
  
  **Update**
  
  I modified my question to make more clear that I am only asking about elementary recursion. (I teach about recursion, in depth, in a more advanced course, Programming Languages, in the functional programming unit.)
  
  I ended up recommending to the student:
  
  * Any of
    + The [Recursion section](http://introcs.cs.princeton.edu/java/23recursion/) of [Introduction to Programming in Java](http://introcs.cs.princeton.edu/java/home/) by Robert Sedgewick and Kevin Wayne, recommended by username_7
    + Chapters 17 and 18 of [Programming via Java](http://www.toves.org/books/java/index.html) by Carl Burch
    + [Recursion](https://study.cs50.net/recursion) in [CS50 Study](https://study.cs50.net/), recommended by username_8
  * [Recursion-1 problems](http://codingbat.com/java/Recursion-1) from [CodingBat](http://codingbat.com/java), recommended by username_8
  
  **Tags:** java, resource-request, recursion
  
  > **Comments:**
  > **username_1**: Recursion is not a language specific concept. Recursion in java is like recursion in any other procedural language. Have them write a method to compute factorials, as a classical first example. For kicks, have him write a recursive tree walker to display a directory structure, and then componentize it by separating the generic tree walker code from the visitor that operates on the directory structure  
  > **username_0**: I understand it's not language dependent, but it's easier to learn something in a familiar language and programming environment if possible.  
  > **username_0**: See this question: https://cseducators.stackexchange.com/questions/1380/where-can-a-student-independently-learn-recursion-preferably-in-java  
  > **username_2**: Base case @username_0, base case. That should be if(you aren't here) {see the question https://cseducators.stackexchange.com/questions/1380/where-can-a-student-independently-learn-recursion-preferably-in-java}  
  > **username_3**: Java does not fully support recursion (same for a lot of other languages), as it does not have tail call optimisation. It will not struggle with algorithms where the call depth is O(log n). However infinite recursion is impossible. Check to see if it is possible in scalla. I have heard that the problem is in the JVM, however scalla may get around this by using trampolinning (A technique to simulate tail call recursion).  
  > **username_4**: Expose her to functional programming. Not only will she be *forced* to use recursion, she'll also widen her horizon considerably.  
  > **username_0**: @username_4 Thanks, but I teach functional programming in depth later in the curriculum. My question is not how to provide a deep understanding of recursion but how to quickly get her up to speed so she can understand a recursive factorial or fibonacci for a sophomore-level course.  
  > **username_4**: @username_0 I don't see how these are different things, but then I don't have experience teaching on that level.  
  > **username_0**: @username_4 In the advanced course, they'd learn about tail recursion, the Y-combinator, etc. For computer architecture, I just need them to understand the simplest examples. Knowing tail call optimization (raised by @richard) would be premature, since my purpose of using recursion in computer architecture is for them to see the stack behavior of ordinary recursion in an imperative language.  
  > **username_4**: @username_0 You can learn about functional programming without mentioning these more involved concepts. My point is that by taking away state and loops, you *force* students to think recursively. They can stay with the basic features of, say, Haskell for this lesson. [Try Haskell](https://www.tryhaskell.org/) is a nice enough intro, for instance.  
  > **username_0**: @username_4 I have edited the question to make it clearer that I am asking about work a beginning student can do on their own in order to learn the minimum necessary amount of recursion for a sophomore-level course. I encourage you to ask and answer a more general question about learning recursion [in greater depth], as you have some good suggestions.  
  
  ---
  
  ## 6 answers
  
  ### Answer by username_8 on 2017-07-05. Score: 4 | Accepted answer
  
  *For learning recursion...*
  
  A student with some programming experience might just need a brief tutorial. Since I teach CS50 AP, I make use of CS50 Study which has a page dedicated to recursion [here](https://study.cs50.net/recursion). There is a slideshow with speaker notes as an overview, tips and tricks for using recursion, and sample problems with solutions. The language in question is C, but any student who knows Java will find the syntax familiar. Additionally, on YouTube the [Computerphile video on recursion](https://www.youtube.com/watch?v=Mv9NEXX1VHc) is excellent as a supplement to this page.
  
  *For practicing recursion...*
  
  I'm a bit surprised this hasn't come up already, but [CodingBat](http://codingbat.com/java) has a handful of recursion exercises in Java ranging from the most basic to some that are quite challenging. There are two sections of problems: [Recursion-1](http://codingbat.com/java/Recursion-1) and [Recursion-2](http://codingbat.com/java/Recursion-2). The site doesn't have much in the way of a tutorial (other than solutions to the first two exercises), so it's mainly useful as a practice tool. The nice thing for an instructor is that students can log in to track their progress. If you do want the student to complete *x* number of problems, you can verify completion by having her either print out her progress while logged in or share her account with you so you can see what has been completed from the teacher view.
  
  
  ---
  
  ### Answer by username_7 on 2017-07-03. Score: 4
  
  Often times, google is our best of friends ([I hope](https://blog.codinghorror.com/trouble-in-the-house-of-google/)). A rather simple search leads to a very informative site:
  
  <http://introcs.cs.princeton.edu/java/23recursion/>
  
  It is very thorough, and explains many use-cases for recursion.
  
  Another very handy resource is, inevitably, Stack Overflow: [this question](https://stackoverflow.com/questions/1247945/understanding-recursion-in-java) also provides some information, but it is rather specific. Instead of staying there, one can navigate to the Related Questions section, and from there choose a promising question (usually the one with the highest votes, but not always) and reading it. And so on, and so on... (recursively `;)`).
  
  > **Comments:**
  > **username_7**: @nocomprende well the exit statement is a simple check: `student.getLearntSubjects().contains("Recursion");`  
  
  ---
  
  ### Answer by username_2 on 2017-07-03. Score: 3
  
  Eric Roberts wrote a great little book: [Thinking Recursively](http://rads.stackoverflow.com/amzn/click/0471701467). Hard to do better than that. He's a master.
  
  Whoa. Not cheap. Disclaimer - I'm not him and he doesn't give me kickbacks.
  
  I'll try to add something free, but you, the prof, should get a copy.
  
  <https://duckduckgo.com/?q=programming+recursively> may be all you need, actually.
  
  > **Comments:**
  > **username_0**: I hadn't known about that book, and I'm an Eric Roberts fan. Thanks!  
  > **username_2**: Note, for the record, that the first (classic) version of the book uses Pascal for the examples.  
  > **username_0**: Ooh! It's on Safari Books, where I have a subscription.  
  
  ---
  
  ### Answer by username_5 on 2017-07-05. Score: 1
  
  Sorry for another answer that doesn't fully answer your question, but I have found that the following explanation helps some students so much that they need less practical excercises to understand recursion.
  
  When I explain it as a technique for problem solving I give one riddle as an example, because at least for me and everyone I have talked to this riddle is so complicated to answer that you need to simplify it using recursion.
  
  Maybe you already know it, some people consider it the most difficult riddle there is.
  
  On an island there are 100 people, each with blue eyes. On this island there is the rule that anyone who finds out that they have blue eyes must leave on the next ferry (there's one ferry per day), so each of the 100 inhabitants doesn't know their eye color. Given that they see 99 people with blue eyes everyone must assume that they might be the only one with a different eye color.
  Since you don't speak about eye color on that island the situation stays like that.
  
  Now there is a guest on the island, and since he enjoyed his stay he makes a speech when he is about to leave, and as a joke he thought that he gave them a "hint" that contains only information that they already know, so he tells them that there is at least one person with blue eyes on the island.
  
  The riddle is: What happens next?
  
  Now as I said the only way I can argue about an answer is by using recursion, because for recursion you need two things: a trivial case and a way to deduce a more complicated case from the trivial case.
  
  In this riddle the trivial case would be if there was only one person living on the islane. In that case when they were told that there was at least one person with blue eyes it would have to be that one person and they would leave the island on the next ferry.
  
  The way to deduce fron the simple case to a more complex one is to look at the situation with two people on the island, because each of the two persons is observing one person, so each is looking at the trivial case. In the situation with two people there are two possible outcomes: if one of the two has non-blue eyes then the other person is performing the trivial case, because it doesn't matter whether they are the only person on the island or if there are other persons without blue eyes. Persons without blue eyes change the trivial case as much as stones or trees. One of the two persons will see that there is no person with blue eyes in sight and will have to deduce that they are the one person with blue eyes.
  
  But if the second person also has blue eyes the first person will NOT leave the island on the next ferry. That can only mean that they were seeing a person with blue eyes (otherwise they would have had to behave like the trivial case), so when there are two people with blue eyes they both observe that the other one is not leaving on the next ferry and they are both leaving on the second ferry.
  
  Once you have understood that you can extrapolate to 100 people who will have to leave after 100 days when they observe that no one left after 99 days.
  
  It usually takes quite a while until everyone accepts the solution, but I have received good feedback by many students who agreed that it convinced them that there are cases where recursion makes them able to solve a problem that otherwise they couldn't.
  
  > **Comments:**
  > **username_0**: This is an excellent answer to a question that I did not ask. Why don't you ask that question and use this answer? (It's okay to answer your own question.)  
  
  ---
  
  ### Answer by username_2 on 2017-07-03. Score: 1
  
  This doesn't answer your question, but might be a resource for your course.
  
  Back when (don't ask) Scot Drysdale (Dartmouth) and David Levine (Saint Bonaventure) had a great exercise for assembly language:
  
  **Animal**
  
  Write an assembly language program whose execution results in writing a true copy of itself elsewhere in memory and then executing the copy.
  
  A refinement is to erase (zero out) the original.
  
  It is recursion without a base case, of course, though you could trick it up.
  
  **However** you can also give it a payload, which could be nasty, so beware and discuss.
  
  It is also an example, in assembly, of a [Quine](https://en.wikipedia.org/wiki/Quine_(computing))
  
  Great fun too (sans payload).
  
  > **Comments:**
  > **username_0**: This is an excellent answer to a question that I did not ask. Why don't you ask that question and use this answer? (It's okay to answer your own question.)  
  
  ---
  
  ### Answer by username_6 on 2017-07-05. Score: 0
  
  Recursion is sometimes difficult for students to grasp. It's important to understand the concept before implementing it in any programming language. My college professor said that recursion may not make sense today, next week, or next year. But one day it will come to you, maybe when you least expect it. I show [this image](http://www.itcuties.com/wp-content/uploads/2014/05/ITCuties-Java-recursion-iteration.jpg) to help students think recursively. Next, I'll start with a simple recursive program to calculate the factorial of a number. In class, I simulate recursive calls with pieces of paper. I start by writing fact(10) = 10 \* fact(9) on a piece of paper. Then I write fact(9) on a new piece of paper and pass it to a student. The student adds to it by writing fact(9) = 9 \* fact(8), writes fact(8) on a new piece of paper, and passes it to another student. This process continues until a student must calculate fact(1), which is simply 1. Then all the papers bubble back up to me, and I calculate the final answer. But even with these relatively simple examples, sometimes it takes time to understand recursion. More simple examples help.
  
  > **Comments:**
  > **username_7**: It seems as though this doesn't actually address the question asked: *"Can anyone recommend a free online source where she can pick up, and ideally practice, recursion?"*. Could you add some resource from which a student can learn recursion, as the question states?  
  
  ---
  
  