Thread Rating:

Poll

25 votes (49.01%)
16 votes (31.37%)
7 votes (13.72%)
4 votes (7.84%)
12 votes (23.52%)
3 votes (5.88%)
6 votes (11.76%)
5 votes (9.8%)
12 votes (23.52%)
10 votes (19.6%)

51 members have voted

aceside
aceside
  • Threads: 2
  • Posts: 848
Joined: May 14, 2021
December 10th, 2025 at 5:40:55 PM permalink
I looked up an online calculator. For a streak of 7 dice rolling in a row, the average number of rolls is 335922.
Ace2
Ace2
  • Threads: 33
  • Posts: 2828
Joined: Oct 2, 2017
December 10th, 2025 at 6:30:07 PM permalink
You can get that answer via linear equations, or you can calculate it directly as:

6^1 + 6^2 + 6^3 + 6^4 + 6^5 + 6^6 + 6^7 = (6^(7+1) - 1) / (6 - 1) - 1 = 335,922
It’s all about making that GTA
aceside
aceside
  • Threads: 2
  • Posts: 848
Joined: May 14, 2021
December 11th, 2025 at 6:57:04 AM permalink
This is easy. When the number of states is large, we can just neglect all terms except the last one. The above as an example,

6^1 + 6^2 + 6^3 + 6^4 + 6^5 + 6^6=55,986;
6^7=279,936.

6^7/(6^1 + 6^2 + 6^3 + 6^4 + 6^5 + 6^6 +6^7)=0.833.

So, this approximation is already very good.
ThatDonGuy
ThatDonGuy
  • Threads: 133
  • Posts: 7493
Joined: Jun 22, 2011
Thanked by
aceside
December 11th, 2025 at 7:08:30 AM permalink
Quote: aceside

I looked up an online calculator. For a streak of 7 dice rolling in a row, the average number of rolls is 335922.
link to original post


Here is the general solution for rolling t 6s in a row:

Let E(n) be the expected number needed to reach t in a row when you currently have n in a row
Note E(n) = 1/6 E(n+1) + 5/6 E(0)
E(0) is the solution, as you start with zero 6s

Proof by induction that E(n) = 1 + 1/6 + (1/6)^2 + ... + (1/6)^(t-n-1) + 5/6 E(0) (1 + 1/6 + (1/6)^2 + ... + (1/6)^(t-n-1))
For n = t-1: E(t-1) = 1 + 1/6 E(t) + 5/6 E(0) = 1 + 5/6 E(0)
Assume E(n) = 1 + 1/6 + (1/6)^2 + ... + (1/6)^(t-n-1) + 5/6 E(0) (1 + 1/6 + (1/6)^2 + ... + (1/6)^(t-n-1))
E(n-1) = 1 + 1/6 E(n) + 5/6 E(0)
= 1 + 5/6 E(0) + 1/6 (1 + 1/6 + (1/6)^2 + ... + (1/6)^(t-n-1) + 5/6 E(0) (1 + 1/6 + (1/6)^2 + ... + (1/6)^(t-n-1)))
= 1 + 1/6 + (1/6)^2 + ... + (1/6)^(t-(n-1)+1) + 5/6 E(0) (1 + 1/6 + (1/6)^2 + ... + (1/6)^(t-(n-1)+1)))
= 1 + 1/6 + (1/6)^2 + ... + (1/6)^(t-(n+1)-1) + 5/6 E(0) (1 + 1/6 + (1/6)^2 + ... + (1/6)^(t-(n+1)-1)))

