EESA09H3 Lecture Notes - Sea Breeze, Royal Institute Of Technology, Cool Air

45 views3 pages
School
Course
Professor

Document Summary

For m (- n, we define predicate q(m) as follows. Q(m):if k (- n and k >= 1, and m = k, then k_th_even_natural(k) terminates and returns the kth natural even number. Want to prove: \-/ m (- n and m >= 1, q(m) and correctness follows. By pci: \-/ m (- n and m >= 1, q(m) Then k_th_even_natural(k) returns 0 equal to the first even natural number as wanted. (by line 1-2) Induction step: let m >= 2, so k = m >= 2. Suppose q(j) holds whenever 0 <= j <= m [ih] For k >= 2, k_th_even_natural(k) executes line 4. Since 1 <= k-1 < k (by ih) k_th_even_natural(k-1) terminates and returns the (k-1)th even natural number. Therefore by line 4, k_th_even_natural(k) returns (k-1)th even natural number + Eesa09 participation#1 - wind analysis map: write down the cities that you are comparing for the participation, and the date and the exact time of the day.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents