text:
# Binney's interpretation of Violation of Bell Inequalities

## Main Question or Discussion Point

Although he is primarily an astrophysicist, Dirac medal-winning Oxford Professor James Binney has taught a Quantum Physics course to second-year students at the university for years. A series of 27 of his lectures for the course is featured on the university's official website. Binney's take on the violation of Bell inequalities and Quantum Physics in general seems unorthodox though. He takes an "instrumentalist" approach which views the Copenhagen Interpretation of quantum theory as a useful epistemological "roadmap" to getting results about an underlying reality that it does not accurately represent. Wavefunction collapse is simply seen as a caricature of measurement that is convenient for calculations but has no relation to a microscopic reality which has many definite physical values and of which non-locality is not a feature.

Binney refuses to admit that the violation of Bell inequalities has important ontological implications.

Here is how he accounts for it:

" Many discussions of the EPR experiment generate needless confusion by supposing that after Alice has measured +1/2 for the component of the electron's spin parallel to a, the spin is aligned with a. The electron has half a unit of angular momentum in each of the x, y and z directions, although the signs of the x and y components are unknown when we know the value of Sz.
Hence the most Alice can know about the orientation of the spin vector is that it lies in a particular hemisphere. Whatever hemisphere Alice determines, she can argue that the positron's spin lies in the opposite hemisphere. So if Alice finds the electron's spin to lie in the northern hemisphere, she concludes that the positron's spin lies in the southern hemisphere. This knowledge excludes only one result from the myriad of possibilities open to Bob: namely he cannot find Sz = +1/2. He is unlikely to find +1/2 if he measures the component of spin along a vector b that lies close to the z axis because the hemisphere associated with this result has a small overlap with the southern hemisphere, but since there is an overlap, the result +1/2 is not excluded.
Contrary to the claims of EPR, the results of Bob's measurement are consistent with the hemisphere containing the positron's spin being fixed at the outset and being unaffected by Alice's measurement."

Binney draws the underwhelming conclusion that

"The experimental demonstration that Bell inequalities are violated establishes that quantum mechanics will not be superseded by a theory in which the spin vector has a definite direction."

He adds that "Macroscopic objects only appear to have well-defined orientations because they are not in states of well-defined spin. That is, the idea that a vector points in a well-defined direction is a classical notion and not applicable to objects such as electrons that do have a definite spin."

This is not an interpretation of the violation of Bell's inequalities about which I have heard much.
Nonlocality is not even entertained as a possibility!
It is hard to find discussions of Binney's view online. I hope someone here can provide a critique of it - many students here in Oxford are being blithely taught that there is nothing important or surprising about these famous experimental results. I doubt that's true!

Looking forward to learning more,
Thanks,
Pat

Related Quantum Interpretations and Foundations News on Phys.org
Yes, it is fairly easy to find special cases where a correlation can be explained by local variables, but AFAIK, the overall dependency of the correlation against b is not explicable this way. That is the reason why Aspect's et al experiments with photons, not electrons used odd multiples of 22.5 degrees where Bell's inequality is maximally violated. A vague fuzz of polarization would account for the special cases of parallel beamsplitters (full correlation) and might be stretched to the 45 degree case (no correlation).

I do not understand how Blinney can agree that Bell's Inequality is violated and yet you say he does not entertain the idea of non-locality. Violation implies that local realism is impossible. It is a theorem. Not negotiable.

Blinney appears to interpret the spin state as being fuzzy or undefined. Nothing wrong with that but it would mean the hemispheric representation was a local, if hidden, variable. Bell's Theorem applies to *any* local variables. Any idea like this must be tested for consistency with the cos^2(b) rule (photons). But b is not a fixed angle in space, it is the angle against the angle chosen by Alice. It should be written as b-a. That alone tells us it is impossible for this rule to be local, though in special cases it can be.

Yes, in his lecture and his book, "The Physics of Quantum Mechanics" by James Binney and David Skinner (available as a free PDF online) he explicitly acknowledges that experiments have shown that
"The quantum-mechanical result is inconsistent with Bell's inequality and is therefore inconsistent with the existence of hidden variables."

Notably he doesn't bother saying "local hidden variables"-it's taken for granted that they would be. He than adds that similar results are gained with entangled photons, concluding
"Consequently, these experiments rule out the possibility that hidden variables exist."

I think what he is saying about spin is that it is well-defined in the case of the electron, but that it is a mistake to think that the vector points in a well-defined direction. So he's claiming it's impossible to measure spin with enough accuracy to draw any conclusions, even though the spin of an electron or photon does have definite values that, if we could measure them, would show that the inequalities aren't violated when the two particles are spatially separated. But then if that's what he thinks, why does he agree that hidden variables are ruled out?

Furthermore, wouldn't the inaccuracies he cites as resulting from the vector not pointing in a well-defined direction cancel themselves out? How can they explain the results' consistent violations of the inequalities? I would have thought a simple statistical analysis would rule this out as a an explanation, but I'm no expert.

The last ten minutes of this lecture outline his position: www.youtube.com/watch?v=uef_qN7VFuY

I think what he is saying about spin is that it is well-defined in the case of the electron, but that it is a mistake to think that the vector points in a well-defined direction. So he's claiming it's impossible to measure spin with enough accuracy to draw any conclusions, even though the spin of an electron or photon does have definite values that, if we could measure them, would show that the inequalities aren't violated when the two particles are spatially separated.
Furthermore, wouldn't the inaccuracies he cites as resulting from the vector not pointing in a well-defined direction cancel themselves out? How can they explain the results' consistent violations of the inequalities? I would have thought a simple statistical analysis would rule this out as a an explanation, but I'm no expert.
Not sure I fully follow you but I don't think he means there is any inaccuracy, just quantum uncertainty when we insist on measuring spin as if it were a direction. He's right to say that spin states are not vectors and do not in general correspond to spatial directions/vectors. I can't see any way round Bell's theorem though - and yes, the important bit of Bell's theorem is undoubtedly the statistical part, so it doesn't matter whether you get your two tables of results from pairs of entangled electrons or from Mystic Meg's crystal ball, if the correlations violate Bell's theorem, the system can't be locally real.

Mind you, I did like this: Macroscopic objects only appear to have well-defined orientations because they are not in states of well-defined spin. That is, the idea that a vector points in a well-defined direction is a classical notion and not applicable to objects such as electrons that do have a definite spin. That's turning things upside down a bit but it might be quite a useful conceptual step. Perhaps.

I can't really say anything more. Nothing useful anyway

Mystic Meg enters the quantum arena...'twas written thus.
I like your analogy - it drives home the key point well. As you say, "If the correlations violate Bell's theorem, the system can't be locally real." It's non-negotiable.
But then I think, "Can someone as accomplished as Binney be foolish enough not to see that?" If, as seems clear, that's all there is to it, then he should be called out on it.

You're right, he's not talking about inaccuracy. But for Binney "quantum uncertainty" is just a convenient representation of the "common-sense" uncertainty inevitably involved in the act of measurement, which suggests he is unaware of Kennard's proven formulation of the uncertainty principle in terms of unavoidable uncertainty caused by quantum fluctuations, whether a measurement is made or not.
And come to think of it, pertinently for this discussion in 2012 Yuji Hasegawa et al experimentally proved that Heisenberg's "measurement" uncertainty and Kennard's "fluctuation" uncertainty are two distinct and different things through the simultaneous "indirect" measurement of two components of spin for each of a stream of neutrons! This measurement violated Heisenberg's "error-disturbance" inequality- either error or disturbance could be reduced while the other remained finite-but Kennard's formulation continued to hold. T
The technology they used would be useful for further testing of Bell's theorem...

Nugatory
Mentor
Binney draws the underwhelming conclusion that

"The experimental demonstration that Bell inequalities are violated establishes that quantum mechanics will not be superseded by a theory in which the spin vector has a definite direction."
That's not an "underwhelming" conclusion - it's the whole point of the exercise, and a fair case can be made that it is the one of the most important philosophical discoveries of the twentieth century.

I'd have to think about it more, but when I read "Many discussions of the EPR experiment generate needless confusion by supposing that after Alice has measured +1/2 for the component of the electron's spin parallel to a, the spin is aligned with a" I'm hearing a rejection of EPR reality; that's a reasonable position as Bell's theorem tells us that we cannot have both locality and EPR reality.

That sounds interesting, I'll look it up. (neutron/fluctuation stuff I mean)

Last edited:
Nugatory, in Binney's case it is underwhelming because the spin vector not having a definite direction is just seen as a feature particular to spin, rather than having anything to do with local realism. I'll repeat the important quote as far as local realism is concerned from my first post:

"Contrary to the claims of EPR, the results of Bob's measurement are consistent with the hemisphere containing the positron's spin being fixed at the outset and being unaffected by Alice's measurement."

You can get more of a flavour of his views by viewing his lecture entitled "Demystifying Quantum Mechanics," in which he dimisses the "pundits" who think that entanglement involves anything more than mundane correlation: www.youtube.com/watch?v=LfBPzVzkdOo

That sounds interesting, I'll look it up. (neutron/fluctuation stuff I mean)
In 2003 Ozawa developed a new formulation of the uncertainty principle which separated it into "measurement" and "fluctuation" components. Hazegawa's experiment (arxiv.org/abs/1305.7251) confirmed that the "measurement" component alone does not satisfy Heisenberg's inequality except in special cases. I don't think the "fluctuation" component alone satisfies it either, but the important thing is that an intrinsic uncertainty exists whether or not measurement is involved.

"The results demonstrate that Heisenberg's error-disturbance relation can always be violated for a non-vanishing lower limit. In contrast, Ozawa's inequality always holds. Furthermore, we conclude that increasing error does not always lead to increasing disturbance and vice versa in spin measurements. Such a reciprocal behaviour occurs only in certain areas and along certain directions. Thus, our results give an experimental demonstration that the generalized form of Heisenberg's error-disturbance relation has to be abandoned."

I think I have to stop at the level of the Sci Am article here.

The intrinsic uncertainty is a theorem so it's not going to be violated.

According to the Sci Am article, Heisenberg thought in terms of actually disturbing the system so maybe it's not so surprising if this can be minimised at the expense of uncertainty in the measurement (so-called fluctuations).

But I need to chew on the Ozawa inequality: ε(q)η(p) + σ(q)η(p) + σ(p)ε(q) ≥ h/4π to see what it really means. Some time.

But I need to chew on the Ozawa inequality: ε(q)η(p) + σ(q)η(p) + σ(p)ε(q) ≥ h/4π to see what it really means. Some time.
It looks to be in a superposition of being quite straightforward and fiendishly complicated!

Derek Potter
Binney on entanglement:

"In quantum mechanics being correlated is the same thing as being entangled, and there are these chattering pundits in philosophy and even in physics departments who will tell you that there is something mysterious about entanglement. There is nothing mysterious about entanglement, it is merely the development of correlation."

"When 2 systems are dynamically coupled, where the first system evolves to depends on the initial state and evolution of the 2nd system. In quantum mechanics they call this correlation 'entanglement' and claim it's mysterious."

Non local entanglement is not entertained as an option because Binney considers any form of instantaneous or superluminal correlation to violate special relativity, questions of whether they actually involve the communication of information notwithstanding. Long-distance experiments such as Aspect's, Zeilinger's and Gisin's, which refute this view unless we abandon realism, are dismissed because their results interpret spin as being directed along an axis. In fact we can apparently only tell what hemisphere the spin is in, so given that Alice and Bob don't make measurements along identical axes, the hemispheres of these axes will overlap, meaning that for example a result apparently indicating that Bob's positron's spin is in the opposite hemisphere to Alice's electron's spin is unreliable - they could actually be in the same hemisphere without us knowing. Binney claims that this unreliability creates a loophole allowing the results of Bob's measurement to be consistent with the hemisphere containing the positron's spin being fixed at the outset and being unaffected by Alice's measurement, as is required by his adherence to refusal to accept non locality - in conjunction with his adherence to realism.

Realism is preserved from his perspective by viewing a correlated system holistically and saying that the physical world that we perceive is real, but that position,momentum, energy etc are not intrinsic properties of a physical system (I think I misunderstood his take on this earlier in the thread). Each time a measurement is made on one of the particles, it will be disturbed by the measuring instrument and yield a value, and the particle with which it is entangled will yield a correlated value, but not instantaneously-the "message" cannot travel from the electron to the positron at superluminal speed. With this proviso, entanglement is seen by Binney as mundane (although why I don't know. Leaving aside the question of whether or not these properties are intrinsic, how a very distant, even if not spatially separated, pair of entangled particles could react to each other's measurements still seems mysterious, even if the equations tell us to treat them holistically).

But if we accept his take on realism (or the part of realism unconcerned with locality/non locality), the fact remains that his "hemispheres" argument against non locality just doesn't seem to matter. When measurements are made of a large collection of data, unreliability in those measurements is not statistically capable of producing the way-above-chance levels of correlation that have been repeatedly recorded, because it cuts both ways - non-correlations will be recorded as correlations, and correlations will be recorded as non-correlations. For every overlapping hemisphere that leads to an incorrect recording of a correlation, there will be an "underlapping" hemisphere that produces an incorrect recording of a non-correlation. Therefore, thanks to a large body of experimental evidence, we have proof of correlations arising between Alice's and Bob's results either instantaneously or at superluminal speed, and that's what's important.

So as far as I can see Binney's local, realistic account of the violation of Bell's inequalities fails. Can someone tell me if I'm going wrong somewhere?

maline
If you're reporting him correctly then you're perfectly right and he's simply wrong.

Bell's inequality, or the more general CHSH, is statistics - quite simple statistics at that, not physics. It cannot be violated if the assumptions of local realism are true. Bell's theorem shows that QM would violate it. So: if QM then violation; if violation then no local realism. Therefore if QM then no local realism. It doesn't really get any simpler.

It certainly doesn't depend on QM being true, let alone on the physical model of spin being correct. In fact QM could be a load of rubbish served up to us by a malicious lizard-mathematician who enjoys tormenting his pet brains in a vat. However it does mean that QM cannot be locally real. (I think I just said that.)

If you're reporting him correctly then you're perfectly right and he's simply wrong.

Bell's inequality, or the more general CHSH, is statistics - quite simple statistics at that, not physics. It cannot be violated if the assumptions of local realism are true. Bell's theorem shows that QM would violate it. So: if QM then violation; if violation then no local realism. Therefore if QM then no local realism. It doesn't really get any simpler.

It certainly doesn't depend on QM being true, let alone on the physical model of spin being correct. In fact QM could be a load of rubbish served up to us by a malicious lizard-mathematician who enjoys tormenting his pet brains in a vat. However it does mean that QM cannot be locally real. (I think I just said that.)
Thanks Derek. I suppose it's a question of whether I'm reporting him correctly then! I think I am. The quotes I used are verbatim. If you or anyone else wants to check the video clips I linked to earlier in the thread, maybe we can achieve further clarity.

stevendaryl
Staff Emeritus
I may have missed something subtle, but it sounds to me that Binney's "hemisphere" explanation of EPR correlations is exactly the type of explanation that Bell proves doesn't work.

Derek Potter
What's confusing is that he's an eminent figure who has taught quantum mechanics to Oxford University undergraduates for years. Can he be making an error this crass? I know that his true field of expertise is astrophysics but still...Then again, I suppose the last 100 years is littered with examples of prominent scientists who have been undone by quantum theory. Maybe he's unwilling to give up certain religious/philosophical beliefs with which QM is incompatible. I don't know if you looked at the video links, but in them he does concede that it is a deep mystery why only in QM is probability calculated using the squares of the amplitudes, which are of course complex numbers. Apart from that, all other "mysteries" are summarily dismissed.

jambaugh
Gold Member
He's more "right" than some IMNSHO. He's correct in that it has nothing to do with locality as such which is what too many others have focused on. He is correct that entanglement is nothing more complicated that correlation. So I would hardly call his error "crass".

The issue is the change of paradigm from classical theory which is ontological to quantum theory which is phenomenological. Bell inequality violation is on par with, say, the twin paradox of relativity. You, in the twin paradox case, retain an intuitive notion of absolute time while considering the predictions of a theory that has dropped this notion. You get a contradiction which indicates your incorrect implicit assumption. So too with Bell inequality violation. The phenomenological theory of QM makes predictions by dropping assumptions about states of absolute objective reality (classical models) and fixating on the empirical phenomena (one's algebra of observables and dynamical actions). You then get a contradiction when you reassert the objective reality in the form of Bell inequality vs quantum prediction.

With relativity one might have abandoned the assumption of absolute time only to see it emerge again as the observed case. But one has opened the door to other possibilities when one fails to assume it a priori an lo and behold time turns out to be relative in fact! Many had a hard time accepting that and many still do.

With QM "lather, rinse, repeat" but what's relativized here is (objective) reality itself.

The thing is, Binney doesn't accommodate locality by loosening his adherence to objective reality. Yes, he emphasizes that the spin vector does not have a definite direction, but this is seen as a particular feature of spin, which he still views as having a definite hemisphere once the measurement has been made. He views quantum theory as a handy guide to a microscopic world which is "mundanely" real but that we can't measure properly for practical reasons.

Here he gets a bit heated debating Simon Saunders, an Oxford philosopher of physics who advocates the Many Worlds Interpretation (he speaks after Saunders and then they have a discussion): www.youtube.com/watch?v=NKPI_wurNIo

stevendaryl
Staff Emeritus
He's more "right" than some IMNSHO. He's correct in that it has nothing to do with locality as such which is what too many others have focused on. He is correct that entanglement is nothing more complicated that correlation. So I would hardly call his error "crass".
Well, I would say just the opposite, that he's mistaken about both points. Entanglement is not the same as correlation, and the violation of Bell's theorem does have something to do with locality.

An "entangled" quantum state of two subsystems is a composite pure state $|\psi\rangle$ that cannot be written as a product of two component states. So, for a pair of spin-1/2 particles, the state $\frac{1}{\sqrt{2}} (|U\rangle |D\rangle - |D\rangle |U\rangle)$ cannot be written as a product state. Entanglement is a fact about pure states.

A "correlated" state of two subsystems is a mixed state such that knowing something about one subsystem tells you something about the other subsystem. If the two subsystems are entangled, then they are correlated, but the other way around is not true. The following mixed state shows correlation, but does not involve entanglement:

Letting $|\psi_1\rangle = |U\rangle |D\rangle$ and $|\psi_2\rangle = |D\rangle |U\rangle$, then the mixed state corresponding to density matrix $\rho$ defined below shows perfect correlation:

$\rho = p |\psi_1\rangle \langle\psi_1| + (1-p) |\psi_2\rangle\langle \psi_2 |$

But $\rho$ does not show entanglement, since it can be decomposed into an incoherent mixture of product states.

As to locality. Bell's theorem doesn't have anything necessarily to do with locality, except that the application of his theorem to an EPR-like experiment requires the assumption that a measurement on one particle can have no effect on another measurement taking place at a spacelike separation (too far away for light-speed influences to propagate from one measurement event to the other).

So, yes, as far as I understand them, his errors seem "crass" to me.

Pat71 and Derek Potter
With QM "lather, rinse, repeat" but what's relativized here is (objective) reality itself.
Hmm. Relative reality means the same in QM as it does in relativity: we see things from our own perspective whether through boosts in "absolutely real" Minkovski spacetime or through entanglements within one "absolutely real" superposition.

There is no non-locality in quantum Bell Inequality violation in a superposition-based (many worlds) model any more than there is a contradiction when the Twins Paradox is analysed correctly in SR. We don't need to abandon objective reality, we just need to abandon our belief that we see it directly.

State reduction, however, does run into problems. Non-locality remains spooky action at a distance, no matter how we dress it up, if we introduce state reduction. So, in that case, reality has to go. (Which is ironic considering that state reduction is only there to avoid having to think dangerous thoughts like "what happens to the other cat?")

Anyway, back to Binney. He may teach at Oxford but so do many others who would disagree with him and they can't all be right - well maybe they can in quantum logic where reality is optional.

Pat71
I think it's one thing to disagree but see the logic of your opponent's position, and another to be unable to see how their argument holds together. Binney seems to want to have his common-sense reality cake and eat it. I think maybe he pines for the Newtonian era. Here's a quote:

"The idea that a vector points in a well-defined direction is a classical notion and not applicable to objects such as electrons that do have a definite spin. This idea is an old friend from which we part company as sadly as after studying relativity we parted company with the concept of universal time. The world we grew accustomed to in playgroup is not the real world, but an approximation to it that is useful on macroscopic scales. The study of physics forces one to move on and let childish things go"

The irony is that he seems to be using this feature of spin to avoid giving up a much more important concept he got used to in playgroup - local realism!
Having reluctantly swallowed relativity, maybe he finds that QM is too much.

DrChinese
Gold Member
One issue with those who dismiss quantum correlations as relating to some "common cause" such as Binney's "the results of Bob's measurement are consistent with the hemisphere containing the positron's spin being fixed at the outset and being unaffected by Alice's measurement.":

Entangled Alice and Bob do NOT need to have ever interacted in the past for this to be true. They do not need to have ever existed in either's light cones. They do not even need to have existed at the same time. And they can be entangled after they are observed. How does any of this fit in with the dismissal above? The point being that entanglement is a far cry from simply saying that our knowledge is all that is being updated on measurement. How can you explain perfect correlation at any angle setting in this situation without invoking quantum non-locality?

Pat71
I was wondering how Binney would account for Gisin et al's recent quantum teleportation results, in which the teleportation between two photons that had never been in contact outperformed the classical benchmark over 25km.

One issue with those who dismiss quantum correlations as relating to some "common cause" such as Binney's "the results of Bob's measurement are consistent with the hemisphere containing the positron's spin being fixed at the outset and being unaffected by Alice's measurement.":

Entangled Alice and Bob do NOT need to have ever interacted in the past for this to be true. They do not need to have ever existed in either's light cones. They do not even need to have existed at the same time. And they can be entangled after they are observed. How does any of this fit in with the dismissal above? The point being that entanglement is a far cry from simply saying that our knowledge is all that is being updated on measurement. How can you explain perfect correlation at any angle setting in this situation without invoking quantum non-locality?
Thanks again for this powerful argument Dr Chinese.

Here is how he accounts for it:
" Many discussions of the EPR experiment generate needless confusion by supposing that after Alice has measured +1/2 for the component of the electron's spin parallel to a, the spin is aligned with a. The electron has half a unit of angular momentum in each of the x, y and z directions, although the signs of the x and y components are unknown when we know the value of Sz.
Hence the most Alice can know about the orientation of the spin vector is that it lies in a particular hemisphere.
And therein lies Binney's confusion. The hemisphere's axis - as defined by Binney right here - is a, not the z axis.
Whatever hemisphere Alice determines, she can argue that the positron's spin lies in the opposite hemisphere. So if Alice finds the electron's spin to lie in the northern hemisphere, she concludes that the positron's spin lies in the southern hemisphere.
This knowledge excludes only one result from the myriad of possibilities open to Bob: namely he cannot find Sz = +1/2.
He is unlikely to find +1/2 if he measures the component of spin along a vector b that lies close to the z axis
He should have said "that lies close to the a vector".
because the hemisphere associated with this result has a small overlap with the southern hemisphere, but since there is an overlap, the result +1/2 is not excluded.
Indeed so. But that means the correlation depends on b-a not on bz-z
Contrary to the claims of EPR, the results of Bob's measurement are consistent with the hemisphere containing the positron's spin being fixed at the outset and being unaffected by Alice's measurement."
Unaffected, yes, but the hemisphere's axis is defined by her measurement so it can't be pre-defined and can't affect Bob's measurement.

Perhaps one should interpret Binney's hemisphere that it does not literally contain a spin vector, but is actually the complete representation of the spin. But in this case, the two hemispheres arrive ready-made at Alice and at Bob. This would give some correlations but they would not be the right ones. After all, Bell's theorem is applied to specifically quantum systems, it does not work with the canonical "red and black ball in a sack" correlation and would not apply to, say, the charges on the particles either. It is easy to show that Binney's correlations would actually be linear in b-a.

Construct a plane through a and b. Draw a circle and split it for the two "given" hemispheres. Choose a direction for a. This determines Alice's hemisphere and thus her result. Choose a direction for b, pointing the other way. Obviously b goes into the other hemisphere. Now allow b to swing round to some other angle. Recall that the electron spins are evenly distributed around 360 degrees. So the probabilty of a and b both lying in the same semicircle is proportional to the angle between them. No trigonometrical functions involved. Hence the anti-correlation will follow a linear rule, not the required cos^((b-a)/2) rule.

See the Wikipedia image below. The text there merely asserts that the triangular (linear) correlation is the best possible one under classical assumptions, which are exactly what Binney makes.


text:
1. Engineering
2. Mechanical Engineering
3. fhmt 36 the energy consumption associated with a home water...

# Question: fhmt 36 the energy consumption associated with a home water...

###### Question details
1. (FHMT 36) The energy consumption associated with a home water heater has two components: 1) the energy that must be supplied to bring the groundwater up to the storage temperature as it replaces the water drawn from the tank 2) the energy to compensate for heat losses while the water is stored (called standby losses). A family of four uses 100 gallons per day of hot water, and groundwater is available at 15°C. Typical standby losses for a water heater are around 145 W (around 500 Bth/hr).
1. What is the annual energy consumption to keep the water at 55°C?
2. If electricity costs $0.12/kWh, what is the annual cost to heat water using electric resistance heaters? 3. For the same$0.12/kWh as b), what is the annual cost using a heat pump with COP = 3?

format: plain


text:
For $t=i$ there is a formula involving and an integral of a Bessel function, so I doubt there is a simple closed formula for $K_{\alpha}$ in general. You can find the formula I mentioned in the first page of the article "Some theorems on stable processes" by Blumenthal and Getoor. Also see this related MO question.
For $t=i$ there is a formula involving and integral of a Bessel function, so I doubt there is a simple closed formula for $K_{\alpha}$ in general. You can find the formula I mentioned in the first page of the article "Some theorems on stable processes" by Blumenthal and Getoor. Also see this related MO question.


text:
# RootFS

The execution environment that all BinaryBuilder.jl builds are executed within is referred to as the "root filesystem" or RootFS. This RootFS is built using the builder scripts contained within the 0_Rootfs directory within Yggdrasil. The rootfs image is based upon the alpine docker image, and is used to build compilers for every target platform we support. The target platform compiler toolchains are stored within /opt/\${triplet}, so the 64-bit Linux (using glibc as the backing libc) compilers would be found in /opt/x86_64-linux-gnu/bin.

Each compiler "shard" is packaged separately, so that users do not have to download a multi-GB tarball just to build for a single platform. There is an overall "root" shard, along with platform support shards, GCC shards, an LLVM shard, Rust shards, etc... These are all embedded within the bundled Artifacts.toml file, and BinaryBuilder.jl downloads them on-demand as necessary, making use of the new Pkg.Artifacts system within Julia 1.3+.

Each shard is made available both as an unpacked directory tree, and as a .squashfs image. .squashfs images take up significantly less disk space, however they unfortunately require root privileges on the host machine, and only work on Linux. This will hopefully be fixed in a future Linux kernel release, but if you have sudo privileges, it is often desirable to use the .squashfs files to save network bandwidth and disk space. See the Environment Variables for instructions on how to do that.

When launching a process within the RootFS image, BinaryBuilder.jl sets up a set of environment variables to enable a target-specific compiler toolchain, among other niceties. See the Build Tips doc page for more details on that, along with the src/Runner.jl file within this repository for the implementation.


text:
2 months ago

## Finite Dimensional Vector Spaces Halmos Pdf Downlo webcam audiogerate k

Finite Dimensional Vector Spaces Halmos Pdf Download

I would not forget that two finite dimensional vector space. .

Finite-Dimensional Vector Spaces - Paul Halmos.pdf. . Halmos. Finite-dimensional vector spaces.

Paul R. Halmos Finite Dimensional Vector Spaces . finite dimensional vector spaces halmos pdf More eBooks to download: gospel-centered-graeme-89891112.pdf

Halmos vector spaces solutions pdf, pdf ebook halmos vector spaces solutions free download, . halmos' finite dimensional vector spaces suppose that \$m .

Finite Dimensional Vector Spaces Library Download Book (PDF and DOC) Finite Dimensional Vector Spaces By Paul R. Halmos PDF : Finite Dimensional Vector Spaces By Paul R.

081004fb23


text:
$O(m+n)$ really necessary for graph algorithms?

It is standard to express the running time of linear-time graph algorithms as $O(m+n)$ (such as depth-first-search, etc.).

For nearly all such algorithms, vertices of degree zero have no effect on the underlying graph problem. So a solution to the graph problem can usually treat all these unsupported vertices jointly, and does not need to process them individually. For example, in depth-first-search, it suffices to list the dfs-tree for the supported vertices, along with an auxiliary record that all other vertices are unsupported.

If the graph is presented with any kind of intelligent data structure, it should be possible to process in time $O(m)$, and to generate a data structure that encodes the solution in time $O(m)$. This applies even in the case that $n \gg m$.

My question is, what is the reason for the notation $O(m+n)$? Are there really algorithms which require this running time $\Omega(n)$ in the regime $n \gg m$? Is this basically for pedagogical purposes only?

• Assuming $m$ is the number of edges and $n$ the number of vertices... "Any kind of intelligent data structure" I guess rules out an adjacency list. In general, yes, $O(m+n)$ is necessary because both $m = o(n)$ and $m = \omega(n)$ are possible. – Huck Bennett Aug 13 '12 at 23:15
• @Huck, the question is, how are null vertices represented in the adjacency list? If you simply list, for each vertex, all of its neighbors, then null vertices take zero space to store and process. – David Harris Aug 13 '12 at 23:24
• Ah, well that depends on how you store it - if you use a list of lists or an array of lists, etc. In any case it doesn't matter - let me change "I guess rules out an adjacency list" to "I guess rules out an adjacency matrix" and the same issue remains. – Huck Bennett Aug 13 '12 at 23:27
• A null vertex can never take zero space because then you don't know how many there are; they might as well not exist. One could possibly use a standard data structure (such as an adjacency matrix or a list of arcs) with the number ofzero-degree vertices. This only takes $O(n_{full} + \log n_{empty} + m)$ space and many linear graph algorithms would run in that much time. But in the worst case, $n_{empty} = 0$. In any case it's often possible to paramaterize algorithms with additional variables and gain more precise running time, but these possibilities are often ignored for simplicity. – SamM Aug 13 '12 at 23:36
• @Sam I personally think this question belongs at CS@SE, but in any case I think you have the answer – Sasho Nikolov Aug 14 '12 at 0:21

Even when stored very efficiently, vertices with zero degree must be stored in some nonzero space (otherwise, how can we say they even exist)? That said, they can be stored and searched more efficiently than $O(|V| + |E|)$ using similar ideas to what you describe.

For example, you could just take a standard data structure for storing graphs and store the set of nodes $V' \subseteq V$ which have degree greater than 0. We don't need to store any information about $V_0$, the set of nodes with degree 0, except for how many there are.

In other words, in a graph with vertices $V$ and edges $E$, if we define

$V' = \{v\in V | v \mbox{ has degree} > 0\}$

$V_0 = \{v\in V | v \mbox{ has degree } 0\}$

