Hi , i have problems to learn recurtion

  • Thread starter Thread starter transgalactic
  • Start date Start date
  • Tags Tags
    Hi
Click For Summary

Discussion Overview

The discussion revolves around understanding recursion, particularly in the context of coding subsets in Java. Participants explore the logic behind recursive functions and their application to set theory.

Discussion Character

  • Exploratory, Technical explanation, Conceptual clarification

Main Points Raised

  • One participant expresses difficulty in grasping the logic of the subsets code related to recursion.
  • Another participant identifies that the example is related to set theory and suggests that recursion should terminate on the empty set.
  • A hint is provided regarding the function's operation on the empty set and how it can recursively find subsets from a given set.

Areas of Agreement / Disagreement

The discussion does not appear to reach a consensus, as participants are still exploring the concepts and logic involved in recursion and subsets.

Contextual Notes

There are indications of missing clarity on the underlying logic of recursion and its application to subsets, as well as potential assumptions about familiarity with set theory.

transgalactic
Messages
1,386
Reaction score
0
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 can't see the logic of it

how do i understand it??
 
Technology news on Phys.org
Langauge what, that is in ?
 
java
 
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
f(S{})
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{}).
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 133 ·
5
Replies
133
Views
13K
Replies
1
Views
7K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 16 ·
Replies
16
Views
5K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 15 ·
Replies
15
Views
3K