Hangsquid!

Cuttleshock

Inkling Commander
Joined
Apr 1, 2016
Messages
459
Maybe I'm not trying hard enough to follow, but I don't fully get it... what I'm confident of is that your method is different to mine.

No, okay, here. What I did was along the lines of setting up simultaneous recursive equations in three probabilities: p(n), q(n) and r(n). p(n) is the probability that, after 2n presses, the state is 10. q(n) is the probability that the state is 01 and r(n), 11. p(0) = q(0) = r(0) =1/3. If the state is 10, there's probability 1/2 that it'll terminate after one more press and 1/2 that it'll go on to the next multiple of 2 (because it definitely can't terminate after two presses, as the first switch would necessarily be ON then). If the state is 01, there's a probability 1/4 that it'll terminate after 2 presses and 3/4 that it'll go on. If 11, again, 1/4 that it'll terminate after 2 presses, 3/4 that it'll go on. We can get a recursive definition for p(n+1) in terms of p(n), q(n) and r(n) and similarly for the other two states. This leads us to several unwieldy infinite geometric sequences which very much require us to evaluate something like the infinite sum of the reciprocals of the Fibonacci numbers.

Extending that to the case with three switches, it begins to get very unpleasant, as you'd need seven recurrently-defined probabilities; again, though, it works by the logic that each one can only terminate at its final 1 after 3n clicks (e.g. 101 being the situation after 3n clicks means that you only have a chance of switching it off at 3n+3 clicks). But I guess I could give it a shot tomorrow. Sleepy right now.
 

Dual

Super Moderator
Super Moderator
Joined
Feb 16, 2016
Messages
281
Location
The Great Zapfish. It's really cozy here!
NNID
chaser1234
S _ A L

E H N O P R T U SAIL (9/10)
くコ:テ

I was sure that I was correct about the first part, but I was also pretty sure that dividing by 2 wasn't quite what I needed to be doing near the end. I had a few other ideas, but none of them seemed to make much sense. One thing would have led me to the solution of 16/3, if I had calculated the expected amount of switches if that problem contained only one switch, then averaged that with the problem containing 2 switches starting in neutral positions (If they started in neutral positions, there would be an expected amount of 6 switches, just like in the cases of (ON,OFF) and (ON,ON)). And I suppose it does seem somewhat logical. I think when I tried that the first time, I had thought that it wouldn't work because doing the second expected press for the problem with one switch wouldn't be possible, but also, I'm now thinking that if the first press did work, then the second part of it with 6 expected presses wouldn't be possible to start, so I guess those situations cancel each other out? It doesn't make a whole lot of sense to me but it's the only thing I can think of leading to the solution you got.

For one switch:
N = (0.5)(N+1)+(0.5)(1)
N = .5N+.5+.5
.5N = 1
N = 2

(2+6)/2 = 4

(6+6+4)/3 = 16/3

And I tried using this logic to solve for a problem with three switches, where you press switch one, then two, then three, then repeat that until they all turn OFF.

For three switches:
N = (2/3)(N+1)+(2/9)(N+2)+(2/27)(N+3)+(1/27)(3)
N = (26N/27)+(13/9)
N = 27(13/9) = 39

4 situations (ON,ON,ON), (OFF,OFF,ON), (ON,OFF,ON), (OFF,ON,ON) where you must get 3 presses of OFF in a row.
2 situations (OFF,ON,OFF), (ON,ON,OFF) where if the first 2 presses are OFF, then it outputs OFF, otherwise you need 3 in a row.
1 situation (ON,OFF,OFF) where if the first press is OFF, then it outputs OFF, otherwise you need 3 in a row. I think you just have to average 39 with 2 for this, rather than averaging 39, 6, and 2, because a situation where you only need to press OFF twice in a row is absolutely impossible to reach here.

(39+39+39+39+((39+6)/2)+((39+6)/2)+((39+2)/2))/7 = 443/14 ≈ 31.64

And that does seem like a plausible answer, so doing the problem this way could work. But I don't know how I'd be able to accurately check if it does, unless you're able find the answer to it using something similar to what you did originally and seeing if we still have the same answer for a problem with 3 switches.
Maybe I'm not trying hard enough to follow, but I don't fully get it... what I'm confident of is that your method is different to mine.

No, okay, here. What I did was along the lines of setting up simultaneous recursive equations in three probabilities: p(n), q(n) and r(n). p(n) is the probability that, after 2n presses, the state is 10. q(n) is the probability that the state is 01 and r(n), 11. p(0) = q(0) = r(0) =1/3. If the state is 10, there's probability 1/2 that it'll terminate after one more press and 1/2 that it'll go on to the next multiple of 2 (because it definitely can't terminate after two presses, as the first switch would necessarily be ON then). If the state is 01, there's a probability 1/4 that it'll terminate after 2 presses and 3/4 that it'll go on. If 11, again, 1/4 that it'll terminate after 2 presses, 3/4 that it'll go on. We can get a recursive definition for p(n+1) in terms of p(n), q(n) and r(n) and similarly for the other two states. This leads us to several unwieldy infinite geometric sequences which very much require us to evaluate something like the infinite sum of the reciprocals of the Fibonacci numbers.

Extending that to the case with three switches, it begins to get very unpleasant, as you'd need seven recurrently-defined probabilities; again, though, it works by the logic that each one can only terminate at its final 1 after 3n clicks (e.g. 101 being the situation after 3n clicks means that you only have a chance of switching it off at 3n+3 clicks). But I guess I could give it a shot tomorrow. Sleepy right now.
Jesus people this is hangman. Just guess. That's what I do.
 