We can store the nodes with nonzero degree in $O(|V'| + |E|)$ space, and the nodes with zero degree in $O(\log |V_0|)$ space, giving a total of $O(|V'| + |E| + \log |V_0|)$ space.

Many algorithms that run in linear time, for example BFS and DFS, will run in time $O(|V'| + |E|)$ because the algorithm can just ignore the vertices with degree zero. Like you say, if $n >> m$, this is much more efficient than the standard algorithm.

There are many cases where algorithms are parameterized by factors in addition to the size of the input. Other examples of this include

• Output-sensitive algorithms like range queries for range trees, which run in time $O(\log n + k)$ where $k$ is the size of the query returned.
• Succinct data structures, which store data in space proportional to the entropy of the stored data
• Algorithms in the external memory model (section 2 of that in particular--in fact the lecture notes for Erik Demaine's class on Data Structures deal with most of these concepts) depend on the size of a cache and the size of a block transferred from the cache to the processor.
• Sparse matrix data structures, and similar structures and algorithms for sparse graphs, which are probably the most similar to what you're asking about.

Most of the references here are fairly general/low level, but there are a great deal of research papers on many of these topics. In any case, there are sometimes good reasons to use another parameter while analyzing an algorithm's running time, but for general algorithms like DFS, it's assumed that no special data structure or storage methodology is used, leading to $O(|V| + |E|)$ time.


text:
# Bieberbach theorem

This article describes a result related to the sectional curvature of a Riemannian manifold

This result relates information on curvature to information on topology of a manifold

## Statement

Let $M$ be a compact flat Riemannian manifold of dimension $n$. Then:

• $\pi_1(M)$ (the fundamental group) of $M$) contains a free Abelian normal subgroup of rank $n$ and finite index
• Thus $M$ is a finite quotient of a flat torus (using the fact that the only Riemannian manifolds whose fundamental groups are free Abelian, are the flat tori).


text:
##### https://github.com/cran/bayestestR
Tip revision: 601edcd
probability_of_direction.Rmd
``````---
title: "Probability of Direction (pd)"
output:
rmarkdown::html_vignette:
toc: true
fig_width: 10.08
fig_height: 6
tags: [r, bayesian, posterior, test]
vignette: >
\usepackage[utf8]{inputenc}
%\VignetteIndexEntry{Probability of Direction (pd)}
%\VignetteEngine{knitr::rmarkdown}
editor_options:
chunk_output_type: console
bibliography: bibliography.bib
csl: apa.csl
---

This vignette can be referred to by citing the package:

- Makowski, D., Ben-Shachar, M. S., \& Lüdecke, D. (2019). *bayestestR: Describing Effects and their Uncertainty, Existence and Significance within the Bayesian Framework*. Journal of Open Source Software, 4(40), 1541. https://doi.org/10.21105/joss.01541
- Makowski, D., Ben-Shachar, M. S., Chen, S. H. A., \& Lüdecke, D. (2019). *Indices of Effect Existence and Significance in the Bayesian Framework*. Frontiers in Psychology 2019;10:2767. [10.3389/fpsyg.2019.02767](https://doi.org/10.3389/fpsyg.2019.02767)

---

```{r message=FALSE, warning=FALSE, include=FALSE}
if (!requireNamespace("see", quietly = TRUE) ||
!requireNamespace("dplyr", quietly = TRUE) ||
!requireNamespace("ggplot2", quietly = TRUE) ||
!requireNamespace("tidyr", quietly = TRUE) ||
!requireNamespace("logspline", quietly = TRUE) ||
!requireNamespace("KernSmooth", quietly = TRUE) ||
!requireNamespace("GGally", quietly = TRUE)) {
knitr::opts_chunk\$set(eval = FALSE)
}

library(knitr)
options(knitr.kable.NA = "")
knitr::opts_chunk\$set(comment = ">")
options(digits = 2)

set.seed(333)
```

# What is the *pd?*

The **Probability of Direction (pd)** is an index of **effect existence**,
ranging from 50\% to 100\%, representing the certainty with which an effect goes
in a particular direction (*i.e.*, is positive or negative).

Beyond its **simplicity of interpretation, understanding and computation**, this
index also presents other interesting properties:

- It is **independent from the model**: It is solely based on the posterior
distributions and does not require any additional information from the data or
the model.
- It is **robust** to the scale of both the response variable and the predictors.
- It is strongly correlated with the frequentist ***p*-value**, and can thus be
used to draw parallels and give some reference to readers non-familiar with
Bayesian statistics.

However, this index is not relevant to assess the magnitude and importance of an
effect (the meaning of "significance"), which is better achieved through other
indices such as the [ROPE percentage](https://easystats.github.io/bayestestR/articles/region_of_practical_equivalence.html).
In fact, indices of significance and existence are totally independent. You can
have an effect with a *pd* of **99.99\%**, for which the whole posterior
distribution is concentrated within the `[0.0001, 0.0002]` range. In this case,
the effect is **positive with a high certainty**, but also **not significant**
(*i.e.*, very small).

Indices of effect existence, such as the *pd*, are particularly useful in
exploratory research or clinical studies, for which the focus is to make sure
that the effect of interest is not in the opposite direction (for clinical
studies, that a treatment is not harmful). However, once the effect's direction
is confirmed, the focus should shift toward its significance, including a
precise estimation of its magnitude, relevance and importance.

# Relationship with the *p*-value

In most cases, it seems that the *pd* has a direct correspondence with the
frequentist **one-sided *p*-value** through the formula: \$\$p_{one-sided} =
1-p_d\$\$ Similarly, the **two-sided *p*-value** (the most commonly reported one)
is equivalent through the formula: \$\$p_{two-sided} = 2*(1-p_d)\$\$ Thus, the
two-sided *p*-value of respectively **.1**, **.05**, **.01** and **.001** would
correspond approximately to a *pd* of **95\%**, **97.5\%**, **99.5\%** and
**99.95\%** .

```{r message=FALSE, warning=FALSE, echo=FALSE, fig.cap="Correlation between the frequentist p-value and the probability of direction (pd)", fig.align='center'}
library(dplyr)
library(tidyr)
library(ggplot2)
library(see)

mutate(
effect_existence = ifelse(true_effect == 1, "Presence of true effect", "Absence of true effect"),
p_direction = p_direction * 100
) %>%
ggplot(aes(x = p_direction, y = p_value, color = effect_existence)) +
geom_point2(alpha = 0.1) +
geom_segment(aes(x = 95, y = Inf, xend = 95, yend = 0.1), color = "black", linetype = "longdash") +
geom_segment(aes(x = -Inf, y = 0.1, xend = 95, yend = 0.1), color = "black", linetype = "longdash") +
geom_segment(aes(x = 97.5, y = Inf, xend = 97.5, yend = 0.05), color = "black", linetype = "dashed") +
geom_segment(aes(x = -Inf, y = 0.05, xend = 97.5, yend = 0.05), color = "black", linetype = "dashed") +
theme_modern() +
scale_y_reverse(breaks = c(0.05, round(seq(0, 1, length.out = 11), digits = 2))) +
scale_x_continuous(breaks = c(95, 97.5, round(seq(50, 100, length.out = 6)))) +
scale_color_manual(values = c("Presence of true effect" = "green", "Absence of true effect" = "red")) +
theme(legend.title = element_blank()) +
guides(colour = guide_legend(override.aes = list(alpha = 1))) +
xlab("Probability of Direction (pd)") +
ylab("Frequentist p-value")
```

> **But if it's like the *p*-value, it must be bad because the *p*-value is bad [*insert reference to the reproducibility crisis*].**

In fact, this aspect of the reproducibility crisis might have been
misunderstood. Indeed, it is not that the *p*-value is an intrinsically bad or
wrong. Instead, it is its **misuse**, **misunderstanding** and
**misinterpretation** that fuels the decay of the situation. For instance, the
fact that the **pd** is highly correlated with the *p*-value suggests that the
latter is more an index of effect *existence* than *significance* (*i.e.*,
"worth of interest"). The Bayesian version, the **pd**, has an intuitive meaning
and makes obvious the fact that **all thresholds are arbitrary**. Additionally,
the **mathematical and interpretative transparency** of the **pd**, and its
reconceptualisation as an index of effect existence, offers a valuable insight
into the characterization of Bayesian results. Moreover, its concomitant
proximity with the frequentist *p*-value makes it a perfect metric to ease the
transition of psychological research into the adoption of the Bayesian
framework.

# Methods of computation

The most **simple and direct** way to compute the **pd** is to 1) look at the
median's sign, 2) select the portion of the posterior of the same sign and 3)
compute the percentage that this portion represents. This "simple" method is the
most straightforward, but its precision is directly tied to the number of
posterior draws.

The second approach relies on [**density estimation**](https://easystats.github.io/bayestestR/reference/estimate_density.html).
It starts by estimating the density function (for which many methods are
available), and then computing the [**area under the curve**](https://easystats.github.io/bayestestR/reference/area_under_curve.html)
(AUC) of the density curve on the other side of 0. The density-based method
could hypothetically be considered as more precise, but strongly depends on the
method used to estimate the density function.

# Methods comparison

Let's compare the 4 available methods, the **direct** method and 3
**density-based** methods differing by their density estimation algorithm (see
[`estimate_density`](https://easystats.github.io/bayestestR/reference/estimate_density.html)).

## Correlation

Let's start by testing the proximity and similarity of the results obtained by different methods.

```{r message=FALSE, warning=FALSE, fig.align='center'}
library(bayestestR)
library(logspline)
library(KernSmooth)

# Compute the correlations
data <- data.frame()
for (the_mean in runif(25, 0, 4)) {
for (the_sd in runif(25, 0.5, 4)) {
x <- rnorm(100, the_mean, abs(the_sd))
data <- rbind(
data,
data.frame(
"direct" = pd(x),
"kernel" = pd(x, method = "kernel"),
"logspline" = pd(x, method = "logspline"),
"KernSmooth" = pd(x, method = "KernSmooth")
)
)
}
}
data <- as.data.frame(sapply(data, as.numeric))

# Visualize the correlations
library(ggplot2)
library(GGally)

GGally::ggpairs(data) +
theme_classic()
```

All methods give are highly correlated and give very similar results. That means
that the method choice is not a drastic game changer and cannot be used to tweak
the results too much.

## Accuracy

To test the accuracy of each methods, we will start by computing the **direct
*pd*** from a very dense distribution (with a large amount of observations).
This will be our baseline, or "true" *pd*. Then, we will iteratively draw
smaller samples from this parent distribution, and we will compute the *pd* with
different methods. The closer this estimate is from the reference one, the
better.

```{r message=FALSE, warning=FALSE}
data <- data.frame()
for (i in 1:25) {
the_mean <- runif(1, 0, 4)
the_sd <- abs(runif(1, 0.5, 4))
parent_distribution <- rnorm(100000, the_mean, the_sd)
true_pd <- pd(parent_distribution)

for (j in 1:25) {
sample_size <- round(runif(1, 25, 5000))
subsample <- sample(parent_distribution, sample_size)
data <- rbind(
data,
data.frame(
"sample_size" = sample_size,
"true" = true_pd,
"direct" = pd(subsample) - true_pd,
"kernel" = pd(subsample, method = "kernel") - true_pd,
"logspline" = pd(subsample, method = "logspline") - true_pd,
"KernSmooth" = pd(subsample, method = "KernSmooth") - true_pd
)
)
}
}
data <- as.data.frame(sapply(data, as.numeric))
```

```{r message=FALSE, warning=FALSE, fig.align='center'}
library(tidyr)
library(dplyr)

data %>%
tidyr::gather(Method, Distance, -sample_size, -true) %>%
ggplot(aes(x = sample_size, y = Distance, color = Method, fill = Method)) +
geom_point(alpha = 0.3, stroke = 0, shape = 16) +
geom_smooth(alpha = 0.2) +
geom_hline(yintercept = 0) +
theme_classic() +
xlab("\nDistribution Size")
```

The "Kernel" based density methods seems to consistently underestimate the *pd*. Interestingly, the "direct" method appears as being the more reliable, even in the case of small number of posterior draws.

## Can the pd be 100\%?

`p = 0.000` is coined as one of the term to avoid when reporting results
[@lilienfeld2015fifty], even if often displayed by statistical software. The
rationale is that for every probability distribution, there is no value with a
probability of exactly 0. There is always some infinitesimal probability
associated with each data point, and the `p = 0.000` returned by software is due
to approximations related, among other, to finite memory hardware.

One could apply this rationale for the *pd*: since all data points have a
non-null probability density, then the *pd* (a particular portion of the
probability density) can *never* be 100\%. While this is an entirely valid
point, people using the *direct* method might argue that their *pd* is based on
the posterior draws, rather than on the theoretical, hidden, true posterior
distribution (which is only approximated by the posterior draws). These
posterior draws represent a finite sample for which `pd = 100%` is a valid
statement.
``````


text:
# If $(B \cap C) \subset A$, then $(C\setminus A) \cap (B\setminus A) = \emptyset$

Question:

Prove/disprove: For all sets $A,B,C$, if $B \cap C \subset A$, then $(C \backslash A) \cap (B \backslash A) = \emptyset$

I'm a bit confused about the question, or where to start. When we learned how to prove these, the examples given were usually either sets that were equal (in which case we could prove that they were subsets of each other) or cases where there weren't subsets at all. Unfortunately, looking at my professors solution is only making things more confusing as I can't find any properties of these sets that he is using in his answer.

1. Let us assume that $B \cap C \subset A$. This implies that
2. $(B \cap C) \cap A^c \subset A \cap A^c = \emptyset$
3. $(B \cap A^c) \cap (C \cap A^c) = \emptyset$
4. $(B \backslash A) \cap (C \backslash A) = \emptyset$

I understand that lines 3 and 4 are correct. The thing I don't understand is the jump from lines 1 and 2, and how he goes about getting that.

• I would prefer a more wordy approach. We can translate to symbols later. Suppose $x$ is in $(B\setminus A)\cap (C\setminus A)$. Then $x$ is in $B$ and $C$ but not in $A$. So $x$ is in $B\cap C$ but not in $A$. If $(B\cap C)\subset A$, there is no such $x$. – André Nicolas May 20 '14 at 4:04
• In going from line 1 to 2, he is using the fact that $\;\cap\;$ is monotonic w.r.t. $\;\subseteq\;$. Or more symbolically, $\;X \subseteq Y \;\Rightarrow\; X \cap Z \subseteq Y \cap Z\;$. Here he chooses $\;Z\;$ to be $\;A^c\;$. – MarnixKlooster ReinstateMonica May 20 '14 at 4:35

This is really easy to see if you draw a Venn diagram. But going from line 1 to line 2, note that $B\cap C$ is contained in $A$ and since $A$ and $A^c$ are disjoint, so are $B\cap C$ and $A^c$.

Going from line 2 to line 3, note that if all operations are intersections then the order does not matter. So

$$(B\cap C)\cap A^c = B \cap C \cap A^c = B \cap A^c \cap C = B\cap ( A^c \cap A^c) \cap C = (B \cap A^c) \cap (C\cap A^c).$$

• How come A^c = (A^c intersects A^c)? – Alex May 20 '14 at 4:40
• The intersection of a set with itself is that set since any element of a set belongs to the set. ;) Recall that the definition of an intersection is the collection of points that belong to both sets. – JPi May 20 '14 at 9:59

I would prefer a more 'logical' approach, where you start with the most complex side, $\;(C \setminus A) \cap (B \setminus A) = \emptyset\;$, apply the definitions, and then simplify using the laws of logic. That results in $$\calc (C \setminus A) \cap (B \setminus A) \;=\; \emptyset \calcop{\equiv}{basic property of \;\emptyset\;} \langle \forall x :: \lnot(x \in (C \setminus A) \cap (B \setminus A)) \rangle \calcop{\equiv}{definition of \;\cap\;, and of \;\setminus\; twice} \langle \forall x :: \lnot(x \in C \land x \not\in A \;\land\; x \in B \land x \not\in A) \rangle \calcop{\equiv}{logic: simplify} \langle \forall x :: \lnot(x \in C \land x \in B \;\land\; x \not\in A) \rangle \calcop{\equiv}{logic: DeMorgan -- keeping \;B,C\; together as in our goal} \langle \forall x :: \lnot(x \in C \land x \in B) \;\lor\; x \in A \rangle \calcop{\equiv}{logic: \;\lnot P \lor Q\; is another way to write \;P \Rightarrow Q\;} \langle \forall x :: x \in C \land x \in B \;\Rightarrow\; x \in A \rangle \calcop{\equiv}{definitions of \;\cap\; and \;\subseteq\;} C \cap B \;\subseteq\; A \endcalc$$

This shows that the two given statements are even equivalent.

To get from line 2 to line 3:

2: $(B \cap C) \cap A^c \subset A \cap A^c = \emptyset$
3: $(B \cap A^c) \cap (C \cap A^c) = \emptyset$

Note that $X\cap Y = X\cap Y\cap Y$.

So \begin{align} (B\cap C)\cap A^c & = (B\cap \color{darkblue}{C})\cap \color{darkblue}{A^c} \cap \color{darkred}{A^c}\\ & = B\cap\color{darkblue}{(C\cap A^c)}\cap \color{darkred}{A^c}\\ & = B\cap \color{darkred}{A^c}\cap\color{darkblue}{(C\cap A^c)} \\ & = (B\cap \color{darkred}{A^c}) \cap \color{darkblue}{(C \cap A^c)} \end{align}

where the last few lines follow by commutativity and associativity of $\cap$.

To get from line 1 to line 2 you need to know that if $X\subset Y$, then $X\cap Z \subset Y\cap Z$. (“All mothers are women, therefore all tall mothers are tall women.”) You should have seen this theorem already, either in class or as an exercise, but if you don't recognize it, you should try to prove it.


text:
Issuing AMPs

Calculating AMPs

Reviewing an AMP

Paying an AMP

### What is an AMP?

Administrative Monetary Penalties (AMPs) are monetary penalties imposed by the regulator, without court involvement, for the violation of a regulatory requirement. They can be applied against any individual or corporation subject to the Nuclear Safety and Control Act (NSCA).

The Administrative Monetary Penalties Regulations (Canadian Nuclear Safety Commission) (AMPs Regulations) came into force and were published in the Canada Gazette, Part II on July 3, 2013. The details of the CNSC's AMPs program are outlined in REGDOC 3.5.2, Compliance and Enforcement: Administrative Monetary Penalties, published in August 2015.

### Are AMPs the same as a criminal offence?

No.AMPs are civil sanctions that secure compliance through the application of monetary penalties for non-compliance with regulatory requirements. AMPs are imposed by way of an administrative process, whereas criminal offences are subject to prosecution in a court of law.

### Who else uses an AMP system?

Several other federal and provincial government agencies and other countries include AMPs as part of their regulatory regimes. They include:

• The Financial Transactions and Reports Analysis Centre of Canada
• Nuclear Regulatory Commission (United States)

### Will AMPs be the CNSC's only enforcement tool?

No. The CNSC's compliance verification and enforcement program includes a number of tools, including written warnings, requests under subsection 12(2) of the General Nuclear Safety and Control Regulations, orders, increased regulatory scrutiny, licensing action, and decertification.

AMPs are one of the new tools in the CNSC's compliance verification and enforcement toolkit. They provide the CNSC with a broader range of options for responding to non-compliance.

### Will the introduction of AMPs mean no more prosecutions?

No. The CNSC will continue to consider prosecution for actions that are considered offences under the NSCA.

### What is the difference between a non-compliance and a violation?

A non-compliance is a regulatory requirement that has not been met. A non-compliance becomes a violation if it is listed in the schedule to the AMPs Regulations and the CNSC selects AMPs as the appropriate enforcement option.

### Which non-compliances will be subject to AMPs?

Only the non-compliance listed as violations in the AMPs regulations may be subject to monetary penalties. The schedule of the regulations provides short-form descriptions of non-compliances that are considered to be violations under the AMPs regulations.

It is important to note that not all non-compliances will result in an AMP. The CNSC's compliance verification and enforcement program includes a number of enforcement options, including continued discussions with licensees, written notices, and orders.

Yes. The CNSC will apply its practice for public disclosure as per other regulatory actions: information about each AMP will be published to the CNSC's Web site soon after the Notice of Violation has been issued. The result of the reviews, if requested, will also be posted to the CNSC's Web site.

### Where do AMPs fit in the CNSC's graduated enforcement scheme?

The CNSC's graduated enforcement strategy encourages the use of the most appropriate compliance verification and enforcement tool for each situation, which will regain compliance, using the least amount of effort possible. The first and most commonly used action is regular discussions with licensees. If this fails to resolve the issue, another action will be taken based on the situation.

## Issuing AMPs

### To whom can AMPs be issued?

AMPs can be issued to any individual or corporation subject to the NSCA. Those who comply with regulations and regulatory requirements will not be subject to AMPs.

### Who will issue AMPs?

The Nuclear Safety and Control Act allows both CNSC Inspectors and Designated Officers to issue AMPs. However, under the CNSC program, AMPs will be issued only by Designated Officers, on the recommendation of Inspectors, Licensing Officers, Specialists or other trained staff.

### How will AMPs be issued?

Each AMP will be issued in the form of a Notice of Violation (NoV) along with the invoice for payment and instructions on how to request a review.

The CNSC plans to issue NoVs by registered mail, but may also do so by way of personal delivery, registered mail, courier, fax or other electronic means (section 6, AMPs Regulations).

### How will you ensure consistent application of AMPs?

An extensive training program will ensure that AMPs are consistently applied and that staff take a similar approach in similar circumstances to achieve similar results.

AMPs will not be issued in the field by inspectors. AMPs will be recommended to management following an established process. There will also be several layers of management endorsements and approvals as well as a quality check prior to issuing any AMP.

### Do you have any examples of violations for which an AMP could be issued to an individual?

These are the 2 most common examples:
An individual could receive an AMP for any violation of section 17, "Obligations of Workers", of the General Nuclear Safety and Control Regulations or any violation of section 31 "Obligations of Operators" of the Nuclear Substances and Radiation Devices Regulations.

### Will a licensee receive a warning before an AMP is issued?

AMPs will rarely be the first response to a non-compliance. The CNSC follows a 'no-surprises' approach and according to the CNSC's graduated enforcement strategy, licensees are generally given several opportunities to correct a non-compliance prior to AMPs being considered. In rare circumstances will AMPs be the first response to a non-compliance.

### Will the CNSC offer a positive reinforcement for consistent compliance when considering AMPs?

The CNSC does not offer rebates or reductions as a reward for consistent compliance. However, factors such as good compliance history are taken into account when determining if an AMP is the appropriate enforcement action when determining the final penalty amount.

### If an action notice is given during a routine inspection, would the non-compliance be automatically considered for an AMP?

No. AMPs are simply an additional option in our compliance and enforcement toolkit. If however the action notice is not complied with, then other compliance and enforcement options will be considered, including AMPs.

### Would a self-identified non-compliance be considered or eligible for an AMP?

First of all, let's be clear: There are some events and situations that must be reported to the CNSC in order to comply with regulatory requirements. If you don't comply with these reporting requirements, you may be subject to an AMP.

The CNSC encourages self-identification and self-reporting of non-compliances and any other dialogue with licensees. Typically, should a licensee self-identify non-compliances, an AMP may not be the most appropriate tool; however, in cases where there may have been harm caused by the non-compliance, it is possible that an AMP may be appropriate. If an AMP is chosen, the fact that it was self-identified may result in lowering the amount of the penalty.

## Calculating AMPs

### How will the AMP amount be determined?

Once an AMP has been selected as the appropriate enforcement action, the following seven factors found in section 5 of the AMPs Regulations will be taken into account to determine the penalty amount:

• the compliance history of the person who has committed the violation
• the degree of intent or negligence on the part of the person
• the harm that resulted or could have resulted from the violation
• whether the person derived any competitive or economic benefit from the violation
• whether the person made reasonable efforts to mitigate or reverse the violation's effects
• whether the person provided all reasonable assistance to the Commission
• whether the person brought the violation to the attention of the Commission

The CNSC defines the factors listed above as Determining Factors.

Based on a review of other AMPs programs, the CNSC has determined that assigning a weight, based on regulatory significance, to each of the determining factors ensures a consistent approach to determining penalty amounts. The weight assigned to each determining factor is published in the CNSC's REGDOC 3.5.2: Compliance and Enforcement: Administrative Monetary Penalties.

The number of determining factors, and their corresponding weights, will influence the final penalty amount. Where multiple determining factors apply, the assigned weights are applied cumulatively, up to the maximum penalty amount in the range for the given category. Mitigating factors decrease the penalty amount, no lower than the minimum penalty amount in the penalty table.

### Will there be a limit on how high a penalty amount can be?

Section 44 of the NSCA establishes maximum and minimum penalty amounts for individuals and corporations. The maximum penalty for a single violation by an individual will be $25,000. The maximum penalty for a single violation by a corporation will be$100,000. These amounts will be applied per violation.

A violation committed or continued on more than one day may be considered as a separate violation (NSCA, s. 65.07). Any additional daily penalties will be calculated accordingly.

### Can I receive an AMP from other regulators for the same incident?

It is important to recognize that a single incident might result in non-compliance with multiple regulatory bodies.

The CNSC cannot prevent other regulatory bodies from exercising regulatory activities within their respective jurisdictions, and vice-versa.

### If I receive an AMP, will my licensing fees increase?

No. AMPs are a tool in the CNSC's enforcement toolkit, providing the CNSC with a broader range of options for responding to non – compliance.

## Reviewing an AMP

### Will there be a review process?

Yes. An AMP can be reviewed, upon request by the recipient, by submitting a request for review to the Commission within 30 days of receiving the Notice of Violation. The process for requesting a review will be included in the Notice of Violation, and is outlined in the NSCA (ss 65.1- 65.15).

### Who is the review panel for AMPs?

The review panel consists of Commission Members.

### Can you appeal the decision of the review panel?

Once the Commission has reviewed the case and made a determination, the decision is final and binding and, except for judicial review under the Federal Courts Act, is not subject to appeal or to review by any court.

## Paying an AMP

### How will I pay my AMP?

The Notice of Violation (NoV) will include an invoice and payment instructions. All payments are due 30 days from the date the NoV is considered received in accordance with Section 6 of the AMP Regulations.

### When an AMP is paid, where will the money go?

Cheques are made payable to the Receiver General of Canada. The money received in payment of AMPs will go to the Consolidated Revenue Fund of the Government of Canada as per the amended NSCA section 65.18 (debt to the Crown). No money will go to the CNSC, or to individuals or groups that report a violation.

### What happens if an AMP is not paid?

Any overdue payments are handled according to normal accounts receivable procedures and, if necessary, collection procedures are initiated when the due date has passed with neither payment nor a request for review.

Non-payment of a penalty is treated as a non-compliance with the Nuclear Safety and Control Act. Any unpaid penalty amount is a debt due to the Crown and may be recovered in the Federal Court or any other court of competent jurisdiction.

### Are licensees permitted to pay AMPs on behalf of their employees?

Unless there is a request for review, the AMP must be paid within 30 days by or on behalf of the person it was issued to.

### Does the CNSC expect to collect the money from an individual?

The CNSC will use its existing processes to collect money from both individuals and corporations.

Date modified:


text:
TITLE

# Common Fixed Points for Weakly Compatible Maps in Intuitionistic Fuzzy Metric Spaces

AUTHOR(S)
Kumar, Sanjay; Vats, Ramesh Kumar
PUB. DATE
March 2009
SOURCE
Advances in Fuzzy Mathematics;2009, Vol. 4 Issue 1, p9
SOURCE TYPE
DOC. TYPE
Article
ABSTRACT
In this paper, we prove a common fixed point theorem for weakly compatible maps in intuitionistic fuzzy metric spaces which generalizes the result of Alaca, Turkoglu and Yildiz[3]. Moreover, we introduce the notions of Rweakly commuting mapping of type (Ag), R-weakly commuting mapping of type (Af) and R-weakly commuting mapping of type (P) in intuitionistic fuzzy metric spaces and provide various examples to reflect upon the distinctiveness among R-weakly commuting mapping of type (Ag), R-weakly commuting mapping of type (Af) and R-weakly commuting mapping of type (P). At the end, we discuss some results related to these newly introduced notions and also establish an example in support of our theorem.
ACCESSION #
47388518

## Related Articles

• APPLICATIONS OF FUZZY SET THEORY AND RECENT DEVELOPMENT IN FIXED POINT THEORY IN FUZZY METRIC SPACES. Sharma, Sushil // AIP Conference Proceedings;11/11/2010, Vol. 1309 Issue 1, p884

No abstract available.

• SOME PROPERTIES OF MODULAR S-METRIC SPACES AND ITS FIXED POINT RESULTS. EGE, MELTEM ERDEN; ALACA, CIHANGIR // Journal of Computational Analysis & Applications;Jan2016, Vol. 20 Issue 1, p24

In this paper, we introduce modular S-metric spaces and deal with their some properties. We also prove some fixed point theorems on complete modular S-metric spaces.

• Common Coupled Fixed-Point Theorems in Generalized Fuzzy Metric Spaces. Rao, K. P. R.; Altun, I.; Bindu, S. Hima // Advances in Fuzzy Systems;2011, p1

We prove two unique common coupled fixed-point theorems for self maps in symmetric G-fuzzy metric spaces.

• A RELATED FIXED POINT THEOREM IN TWO FUZZY METRIC SPACES. Aliouche, Abdelkrim; Merghadi, Faycel; Djoudi, Ahcene // Journal of Nonlinear Sciences & its Applications;2009, Vol. 2 Issue 1, p19

We prove a related fixed point theorem for two mappings in two fuzzy metric spaces using an implicit relation which gives fuzzy versions of theorems of [1], [2] and [10].

• FIXED POINT RESULTS OF Î¨Î±-CONTRACTION SELF MAPS IN Î±-NON-ARCHIMEDEAN FUZZY METRIC SPACES. Gebray, Gebru; Reddy, B. Krishna // JP Journal of Fixed Point Theory & Applications;2015, Vol. 10 Issue 2, p67

In this paper, by relaxing the triangular condition in a non-Archimedean fuzzy metric space further, a notion of an Î±-non-Archimedean fuzzy metric space is introduced and some of its properties are investigated. Existence of fixed point results of Î¨Î±-contraction self map in a complete...

• ï¿½S- COMPACTNESS IN L-FUZZY TOPOLOGICAL SPACES. Hanafy, I. M. // Journal of Nonlinear Sciences & its Applications;2009, Vol. 2 Issue 1, p27

In this paper, the notion of ï¿½S*-compactness is introduced in L-fuzzy topological spaces based on S*-compactness. A ï¿½S*-compactness L-fuzzy set is S*-compactness and also ï¿½-compactness. Some of its properties are discussed. We give some characterizations of ï¿½S*-compactness in...

• A Heavy Night With... (Music). Baird, Dugald; Brooke, Phil; Jones, Joanna; Knight, David; Lawrence, Owen; Roberts, James; Slade, Nicola; Ward, Simon; Woods, Adam // Music Week;10/18/2003, Issue 41, p35

Reviews the music recording 'A Heavy Night With...,' performed by Relaxed Muscle.

• Redefined fuzzy B-algebras. Zarandi Baghini, A.; Borumand Saeid, A. // Fuzzy Optimization & Decision Making;Dec2008, Vol. 7 Issue 4, p373

By two relations belonging to $${(\in)}$$ and quasi-coincidence ( q) between fuzzy points and fuzzy sets, we define the concept of ( Î±, Î²)-fuzzy subalgebras where Î±, Î² are any two of $${\{\in, q, \in\vee q, \in\wedge q\}}$$ with $${\alpha\neq \in\wedge q}$$ . We state and prove some...

• Fully Invariant and Characteristic Interval-Valued Intuitionistic Fuzzy Dual Ideals of BF-algebras. Satyanarayana, B.; Ramesh, D.; Prasad, R. Durga // Mathematical Theory & Modeling;2012, Vol. 2 Issue 3, p52

The notion of interval-valued intuitionistic fuzzy sets was first introduced by Atanassov and Gargov as a generalization of both interval-valued fuzzy sets and intuitionistic fuzzy sets. Satyanarayana et. al., applied the concept of interval-valued intuitionistic fuzzy ideals and interval-valued...

Share


text:
# Iterative FloodFill or alternative.

This topic is 4878 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, Does anyone know how to implement an iterative FloodFill? Or can suggest an alternative algorithm which fullfills the same task?
void FloodCopy(int x, int y) {
if (x<1) return;
if (y<1) return;
if (x>(greywidth-1)) return;
if (y>(greyheight-1)) return;
if (greyFrame[x+y*greywidth]==0) {
objFrame[x+y*greywidth]=255;
FloodCopy(x+1,y);
FloodCopy(x-1,y);
FloodCopy(x,y+1);
FloodCopy(x,y-1);
}
}

I've tried just increasing the stack size in the compiler, but it never seems to be enough.. Thanks.

##### Share on other sites
You need an iterative algorithm. Definetly.

Theres one, that is one of mine (look in my profile), it is "Commonly used algorithms" or something like that. That has an implementation of an iterative floodfill, along with heaps of nicve stuff.

Please go and add something there too, even if its just advise on which algorithm to implement.

From,
Nice coder

##### Share on other sites
Nice Coder could you post a link? I'm having trouble finding it after going through your posts...

As for my own ideas, the simplest way to make it iterative is to use a queue and push positions you want to fill next onto it.

Pseudocode since I'm actually procrastinating on studying for an exam:

FloodCopy(int x, int y) {  if (out of bounds) return;  queue positions;  positions.push(x, y);    while (positions not empty) {    x, y = positions.pop();    // flood or do something to x, y        // push neighbors of x, y    positions.push(x+1,y);    positions.push(x-1,y);    positions.push(x,y+1);    positions.push(x,y-1);  }}

The recursive algorithm isn't really safe since image size is limited by stack space. This approach can be improved, hopefully someone else can help here :)

##### Share on other sites
Second topic from the top

I would recommend a list to store the data.

All of the data is stored sorted, allowing o(log2 n) read time.

It also stops your app from going in circles and dying (which yours will do, sorry to say).

You go and you keep a pointer to the end of where you've been. (you start it off with two elements, one that its already seen, and one that it hasn't).

When decommisioning an item, you go and you increment the pointer for the one that you have already seen, and you swap the item for the thing you want to decomission.

i would recomment a vector to keep the data, and it will eventually be quite big...

From,
Nice coder

##### Share on other sites
void floodFill(int initialX, int initialY, bool(*fillCondition)(int, int)) {  // The passed in function should fill the specified point and return true  // if it should be filled; otherwise it should just return false.  // Containers to store the set of points that we need to fill around, and   // the set of points we've already filled.  typedef std::set<std::pair<int, int> > PointContainer;  PointContainer exposed, filled;  exposed.insert(make_pair(initialX, initialY));  while(!exposed.empty()) {    // Remove one of the 'exposed' points and examine it, extracting coordinates    PointContainer::iterator pi = exposed.begin();    int x = pi->first; int y = pi->second; exposed.erase(pi);    // If we can fill this spot, fill it, add it to filled set,    // and add unfilled neighbours to exposed set.    if (fillCondition(x, y)) {      // Add to filled set      filled.insert(make_pair(x, y));      // Generate the neighbours      std::pair<int, int>[4] neighbours = {        make_pair(x-1, y), make_pair(x+1, y),        make_pair(x, y-1), make_pair(x, y+1)      };      PointContainer::iterator notFound = filled.end();      for (int i = 0; i < 4; i++) {        if (filled.find(neighbours) != notFound) {          exposed.insert(neighbours);        }      }    }  }}

Warning: off the top of my head, not at all guaranteed. Made reference to STL docs for std::set. It seemed like an appropriate datatype because of how I phrased the pseudocode description, and because a lot of lookups are done, plus the need for uniqueness of contents. However, you might find it makes more sense to keep the map for the 'exposed' list, but use a boolean array to check for filled-ness.

##### Share on other sites
Hi sorry for taking a while to reply.
 if (filled.find(neighbours) != notFound) {

 if (filled.find(neighbours) == notFound) {

Unfortunately Zahlmans generic solution was a bit slow for my application so I took nice coders advice of using a list to store the data (exposed). I also used my second buffer to replace the need for the 'filled' list. This gave me a fair speed boost but it's still a little slow, which I think is the fault of the 'std::list'.

Actually I just realised that a deque will do the job nicely, which I just tried, so now I pritty much ended up with mutex's solution. (it is a lot faster than a list)

So thanks everybody for thier help!

(I have tried replacing the std::pair with:
typedef struct {	short x,y;} intpair;

but that caused no noticable speed difference.)

##### Share on other sites
The code we did use in an old Win32 virtual printer device:
#include <deque>#include "Image.h"template <class PIXEL> void floodFill(const Image& img, const Point& pt, PIXEL oldcolor, PIXEL newcolor){  std::deque<COORD>  fillStack;  PIXEL              *ptr;  PIXEL              *dataPtr;  Point              coord;	  fillStack.push_back(pt);  dataPtr = reinterpret_cast<PIXEL*>(Image.dataPtr);  while (!fillStack.empty()) {    coord = fillStack.front();    fillStack.pop_front();    ptr = dataPtr + coord.y * img.widthAlign + coord.x;    if (*ptr == oldcolor) {      *ptr = newcolor;      fillStack.push_back(Point(coord.x, coord.y + 1));      fillStack.push_back(Point(coord.x, coord.y - 1));      fillStack.push_back(Point(coord.x + 1, coord.y));      fillStack.push_back(Point(coord.x - 1, coord.y));    }  }}

This code may need some extra work to be faster than it is. It also assume that we are using interleaved images - which may not be the case. If genericity is needed, something better should derived from this.

Anyway, I like Zahlman (change the function pointer to a functor perhaps).

Regards,

##### Share on other sites
I wrote very efficient floodfill some time ago, but it is in pascal...
it works per-scanline and have very small memory requirements. But is, indeed, quite complicated.
procedure Tgraph.Fill(x,y:longint);type TfillPoint=record  y:longint;  lx,rx:longint;  lxs,rxs:longint;  dir:boolean;{up=true;down=false}end;type TdrawPoint=record lx,y,rx:longint; end;TdrawArray=array[1..MaxFillLines] of Tdrawpoint;type Farray=array[boolean,1..MaxFillLines] of {array[1..MaxFillLines] of} Tfillpoint;PFarray=^Farray;var AreaColor:dword;a:PFarray;drps:^TdrawArray;drpsn:longint;m:array[boolean] of longint;_cur,LastP,newP,_dir:boolean;var lx,rx,lxs,rxs:longint;cx,CY,cy2:longint;n:longint;function ColorOK(x,y:longint):boolean;begin  colorOk:=(x>=0)and(x<=Max.X)and(y>=0)and(y<=Max.y)and(GetPixel(x,y)=AreaColor);end;procedure StorePoint;begin  inc(m[not _cur]);  if m[not _cur]>=MaxFillLines then begin    FontBack:=1;    Writeln('Too many filling points!!(more that ',MaxFillLines,')');  end;  a^[not _cur,m[not _cur]].lx:=cx;  a^[not _cur,m[not _cur]].lxs:=lx;  a^[not _cur,m[not _cur]].rx:=cx;  a^[not _cur,m[not _cur]].rxs:=rx;  a^[not _cur,m[not _cur]].y:=cy2;  a^[not _cur,m[not _cur]].dir:=_dir;end;procedure Scan(lx,rx:longint);begin  {if xl>xr then exit;}  if (cy2 <= max.y)and(cy2>=0)and(lx<=rx) then  begin    cx:=lx;    if ColorOk(cx,cy2) then begin      dec(cx);      while ColorOk(cx,cy2) do dec(cx);      inc(cx);      StorePoint;      cx:=lx;      ScanE(cx,cy2,max.x,AreaColor);      {if ColorOk(cx,cy2)and(cx<rx) then begin Writeln('Cycle bug E1 ');readln;end;}      a^[not _cur,m[not _cur]].rx:=cx-1;      with a^[not _cur,m[not _cur]] do FillLine(lx,y,rx{-lx});    end;    while cx<=rx do begin      ScanNE(cx,cy2,rx,AreaColor);      if cx>rx then break;      {      if not ColorOk(cx,cy2) then begin Writeln('Cycle bug NE ,cx=',cx);readln;end;}      StorePoint;      ScanE(cx,cy2,max.x,AreaColor);      {      if ColorOk(cx,cy2)and(cx<rx) then begin Writeln('Cycle bug E2 ,cx=',cx);readln;end;}      a^[not _cur,m[not _cur]].rx:=cx-1;      with a^[not _cur,m[not _cur]] do FillLine(lx,y,rx{-lx});    end;{cycle}  end;end;var TempColor,LastColor:dword;LastPattern:pFillpattern;TempLineRQ:boolean;begin  NormalizeColor(CurColor);  FontBack:=1;  AreaColor:=GetPixel(x,y);  if (AreaColor=CurColor)and(Pattern=nil) then exit;  TempLineRQ:=(CurColor=AreaColor)or((BackColor=AreaColor)and(Pattern<>nil));  LastPattern:=pattern;  if TempLineRQ then begin TempColor:=not(AreaColor);pattern:=nil; end else TempColor:=CurColor;  NormalizeColor(tempColor);  LastColor:=CurColor;  CurColor:=TempColor;  new(a);  new(drps);  drpsn:=0;  while ColorOk(x,y+1) do inc(y);  _cur:=true;  m[_cur]:=1;  a^[_cur,1].lx:=x;  a^[_cur,1].rx:=x;  a^[_cur,1].y:=y;  with a^[_cur,1] do begin    while ColorOk(lx-1,y) do dec(lx);    while ColorOk(rx+1,y) do inc(rx);    hLine(lx,y,rx);  end;  a^[_cur,1].lxs:=x;  a^[_cur,1].rxs:=x;  a^[_cur,1].dir:=true;  repeat    m[not _cur]:=0;    for n:=1 to m[_cur] do begin      cy:=a^[_cur,n].y;      lx:=a^[_cur,n].lx;      rx:=a^[_cur,n].rx;      lxs:=a^[_cur,n].lxs;      rxs:=a^[_cur,n].rxs;      _dir:=a^[_cur,n].dir;      {Scanning}      {      if GetPixel(lx,cy)<>TempColor then Writeln('???? error');      if GetPixel(rx,cy)<>TempColor then Writeln('???? error');}      if _dir then cy2:=cy-1 else cy2:=cy+1;      scan(lx,rx);      if _dir then cy2:=cy+1 else cy2:=cy-1;      _dir:=not _dir;      scan(lx,lxs-1);      scan(rxs+1,rx);    end; {cycle}    if TempLineRQ then begin      CurColor:=LastColor;      Pattern:=LastPattern;      for n:=1 to drpsn do with drps^[n] do FillLine(lx,y,rx);      drpsn:=m[_cur];      for n:=1 to drpsn do with a^[_cur,n] do begin drps^[n].lx:=lx;drps^[n].rx:=rx;drps^[n].y:=y; end;      Pattern:=nil;      CurColor:=TempColor;    end;    _cur:=not(_cur);{swap buffer}    {debug    MoveTo(0,460);    Write('Borders=',m[_cur]:6,'  ');    delay(100);    }    if m[_cur]>MaxFronts then MaxFronts:=m[_cur];  until m[_cur]=0;  Pattern:=LastPattern;  CurColor:=LastColor;  for n:=1 to drpsn do with drps^[n] do FillLine(lx,y,rx);  dispose(a);  dispose(drps);end;

It supports filling with pattern, including pattern with one of colors equal to color of area to be filled.

##### Share on other sites
After thinking about it some more...

Use an array of 2 bits per tile to indicate "exposed"/"filled"-ness, and also keep a list of exposed tiles. Then we can easily check for set membership immediately, and don't need a 'set' for the exposed tiles - a vector will be fine, being used as a stack. (Of course it is still better to keep this list rather than scanning the array every time to look for an exposed tile!)

Also, I'm going to template the fillCondition 'hook' so it can take either a function pointer or functor object.

template <typename T>void floodFill(int initialX, int initialY, int width, int height, T fillCondition) {  // The passed in function should fill the specified point and return true  // if it should be filled; otherwise it should just return false.  // Containers to hold flags for which tiles are exposed and filled  // Initializing all of this to false may well be the slow part :/  vector<vector<bool> > exposed(width, vector<bool>(height, false));  vector<vector<bool> > filled(width, vector<bool>(height, false));  // List of exposed tiles  vector<pair<int, int> > workingSet;  workingSet.push_back(make_pair(initialX, initialY));  exposed[initialX][initialY] = true;  while(!workingSet.empty()) {    // Remove one of the 'exposed' points and examine it, extracting coordinates    pair<int, int> current = workingSet.back(); workingSet.pop_back();    int x = current.first; int y = current.second;    exposed[x][y] = false;    // If we can fill this spot, fill it, add it to filled set,    // and add unfilled neighbours to exposed set.    if (fillCondition(x, y)) {      // Mark as filled      filled[x][y] = true;      std::pair<int, int>[4] neighbours = {        make_pair(x-1, y), make_pair(x+1, y),        make_pair(x, y-1), make_pair(x, y+1)      };      for (int i = 0; i < 4; i++) {        int[2]& neighbour = neighbours; // not sure I got that right        if (!filled[neighbours.first][neighbours.second])          exposed[neighbours.first][neighbours.second] = true;          workingSet.push_back(neighbours);        }      }    }  }}

And yeah, std::pair isn't the bottleneck here - it effectively is the struct you tried replacing it with. (But feel free to try it with shorts instead of ints anyway :) )

• 10
• 10
• 9
• 48
• 12
• ### Forum Statistics

• Total Topics
631388
• Total Posts
2999715
×


text:
# Total Photonic and Hadronic Cross-sections

Godbole, Rohini M and Grau, A and Pancheri, G (2001) Total Photonic and Hadronic Cross-sections. [Preprint]

 Preview
PDF
0101321.pdf

## Abstract

We discuss total cross-sections within the context of the QCD calculable mini-jet model, highlighting its successes and failures. In particular we show its description of $\gamma \gamma \to hadrons$ and compare it with OPAL and L3 data. We extrapolate this result to $\gamma p$ total cross-sections and propose a phenomenological ansatz for virtual photon cross-sections. We point out that the good agreement with data obtained with the Eikonal Minijet Model should not hide the many uncertainties buried in the impact parameter distribution. A model obtained from Soft Gluon Summation is briefly discussed and its application to hadronic cross-sections is shown.

Item Type: Preprint Division of Physical & Mathematical Sciences > Centre for Theoretical Studies 12 Aug 2004 19 Sep 2010 04:13 http://eprints.iisc.ernet.in/id/eprint/814


text:
# Sum of products over k-permutations

Let $$A$$ be a matrix of size $$K \times N$$, $$K \leq N$$. Let $$n_1...n_K$$ denote a $$K$$-permutation of integers $$1...N$$ (understood as a unique assignment of a column to every row in the matrix). How to most efficiently calculate the sum, over all $$K$$-permutations, of products $$A[1,n_1] * A[2,n_2] * ... * A[k,n_K]$$?

For example, let $$K=3$$ and $$N=5$$. One possible K-permutation is (5, 1, 3), and the corresponding product is $$A[1,5] * A[2,1] * A[3,3]$$. But what must be calculated is the sum of such products over all K-permutations, e.g.:

$$A[1,1] * A[2,2] * A[3,3] + \\ A[1,1] * A[2,2] * A[3,4] + \\ A[1,1] * A[2,2] * A[3,5] + \\ A[1,1] * A[2,3] * A[3,4] + \\ A[1,1] * A[2,3] * A[3,5] + \\ A[1,1] * A[2,4] * A[3,5] + \\ ...$$

I am not even sure there is an efficient (polynomial time) solution, the most I have been able to come up with has about $$2^M$$ complexity which is unacceptable.

When $$K = N$$, the polynomial you are trying to compute is known as the permanent. The best algorithms for computing the permanent use $$\tilde{O}(2^N)$$ arithmetic operations, see Wikipedia. The VP≠VNP conjecture implies that the permanent cannot be computed using a polynomial number of operations.
For general $$K$$, your function is a known extension of the permanent. Ryser's algorithm, one of the $$\tilde{O}(2^N)$$ algorithms for the square case, extends to the rectangular case as well.


text:
# How to interpolate server updates on the client for multiplayer?

I am implementing client-side prediction and an authoritative server multiplayer architecture. I am following along with the series of articles from http://www.gabrielgambetta.com/entity-interpolation.html

I am at a point of confusion and have a few questions.

Within my client game loop I have a sequence of actions that update the local state.

applyLocalUpdates(state, loopTime)
reconcileLastRemoteUpdate(state, loopTime)

• applyLocalUpdates

This updates all the entities positions based on their local physics and game logic simulation.

• reconcileLastRemoteUpdate

I am in the process of implementing this and is the point of confusion. My initial naive attempt takes the last received server state and sets each local entities position to that last remote one.

This produces a choppy update effect. When each server update comes in the entities jump to match that last server position.

This is where I am trying to add interpolation...

I have interpolation methods like vec3.lerp(a,b,t) and quat.lerp(a,b,t) which I use to update the position vector and rotation quaternion.

My unknown points are:

1. Which values do I pass for a and b in the interpolation?

Is this the most recent local state and the last server state?

2. What value do I pass in for t in the interpolation?

This I'm highly confused. Is this the difference of elapsed time between the last 2 server states?

Is it the difference of elapsed time between the last local update and the last server update?

Additionally, should I swap the order of execution between applyLocalUpdates and reconcileLastRemoteUpdate ?

You want to interpolate between the last two server states, so these should be a and b. t should be a value between 0 and 1; at 0, the lerp is equal to a, at 1, it is equal to b, anything between that will result in an interpolation between them (reference). It looks like you would want to scroll t from 0 to 1 fluently while you wait for the next server state, which requires estimating the time between each update you receive from the server.

Very barebones pseudocode (requires consistent update times, which are not given in practice):

float upadteTime = pingServer()
vec3 a
vec3 b

localUpdate {
if (serverUpdate) {
a = b
b = newServerState
timeSinceLastUpdate = 0
}

localState = vec3.lerp(a, b, timeSinceLastUpdate / updateTime)
timeSinceLastUpdate += deltaTime
}

This approach will, of course, double your lag, as your local state will always be between the last two server states. You could try to predict things from local state, which makes matters more complicated.

I am not sure what happens when t is not in the range 0 - 1; perhaps it could serve as a rudimentary form of prediction? You might want to try that or research on it.

• Your answer seems to imply that I should not be applying the local simulation to remote entities. Is that correct? Just interpolating them between server states? – kevzettler Mar 4 '18 at 17:07
• @kevzettler Sorry, I must have overread that part. Will update shortly. – Tau Mar 6 '18 at 21:25


text:
# EPS-HEP2019

10-17 July 2019
Ghent
Europe/Brussels timezone

## MADMAX: A new way to search for QCD Axion Dark Matter with a Dielectric Haloscope

11 Jul 2019, 10:25
20m
Campus Ledeganck - Aud. 2 (Ghent)

### Campus Ledeganck - Aud. 2

#### Ghent

Parallel talk Dark Matter

### Speaker

Stefan Knirck (Max-Planck-Institute for Physics, Munich, Germany)

### Description

Light Dark Matter candidates have increasingly come under the focus of scientific interest. In particular the QCD axion is also able to solve other fundamental problems such as CP-conservation in strong interactions. Galactic axions and axion-like particles can be converted to photons at boundaries between materials of different dielectric constants under a strong magnetic field. Combining many such surfaces, one can enhance this conversion significantly using constructive interference and resonances. The proposed MADMAX setup containing 80 high dielectric disks in a $10\,{\rm T}$ magnetic field could probe the well-motivated mass range of $40-400\,\mu{\rm eV}$, a range which is at present inaccessible by existing cavity searches. The experimental idea and the proposed design of MADMAX will be discussed. Among recent R&D results from 3D simulations and proof of principle prototype measurements, the prospects of reaching sensitivity to the QCD axion will be presented.

### Primary author

Stefan Knirck (Max-Planck-Institute for Physics, Munich, Germany)