2. Give at least two loop invariants for the following code: Input: a sequence of numbers
a 1
​
,…,a n
​
max:=1
While
(j if
(a max
​
​
)
, then
max:=j+1
j:=j+1
End-while 3. Solve the recurrence relation
x n
​
=5x n−1
​
−8x n−2
​
+4x n−3
​
with initial conditions
x 0
​
=0,x 1
​
=1,x 2
​
=7