CS Behind the Curtain (CS195 2003S)
Primary:
[Front Door]
[Current]
[Glance]

[Blurb]
[Disabilities]
[Honesty]
[Instructions]
[Links]
[Search]
[Syllabus]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
ECA:
[About]
[Grades]
[Quizzes]
[Submit Work]
[Change Password]
[Reset Password]
Misc:
[Walker/Fall 2001]
[SamR]
Back to Introduction. On to Program Verification.
Held: Tuesday, 21 January 2003
Summary: Today we will consider the binary search algorithm (and your implementations of that algorithm) in some detail.
Due
Overview:
mid
rather
than mid+1
or mid1
).
lower
and upper
are equal).
for n = 0 to M create an array, x, of size n for i = 1 to n put 2*i in location i for t = 1 to 2*n + 1 if (even(t) and binarySearch(n, x, t) != t/2) reportError(t, n) else if (odd(t) and binarySearch(n, x, t) != 1) reportError(t, n)
throw awaypart of the array containing t.
Back to Introduction. On to Program Verification.
Primary:
[Front Door]
[Current]
[Glance]

[Blurb]
[Disabilities]
[Honesty]
[Instructions]
[Links]
[Search]
[Syllabus]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
ECA:
[About]
[Grades]
[Quizzes]
[Submit Work]
[Change Password]
[Reset Password]
Misc:
[Walker/Fall 2001]
[SamR]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Fri May 2 14:20:07 2003.
The source to the document was last modified on Mon Jan 20 12:41:00 2003.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS195/2003S/Outlines/outline.02.html
.
You may wish to validate this document's HTML ; ; Check with Bobby
Samuel A. Rebelsky, rebelsky@grinnell.edu