Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Hi , i have problems to learn recurtion

  1. Feb 13, 2008 #1
    i have this question which are femiliar to the
    codes which we learned in class like subsets

    but when i try to looks on the subsets code
    i cant see the logic of it

    how do i understand it??
  2. jcsd
  3. Feb 13, 2008 #2


    User Avatar
    Science Advisor
    Homework Helper

    Language what, that is in ?
  4. Feb 13, 2008 #3
  5. Feb 26, 2008 #4
    Sounds like your are learning recursion and the example you are using is taken from set theory, namely sets and subsets.

    Hint: let your recursion terminate on the empty set.

    if your function
    works on sets, S{},
    recognises the empty set {}, and
    can find subsets from S{}, then
    for every subset Si{} in S{} you can
    call f(Si{}).
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook