Base Case:
Let us assume that n = 1.
Hence, function g returns 1 since n <= 1.
Now, 3n - 2n = 3 - 2 = 1
Clearly, the equality is satisfied for base case n = 1.
Inductive Hypothesis:
Let us assume that for n <= k, the function g(k) returns 3k - 2k and g(k-1) = 3k-1 - 2k-1
Inductive Step:
Now, we would need to show that for n = k + 1, the function g(k + 1) returns 3k+1 - 2k+1.
Proof:
g(k + 1) = 5*g(k) - 6*g(k-1)
= 5 * (3k - 2k) - 6(3k-1 - 2k-1)
= 15*3k-1 - 10*2k-1 - 6*3k-1 + 6*2k-1
= 9*3k-1 - 4*2k-1
= 3k+1 - 2k+1 (proved)
10. (10 points) Computational problem solving: Proving correctness: Function g (n: nonnegative integer) if n si...
Problem Description proving program correctness Consider the following program specification: Input: An integer n > 0 and an array A[0..(n - 1)] of n integers. Output: The smallest index s such that A[s] is the largest value in A[0..(n - 1)]. For example, if n = 9 and A = [ 4, 8, 1, 3, 8, 5, 4, 7, 2 ] (so A[0] = 4, A[1] = 8, etc.), then the program would return 1, since the largest value in...
The symbol N denotes the nonnegative integers, that is, N= {0,1,2,3,...}. The symbol R denotes the real numbers. In each of the proofs by induction in problems (2), (3), and (4), you must explicitly state and label the goal, the predicate P(n), the base case(s), the proof of the base case(s), the statement of the inductive step, and its proof. Your proofs should have English sentences connecting and justifying the formulas. As an example of the specified format, consider the...
Use mathematical induction to prove that the statement is true for every positive integer n. 1'3+ 24 +3'5 +...+() = (n (n+1)(2n+7))/6 a. Define the last term denoted by t) in left hand side equation. (5 pts) b. Define and prove basis step. 3 pts c. Define inductive hypothesis (2 pts) d. Show inductive proof for pik 1) (10 pts)
Question 1 result in a grade of zero for the assignment and will bo subject to disciplinary action. Part I: Strong Induction (50 pt.) (40 pt., 20/10 pt. each) Prove each of the following statements using strong induction. For each statement, answer the following questions. a. (4/2 pt.) Complete the basis step of the proof by showing that the base cases are true. b. (4/2 pt.) What is the inductive hypothesis? C. (4/2 pt.) what do you need to show...
Let S(n) be a statement parameterized by a positive integer n. Consider a proof that uses strong induction to prove that for all n 4.S(n) is true. The base case proves that S(4), S(5), S(6), S(7), and S(8) are all true. Select the correct expressions to complete the statement of what is assumed and proven in the inductive step. Supposed that for k> (1?),s() is true for everyj in the range 4 through k. Then we will show that (22)...
In the following problem, we will work through a proof of an important theorem of arithmetic. Your job will be to read the proof carefully and answer some questions about the argument. Theorem (The Division Algorithm). For any integer n ≥ 0, and for any positive integer m, there exist integers d and r such that n = dm + r and 0 ≤ r < m. Proof: (By strong induction on the variable n.) Let m be an arbitrary...
DISCRETE MATHEMATICS Problem 3 (10 points) Use mathematical induction to prove the following statement for all n 21. For full credit, mention the base case (1pt), the induction hypothesis (1 pt) and the induction step (8 pts). 12 22 32
Please do exercise 129: Exercise 128: Define r:N + N by r(n) = next(next(n)). Let f:N → N be the unique function that satisfies f(0) = 2 and f(next(n)) =r(f(n)) for all n E N. 102 1. Prove that f(3) = 8. 2. Prove that 2 <f(n) for all n E N. Exercise 129: Define r and f as in Exercise 128. Assume that x + y. Define r' = {(x,y),(y,x)}. Let g:N + {x,y} be the unique function that...
.data prompt: .asciiz "Input an integer x:\n" result: .asciiz "Fact(x) = " .text main: # show prompt li $v0, 4 la $a0, prompt syscall # read x li $v0, 5 syscall # function call move $a0, $v0 jal factorial # jump factorial and save position to $ra move $t0, $v0 # $t0 = $v0 # show prompt li $v0, 4 la $a0, result syscall # print the result li $v0, 1 # system call #1 - print int move $a0,...
Real analysis 10 11 12 13 please (r 2 4.1 Limit of Function 129 se f: E → R, p is a limit point of E, and limf(x)-L. Prove that lim)ILI. h If, in addition, )o for all x E E, prove that lim b. Prove that lim (f(x))"-L" for each n E N. ethe limit theorems, examples, and previous exercises to find each of the following limits. State which theo- rems, examples, or exercises are used in each case....