This logic puzzle stumped ChatGPT. Can you solve it?

preview_player
Показать описание

0:00 problems
1:23 solution
6:08 general 1
10:49 general 2

UKMT
Puzzling StackExchange solution by Caleb Stanford

Send me suggestions by email (address at end of many videos). I may not reply but I do consider all ideas!

If you purchase through these links, I may be compensated for purchases made on Amazon. As an Amazon Associate I earn from qualifying purchases. This does not affect the price you pay.

If you purchase through these links, I may be compensated for purchases made on Amazon. As an Amazon Associate I earn from qualifying purchases. This does not affect the price you pay.

Book ratings are from January 2023.

My Books (worldwide links)

My Books (US links)
Mind Your Decisions: Five Book Compilation
A collection of 5 books:
"The Joy of Game Theory" rated 4.3/5 stars on 290 reviews
"The Irrationality Illusion: How To Make Smart Decisions And Overcome Bias" rated 4.1/5 stars on 33 reviews
"40 Paradoxes in Logic, Probability, and Game Theory" rated 4.2/5 stars on 54 reviews
"The Best Mental Math Tricks" rated 4.3/5 stars on 116 reviews
"Multiply Numbers By Drawing Lines" rated 4.4/5 stars on 37 reviews

Mind Your Puzzles: Collection Of Volumes 1 To 3
A collection of 3 books:
"Math Puzzles Volume 1" rated 4.4/5 stars on 112 reviews
"Math Puzzles Volume 2" rated 4.2/5 stars on 33 reviews
"Math Puzzles Volume 3" rated 4.2/5 stars on 29 reviews

2017 Shorty Awards Nominee. Mind Your Decisions was nominated in the STEM category (Science, Technology, Engineering, and Math) along with eventual winner Bill Nye; finalists Adam Savage, Dr. Sandra Lee, Simone Giertz, Tim Peake, Unbox Therapy; and other nominees Elon Musk, Gizmoslip, Hope Jahren, Life Noggin, and Nerdwriter.

My Blog

Twitter

Instagram

Merch

Patreon

Press
Рекомендации по теме
Комментарии
Автор

move 0 (or just the starting position):0000
move 1:1110
move 2:1001
move 3:0010
move 4:1111
0=up-right
1=upsidedown

nohax
Автор

There is a solution that works for any number of glasses and requires only 0 inverting steps... you take all the glasses and carefully, without reverting any of them, travel to the exact opposite point of the Earth's surface. DISCLAIMER: doesn't work for flat earthers.

mihailghinea
Автор

Equivalently you can think this way: the glasses are automatically inversed and each time you choose one glass not to get inversed. Remark that for a glass to get inversed, it needs to get inversed odd times. Therefore, if you choose one glasses at a time for four inversions, every glass gets inversed three times and gets inversed!

zlmuwdd
Автор

I got so excited when I solved it without looking at the video then immediately humbled when I saw the question was MUCH more complicated.

creepx_hd
Автор

It takes two moves to reach a position where two of the glasses are upside down. This is a symmetrical situation which could be reached from either the initial position or the desired final position. That means the minimum number of moves is four.

ceejay
Автор

Every position is just a linear combination on Z/2Z of the 4 possible moves, since moves are commutative. The question is then "find the coefficients given the basis".

mfavier
Автор

1: lemme fiddle with this
2: wait this might be impossible
3: lemme check by thinking about possible states
3.5: wait the state of the glasses only depends on the number of downs and ups
4: ah wait its not impossible
5: finds solution
6: yippie *clicks video*

Capiosus
Автор

The simples terms to think of this is, there is in each situation until the final move only one possible move that doesn’t recreate a previous situation

sirrjean
Автор

Go figure language AI models aren't math AI tools. Who would have thunk it.

DulcetNuance
Автор

Saying this puzzle "stumps" ChatGPT or Google AI plays into the myth that these applications are capable of thought - they are not. They're using statistical modeling to choose words and phrases. Stop it.

partycatplays
Автор

Remember: LLMs being called intelligent is marketing hype. They're a superpowered autopredict, not intelligent.

phasm
Автор

Since glass position does not matter only the Up or Down positioning, this is a simple state model where the initial state is 4U0D and you want to get to 0U4D by changing a total 3 U to D or D to U each round. Sideways and backward state changes to prior states are not allowed. So it goes 4U0D, 1U3D, 2U2D, 3U1D, 0U4D .. done, 4 is the minimum possible with not duplications of states.

