Beep Boop Bip
[Return] [Entire Thread] [Last 50 posts] [First 100 posts]
Posting mode: Reply
Name
Email
Subject   (reply to 931)
Message
BB Code
File
File URL
Embed   Help
Password  (for post and file deletion)
  • Supported file types are: BMP, C, CPP, CSS, EPUB, FLAC, FLV, GIF, JPG, OGG, PDF, PNG, PSD, RAR, TORRENT, TXT, WEBM, ZIP
  • Maximum file size allowed is 10000 KB.
  • Images greater than 260x260 pixels will be thumbnailed.
  • Currently 1097 unique user posts.
  • board catalog

File 133699565596.jpg - (74.31KB , 800x600 , 1281122789294.jpg )
931 No. 931 [Edit]
Lets start a game where we try to answer a science question, and also think up other questions. The aim is to make a question that the average untrained but curious tohnochanner can think about and also have a bit of fun discussing things. Try not to make questions which require too much specialised technical knowledge. Also note this is not just a place to get your homework questions answered.

First question: from an evolutionary point of view, is it possible for a species of parasite to completely wipe out its host species?
Expand all images
>> No. 932 [Edit]
Theoretically no, because it would be disadvantageous. Why? A parasite has to drain enough energy from its host while still keeping its host alive. Once its host is dead, the parasite is dead (no chance of spreading to other hosts). So there would be a trade off between transmission and virulence. Even if a parasite does wipe out its host, it has to spread to another host before it could either weaken/kill it.
>> No. 933 [Edit]
>>1940
Parasites do what they do to survive, even if it's the death of them. I highly doubt a virus has a consciousness. My shot at the 1st question is that it is indeed technically possible. If a parasite destroys their own source of living, then they don't have any place in the evolutionary chain of life.
>> No. 934 [Edit]
Question 2: How is it possible for someone to be thirsty but need to pee at the same time?
>> No. 935 [Edit]
>>1954
You did not specify the beverage so I take it as water. Either you have diabetes or that you drink alot and you get easier thirsty and the need to piss more often.
>> No. 936 [Edit]
>>1955
Why do I need to specify a beverage? Someone could be thirsty because he went for a run or something.
>> No. 937 [Edit]
>>1954

Diuretics? Maybe.
>> No. 938 [Edit]
>>1955
I'm diabetic, and we're not thirsty ALL the time... just sometimes, when our blood sugars are high, because it gets the sugar out of our body.
>> No. 939 [Edit]
When you're boiling water, why do bubbles form before the water reaches boiling temperature?
>> No. 940 [Edit]
>>2009

below boiling point, the water can evaporate and form bubbles because the pressure on the liquid is almost equal to the vapor pressure, while we say the water is at it's boiling point when the bulk of the water forms vapor bubbles
>> No. 2865 [Edit]
I'll repurpose this to post an interesting math puzzle. Others should feel free to post things; ideally they should be simple to understand even though the principles involved may require high-level maths to formalize correctly.

This is a puzzle from [1]

>Ruth and Ron start together at the origin and take a walk on the integers. Every day they make a move. They take turns in flipping a coin and they move together right or left according to the outcome. Their coin flips create a simple random walk starting at the origin on the integers.
>We know for sure that they we will return to the origin infinitely many times. However, their random walk never comes back to the origin, so we know for sure that one of them did not follow the rules!
>Test your intuition: Is it possible to figure out from the walk whether it was Ruth or Ron who did not follow the coin-flipping rule?

Some questions to foster discussion:

1) We know that this problem involves a random walk on the integers. If you haven't studied this, it might be good to look this up their properties (although proving some of them can be non-trivial)

2) Despite being posed as a combinatorial/probability puzzle, the question seems more related to information theory and randomness. The crux of the question involves how to distinguish a random sequence from a non-random one. To appreciate the difficulty of this, try to think of some randomness tests and pretend you are the adversary (WLOG, Ron) trying to create such a sequence to fool such tests.

3) It's important to get the text of the problem right - we're given the output of a given run (which you can imagine as an infinite bit string (b_1, b_2, ...) denoting the decisions made at each time step), and purely from this we need to determine the cheater. This is subtly different from how we might usually analyze randomness, in which we look at a sequence of random variables (X_1, X_2, ..). Consider: if we had the ability to repeat this entire process many times (i.e. instead of the output from 1 random walk, we have them repeat this process N times), does the problem become easier?

4) Can we start with the easier goal of proving that this it's simply _possible_ to detect the cheater (i.e. non-constructively, so we prove that that it's possible even if we don't arrive at a concrete algorithm for doing so).

I'll post some more resources and links in a few days since this is a really nice problem to think about, teaches you a lot about randomness, and the solutions (both constructive and non-constructive) are illuminating.


[1] https://gilkalai.wordpress.com/2022/08/03/test-your-intuition-50-two-players-random-walk-can-you-detect-who-did-not-follow-the-rules/

Post edited on 15th Sep 2022, 8:10pm
>> No. 2866 [Edit]
File 166334860959.jpg - (1.16MB , 1920x2694 , 100309184_p0.jpg )
2866
>>2865
I will assume 0 is the origin, tails is left, heads is right, and the first flip is considered 1, so it is odd.

Because Ruth and Ron move together, you might as well have one person, Paul, and rephrase the question as: does Paul cheat on even or odd flips?

I will also assume Paul only cheats on either even or odd flips, and not both.

There are 4 possible situations before Paul would be able to return to the origin:
Paul is at -1 and the next flip is even
Paul is at -1 and the next flip is odd
Paul is at 1 and the next flip is even
Paul is at 1 and the next flip is odd

Every single time Paul reaches one of these situations, the outcome prevents him from getting to the origin. Paul must encounter the even situations at least once every single walk, because when he exits the origin, he is in one of them.
>Paul is at -1 and the next flip is even
>Paul is at 1 and the next flip is even

If Paul doesn't cheat on the even flip, during at least some of the walks, he must return to the origin on the second step, but this never happens.

So therefore, he can only cheat on even flips.

Post edited on 16th Sep 2022, 10:35am
>> No. 2867 [Edit]
>>2866
I just realized we only know a single walk. So, to expand this:

We can discard the second flip failing to return Paul to the origin as random chance and not an indication of cheating.

1. Paul will only encounter 1 of these situations(even or odd, -1 or 1) repeatedly, otherwise, he'd eventually reach the origin

2. Paul will only encounter 1 of these situations once. Afterwards, he never returns to that situation(some large number of steps can be interpreted as never).

If 1 is true, whether the next flip is even or odd during that one situation will tell you which one Paul is cheating on.

If 2 is true, -1 or 1 can be treated like another origin, and 4 more situations can be made, and so on until -3 and 2 on the line.

