שינויים

שיחה:83-116 תשעד סמסטר א

נוספו 623 בתים, 16:23, 27 בינואר 2014
/* רקורסיה משיעור החזרה */
I would think it should be
f(n-1)(odd)= 10*f(n-2)
 
 
There's a difference between
 
adding the <math>n^{th}</math> digit '''after''' n-1 digits (that is, '''you know the first n-1''' digits, and the '''<math>n^{th}</math> is unknown'''),
 
and adding n-2 digits '''before''' the <math>n-1</math> digit (that is, '''you only know the <math>n-1</math> position''', and the '''previous <math>n-2</math> digits are unknown''').
 
In the first case, if the n-1 position is odd then indeed you have 10 ways to feel the '''<math>n^{th}</math> position'''. In the second case, if the n-1 position is odd then you have f(n-2) ways of feeling the '''n-2 previous positions'''.
 
'''Adi
2,077
עריכות