Anaru

Inkling Cadet
Joined
Nov 2, 2015
Messages
295
Location
Callie-Fornia
NNID
lavalizard24
I did that in a really dumb way. Wow. What the hell. I'll correct that egregious mistake.

N = (2/3)(N+1)+(2/9)(N+2)+(2/27)(N+3)+(1/27)(3)
What was I doing here? There's a 50% chance for the switch to turn off. Not a 33% chance. And I did this at 4PM? It couldn't have been due to fatigue. I feel incredibly dumb. There are nothing but 50% chances in any part of this problem except for the starting position. It seems like I confused myself because the problem now contained 3 switches but I should have easily noticed before posting. Or just not done that at all. I'm very sorry for that.

N = (.5)(N+1)+(.25)(N+2)+(.125)(N+3)+(.125)(3)
N = .5N+.5+.25N+.5+.125N+.375+.375
N = .875N+1.75
.125N = 1.75
N = 14

Okay, neat. That's what it should be when the last one starts ON, I'm very sure of that. Now I can try to solve for 3 switches again. I originally came back here just to correct a mistake I noticed while thinking about it earlier that was very small and actually sort of understandable compared to the last one. I needed to average differently for the situations of (OFF,ON,OFF) and (ON,ON,OFF) because there is only a 1/4 chance of getting all OFF on the second try compared to the 1/2 chance of getting them all OFF first try with (ON,OFF,OFF), I overlooked that last time. I'm extremely confident that this answer is correct and shouldn't need to change it anymore.

(14+14+14+14+((14+14+14+6)/4)+((14+14+14+6)/4)+((14+2)/2))/7 = 88/7 12.5714285714

Oh, I should make a simulation of this like your dad did! I learned how to use Java but hardly ever use it. And I could check if I'm actually correct.

import java.util.Random;
import java.util.Scanner;

public class Switches {

static Random randomN = new Random();

public static void main(String [ ] args) {

int S = 0;
int S1 = 1;
int S2 = 1;
int S3 = 1;
int K = 0;
double T = 0;
double N = 0;

while(K < 10000000){
K++;
S = randomN.nextInt(7);
if(S == 0){
S1 = 1;
S2 = 1;
S3 = 1;
}
else if(S == 1){
S1 = 0;
S2 = 1;
S3 = 1;
}
else if(S == 2){
S1 = 1;
S2 = 0;
S3 = 1;
}
else if(S == 3){
S1 = 1;
S2 = 1;
S3 = 0;
}
else if(S == 4){
S1 = 0;
S2 = 0;
S3 = 1;
}
else if(S == 5){
S1 = 0;
S2 = 1;
S3 = 0;
}
else if(S == 6){
S1 = 1;
S2 = 0;
S3 = 0;
}
T = 0;
while(S1 == 1 || S2 == 1 || S3 == 1){
T++;
if((T % 3) == 0){
S1 = randomN.nextInt(2);
}
else if((T % 3) == 1){
S2 = randomN.nextInt(2);
}
else if((T % 3) == 2){
S3 = randomN.nextInt(2);
}
}
N = N + T;
System.out.println(T);
}
N = N/K;
System.out.println("total"+N);
}
}
In just 52 seconds, it got to 12.5734143 by averaging the results of 10,000,000 trials!!! That's close enough for me to be sure of my answer!
 

Anaru

Inkling Cadet
Joined
Nov 2, 2015
Messages
295
Location
Callie-Fornia
NNID
lavalizard24
That incorrect solution actually seems like it would work for a problem with 3 switches if each switch had three outputs, ON, ON, or OFF, if I once again adjusted the averaging for (OFF,ON,OFF) and (ON,ON,OFF). Anyways, the reason I'm making this post is to give a hint so the game doesn't stall. None of the letters on the list of plausible letters you made are in this word. I'll even make a list of all the ones that are now possible: BDFGIJQX. It should be quite easy to guess now.
 

Cuttleshock

Inkling Commander
Joined
Apr 1, 2016
Messages
459
I've... got to revise my method for two switches, then. The infinite sum of reciprocal Fibonacci numbers doesn't seem so exciting when it's obscenely over-complicating the problem.

Seems like the only pronounceable ones are I and Q (unless it's a loan word with a weird-sounding J... ?). I don't like this word. I'm leaving it to someone else to guess.
 

Anaru

Inkling Cadet
Joined
Nov 2, 2015
Messages
295
Location
Callie-Fornia
NNID
lavalizard24
I just want to get this over with. C?
No, scal does seem like it could be a word but I clearly stated the letter was one of those 8 that I listed.

S I A L

Dual can guess the next word, he said he meant to put sial but mistyped and put sail. He corrected his mistake but hadn't actually re-guessed the word, I thought he would eventually realize that there aren't any letters that fit into s_al except E and I, and E was already taken. I believe it's pronounced like "vial" with an s at the start rather than a v, and the sound the al makes would be similar to the sound at the start of "alibi".

Anaru said:
That's close enough for me to be sure of my answer.
Also, I meant this for both my answer for 2 and for 3 switches. The reason I was trying to do 3 is to see if my logic actually made sense or just coincidentally got to the correct answer for the 2 switch problem but wouldn't work for anything else. The problem still seems quite difficult even without having to find the complicated answer with the Fibonacci Numbers, I doubt there are very many people who would think of using that logic to solve it. Although, I did originally get each problem wrong, and it wasn't until I corrected myself each time that it was actually right. Thank you for sharing it, it was fun to solve!
 

Users who are viewing this thread

Top Bottom