/ 0
60%
Table of contents

Document in text mode:

1Computing Camp for JC Students22-24 November 2010What do human evolution, leukemia treatment,databasedesign(andatreatment, database design (and a few other things) have in common?byProf. Wong LimsoonFun With InvariantsLimsoon Wong3Plan •What is an invariant?–Bet on color of the bean–21 cards•Origin of Polynesians•Problem solving by logical reasoning on invariantsComputing Camp for JC Students, 22-24 Nov 2010Copyright 2010 © Limsoon Wong•Make a list sorted•Design a good database•Diagnose leukemia•Make exponentiation faster•Problem solving by rectifying violation of invariants•Guilt by association of invariants•Solution optimization by preserving invariants What is an invariant?5Shall we bet on thecolorofthe•Suppose you have a bag of xred beans and ygreen beans•Repeat the following:–Remove 2 beans IfbothgreendiscardComputing Camp for JC Students, 22-24 Nov 2010Copyright 2010 © Limsoon Wongthe color of the bean that is left behind?–If both green, discard both–If both red, discard one, pu...