Bisection Search
Number Guessing Game
The host have a number in mind
Audiance try to guess the number
When the auduance guess a number, the host will answer: "too high" or "too low"
If this number ranges from 1 to 100, can all of the students in our class participate?
No, if all the students need to participate, the number need to be larger than 2^19
Describe what has happened!
Pseudocode
Bifurcation
Quantitative Change Induces Qualitive Change
Goal: Find the Point Where Number of Eq. Points Change!
How many equilibrium points we have with current r?
Error in lines 2-2
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1188, in execute
flags=compile_flags) in namespace, locals
File "", line 1, in <module>
TypeError: unsupported operand type(s) for *: 'function' and 'sage.symbolic.expression.Expression'
How to get the value?
0.20871215252208009
4.7912878474779195
0.0
How to Search for Bifurcation
For searching first bifurcation (2 equilibrium points to 3 equilibrium points)
Find r that has 3 equilibrium points, set this r as higher bound
Find r that has 2 equilibrium points, set this r as lower bound
guess a new r in this range
if has 3 equilibrium points => update higher bound
if has 2 equilibrium points => update lower bound
if higher bound is close to lower bound => end
How to guess efficiently?
0.25001831054687507
P.S. solve does not always work!
(however, we will not see it in this lab)
[x == -1/2*(1/27*I*sqrt(9553223) + 6475/27)^(1/3)*(I*sqrt(3) + 1) - 62/3*(-I*sqrt(3) + 1)/(1/27*I*sqrt(9553223) + 6475/27)^(1/3) + 25/3, x == -1/2*(1/27*I*sqrt(9553223) + 6475/27)^(1/3)*(-I*sqrt(3) + 1) - 62/3*(I*sqrt(3) + 1)/(1/27*I*sqrt(9553223) + 6475/27)^(1/3) + 25/3, x == (1/27*I*sqrt(9553223) + 6475/27)^(1/3) + 124/3/(1/27*I*sqrt(9553223) + 6475/27)^(1/3) + 25/3]
0.32789714277901966
3.621997059419165
21.050105797801766