正在加载视频...

视频加载失败

One of the most deceptively simple yet profound unsolved problems in mathematics is the Collatz conjecture, also known as the 3n + 1 problem. Here is how it works. Choose any positive integer. Let us begin with 7. We repeatedly apply two elementary rules: If the number is odd,...

18,241 次观看 • 20 天前 •via X (Twitter)

9 条评论

Maths Ed 的头像
Maths Ed20 天前

The most dangerous problem in mathematics. Was it a Cold War invention of the Soviets to slow the progress of mathematics in the West?! For the story of the Collatz conjecture:

SouthTeacher🍓🤔💪🏻🌈 的头像
SouthTeacher🍓🤔💪🏻🌈20 天前

In French we call it Syracuse conjecture

Heather Self 的头像
Heather Self20 天前

A friend and I tried to solve this as undergraduates in 1980, with a basic calculator to plot the number of steps required for each starting integer. We failed. I wrote to Roger Penrose who kindly supplied some insights using statistics and (I think) converging series.

Rage4Me 的头像
Rage4Me20 天前

@grok If I were to make an attempt at solving this I would need to know why the founding rules were being applied. If the number is odd, multiply it by 3 and add 1. If the number is even, divide it by 2. What in nature or physics requires these rules to be applied?

RAUL ENRIQUE ESCOBAR CARO 的头像
RAUL ENRIQUE ESCOBAR CARO20 天前

No funciona para todos los positivos. Ese cuantificador universal está mal.

Daisy Jones 的头像
Daisy Jones20 天前

Express every odd integer (uniquely) as an odd multiple of a power of 2 plus 1. Plot the multiple on the x axis, plot the exponent on the y axis. Then plot only the odd terms of a collatz sequence. Clear diagonals make it easy.

Bryan W. Lepore | anti alchemy 的头像
Bryan W. Lepore | anti alchemy20 天前

Is that the right question? IOW What about the question of reaching a cycle? Not that I know!

Jay Villas 的头像
Jay Villas20 天前

A counter example would imply an infinite series of counterexamples that monotonically increase, right?

zaruya 的头像
zaruya20 天前

Así como existe El Cuerno de Gabriel, esta ☝️son sus alas. 😁

相关视频

Self Attention by hand ✍️ ~ 9 steps walkthrough below Self-attention is what enables LLMs to understand context. How does it work? So I drew and calculated one entirely by hand. Goal: turn four 6D features into four 3D attention weighted features, filling in every cell yourself. = 1. Given = Four feature vectors, six dimensions each, one per position. = 2. Query, key, value = Let us multiply the features by WQ, WK and WV. Queries, keys and values all come out of the same four features, and that is what the word "self" is doing in self-attention. = 3. Prepare for MatMul = We copy the queries across the top and the transposed keys down the side. Lining the two up is half the work. = 4. MatMul = Let us multiply K transpose by Q. Every cell is the dot product of one key with one query, which we use as a matching score. That works because the dot product is the numerator of cosine similarity: it is how alike two vectors are, before anyone divides by their lengths. = 5. Scale = We divide by the square root of dk, the dimension of a key vector, here 3. Without it the scores grow with the dimension and a 64-wide head would swamp the softmax. To keep the page doable in pen, the drawing approximates dividing by root 3 with halving. = 6. e to the power = Let us raise e to the power of each score. This is the first half of softmax, and the drawing uses 3 in place of e, which is close enough to do in your head. = 7. Sum = We add up each column: 16, 6, 7 and 12. = 8. Normalize = Let us divide every cell by its column sum. That gives the attention weight matrix in yellow, and each of its four columns is now a probability distribution over the four positions. The decimals are nudged as they are rounded, so every column still sums to exactly 1. = 9. MatMul = We multiply the value vectors by those weights. Each output is a blend of all four values, mixed in the proportion the attention matrix just decided, and it goes to the position-wise feed forward network in the next layer: the FFN box at the bottom of the page. The outputs: Attention weights (A), by column = [.2, .6, 0, .2], [.2, .4, .2, .2], [.4, .2, 0, .4], [.1, .7, .1, .1] Attention weighted features (Z) = [8, 2, 6], [8, 4, 4], [16, 4, 2], [4, 2, 7] The takeaway: attention is a weighted average, and everything before step 9 exists to decide the weights. Compare every position with every other, turn the scores into one distribution per position, then blend. 💾 Save this post!

Tom Yeh

27,383 次观看 • 3 个月前