Post edited on 16th Sep 2022, 10:57am
>> No. 2868 [Edit]
>>2867
And finally, part of me thinks that if Paul is some kind of computer that can calculate billions of steps in advance, this method wouldn't work. Paul is not in total control, but he can still choose when to cheat and when not to cheat. So, I'm up in the air. If Paul is a human though, he has no chance.
>> No. 2869 [Edit]
>>2866
>>2866
Excellent. I believe your reasoning is valid, under the assumption that one person will _always_ successfully cheat on any instance of the random walk. This goes back to point (3) in >>2865. Under this stronger assumption, indeed as you noted it is "trivial" to detect the cheater, because the player who goes first cannot always guarantee the non-origin condition (that is, there's a 50% chance the second player will return them back to the origin).

Now let's loosen that assumption: we no longer have the guarantee that the cheater will successfully cheat on every random walk (i.e. the cheater is satisfied with just having a non-zero probability of succeeding). We are simply given a random walk in which he happens to succeed in cheating.
>> No. 2870 [Edit]
>>2869
>We are simply given a random walk in which he happens to succeed in cheating
I think I addressed that in >>2867
Maybe you didn't see it, or am I missing something?
>> No. 2871 [Edit]
>>2870
>>2870
Yes sorry I was still drafting >>2869 when you posted your follow up.

>>2867
Nice reasoning, and I think you can more succinctly unify the two cases as follows. Assume WLOG the walk we are given is always among positive integers (since it never crosses zero, it's stuck on one half of the number line). Then we have 2 cases:

* Either there is a smallest number X that repeats infinitely often
* Or there is not (the walk drifts to infinity).

I believe both cases (1) and (2) you noted correspond to the former case above (the special case of X=1 is your case (1), and we can inductively extend this to get your case (2)). When such an X exists, the cheater is the one who never lets the random walk drop below X, i.e. their moves indicate they have move right when at X (this happens infinitely many times with 0 probability in a genuine play, so he is the cheater with probability 1).

However, it might also be that no such X exists. In this case, the walk is not bounded and instead drifts to infinity. This is the more interesting case to analyze.

Some questions to ponder (not posed to you in particular, anyone should feel free to jump):

* Is it possible for the cheater to force the random walk to drift to infinity without doing anything "too obvious?"

- As an example, you might naively think this would result in the ratio of the cheater's right to left moves being non-unitary. Can you think of a sequence that has no right/left bias but still drifts right?

- In fact I _think_ the cheater's walk doesn't even have to be unbounded to force the overall walk to be unbounded. Can you think of an example?

* Given that "naive" strategies to detect the cheater in unbounded random walk case fail, what _can_ we do. Note that I think actually formalizing anything here is very difficult (indeed, it seems to be among the non-trivial theorems in the paper that Gil Kalai links as the answer to the riddle, so we can discuss high-level ideas).
>> No. 2872 [Edit]
File 166342903250.jpg - (885.66KB , 1600x1200 , 3d112bc53a7d902ac4fd034364ba5b05.jpg )
2872
>>2871
>In this case, the walk is not bounded and instead drifts to infinity
In the original link, the line has no arrows, so I assumed it did not extend past the integers shown.

>Can you think of a sequence that has no right/left bias but still drifts right?
I can't do that. I will assume the line goes to infinity. You can make a table with left and right as columns, even and odd as rows.

For Paul to ever reach 500, as he would eventually do if he is drifting to the right, he needs to have gone right 500 more times than the times he went left. For Paul to ever reach the origin, he needs to have gone right the same number of times he went left.

Within 1000 turns, if Paul moved randomly, he is much more likely to reach 0 than he is to reach 500. He is also much for likely to reach X, as you described here
>When such an X exists, the cheater is the one who never lets the random walk drop below X

So for Paul to reach 500, and such an X to not exist, there almost certainly needs to be a noticeably right bias. Whether even or odd has a right bias, will tell you when Paul is cheating.

If Paul cheats in such a way, to drift to the left in an attempt to mask a right bias, X would exist.

To summarize, if such an X does exist, the cheating turn can be found out by seeing which never lets Paul go below X. If such an X does not exist, the cheating turn can be found out by seeing which has a greater right bias. Though if Paul was extremely lucky, he wouldn't need to cheat in any way what so ever.

Post edited on 17th Sep 2022, 8:46am
>> No. 2873 [Edit]
File 16634365363.jpg - (339.30KB , 2048x1353 , 1527052957654.jpg )
2873
>>2872
> it did not extend past the integers shown.
Fair point, bad drawing on the author's part. Indeed if the set we're walking over is finite then yes there's no "infinitely drifts right" case.

>I can't do that
>there almost certainly needs to be a noticeably right bias
This is true, I should have maybe phrased my question better. As you stated, there needs to be a bias in the sense that in aggregate he makes more right steps than he does left steps, but he can make this bias arbitrarily low in the limit (which is what we really care about, since in any finite prefix he could claim to have just have "gotten lucky"). Consider for instance the cheater uses the following strategy: play randomly except when the turn number is a perfect square (so he cheats only on turns 1, 4, 9, etc.).

You can intuitively see that this means in the limit there's no bias since he cheats less frequently as time goes on, eventually playing fairly in the limit, but we can go through the calculation: if he cheated on turn N=k^2 he'll next cheat on N'=(k+1)^2, and the number of turns between his cheating is on the order of k = sqrt{N}, so the bias over that period is 0.5 + 1/sqrt{N}. In the limit, this tends to 0.5.

This tripped me up at first (and still does), it was only after reading the comments on the blog that I sort of convinced myself this case was possible. Basically, he can attempt to "disguise" his cheating by drifting slowly enough, applying most of his bias in the beginning and then afterwards applying it sparingly to force the walk enough to remain away from the origin, while still remaining below the threshold of detectability as as the number of steps tends towards infinity.

Another more sinister example of the way he can cheat is by countering his bias when safe to do so. For instance, if he went right more times than left in order to avoid hitting the origin early on in the game, maybe later he can compensate by going left more and thus avoiding an overall bias.

So the claim that
>the cheating turn can be found out by seeing which has a greater right bias
doesn't hold I think, since he could theoretically disguise the aggregate bias via the methods described above.

But all hope is not lost: There are still some things he cannot get away with:

* Note that in both cases above, the cheater is less random (more biased) when close to the origin, and less biased (more random) far away from the origin. So to summarize we have 3 cases we can consider:

1) There's a lower-bound that repeats infinitely often. This has already been covered, and we know a strategy to catch it.
2) The cheater is stupid and forces the walk to drift by cheating consistently, resulting in a non-zero bias. Easy to catch.
3) The cheater is smart and tries to disguise his bias by doing things as a function of the position. The naive strategy of checking for balanced left/right bias won't work, but since his subwalk is ultimately not a genuine random walk there will be enough anomalies here looking at his decisions as a function of position over a long enough interval. I don't know enough math here to give a constructive algorithm to detect such anomalies, but we can handwave that one exists so he will be caught.

[To be continued in a following post, where we discuss (or at least try to skim) the paper].
>> No. 2874 [Edit]
File 166344130047.gif - (20.81KB , 1000x600 , Law_of_large_numbers.gif )
2874
>>2873
Now with this in mind, we can try to skim the paper [1]. I am not too well versed in probability (or really any upper-undergrad level math for that matter), so I don't understand most of it (though maybe some esteemed TC reader lives a secret life as a combinatorialist) but we can glean some interesting things.

