Embed presentation
Download to read offline






![Mathematical analysis
• The input size of the problem is n
• The basic operation is if A[i]==A[j]
• The outer loop will be executed first to last but one
element and inner loop is executed 2 to n array
index.
• C(n) no.of.comparison statement is executed in
worstcase.](https://image.slidesharecdn.com/mathanonrecur-240725203521-baa8c873/85/mathematical-nonrecursive-algorithm-pptx-7-320.jpg)

The document outlines a mathematical analysis of a non-recursive algorithm by determining input size and identifying basic operations. It focuses on the operation of comparisons made to find the largest value in an array and analyzes the execution count of these comparisons under different scenarios (best, worst, average). The analysis includes simplification of sums related to the number of comparisons based on input size n.






![Mathematical analysis
• The input size of the problem is n
• The basic operation is if A[i]==A[j]
• The outer loop will be executed first to last but one
element and inner loop is executed 2 to n array
index.
• C(n) no.of.comparison statement is executed in
worstcase.](https://image.slidesharecdn.com/mathanonrecur-240725203521-baa8c873/85/mathematical-nonrecursive-algorithm-pptx-7-320.jpg)
