7 ms·
Nature has the best algorithms, don't it folks? I have a question about a detail. The rule is: 1. When you see a nearby neighbour flash, nudge your own clock
by 19eightyfour 9y ago
Nature has the best algorithms, don't it folks?
I have a question about a detail.
The rule is:
1. When you see a nearby neighbour flash, nudge your own clock forward.
2. That's it.
My question is -- when the fireflies are firing at the same time, they see each other flash, so they all nudge their clocks forward, correct?
Assuming they don't nudge their clocks forward at the same amount, they would fall out of sync, correct? But they stay in sync, so they must nudge forward at the same amount...is this right?
So my question is -- if everyone keeps nudging their clocks forward, why don't they keep speeding up? They do appear instead to continue flashing at the same steady rate.
Does this mean that there ought to be another detail in the rule, such as,
If you see a neighbour nearby flash, when you are not flashing, nudge your clock forward by a bit.
? Or is the perspective I just said missing something?
- msarchet 9y agoThey would all have to jump their clocks identically for that to work.
- JepZ 9y agoI think the rule is not very precise written down (e.g. I do not believe that a firefly nudges its clock multiple times within one cycle, just because it has multiple neighbors).
- metafunctor 9y agoIf nudging is done proportional to the intensity (or distance) of observed flashes, I'm pretty sure it will still work fine.
- tonmoy 9y agoNudge the clock "forward", not increase speed. So the overall frequency will be a little higher, but it won't keep on increasing
- JorgeGT 9y agoExactly. For anyone having trouble, just picture a pure sinusoidal signal, flash = sin(2π·freq·time + phase). Fireflies are changing their phase, not their frequency. Completely independent parameters.
- mhb 9y agoSo the frequencies of the fireflies need to be pretty close to the same. How close are they actually?
- mhb 9y agoNo. The fireflies are able to adjust both their frequencies and phase differences. If their frequencies are matched they are phase-locked. If their phase difference is 0, then they are also synchronized. From: https://www.math.hmc.edu/~dyong/math164/2006/runyeon/finalreport.pdf https://www.math.hmc.edu/~dyong/math164/2006/runyeon/finalre...
- matt-snider 9y ago> If you see a neighbour nearby flash, when you are not flashing, nudge your clock forward by a bit. I think this is it. There could be some missing detail (e.g. a firefly is unable to "see" when it flashes) which keeps them from nudging their clocks once already in sync
- fredley 9y agoThis reminds me of collision detection algorithms for wireless antennae. You can't 'hear' when you're transmitting, since your own signal drowns out anything you might receive (for simple antenna arrays) - I imagine the same is true for fireflies.
- SideburnsOfDoom 9y ago> which keeps them from nudging their clocks once already in sync Does it matter if they "nudge their clocks once already in sync" ? If they all do that, they'll stay in sync, with a slightly higher frequency.
- unholiness 9y ago"Speeding up" would only happen when you turn nudging on, it wouldn't continuously keep getting faster. But the algorithm described by the author has a bigger problem: It wouldn't actually sync the fireflies! If EVERYONE nudged their clocks forward, then an out-of-sync firefly would be nudged the same as an in-sync firefly, and synchronization wouldn't increase over time! Your rule avoids this problem: > If you see a neighbour nearby flash, when you are not flashing, nudge your clock forward by a bit. If you look in "show clocks" mode, it looks like this is exactly what is implemented.
- tsbertalan 9y agoAt least in the Kuramoto model, it's a little more complicated than the OP makes it sound (but not much). Step 1 is more like "if you see a flash, bump your clock closer to midnight." Specifically, an ODE is given for firefly $i$'s phase angle $ \theta_i$ $$\dot\theta_i = \omega_i + K / N \sum_{j=1}^N \sin(\theta_j - \theta_i)$$ This gets interesting because the flies natural frequencies $\omega_i$ are also assumed to be randomly distributed. So you don't get perfect phase-synchronization--flies with fast natural frequencies lead the pack as it loops around the phase ring, and flies with slow natural frequencies are dragged along at the back. Relative to the mean phase, your excess phase approaches a smooth increasing function of your natural frequency. But, for high enough values of $K$, you do get frequency-synchronization--everyone oscillates at the average frequency. (For low values of $K$, or too-large natural frequencies, "rogue oscillators" emerge in a SNIPER bifurcation. They zoom around the phase ring at a different frequency, briefly slowing as they pass through the cloud of synchronized oscillators. Also applies for too-slow rogues.) In the video and the OP's simulation, it looked the natural frequencies were all pretty similar, if not the same. However, there was a second addition that is not in the original Kuramoto model (but is in most subsequent models): rather than observing all other flies, only observe nearest neighbors. This can be added by putting a symmetric boolean adjacency matrix $A_{i,j}$ right before the $\sin$ in the previous equation. This has the effect of making excess phase a smooth function of not only the natural frequency, but also some structural feature imposed by the network. In random networks like Erdos-Renyi, this feature is the node degree, but in the video it looks like it might be the long axis of the bush (so, like, one of the eigenvectors of the graph Laplacian). (In general, coupled oscillators, such as circadian gene clocks, show this smooth dependence of excess phase on per-unit heterogeneities, which is the topic for the first half of my PhD dissertation. The second half is figuring out what the heterogeneities are when you only have recordings of the dynamics to go by.)
- lucb1e 9y ago> $$\dot\theta_i = \omega_i + K / N \sum_{j=1}^N \sin(\theta_j - \theta_i)$$ What's the quickest way to preview that (without needing a hosted service)? I just made this small LaTeX document (I'm amazed I knew this by heart, I typed this manually maybe thrice in my life): \documentclass{paper} \begin{document} $$\dot\theta_i = \omega_i + K / N \sum_{j=1}^N \sin(\theta_j - \theta_i)$$ \end{document} <esc>:wq pdflatex tmp.tex && evince tmp.pdf && rm tmp.* but that's still quite a bit of extra work just to view it. Do you know a better way to do it?