The paper provides a constructive algorithm for not only the specific game we discussed, but also non-constructively proves that it's always possible to detect a cheater in the entire generalized class of such games

>A group of players are supposed to follow a prescribed profile of strategies. If they follow this profile, they will reach a given target. We show that if the target is not reached because some player deviates, then an outside observer can identify the deviator

>We study a more general form of this question, in which each player has some
>probabilistic rule according to which they are supposed to generate outcomes in every
>period. The blame function identifies a player, who is proclaimed the deviator, when
>the outcome is outside some target set. In the second example [the random walk game we've been discussign]
>the target set is the set of all realizations where the induced random walk crosses the
>origin infinitely often. Given a target set, we seek a blame function with the property
>that, if only one player deviates from her prescribed rule, then the probability that
>the realization is outside the target set and an innocent player is blamed is small.

The paper quickly delves into establishing the generalized theorems which I'll skip because I have no idea what they mean, and the paper doesn't give any plain-text intuition either (if you do happen to be familiar with the terminology here, future readers, please reply).

Section 3.2 provides an explicit algorithm for the blame function in the case of our random-walk game. One immediate interesting thing to note is that though the introduction used the game we talked about (where the random walk never ends up crossing 0), in 3.2 they formalize this by saying that the moves are {-1, 1} with the random walk originating at **Z=10**. This seems really weird and arbitrary, and I have no idea why they're starting the random walk here, especially because to me it doesn't seem like starting at 0 or starting at 10 makes any material difference to the cheating-detection strategy.

That aside, they at least have some plain-text intuition for what the 4 steps of their algorithm does:

>The idea of the proof is that since Deviator must move to the right during periods
>where Honest moves substantially to the left (to avoid going below zero), Deviator
>must thus move to the left when Honest moves to the right to avoid being clearly
>right-biased (Steps 1 and 2 detect right-biased behavior). Thus Deviator must keep
>the walk fairly close to 0.

>Since s_n^2 (where s_n is the position of the random walk) increases by 1 in expectation on Honest’s moves, it should decrease on
>Deviator’s moves to keep the walk close to 0, and this discrepancy is what’s detected
>in Step 3


If I understand this correctly, they broadly have the same 2 cases we arrived at:

* Either the walk has a finite lower limit (i.e. some X that repeats infinitely often)
* Or it has an unbounded lower-limit (no X that repeats infinitely often, and so the walk drifts right)

Whereas in the first case we detected the cheater as the one who always makes the move X->X+1, it seems the authors more cleverly avoid needing to calculate X itself – instead looking at the discrepancies between position to reveal the deviator that is actively working to preserve the lower-limit of the walk (they say "Thus Deviator must keep the walk fairly close to 0" which I interpret as meaning that he works to ensure the walk doesn't drift right, while still applying enough bias to keep it above zero). I don't know exactly how formula 3 of theorem 3.1 does this though, and the proof is too complex for me to gain any intuition.

Moreover, whereas we hadnwaved the algorithm for the latter case (except when the bias is obviously detectable in the limit), it seems they actually provide a method for doing so, in formulas 1 and 2. I also don't have very good intution of this, but I can at least sort of get a sense of what what formula 1 is doing. The proof of this is a simple one line "law of iterated logarithm" [2], and reading up on that it seems it sort of gives tight bounds on the behavior of a random walk.

Basically if you let Y_1, Y_2, Y_3, each be coin flips {-1, 1} and look at the partial sums S_n = Y_1 + ... Y_n, then we know 2 things

1) In the limit as n->inf, S_n/n = 0 (this is just the law of large numbers (LLN), average enough samples and we approach the expected value)

2) In the limit as n-> inf, S_n/n approximates a normal distribution, which is the central limit theorem (CLT)

However, LLN doesn't really give any useful information on the bounds of the partial sums (i.e. it's useless for detecting deviations), and CLT doesn't give useful information on the bounds of a _particular_ realization of S_n, only about the distribution of S_n in general. (This is a subtle point that I only have handwavy intuition for and haven't internalized myself, but you should lookup the difference between convergence "almost surely" and convergence "in probability"). Or in other words, it's quite likely that a _given_ realization of S_n will exceed the bounds of the standard deviation given by normal distribution, and it's only by aggregating over all S_n that we approach the normal distribution.

However, it seems law of iterated logarithm can provide stricter bounds that should be satisfied even for a given realization of flips. Refer to the attached picture which shows partials sums S_n, where the blue line is the bound given by the standard deviation of the normal, and the green line is the bound given by law of the iterated logarithm.

So overall it seems like they use law of the iterated logarithm (LIL) as a way to detect a non-random walks (which will violate the bounds given by LIL), but the statement doesn't match the version on wikipedia (lim sum > 0 vs the lim sum = 1) so I don't know what to make of that.

They finish off the proof by mentioning something about martingales, which reminded me of something else, perhaps another non-constructively way to show that it's possible to detect the cheater.


Some open questions (not open in the sense that they're currently unsolved, open in the sense that I personally don't know the answer to them and would like to discuss with TC)

* So far we've assumed there is exactly 1 honest and 1 dishonest person. What if we relaxed that assumption further, so both could be cheaters. Can we distinguish between the case that there's 1 honest/1 dishonest and 2 dishonest people?

* Can someone who's well-versed here provide plain-text explanations of formulas 1-3 in Theorem 3.1. There's frustratingly little exposition provided by the authors, and the overall formulas are simple enough that there is surely some sort of intuitive explanation.

[1] https://arxiv.org/abs/2203.03744
[2] http://simonrs.com/eulercircle/markovchains/taekyu-iterlog.pdf

Post edited on 17th Sep 2022, 12:03pm
>> No. 2875 [Edit]
>>2873
>maybe later he can compensate by going left more and thus avoiding an overall bias
I mentioned this possibility.
>If Paul cheats in such a way, to drift to the left in an attempt to mask a right bias, X would exist.

>play randomly except when the turn number is a perfect square (so he cheats only on turns 1, 4, 9, etc.).
He can't cheat on both even and odd turns. Either he can cheat on turn 1, or he can cheat on turn 4, but not both.

