We will first check the value of I(1,n). If it is 0, then we will return 0. But if it shows 1 as output, then we will divide the bits in two parts, with almost same number of elements (i.e. from 1 to [n/2] and from [n/2]+1 to n). Then, we will check the output of the function on these two parts of the bits (i.e. I(1,[n/2]) and I([n/2]+1,n)). Now, if only one of the outputs return 1, then we will take that array and divide it further and go on with the same process. If both of the arrays give us 1 as a output, then we will take the first one as the array and then we will go on with the same process.
Get Answers For Free
Most questions answered within 1 hours.