5,323
edits
Line 489: | Line 489: | ||
Assign each internal node 4 numbers: a,b,c,d<br> | Assign each internal node 4 numbers: a,b,c,d<br> | ||
These are initialized to (1,0,1,0)<br> | These are initialized to (1,0,1,0)<br> | ||
The internal node will be (a*l+b) \times (c*r+d) where \times is either addition or multiplication.<br> | The internal node will be <math>(a*l+b) \times (c*r+d)</math> where <math>\times</math> is either addition or multiplication.<br> | ||
If we delete one leaf and it's parent (stem), we will modify these variables of the stem's parent. | If we delete one leaf and it's parent (stem), we will modify these variables of the stem's parent. | ||