I'm not good with hard math and hard numbers, so I'm not going to get into that, but I will say that while it may be impossible to tell with certainty who is cheating, I think you could be somewhat sure.
>> No. 2876 [Edit]
>>2875
>to drift to the left in an attempt to mask a right bias, X would exist.
There's no guarantee that X would exist if he attempts to mask right bias (maybe you can prove as such, but it's not immediately obvious, to me anyway). Basically, the cheater might be able to devise some strategy such that his _individual_ subwalk returns to 0 infinitely often (and so there's no bias) even though the combined walk drifts right.

>play randomly except when the turn number is a perfect square
It was a hypothetical example of a case where the long-term bias tends to 0 even though the walk drifts right, not an actual strategy the cheater could employ in the game. But to counter your particular assertion, maybe he cheats on powers of 2 instead. Or maybe something even more sinister.

>it may be impossible to tell with certainty who is cheating, I think you could be somewhat sure.
Yes in the real world such an algorithm can't exist because we need to look at the limiting behavior. Basically we're looking for properties of the subwalks that have zero probability of occurring in a genuine random walk. (Note here that zero probability doesn't mean "cannot exist", since any individual given instance of a walk has probability 0 but clearly can occur). The actual algorithm to distinguish these properties cannot be finite, but nonetheless mathematically the property should be able to distinguish genuine walks from non-genuine walks by virtue of the property holding with probability 1 for genuine walks and probability 0 for non-genuine walks.
>> No. 2877 [Edit]
>>2876
>maybe you can prove as such, but it's not immediately obvious, to me anyway
He can't drift to the left too much, or else he'll end up on 1 during a turn he can't cheat on, is what I mean. So I think there's a limit to how much he can compensate, before he has to abandon that strategy and go further right.

If Paul made 200 steps overall, and he can only cheat on even turns, let's say on odd turns he made 48 rights and 52 lefts, which seems reasonable given the 50/50 chance on a fair coin toss. During even turns, he would need to have made more than 52 rights, or else he'd be at the origin. He'd also need to make more than 53 rights to make sure on the next turn he can't go back to the origin.

And after that, he'd still be dangerously close and need to cheat often(at an X). The only way to avoid this is with a strong right bias.

This is just my intuition talking, though it could very well be wrong.
>> No. 2878 [Edit]
>>2877
>So I think there's a limit to how much he can compensate
>And after that, he'd still be dangerously close and need to cheat often(at an X). The only way to avoid this is with a strong right bias.

He could be smarter, and apply enough right bias early on to move the random walk far off, then slowly pay it back (e.g. maybe he only pays it back each time the honest person makes a right move). Remember, he doesn't need to keep the bias close to zero for any finite prefix of the game, it's only the long-run behavior that will bite him.

As another example, consider the case where the cheater reverses the honest person's moves, except on turn numbers f(1), f(2), f(3).... where he always moves right. If f is a fast growing function (e.g. exponential, so he cheats on turns 2, 4, 8, ...), then the overall walk still drifts right (at a logarithmic rate) even though his individual subwalk returns to 0 infinitely often.
>> No. 2879 [Edit]
>>2878
>he doesn't need to keep the bias close to zero for any finite prefix of the game, it's only the long-run behavior that will bite him
His goal is to hide the cheating. Couldn't we also be smarter and only pay attention to the early steps? If the further along you go, the more useless the data gets, only the early data should be examined.

>consider the case where the cheater reverses the honest person's moves, except on turn numbers f(1), f(2), f(3).... where he always moves right.
If the cheater always reveres the honest person's step, the sequence might look like
{R, R, R, L, R, L, R, R, L....}
You would know the cheating happens on odd turns, because R repeats on turn 8, but on every odd turn(after step 3), it's always the opposite of what came before. So that wouldn't be a very good strategy.

If the cheater tries to hide this, by sometimes not reversing what came before, there will probably be an occasion where left repeats 3 times, which would cancel out the first 3 steps.

Post edited on 17th Sep 2022, 5:40pm
>> No. 2880 [Edit]
>>2879
> Couldn't we also be smarter and only pay attention to the early steps? If the further along you go, the more useless the data gets, only the early data should be examined.
No, this gets back to point (3) in >>2865. For any finite prefix of a random walk, the probability of it occuring is negligible but non-zero so the cheater could legally claim that he got lucky. In fact, we can only claim to have caught him cheating if we can demonstrate that he violates randomess in the limit (or in practice where we are forced to look at finite things, if we show that he exhibits some property that would occur with negligible probability in a genuine random walk).

Indeed, even a "genuine" instance of random walk might exhibit bias in the first 100 moves, so it's not sufficient evidence to distinguish a cheater. As the number of moves increases though, our confidence in someone cheating grows.

>So that wouldn't be a very good strategy.
Yes, it's trivial to devise a test to catch this specific strategy because it exhibits obvious properties that a genuine random walk never would. But then you're just playing whack-a-mole with strategies; for any specialized detection strategy you can think of, the cheater could turn around and patch his method to avoid detection. The goal of the problem is to avoid the cat-mouse game altogether and think of a property (or collectively a set of properties) shared by strictly-positive random walks that would occur with 0 probability in a genuine random walk – therefore if we see that a person's moves exhibits this property (note that to do so we may need to analyze infinitely many moves, so this is not a finite algorithm. Nonetheless as we consider an increasing number of terms we can get better guarantees) then we can identify him as the cheater. Note that this property must be computable on a _given_ instance walk, i.e. it's not a property of the distribution of walks (like the expected value of x_i should be 0 for all x_i) but rather a property of the walk itself (i.e. returns to 0 infinitely often).
>> No. 2881 [Edit]
>>2880
Forgot to add that it's not meant to be an easy problem, or even a problem that has a solution a priori. Indeed, the linked paper shows that it's a problem hard enough to be considered graduate research. But it's a rich problem for discussion, which is why I wanted to share it.

I think there also is actually an elegant constructive algorithm to distinguish the cheater which takes advantage of the fact that a strictly-positive random walk is not random in the ML-random sense [1] and so we can construct a martingale that provides unbounded winnings on it to identify the cheater.

[1] https://plato.stanford.edu/entries/chance-randomness/algorithmic-randomness.html
>> No. 2882 [Edit]
File 166346504291.png - (2.42MB , 1905x1900 , 01629945ef2ffb3702560697421f252e.png )
2882
>>2880
>As the number of moves increases though, our confidence in someone cheating grows.
How? I disagree. I'd guess it's more like a bell curve. Here's a rephrasing of the problem:

Paul is on an infinitely long line with markers. Every step, he either goes left or right on the line based on a coin toss. He starts at 1,000,000 and never reaches 0. Prove whether Paul cheats on even or odd flips.

It's sounds a lot more absurd now, doesn't it? We're supposed to, from nothing, prove that Paul cheats just because he never goes left 1,000,000 more times than he goes right.

0, the origin, is only special because that's where Paul starts. The further he gets from 0, the less special it becomes.
>> No. 2883 [Edit]
>>2882
>How? I disagree
Because any given finite length-n prefix occurs with probability 1/2^n in a genuine random walk. As n->infty, probability goes to zero. Hence we can say as the prefix length analyzed, we become increasingly confident someone is cheating. This motivates the limit supremum [1], since we often want to discard some finite prefix and look only at the limiting behavior.

>It's sounds a lot more absurd now, doesn't it?
What sounds absurd? By number of moves I'm not referring to the numerical position on the number line of the random walk, but how many turns it has been. Shifting the starting point to 1e6 doesn't change anything material about the problem. That fact that his random walk never crossed 0, even though in a genuine random walk each point is hit infinitely many times (polya recurrence theorem) means that the walk is not a genuine random walk, so someone cheated.

[1] https://en.wikipedia.org/wiki/Limit_inferior_and_limit_superior
>> No. 2884 [Edit]
[Cont] from >>2874

So I mentioned that martingales reminded me of something else, and indeed I remember I once took a course on combinatorics that touched upon notions of randomness, and used computable martingales as a way to measure this. Basically, let's reframe the problem in the abstract: we're given an infinite sequence of coin flips and want to distinguish if this is "random" or not. If we had some sort of magical function that did this for us, the problem is trivial, and we don't even need to worry about the cheater's possible strategies.

Does there exist such a function "f"? It turns out we can indeed show the existence of such a function by borrowing ideas from betting theory, namely martingales. Very roughly, a martingale is a betting strategy: a function that takes as input a string of past events, and returns probabilities for the bets that should be placed on the next event that will occur (in the extremes where you wager 100%, if you get it right you double your money, if you get it wrong you lose all your money). Moreover the martingale here needs to be computable, i.e. be a finite/bounded algorithm (so it can't just encode the entire infinite string).

Clearly, no betting strategy can make money on truly random coin flips, whereas a non-random sequence provides an opportunity to make money. In fact, we can define a given sequence as non-random if there exists a computable martingale that wins an unbounded amount of money.

Some interesting examples:
* Sequence that is digits of pi – not random by this definition, since we can compute digits of pi in a finite algorithm and win money
* Sequence whose odd digits are pi, even digits are coin flips –  also not random, since we can make the trivial bit (50-50) odds on even digits and rake in money on odd digits, so our winnings can be unbounded.
* Sequence that is always a fixed prefix followed by random digits – This _is_ random by the computable martingale definition, since our winnings are bounded. (Intuitively, this goes back to how we can't use fixed prefixes to assign blame, since someone might have gotten unlucky).

Now we will show that there exists a computable martingale that succeeds on any random walk that never crosses the origin (i.e. we can predict the next bit with non-trivial probability in an online manner). This is because out of all length-n random walks, those that are strictly-positive-valued are a small fraction (challenge: find a formula for the number of length-n strictly positive random walks), and as n->infty, the fraction of such strings -> 0.

This means that we have a sequence {a_1, a_2, ...} whose finite prefixes {{a_1}, {a_1, a_2}, ...} become "increasingly rare" according to some property [strictly positiveness] (and importantly is not something that would happen in a genuine random walk). This is a property we can exploit in our betting strategy, by conditioning our bets on this property being true (more on this later).

Now given any martingale, we also have the property that we can split it into two martingales. One martingale will make the same moves as the original on odd number moves, and bet trivially (50/50) on even moves. The other will make the same moves as the original on even moves, and bet trivially (50/50) on odd moves. If the original martingale succeeded on a sequence (won an unbounded amount of money), then at least one of the split martingales must also succeed on that sequence.

The person whose split martingale succeeds in winning unbounded amounts is the cheater.

This non-constructively shows that it's possible to identify the cheater, but I think if you just formalize the algorithm for the martingale described then it's also constructive, and you formalize it in the natural way.

As an example, among sequences of length 3, exactly 1/2 are strictly positive. So I claim we can double our money in these first 3 digits. The way we do this is by conditioning our bets only on the sequences that are strictly positive. I.e. if currently the martingale has as input the prefix of length 2 (call this length-2 prefix w), and we're betting on the outcome of step 3. Let k_1 be the fraction (amongst all strictly positive length-3 strings) that have w0 as a prefix, let k_2 = 1 - k_1 be the fraction of strictly-positive length-3 strings that have w1 as a prefix; bet on the next bit according to those fractions.

The reason why this works is as follows: we'll show that given "insider information" that all outcomes are guaranteed to have some property that holds in a fraction 1/x of the sample space, we can bet to multiply winnings by x.

Let's say among the n-bit strings K strictly-positive strings start with 0 and L strictly positive-strings start with 1. Then the fraction is (K+L)/2^n. We'll show that our overall winnings multiplier will be 2^n/(k+l). When we bet, we bet with probability k/(k+l) on 0 and l/(k+l) on 1. WLOG if it was indeed a 0, our winnings are multiplied by 2k/(k+l). Then the process repeats – we now have only k such n-1 bit strings beginning with 0, but we know that by inductive hypothesis, our multiplier is 2^(n-1)/k. So the net is indeed 2^n/(k+l).

Intuitively, the more rare the property the bigger advantage we have over the house since because a rare long prefix will almost certaintly fix the rest of the sequence. (Challenge: can you write a quick program to demonstrate/visualize this?)

This property can then be repeatedly exploited over longer and longer prefixes:

So the overall algorithm would be like:

We start with 1 unit of money.

* Divide this unit as 1/2, 1/4, 1/8, 1/16, etc.
* Each of these will be given as initial capital to a series of gamblers who operate in parallel: The goal of the first gambler will be to 4x the input money, the goal of the second is to 16x, the input, the goal of the third is to 64x the input, and so on.
* Each gambler does so by choosing an apporiately long (and hence appropriately rare) prefix length, then using the above strategy. Note that the computation of the needed prefix length does not depend on the specific string we are given, it can be precomputed.
* The overall winnings hence clearly are unbounded (2 + 4 + 8 + ...)


Note that prefixes are overlapping, so the process described above is happening "in parallel" not sequentially – which is not actually a true martingale which must be sequential. But I think this is not a major issue since we can combine them into a single martingale. E.g. When betting on the first state the new combined martingale will simulate all other machines, and then make a combined bet appropriately. Or maybe we don't even need to simulate and can just naively start the second after the first finishes – the second gambler _would_ have used a different probability when betting on the common prefix that gambler 1 had already bet on, but I think since the sequences get longer and longer anyway the probabilities won't differ by that much so things could still work, I need to think more about this.

In short, we have shown that because strictly-positive random walks are a negligible fraction (-> 0) of genuine random walks, there exists a computable martingale that succeeds on any strictly positive walk. Splitting this martingale into a product of two martingales (odd/even) corresponding to the two individual players, we have that one of the split martingales must also succeed, revealing in the cheater and thus telling us that his subwalk is not online-random in the ML-random sense.

[1] https://web.archive.org/web/20160703220408/http://www.personal.psu.edu/jmr71/talks/rute_2012_penn_state.pdf
[2] https://math.berkeley.edu/~slaman/papers/mlreals.pdf
>> No. 2885 [Edit]
>>2884
I'm not following. Never took a course on combinatorics. I'll say this though, the question was posed as a test of intuition. I would say whatever this method is, it's not based on intuition.
>> No. 2886 [Edit]
>>2885
Yes, though I tried to make the martingale approach as easy to understand as possible, it does still require comfortability reasoning with infinite series and such. It's not very intense mathematically, but it can take some time to understand what's going on. And it's of course not something immediately obvious, although once you understand it you now have a general tool you can use to attack problems of this kind. I think the martingale approach is very elegant though because once you understand that single key step in the construction (namely that we can win money by taking advantage of the scarcity of a given property) the rest becomes intuitive.

---

That aside, did >>2883 sufficiently answer your question on why longer prefixes allow us to say more strongly that someone is cheating?

>the question was posed as a test of intuition
It's posed as both. But intuition can be misleading, you should always back it up with some more detailed analysis. The problem can be used as an example for when to trust and not trust your intuition. When analyzing the problem your thought process might go like this

* What do they mean by "detect cheating" here? <proceed to more rigorously clarify assumptions of the problem>

* What are some immediate things we can try? One naive/intuitive thing is that the cheater would have non-trivial bias. <proceed to analyze more formally, and understand that cheater can ensure bias is negligible in the limit>

* What general properties are guaranteed to hold for the cheater? <proceed to analyze and see that if there is a lower-bound that is hit infinitely often, it is easy to detect the cheater>

* Does that property we discovered necessarily true for all of the cheater's possible strategies? <proceed to analyze and see that no, the walk could drift>

This was a good problem to discuss, and your questions and responses were helpful in solidifying my own understanding, so thank you for staying the course.
>> No. 2887 [Edit]
>>2886
>did >>2883 sufficiently answer your question on why longer prefixes allow us to say more strongly that someone is cheating?
I don't even know what you mean by a prefix. If I had to guess, it means, "the walk so far", or something like that.

I don't know how
>As n->infty, probability goes to zero.
Implies
>we can say as the prefix length analyzed, we become increasingly confident someone is cheating.
And I also don't know what "limit supremum" or "limiting behavior" means.
>> No. 2888 [Edit]
File 166347203383.png - (42.76KB , 800x600 , Lim_sup_example_5.png )
2888
>>2887
abc is a prefix of abcdef
Same for sequences, since we can order it x_0, x_1, ...

Probability of an event going to zero means that it almost certainly does not happen under genuine play, so it means someone is cheating. If the probability did not drop below a finite bound, then the cheater always has an excuse that he was unlucky.

Limit supremum of an infinite sequence is intuitively the largest value (*) attained by the sequence in the long-term, after discarding all finite prefixes. See the attached image. I only mentioned it in this context to illustrate how we can formalize the notion of caring about long-term behavior.

In the attached image, imagine that we're plotting the bias. It can oscillate, maybe growing very large in the beginning, but we care what happens in the long-term. In the attached image, limit supremum is a finite non-zero value, so we can say that he has long-term bias so is cheating. if the oscillations instead kept getting smaller and in the long term the limit supremum became zero (and also the limit infimum, so we can say that the sequence itself converges) then we cannot use that as justification for blowing the whistle on him.

(*) Technically the supremum doesn't have to be an element of the sequence, just the least upper bound, but that's an issue for real analysis.

Post edited on 17th Sep 2022, 8:36pm
>> No. 2889 [Edit]
>>2884
>challenge: find a formula for the number of length-n strictly positive random walks
Hint: don't start with an explicit formula. See if you can formulate a recurrence relation, then convert. You may want to break this up into the following subchallenges:
* Find a formula for the number of walks from 0 to x in t timesteps.
* Lookup the reflection principle, and use this to your advantage
* Simplify using symmetries.


Once you get the formula (it should be simple!), can you find a way to recast it as a combinatorial proof?

Post edited on 17th Sep 2022, 10:49pm
>> No. 2890 [Edit]
>>2888
>the largest value (*) attained by the sequence in the long-term
You mean the largest integer on the line?
>in the long term the limit supremum became zero
I don't know know why this would happen. It doesn't make sense to me.

In any case, I don't think people can just jump into this. Clearly there's a bunch of stuff you already have to know to understand any of it.

Post edited on 17th Sep 2022, 9:29pm
>> No. 2891 [Edit]
File 166349211122.jpg - (23.33KB , 305x211 , 1-s2_0-S0195669815000505-gr1.jpg )
2891
>>2889
Answering myself because leaving this unresolved was too annoying that I had to solve it myself (I knew the answer previously by brute forcing the first few terms and feeding to oeis, but the resulting expression begged me to find a combinatorial proof). Spoilers, since I think this is a problem that's worth playing around with:

Q: Count the number of n-step strictly positive random walks.

A1: We can solve this recursively. Let a_n be the number of such walks of length n. Note that we will never hit zero on odd # steps, so we have a_n = 2*a_{n-1} if n is odd. If n is even, then we have a_n = 2*a_{n-1} - #{strictly positive walks of length n-1 ending at 1}.

There's a trivial bijection between #{strictly positive walks of length n-1 ending at 1} and dyck paths, since given any dyck path of length n we can convert it to a length n+1 strictly positive walk ending at 1 by just prepending an "R", effectively shifting the walk over by 1. A dick path of length 2n is just the catalan number C_n, so hence we have:


have the recurrences:

a_1 = 1
a_{n} = 2*a_{n-1} # if n is odd
a_{n} = 2*a_{n-1} - C_{n/2 - 1} # if n is even

which is not too hard to massage into the closed form a_n = B(n-1, floor((n-1)/2)) where B is the binomial function.

-----

A2: Let's start by computing an expression N(t, x) for the number of paths from 0 to x with length t. We know that if we end at x then we must have #R - #L = x. Moreover, #R + #L = t. We thus have the number of possible paths as B(t, #L) = B(t, (x+t)/2)

Now onto the main task. Since we know the odd case is trivial from A1, let us focus only on the even case and thus worry only about walks of length 2k. Any strictly positive path begins with RR, so it suffices to instead only consider paths starting at 1. What we are after is Sum{# strictly positive length 2n-1 paths from 1->k} where k can be any even value from 2 to 2n.

But note that

# strictly positive length 2n-1 paths from 1->k

=

total # of length 2n-1 paths from 1->k

-

# length 2n-1 paths from 1->k that hit the origin

Moreover, by symmetry we have that

# length 2n-1 paths from 1->k that hit the origin
=
# length 2n-1 paths from -1 -> k


Which is N(t=2n-1, x=k-1) - N(t=2n-1, k+1) summed across even k from 2 to 2n. Telescoping the sum, we get N(t=2n-1, x=1) = B(2n-1,n) = (1/2)B(2n, n)

Or equivalently whenever n is even, then we have a_n = 1/2 B(n, n/2)

-----

Challenge: Can you prove that this formulation is equivalent to the one above. That is for an even n,


(1/2) * B(n, n/2) = B(n-1, floor((n-1)/2))

We have floor((n-1)/2) = n/2 - 1 when n is even, and (1/2)B(n, n/2) = 1/2( n/(n/2) ) B(n-1, n/2 - 1)

------


A3: The simplicty of the solution (at least for the even case) suggests that there's an elegant combinatorial proof. And indeed there is. We form a bijection between two different types of paths:

* Paths that start and end at the origin (if n is even), or end at 1 (if n is odd). This is trivially computed as B(n, floor(n/2)) for an n-length path.

* Paths that never go below the origin (i.e. non-negative walks)

The latter is essentially what we're after, since it's trivialt to convert a non-negative walk to a positive walk

The bijection between these two is as follows: given a non-negative walk, we can find non-overlapping substrings that are individually monotically increasing then decreasing (i.e. are peaky – RL, RRLL, RRRLLL, etc. are examples of such substrings. These substrings may not necessarily cover the entire walk: indeed, if the non-negative walk ends at height K we must have K unmatched right steps. Swapping the sign of the first floor(K/2) unmatched R steps into L is sufficient to produce a path that starts and ends at the origin (if n is even) or ends at 1 (if n is odd). This step is also invertible, so the mapping is a bijection. See the image if this step isn't clear.
>> No. 2892 [Edit]
>>2880
I read through some of your posts again, and you said
>if we show that he exhibits some property that would occur with negligible probability in a genuine random walk
This statement makes a very big assumption that such a property even exists. In your case, it wasn't an assumption because you already knew there was such a magical math property.
>> No. 2893 [Edit]
>>2892
If no such property exists, it is impossible to distinguish cheater from the non-cheater. The goal is to either constructively determine such a property, or at least non-constructively proof such a property exists. That's how all things in math go? You don't know a priori if some theorem (e.g. riemann hypothesis) is true, you have to prove as such.
>> No. 2894 [Edit]
>>2893
>I'll repurpose this to post an interesting math puzzle. Others should feel free to post things; ideally they should be simple to understand even though the principles involved may require high-level maths to formalize correctly.
I would have preferred a puzzle that actually can be solved purely through intuition. I wouldn't even call it a puzzle. I feel somewhat deceived.
>That's how all things in math go?
I know algebra, some calculus, and some probability. None of which had problems like this.

Post edited on 18th Sep 2022, 9:09am
>> No. 2895 [Edit]
>>2894
>a puzzle that actually can be solved purely through intuition
Nothing can be solved "purely" through intuition. You can use intuition to guide you to a formal proof, but until you have that formal proof to verify you have not actually solved it. By doing so, you sharpen your intuition for the future. Beginning mathematicians may fall prey to their intuition and think something holds true, even though in reality it is not. The top mathematicians have a finely honed intuition that operates at an unfathomable level of abstraction (this could be called "unconscious competence" if we were in psychology). As I think I mentioned in one of the previous posts, this is a problem where intuition can get you 3/4 of the way there, but it's a problem designed to expose holes in your intuition regarding infinite sequences and behaviors of random walks.

>None of which had problems like this.
Schoolage math usually has rote problems: given a closed problem find a solution. E.g. "find the derivate of f(x)" or "bob has 2 apples, etc." That's only really just the tip of the iceberg in an ocean of mathematics, but it's the most practical for day-to-day things which is why it's taught first.

The vast majority of math however is concerned with the process of proving properties. Take calculus as an example. There's a joke that engineers do calculus, mathematicians do analyis. Most engineers don't actually know or care about the formalisms of calculus, they just use it as a tool that gives them answers that match what they see in the real world. Mathematicians, however, care about formalizing things and not handwaving them. E.g. what's the definition of a limit, under what circumstances does a limit exist, can we prove properties about the derivative (i.e. that it's linear)? And then generalizing them – given a derivative that acts on f: R->R, how can we generalize this to a derivative that acts on f: R^n->R^m? Does there exist a function that is continuous everywhere but differentiable nowhere?

This is why many students find their first upper-division math course hard, because they're not used to open-ended problems. All throughout their life they've known math as a set of prescribed steps to follow to get to a known destination.
>> No. 2896 [Edit]
File 166352325896.jpg - (38.48KB , 697x563 , snimek01_0.jpg )
2896
>>2895
As a concrete example, this very OP thread has such a problem:

>First question: from an evolutionary point of view, is it possible for a species of parasite to completely wipe out its host species?

This is a problem where you need to prove (or disprove) that some property has possibility of occurring.

Fortunately this is an easier problem since we are dealing with only one level of quantifier (prove there exists X...) as opposed to the random walk puzzle where we have two levels of quantifiers (prove there exists a property X shared by all walks Y...), and in this case a single example suffices as witness for the proof.

It's an interesting problem by the way – my first line of reasoning would just be to just model this with some diff-eqs (Lotka–Volterra esque). The problem statement is ambiguous, but we have several cases we need to consider:

* The parasite can be hosted by multiple species, or if it requires only a specific host
* Do we assume the parasite/host can co-evolve, or are we assuming fixed genetics on both the host and the parasite?
* How fast does the parasite breed in comparison to its host?

The answer (extinction of host species or not) will depend on at least these factors. We can look at the lotka-volterra dynamical system as an example. There, we know that the (0, 0) fixed point is unstable, so that in a mathematical sense (in a continuous regime) it is essentially impossible for a predator to "starve itself to death" by consuming all the prey (under this simplistic model). The diffeq for a single species parasite is basically identical, so under this simplistic model it's impossible.

Of course the real-world is not continuous, so let's go to a discrete regime. I've never personally looked at the recurrence relations for a discrete LV system, but it appears others have [4]. Note that despite the state-space being discrete, we still allow the population to be real numbers. We could consider any population size less than 1 as extinct when analyzing though. Indeed, we see that in discrete regime there's a stable fixed point at (1-1/a, 0) where a is the rate of reproduction. This occurs when 1 < a <= 3 and the predator-induced death rate on the prey is bounded. Note that in the real world, we would consider any walk that dips below unit population to be considered extinct, so this is just a very conservative estimate.

Thus we can say that in the real-world it is indeed feasible for predator to go extinct since the continuous/discrete LV model can exhibits oscillatory behavior (where population may drop below 1 given the right initial condition on population size).

I actually found someone who set up a more complicated diffeq model for the parasite case in [1]. They make the following assumptions in their model:

* The parasite operates in two stages: invasive and infecting. The invasive stage looks for new hosts. Once a host is found, it switches to infecting stage (killing the host with some probability k5), and spawns parasites in the invasive stage. Note that this 2-stage behavior is key, since it means we no longer have a strict predator prey dynamic and allow for more interesting types of behavior (a parasite may spawn many invasive stages which can wait a while before seeking hosts. In such a way, in the future there can be more parasites than hosts).

* The parasite alters reproductive rate of its host. In their graph they made an infected host less likely to reproduce, I don't know if this is correct evolutionarily speaking because I'm not a biologist. Offspring of the host are not infected.

* They assume there the parasite only invades and infects one species

* Infecting an already infected host is a noop

Depending on the various values we see oscillations which will eventually lead to extinction of the host. Maybe someone can rig up a python program to simulate this for various parameter values (or use one of the matlab toolkits).


----

But now let's put aside whether it's mathematically possible and consider if we would ever see this happening in real-life. It seems it already has, with fleas killing an island-native rat population [2]. My intuition here is that some conditions need to be met though: 1) a small, isolated population, so that it's population is already on the edge of stability and anything can topple it over 2) A sudden instantaneous event, so that it's hard for the host species to adapt to it. In this case someone introducing non-native fleas to the native population. The linked plos paper is a nice read [3].


[1] https://www.frozenevolution.com/xix14-parasite-must-not-exterminate-its-host-species (incidentally the site's author seems to be an interesting guy. I'll need to look more into the "frozen evolution" mechanism he proposes. What a gem of an obscure website!

[2] https://www.wired.com/2008/11/yes-disease-can/
[3] https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0003602
[4] https://advancesindifferenceequations.springeropen.com/articles/10.1186/s13662-016-0903-6

Post edited on 18th Sep 2022, 3:51pm
>> No. 2897 [Edit]
>>2884
The inductive proof for the betting strategy conditioning on epsilon-rare events wining 1/epsilon money wasn't very satisfying to me. For instance, it still might feel like even after conditioning on the epsilon-rare event, you might still end up with 50/50 odds for the next bit. However it might help to explicitly see why this can't be the case:

Setup:

We have a martingale playing on n-bit strings; we are given insider information that the outcome is guaranteed to be within a target set X which a measure that is a fraction epsilon of the n-bit strings. (I.e. |X| = epsilon * 2^n). Our previous inductive proof showed that we can bet to win 1/epsilon money playing over those n bits. Here we will show constructively that as we make our bets, our insider information will allow us to predict the next bit with non-trivial (i.e. non-50%) probability. I.e. it can never be the case that when we follow our betting strategy previously prescribed we will end up betting 50-50 on all bits.


Proof sketch:

X is our target set thall all realizations are guaranteed to occur in, and we know |X| = epsilon * 2^n. Let's enumerate X via a tree. Consider the first bit: some fraction will have first bit as 0, the rest have bit 1. If this is 50-50, the sets with prefix 0* and 1* must have equal size. This continues for each bit, so if we had 50-50 odds on all n bits our |X| would have size 2^n, a contradiction. Basically the fact that |X| = epsilon * 2^n skews our sample space in a way that forces non-trivial probabilities for the two halves.

It might be instructive to have a concrete example:

There are 8 length-3 walks, 2 of which are strictly positive. I claim that we can thus 4x our money when playing a martingale on 3-bits.

RRR
RRL

You can see that on the first two bits we bet R, so we are guaranteed to 4x our money.

But maybe this is too small an example, let's do length-4 where we have 3 out of 16 strictly positive:

RRRR
RRLR
RRRL

Note that we have double our money on the first 2 bits. we have 2/3 on the third bit – if we get it right then it's a wash on the last bit. If we get it wrong though, we're still good because it fixes the last bit.

Hopefully this gives intuition. This is the core lemma you need to internalize to understand how you can construct a martingale that succeeds on the non-random sequence. But to me at least it's not immediately intuitive: I mean at some sense I can accept that your insider information gives you a significant advantage against the house if we were betting "dart board style" where we draw a random n-bit string one-shot and bet on the outcome of that. But the genius of the strategy is how we make use of this information in an online manner to extract the same advantage bit-by-bit.

And I think it's the online part that's crucial. Because let's say we just left it at the fact that constructing a martingale for the strictly positive walk means that it's not ML-random. So what? We already knew that it's not "random" (putting aside any specific randomness metric) just based on the fact that probability of it happening in a genuine walk is zero. The genius part it being an online algorithm means we can split it step-by-step and run the martingale independently on each of the player's halves.

The other tricky thing is convincing myself that splitting the martingale works. I mean you can prove it, but that's not intuitively satisfying. We've essentially constructed an online algorithm for detecting any sequence that violates the no-return property. We then split it, and run the split algorithms on each of the subwalks. The subwalks themselves don't need to violate the no-return property (indeed, the cheater can make his subwalk return to zero infinitely often as we've discussed before) but the split algorithm nonetheless succeeds in distinguishing the cheater as witnessed by its winnings being unbounded. I feel like I'm missing the last piece of intuition here. I think it's because in the algorithm we're only making use of the fact that the strictly positive random walks have measure 0 amongst all random walks (rather than explicitly checking for origin crossings) which allows us a mechanism for predicting the next bit with non-trivial probabilities. Splitting the walk really is just a mathematical formalism for seeing which half of bits we can predict non-trivially (i.e. if we wanted to do it informally, we note down the payoff at each step, and see if the aggregate payoffs at odd or even places are higher).

Appendix:

Consider what happens if you make trivial (50-50) bets on a genuine random walk. Whether we succeed or fail our winnings remain the same: we have d(*) = 0.5d(0*) + 0.5d(1*) but by symmetry d(0*) = d(1*), d(*) = d(0*) = d(1*) so in expectation we never grow our starting capital.
>> No. 2907 [Edit]
>>2897
For future reference, seems the construction given here is essentially a concrete example of the more general theorem that any ML-test (martin lof test) [1] corresponds to an unbounded martingale and vice-versa. Here it's applied in the specific case of no-zero-crossings, and the sets that exhibit this have measure zero (correspond to a nullset). I think the proof is basically the same proof we did here, although if I hadn't worked through this problem before the general proof wouldn't make any sense.

It's also worth thinking about how these two definitions relate to the traditional kolmogorov complexity based-definition of a random sequence.

[1] https://cacm.acm.org/magazines/2019/5/236411-algorithmic-randomness/fulltext
[2] http://www.personal.psu.edu/jsr25/Lectures/JiaoTong_2014/Shanghai_Lecture_1.pdf
>> No. 2931 [Edit]
File 16650807518.jpg - (66.69KB , 749x774 , peace was never an option.jpg )
2931
Could someone use the Joule–Thomson effect to create a showerhead whose water runs off a capillary tube and thus gets colder than room temperature without using any additional source of power or something? You would use a capillary tube for the water to run through thus getting colder.
>> No. 2932 [Edit]
>>2931
I don't understand the setup, how exactly do you plan to use the capillary tube to cool liquid water? There's a joule thompson inversion point where expansion ends up heating the fluid rather than cooling it (and I believe for liquid water it is as such), so exiting the capillary tube the water would end up heating slightly.

Post edited on 6th Oct 2022, 1:28pm
>> No. 2943 [Edit]
>>2932
I discovered this technique while reading about fridges. Yes, it works on water. I forgot to factor the exiting of the fluid from the capillary tube. In this setup the water would cool but would heat up on the person's head, just as it leaves the tube. It doesn't work.
>> No. 2944 [Edit]
>>2943
>Yes, it works on water
Well the effect exists for all fluids, but for liquid water expansion doesn't result in cooling. See [1]

>Although the Joule–Thomson coefficient is not a thermodynamic property for itself, the effect is important for practical purposes and values for the Joule–Thomson coefficient help to realize the changes occurring during processes. From the table, it can be seen that during expansion of liquid water the temperature increases. In the gaseous and near-critical state, temperature of water during expansion drops.


Also it should be noted that (as far as I understand) the joule-thomson effect doesn't play a major part in the refrigeration cycle, it's the phase changes between liquid/gas of the coolant that are responsible for most of the heat transfer to/from the environment.

[1] https://www.sciencedirect.com/topics/chemistry/joule-thomson-effect

Post edited on 9th Oct 2022, 12:09pm
[Return] [Entire Thread] [Last 50 posts] [First 100 posts]

View catalog

Delete post []
Password  
Report post
Reason  


[Home] [Manage]



[ Rules ] [ an / foe / ma / mp3 / vg / vn ] [ cr / fig / navi ] [ mai / ot / so / tat ] [ arc / ddl / irc / lol / ns / pic ] [ home ]