walterengler
Автор

I didn't watch the video yet, only saw the video thumbnail.
I was able to do it in four steps:



1. Flip 3 cups, that are in up position.
2. Flip 1 cup that is in up position, and 2 cups that are in down position.
3. Flip 1 cup that is in up position, and 2 cups that are in down position.
4. Flip the three cups that are in up position.

tyronorxy
Автор

Funny, we did this in 4th grade in the 1990's in a game called "Math castle" but it was light-switches instead of glasses.

jennystrandqvist
Автор

Nice question on parities and xors. If you encode glass up as a 0 and glass down as a 1, you are basically asking how to get 1111 from 0000 by xoring with only 0111, 1110, 1101 and 1011. Notice that there are only 4 and you need to use each one exactly once to get the result. If you use two sequences at any time, that would be a redundancy as they cancel. This can be generalized to any even n as well.

konchady
Автор

I think the simplest solution for N glasses would be more like…

Every two moves, the net number of glasses that have been flipped is either 0 or 2.

So when N is even, it will take N/2 pairs of moves to flip N glasses, so N moves in total.

It can’t be less than N if the number of moves is even, because the most the number of flipped glasses can increase each pair of moves is 2.

If the number of moves is odd, and all glasses were flipped, then you could make one more move, and so have a set of paired moves where the total number of flips would need to be even, and that contradicts that you would have flipped the N glasses already . Therefore there can be no solution with an even number of moves.

SmoMo_
Автор

I thought about this in terms of boolean algebras and got to the solution pretty quickly

theelk
Автор

I solved this using some advanced linear algebra:

Firstly, note the isomorphism between the state of the glasses and the *F*_2-vector space *F*_2^n: for a vector (a_1, ..., a_n) in *F*_2^n, the term a_i = 0 if the glass is not inverted, and 1 if it is. Applying the move "invert all but the i-th glass" is equivalent to adding the vector e_i := (1, 1, ..., 1, 0, 1, ..., 1), where only the i-th term is 0. Since the initial state of the glasses is the zero vector (0, ..., 0), we wish to find nonnegative integers c_1, ..., c_n such that c_1 e_1 + ... + c_n e_n = (1, 1, ..., 1). Taking the c_i modulo 2, and noting that we are after the minimum of c_1 + ... + c_n, we can assume that each c_i is either 0 or 1, and then treat them as elements of *F*_2.

Let v = e_1 + e_2 + ... + e_n, and notice that v = (n-1, n-1, ..., n-1) (mod 2). When n is even, v = (1, 1, ..., 1). In this case, noting that v-e_i = (0, 0, ..., 0, 1, 0, ..., 0), we see that the standard basis vectors lie in the span of the set {e_1, ..., e_n}. This implies that {e_1, ..., e_n} forms a basis of *F*_2^n, and therefore (1, 1, ..., 1) is uniquely expressed as the *F*_2-linear combination e_1 + ... + e_n. Thus the minimum is 1 + ... + 1 = n. When n=4, we have the initial case.

On the other hand, if n is odd, then v = e_1 + e_2 + ... + e_n = (0, 0, ..., 0), which implies that the e_i are not linearly independent. Hence the above argument no longer applies. For this case, let us consider the linear map T: *F*_2^n --> *F*_2 given by T(a_1, ..., a_n) = a_1 + ... + a_n. Notice that T(e_i) = 0 for each i (since n is odd), hence every e_i lies in ker(T). But T(1, 1, ..., 1) = 1. This implies that (1, 1, ..., 1) is not in ker(T), hence is not in the span of {e_1, ..., e_n}. Therefore when n is odd, it is impossible to reach a state where all glasses are inverted.

ExplosiveBrohoof
Автор

It looks like a dynamic programming question. Good one!

kaansonmez
Автор

Something that interests me is when you include a non-integer number of steps, and this would allow for solutions for odd numbers with a minimum of half of that odd number. (where in half a step you move half as many glasses) Example: (111), Step 1: (010), Step 1.5: (000). I know this is not actually how a "step" works, however I find it interesting that using this definition gives exactly half of the odd number as a minimum number of moves.

JamesMcCullough-lugf
visit shbcf.ru