Backpropagation by hand ✍️ ~ 11 steps walkthrough below Backpropagation is the algorithm that actually trains a neural network, and it is where most people stop following along. It is not calculus you cannot do. It is matrix multiplication, working backward, one layer at a time. So I drew and calculated one entirely by hand. Goal: push the loss gradient back through a 3-layer network and land on a new value for every weight and bias. = 1. Given = A 3-layer perceptron, an input X, predictions Ypred = [0.5, 0.5, 0], and the truth Ytarget = [0, 1, 0]. = 2. Backprop gradient cells = Let us draw empty cells for every gradient we are about to compute. The shape of the answer comes first. = 3. Layer 3 softmax = We get dL/dz3 straight from Ypred minus Ytarget = [0.5, -0.5, 0]. No chain rule needed, and that shortcut is the whole reason softmax and cross-entropy are paired. = 4. Layer 3 weights and biases = Let us multiply dL/dz3 by [a2 | 1]. One multiplication gives the gradient for W3 and b3 together. = 5. Layer 2 activations = We multiply dL/dz3 by W3 to get dL/da2. The gradient moves back across a layer the same way the signal moved forward. = 6. Layer 2 ReLU = Let us pass it through the gate: keep the gradient where the activation was positive, zero it everywhere else. = 7. Layer 2 weights and biases = We multiply dL/dz2 by [a1 | 1]. The same figure as step 4, one layer up. = 8. Layer 1 activations = Let us multiply dL/dz2 by W2. = 9. Layer 1 ReLU = We apply the same gate again, now on a1. = 10. Layer 1 weights and biases = Let us multiply dL/dz1 by [x | 1], and every weight in the network now has a gradient. = 11. Update = We subtract, and the network has learned. In practice a learning rate scales this step. The gradients: dL/dz3 = [0.5, -0.5, 0] dL/da1 = [1, -2, 2, -1] dL/dz1 = [0, -2, 2, -1] The takeaway: matrix multiplication is all you need. Just like the forward pass, backpropagation is matrix multiplications end to end. You can do every one by hand, slowly and imperfectly, which is exactly why a GPU's ability to do them fast mattered so much to deep learning. 💾 Save this post!

Tom Yeh

964,224 次观看 • 3 个月前

Generative Adversarial Network (GAN) by hand ✍️ ~ 9 steps walkthrough below The Gen in GenAI came from this landmark paper by Ian Goodfellow et al., 12 years ago. The paper showed that a neural network can not only classify but also turn upside down to generate realistic looking images. The secret? We pit two of them against each other: a Generator turns noise into fake data, and a Discriminator learns to tell fake from real, pushing the Generator to keep doing better. One runs upside down, the other right way up. I drew and calculated one entirely by hand. Goal: generate realistic 4D data out of 2D noise, filling in every cell yourself. = 1. Given = Four noise vectors in 2D, and four real data vectors in 4D. = 2. Generator, first layer = Let us multiply the noise by weights and biases to get new features. = 3. ReLU = We apply the activation, and -1 and -2 are crossed out and set to 0. = 4. Generator, second layer = Let us multiply again. ReLU applies here too, but every value is already positive, so nothing changes. What comes out is the fake data F, made by a two-layer generator out of nothing but noise. = 5. Discriminator, first layer = We feed it both, the four fakes and the four real vectors, through the same weights. It never learns which is which from the layout, only from the numbers. = 6. Discriminator, second layer = Let us reduce each data vector to a single feature Z. Eight vectors in, eight numbers out. = 7. Sigmoid = We turn each Z into a probability Y. A 1 means the discriminator is certain the data is real, a 0 means certain it is fake. = 8. Training the Discriminator = Let us take the gradients as Y minus YD, where YD is what the discriminator should have said: 0 for the four fakes, 1 for the four real. Why so simple? Because pairing sigmoid with binary cross entropy loss makes the math collapse to exactly this subtraction. Its loss uses both halves of the page. = 9. Training the Generator = We do it again, as Y minus YG, and YG is [1, 1, 1, 1]: the generator wants the discriminator to call every fake real. Same predictions, different target, opposite goal. Its loss uses only the fakes. The outputs: Fake data F = [1, 2, 3, 1], [1, 1, 2, 1], [2, 2, 4, 2], [1, 0, 1, 1] Predictions on fakes = [.7, .5, .9, .3] Predictions on real = [.7, .9, .9, 1] Discriminator gradients = [.7, .5, .9, .3] and [-.3, -.1, -.1, 0] Generator gradients = [-.3, -.5, -.1, -.7] The takeaway: the adversarial part is one subtraction done twice. The same eight predictions, scored against two opposite targets, send one set of gradients back through the blue weights and another back through the green ones. 💾 Save this post!

Tom Yeh

16,752 次观看 • 3 个月前

The Fibonacci sequence has a hidden rhythm. Take any number say, 7. Write out the Fibonacci numbers (0, 1, 1, 2, 3, 5, 8...) and look at the remainders when you divide by 7. You get: 0, 1, 1, 2, 3, 5, 1, 6... Keep going, and the pattern eventually repeats. The length of that repeating cycle is called the Pisano period. For most numbers, this cycle length is pretty unpredictable. But we proved something precise. If you ask "when does the cycle length equal exactly twice the number?" The answer is an infinite tower. 12, 60, 300, 1500, 7500...just keep multiplying by 5. But if you change the question slightly "when does the cycle length equal twice the square root?" there is exactly ONE answer. 144. Same skeleton. Two completely different outcomes. The culprit? The prime number 5 ,which has a weird superpower in Fibonacci land. it's the only prime that divides its own cycle length. In one equation it fits perfectly and builds an infinite tower. In the other, it overflows and gets kicked out leaving 144 all alone. Fun fact. 144 is also the only perfect square (besides 0 and 1) that appears anywhere in the entire Fibonacci sequence. Two totally different math questions from two totally different fields converging on the exact same number. The animation spins through the golden spiral, forges the 12-skeleton, ignites the self-supplying 5, then splits into two fates, 144 on the left, the infinite tower on the right. The Pisano Doubling Equations π(m) = 2m and π(m2 ) = 2m: One Skeleton, Two Fates The Prime Lattice Coherence Framework: A Unified Master Document

CTFTHEORY

37,829 次观看 • 2 个月前