Python Summation for a Python function

Click For Summary
The discussion focuses on understanding the derivation of values in a summation related to a recursive function, specifically Cn+1 = Ʃ Ck Cn-k from k = 0 to n. The user expresses confusion about how to calculate the values, particularly for C1 and beyond, and seeks clarification on the recursive process. Another participant corrects the misunderstanding, explaining that Cn+1 is not directly included in the equation but rather depends on previous terms. They provide examples of calculating values for C1, C2, C3, and C4 to illustrate the process. Overall, the conversation emphasizes the importance of correctly interpreting the summation notation and the recursive nature of the function.
BK124
Messages
1
Reaction score
0

Homework Statement



For formatting sake I've copied a picture of the problem and attached it here: http://i.imgur.com/kOjTy.png

Im not worried about the coding part right now I feel I can handle that, my main issue is trying to understand how the values in the summation are derived. It seems simple enough, but I can't seem to grasp how they got the 10 values in the example there. Once I understand the summation, the coding should be easy. I just need a bit of guidance in how it all's working.

Homework Equations



Cn+1 = Ʃ Ck Cn-k from k = 0 to n

The Attempt at a Solution


Obviously
C0 = 1

Beyond that, here's what my understanding of it seems to be:
For C1
k starts at 0
C1 = C0 * C1-0 + C1 * C1-1

but this is where I get confused.
 

Attachments

  • gfhdfghfgh.PNG
    gfhdfghfgh.PNG
    27.8 KB · Views: 791
Technology news on Phys.org
I suspect one defines the process recursively. How many ways can you draw a line segment between vertices? Each way divides the polygon into two smaller polygons.

You may then have to be careful iterating cases in a way that avoids double counting.
 
BK124 said:
Cn+1 = Ʃ Ck Cn-k from k = 0 to n

The Attempt at a Solution


Obviously
C0 = 1

Beyond that, here's what my understanding of it seems to be:
For C1
k starts at 0
C1 = C0 * C1-0 + C1 * C1-1

but this is where I get confused.

hmm, i think you are reading the summation notation wrong, Cn+1 doesn't come into the equation, only Cn, the previous term.
C1 = C0*C0 = 1
C2 = C0*C1 + C1*C0 = 2
C3 = C0*C2 + C1*C1 + C2*C0 = 5
C4 = C0*C3 + C1*C2 + C2*C1 + C3*C0 = 14
and so on...
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
Replies
1
Views
2K
Replies
55
Views
6K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K