E(0) = 1 + 1/6 + (1/6)^2 + ... + (1/6)^(t-0-1) + 5/6 E(0) (1 + 1/6 + (1/6)^2 + ... + (1/6)^(t-0-1))
= (1 - (1/6)^t) / (1 - 1/6) + 5/6 E(0) (1 - (1/6)^t) / (1 - 1/6)
= 6/5 (1 - (1/6)^t) + E(0) (1 - (1/6)^t)
E(0) (1 - (1 - (1/6)^t) = 6/5 (1 - (1/6)^t)
(1/6)^t E(0) = 6/5 (1 - (1/6)^t)
E(0) = 6/5 (1 - (1/6)^t) / (1/6)^t
= 6^t (6/5) (1 - (1/6)^t)
= 6^(t + 1) (1 - (1/6)^t) / 5
= 6^(t + 1) (6^t - 1) / (6^t x 5)
= 6 (6^t - 1) / 5

For t = 7, this is 6 (6^7 - 1) / 5 = 335,922

Ace2
Ace2
  • Threads: 33
  • Posts: 2828
Joined: Oct 2, 2017
December 11th, 2025 at 8:29:29 AM permalink
Quote: aceside

This is easy. When the number of states is large, we can just neglect all terms except the last one. The above as an example,

6^1 + 6^2 + 6^3 + 6^4 + 6^5 + 6^6=55,986;
6^7=279,936.

6^7/(6^1 + 6^2 + 6^3 + 6^4 + 6^5 + 6^6 +6^7)=0.833.

So, this approximation is already very good.
link to original post

17% off is not a “very good” approximation of something that can be easily calculated exactly. Would you say 2 + 2 = 3.3 is a very good approximation?
It’s all about making that GTA
Wizard
Administrator
Wizard
  • Threads: 1539
  • Posts: 27897
Joined: Oct 14, 2009
December 16th, 2025 at 11:35:59 AM permalink
Quote: aceside

I looked up an online calculator. For a streak of 7 dice rolling in a row, the average number of rolls is 335922.
link to original post



I agree. The general answer for the expected number of rolls to get a particular face n times in a row on a d sided die is d^1 + d^2 + d^3 + ... + d^n. In this case 6^1 + 6^2 + ... + 6^7 = 335,922.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Wizard
Administrator
Wizard
  • Threads: 1539
  • Posts: 27897
Joined: Oct 14, 2009
December 16th, 2025 at 11:39:54 AM permalink
Fair warning I found the following puzzle quite hard.

You are among three gods, which are labeled A, B and C. One always speaks the truth, one always lies and one answers yes/no randomly without even listening to the question. The gods know the identity of each other. You may ask three yes/no questions directed to any particular god one at a time. Questions must have clear yes/no answers, so no paradoxical questions. Your goal is to determine which god is which.

What should be your line of questioning, which you may adapt according to previous responses.
Last edited by: Wizard on Dec 16, 2025
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
ThatDonGuy
ThatDonGuy
  • Threads: 133
  • Posts: 7493
Joined: Jun 22, 2011
December 16th, 2025 at 1:49:28 PM permalink
Quote: Wizard

Fair warning I found the following puzzle quite hard.

You are among three gods. One always speaks the truth, one always lies and one answers yes/no randomly without even listening to the question. You may ask three yes/no questions directed to a particular god one at a time. Questions must have clear yes/no answers, so no paradoxical questions. What should be your line of questioning, which you may adapt according to previous responses.
link to original post


Question: does each god know how the other two gods will answer? For example, if god A tells the truth, does A know which of B or C is the liar?
Wizard
Administrator
Wizard
  • Threads: 1539
  • Posts: 27897
Joined: Oct 14, 2009
December 16th, 2025 at 2:03:38 PM permalink
Quote: ThatDonGuy

Question: does each god know how the other two gods will answer? For example, if god A tells the truth, does A know which of B or C is the liar?
link to original post



Yes, they know the identity of each other. I also forgot to say the goal is to determine who is whom (is that the correct grammar?).
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
ThatDonGuy
ThatDonGuy
  • Threads: 133
  • Posts: 7493
Joined: Jun 22, 2011
December 16th, 2025 at 2:19:00 PM permalink
Quote: Wizard

Quote: ThatDonGuy

Question: does each god know how the other two gods will answer? For example, if god A tells the truth, does A know which of B or C is the liar?
link to original post



Yes, they know the identity of each other. I also forgot to say the goal is to determine who is whom (is that the correct grammar?).
link to original post


No, it is not correct grammar; "whom" is used with objects, so "who is who" is correct.

Also, defining the goal like that is important, as otherwise you could get an answer in two questions.

Label the gods A, B, and C
Question 1, to A: "Is B the truthteller or is C the liar?"
Of the six possible sets of gods (let T be the truthletter, F be the liar, and R be random):
T, F, R: the answer is No, so the (truthful) response will be No
T, R, F: the answer is Yes (C is the liar), so the (truthful) response will be Yes
F, T, R: the answer is Yes (B is the truthteller), so the (false) response will be No
F, R, T: the answer is No, so the (false) response will be Yes
R, T, F and R, F, T: the response will be random
If the response is Yes, then C is not random; if the response is No, then B is not random

Question 2, to whichever of B or C is not random: "Does 1 + 1 = 2?"
If the answer is Yes, that god is the truthteller; if it is No, that god is the liar

Question 3, to the same god: "Is A random?"
If the question is asked to the truthteller, Yes means that A is random, and No means that the other god is random; whichever one is not random is the liar
If the question is asked to the liar, No means that A is random, and Yes means that the other god is random; whichever one is not random is the truthteller



Extra credit (at least, I think I have this right): obtain the answer to any yes-or-no question in two questions to the gods.
  • Jump to: