This one weird trick will get you infinite gold - Dan Finkel
Vložit
- čas přidán 27. 03. 2023
- Practice more problem-solving at brilliant.org/TedEd
--
A few years ago, the king decided your life would be forfeit unless you tripled the gold coins in his treasury. Fortunately, a strange little man appeared and magically performed the feat. Unfortunately, you promised him your first-born child in exchange for his help - and today he’s come to collect. Can you figure out how to outsmart the man and keep your baby? Dan Finkel shows how.
Lesson by Dan Finkel, directed by Gavin Edwards, Movult.
This video made possible in collaboration with Brilliant
Learn more about how TED-Ed partnerships work: bit.ly/TEDEdPartners
Support Our Non-Profit Mission
----------------------------------------------
Support us on Patreon: bit.ly/TEDEdPatreon
Check out our merch: bit.ly/TEDEDShop
----------------------------------------------
Connect With Us
----------------------------------------------
Sign up for our newsletter: bit.ly/TEDEdNewsletter
Follow us on Facebook: bit.ly/TEDEdFacebook
Find us on Twitter: bit.ly/TEDEdTwitter
Peep us on Instagram: bit.ly/TEDEdInstagram
----------------------------------------------
Keep Learning
----------------------------------------------
View full lesson: ed.ted.com/lessons/this-one-w...
Dig deeper with additional resources: ed.ted.com/lessons/this-one-w...
Animator's website: www.movult.com
Music: www.workplaywork.com
Educator's website: mathforlove.com
----------------------------------------------
Thank you so much to our patrons for your support! Without you this video would not be possible! Jeremy Shimanek, Mark Byers, Avinash Amarnath, Xuebicoco, Rayo, Po Foon Kwong, Boffin, Jesse Jurman, Scott Markley, Elija Peterson, Ovidiu Mrd, paul g mohney, Steven Razey, Nathan Giusti, Helen Lee, Anthony Benedict, Karthik Balsubramanian, Annastasshia Ames, Amy Lopez, Vinh-Thuy Nguyen, Liz Candee, Ugur Doga Sezgin, Karmi Nguyen, John C. Vesey, Yelena Baykova, Nick Johnson, Carlos H. Costa, Jennifer Kurkoski, Ryan B Harvey, Akinola Emmanuel, Jose Arcadio Valdes Franco, Sebastiaan Vleugels, Karl Laius, JY Kang, Abhishek Goel, Heidi Stolt, Nicole Sund, Karlee Finch, Mario Mejia, Denise A Pitts, Doug Henry, Keven Webb, Mihai Sandu, Deepak Iyer, Javid Gozalov, Kyanta Yap, Rebecca Reineke, William Biersdorf, Patricia Alves Panagides and Yvette Mocete.
Never thought I'd see TED-ed have a video titled like a Buzzfeed article
True that 😂
I literally said this must be click bait cuz ain't no way the powers that be want us to have access to free gold
here before this blows up
Ikr
😂
Clicked for the curiosity of gold. But I got trapped with a math problem. Touche.
Same
sameeee i thought it would be about alchemy ahahah
same😀
Me too, 😅
Me signing up for college
For once I have thought too hard in an attempt to solve a ted-ed puzzle instead of throwing up my hands in confusion. Thank you VSauce for teaching me about Banarch-Tarski
Same here
Meanwhile i just went to shooting them
@@metal_pipe9764 dawg waht
@@djdog120 they can't steal if they're dead
It'll probably be easier if he asked what colour were his eyes
"Also, it's on the back of your shirt." 💀
bro was flabbergasted 💀
😂😂 made me laugh
🤣🤣🤣
@@ashwindongre5918 I know! That was funny!
I really appreciate the time effort the animator(s) put into this. As someone who animates casually for fun this is really impressive.
It makes sense since it's their job. But of course they are really talented!
fr
If only all math tests could be like this; I'd be way more invested if they were like this
Still didnt know how to solve it though.
@@carealoo744 me too
You would get 5% enjoying them and the rest getting frustrated and depressed.
Ikr! The answer should be on the back of the paper! >:(
Oh that's waht u meant-
Yes, if only all math tests had the teacher wearing all the answers on their clothing, so you just need to figure out where to plug everything in
1:11 that's the first time EVER I heared the TED narrator change his tone in any way.
a casual one at 4:14 as well
watch a history on trial video you'll see him in three different accents at once
For anyone wondering, I found a closed form function for the bag that you could graph on a calculator: f(x) = 2(x-2*3^floor(log_3(x)))+|x-2*3^floor(log_3(x))|+3^(floor(log_3(x))+1). It could probably simplified, but this works for all positive x where f(f(x)) = 3x.
how did you do this
This guy maths
Disappointed that there's not a nice way to put it but:
When N can be written as 3^x+y where y is less than or equal to 3^x, N transforms to 2*3^x+y
Otherwise N transforms to 3y
So any N such that N= 3^x+y becomes 2*3^x+y = 3^x+(3^x+y) becomes 3*(3^x+y) = 3N
I got as far as doing all the steps indicated in the solution except extending the table far enough. I tried to force the general solution out of my brain thinking it had to be something simple and probably do with divisibility by three and modulus. I gave up 15 mins later and am happy now to notice that the proper general form isn't pretty nor totally trivial.
Ulu
The way she just DROPPED HER BABY
Yeah 😂
0:59 here
Yeet the baby!
"Were you dropped in the head as a baby"
Yes
HAHAHAHAHAHAHHAHAHAHAHAHAHAHHAH 🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣
I hope whoever animated this get jobs at big studios, because I found it so pleasing to watch.
yes! it was a mixture of a fairy tale and riddles I used to do when I was a child, it took me back in time, we live for this kind of moments 🤩
btu if they get jobs at big studios, we won't have as much ted-ed animations as we have today.....
It’s like Netflix level animation, which isn’t that good. I mean the animation is alright, not my favorite at all
1:42 two ez that's twenty to
All I could find was Movult Website
Trying to figure out the general formula, and finding out the answer is "you have a set number, just brute force it until you get to it" is incredibly dissapointing, but, incredibly on theme for riddles, where misdirection and unusual ways of thinking are common tools. Cool.
I actually like this more than just "write the problem as equations and solve with algebra". My issue with most of these riddles is they're just math problems with a thin aesthetic veneer of a puzzle. This one actually requires you to use more basic logic than just "use what you learned in 5th grade" or whatever.
Exactly ! I am in depression now..haha
There has to be a general formula. Just because it's not easily described in purely mathematical form doesn't mean it doesn't exist.
Just like in Fibonacci where "each number is the sum of the previous two numbers" doesn't let you create a formula going from one number to the next, nor can you easily find the Nth number without calculating all the ones before it.
If you write down everything in the form A -> B, you just get an index on the left where you can say "the Ath magic bag number is B", and so this is just a series of numbers like any other, just one with a somewhat complicated ruleset. The only remaining question is whether it's infinite or not.
@@Gamesaucer I'm not sure that this completely makes sense. It is entirely possible to create a sequence like this that has no "general" formula, and saying that it might not be infinite (depending on what you mean) contradicts the existence of a general formula. This puzzle was solved using the constraints of a finite band of possibilities. I actually don't think that there is a generalizable f(x) for all x formula to this solution. If the strange man had made this request using, say, 20 coins, I don't think that there is a singular logical answer that can be derived from this premise alone. The constraint that all results must be whole numbers (coins) means that any sort of consistent linear or exponential solution can't be generalized for all numbers.
It would require either: a) specific rules for specific sets of inputs, and those rules would necessarily require a number of conditions on the order of the number of inputs (i.e. countably infinite), or b) an initial scheme followed by a "simpler" formula for the rest of the inputs. (a) is not a "general" solution, and both (a) and (b) would not be unique, you would be able to come up with multiple valid ways of constructing it (assuming (b) is even possible, which I'm pretty sure it isn't having played around with the algebra myself).
@@Gamesaucer You might find "Binet's Formula" interesting.
New lore for the riddleverse? Yay. Clearly she figured it out because he has green eyes which means if he saw two frogs and one said ozo the fuddly must have used the tri source to make the bag for him.
its always quite unfortunate when your crew of five pirates need to take turns crossing a bridge with only a single lamp to get fuel for your aircraft :(
wow 5 riddles in one sentence
Wha?
@@uncreative127 6 riddles wow
Also, it was all on the his nametag
Interesting facts about this puzzle
1) There is an OEIS entry where a(n) is the dollar amount that comes out when used once on n
2) In 1992, British Math Olympiad tasked students to find the number of coins that came out when 1992 coins were put in. This was Q5.
3) There is a really elegant (IMO) way to get the answer for any n:
Convert n to base-3, (ternary). It either starts with 1 or 2.
If it started with 1, then the answer is the same number but the lead digit is 2 instead. Example, 13 is 111 in base 3, so the answer is 211 in base 3 which is 22 in base 10
If it started with 2, change the lead digit to 1 and add a zero at the end.
So 1992, which is 2201210 in base 3 becomes 12012100 which is 3789 in base 10(and is the solution to BMO Q5)
Proving this is pretty fun, but I'm not good at articulating it as a YT Comment, so i leave that as a challenge to you!
I proved the function f(x)
Let n=floor(log_3_(x))
If x
I just worked through this too and came up with the same piecewise function f(x) = (x >= 2n) ? 3x - 3n : x +n where n is the largest power of three that is less than or equal to x. It seemed strange at first but after reading this and understanding those operations in base three it makes so much more sense now. Thanks for posting.
Another way to formulate (3):
Let k be the greatest power of 3 that's less than n.
if n < 2k
then f(n) = n + k
else f(n) = 3(n - k)
Just fantastic information - thanks for posting this.
The OEIS entry is A003605.
The Q5 on the BMO was:
"Let f be a function mapping the positive integers into positive integers.
Suppose that f(n + 1) > f(n) and f(f(n)) = 3n for all positive integers n. Determine f(1992)."
I was hoping there is an elegant solution that uses ternary, alike to the elegant solution to Josephus problem, that uses binary.
I’m a huge fan of the art style of this video! Please have this animation team back!
Same. I'm glad I'm not the only one who enjoyed the art style and the animation; very cartoony but also very unique and fun (and other descriptions I can't figure out)
*Me who clicked hoping to make infinite gold:*
I've been tricked, I've been backstabbed and I've been quite possibly, bamboozled. My disappointment is immeasurable, and my day is ruined. 💀
You know if u actually looked at the thumbnail you know it was a riddle
you guys should sell pedagogic courses to the schools of the world, because if we were introduced to science and math like this, so many more people would love learning
Won't be enough for me
But they do, it's the video's sponsor
Extending the video solution to larger numbers reveals what might be an infinite stack of interleaved sequences, that in total fill the space of all positive integers.
Each sequence begins with two values.
The pairs of values for starting the first eleven sequences are: (0 0) (1 2) (4 7) (5 8) (10 19) (11 20) (13 22) (14 23) (16 25) (17 26) (28 55) (29 56).
To generate the next terms in each sequence you take the last but one number and multiply by three. So for example the sequence starting (4 7) continues as 4, 7, 12, 21, 36, 63, 108, 189, 324 ....
The puzzle as posed, for 13 coins, is the start of the seventh sequence 13, 22, 39, 66 etc.
This all feels rather Fibonacci.
Another presentation of the results is to list in sequence the numbers of coins that come out of the magic bag if you put into the bag 0, 1, 2, 3, 4, etc coins.
That sequence starts 0 2 3 6 7 8 9 12 15 ... and (at least) the first 28 terms match "The On-line Encyclopedia Of Integer Sequences" - sequence number A003605.
In the Encyclopedia it says "Unique monotonic sequence of nonnegative integers satisfying a(a(n)) = 3n." -- Which is exactly what this is. I also generated the sequence, and found a web page displaying the first 10,000 terms of the sequence, such a curio.
And a new sequence is generated by taking a number that doesn't exist in any existing sequence and adding nearest lower power of 3.
For e.g. 3^0 for less than 3, 3^1 for less than 9 and so on.
For those who are wondering how to calculate the function without using computation table, here's the function looks like:
Lets say k is the largest integer that satisfy 3^k
For completion, one should also show that there is a unique function satisfying f(f(x))=3x. I do not think this is clear.
can you explain the thought process like how did you come up with this
@@lennyarms4476 I used a program to generate the computation for the first 1000 value, and then I notice some pattern in f(x)-x, there's a lot of 3^k term showing up.
@@willnewman9783 It's easy to compute f(x), for x = 3^k or 2 * 3^k, for example:
f(1) = 2
f(2) = 3
f(3) = 6
f(6) = 9
f(9) = 18
f(18) = 27
f(27) = 54
f(54) = 81
f(81) = 162
And now we want to fill in the gap for the value that hasn't be computed, lets see at the gap between f(3^k) to f(2 * 3^k), for example f(9) to f(18), we can uniquely find value for f(10) to f(17) since we know that f(x) must be increasing and produce integer value (for x is positive integer).
So f(10) = 19, f(11) = 20, ..., f(17) = 26.
Since know we have a function that result in f(x) = 19 to 26, we know can also compute f(x), with x = 19 to 26, since f(f(x)) = 3x.
So f(19) = 30, f(20) = 33, ..., f(26) = 51.
With this it's can be easily seen that the function f(f(x))=3x can be computed uniquely (with the rule that it's must be increasing and produce integer value).
@@ricofilberto404 Why is the solution not 26? This would also fit the riddle as far as I can tell if the progression is:
Y goes in and the magic adds Y, then 2 Y comes out, when 2Y goes back in, the magic adds Y again, and 3Y comes out...done. As far as I can tell, the riddle only stipulates the rule for two uses of the magic, and not a continuing progression, so this would work for all cases and satisfy that more comes out when more is put it. What am I missing?
The tone of this one was soo completely different from the usual riddles! So many quick jokes and character breaks, it was very funny
The summary pause screen lacks the fact that you have to put all the coins in the bag in order to make the "always tripled" rule work. With that left out, "using it twice" is still unclear if in the second round you put all the coins or only the initial ones (in which case is trivial since it would be x2)
Exactly
Agreed that I had to rewatch the part before the summary to confirm this.
Ok yeah, I was confused because I got stuck thinking I’m just putting the initial amount back in, which then simply lets you double, then triple that initial number, so I settled on 26
This was the most creative way of presenting Banach-Tarsky.
Thought it was a hack, then thought it was a fairytale animation. It turned out to be functions chasing me to the internet 😂
I love this puzzle, it also reminds me of one thing I've always questioned about the what number comes next riddles. At the end of the day you can always make more complicated formulas that will go through all those points. What's more as in this case technically there doesn't have to be a formula at all, a function can simply be looked up from a table.
Implicitly they're asking for the simplest continuous function in most cases. But they should say it explicitly to teach the kids what's going on.
Bruh, can't y'all just put the baby in the bag and get like, 2 or 3 babies? Then the Tarski guy can take the other two away, and everything would be fine!z
im not sure I got this right are you speaking bunny dialect?
That probably wouldn't be ethical to the babies though.
The bad part is that you would have ended up with one more baby too! 😂
@@nawel991 ah yes sry it's ohio dialect so i was saying just duping the baby would work if the guy wants it
@@luxtempestas you'd have to use the magic twice to do that, the 1 coin was turned into 3 after the magic was used twice.
I'm getting Infinite 1-Ups from jumping on a Koopa Shell vibes from this 😂
3D world was amazing
@@NOTZeroBlank fr
4:19 my man got drafted for squid game 💀
0:57 did she drop the baby?
Yeah lol
Nah, you crazy.
The explanation went above my head lol.
I love ted-ed riddles... never stop
Agreed. What’s your favorite
Agreed
I love TED-ed riddle series, I am not able to solve these but I do always like watching them. It fascinates me😂
My answer was 26, and also seems to satisfy the wording of the riddle. 13-26-39, and as the third time is always triple, and more coins yield more out, then 1-2-3, 2-4-6, etc still hold true to the wording of the riddle.
same
does 2 become 3 or does 2 become 4?
Your solution doesn't follow the consistent rule stipulation. If 1-2-3 works then 2-4-6 does not, because for the first one you put in 2 and got 3 and for the second you got 4.
@@MCTrapsandTutorials 3 is triple of 1, 4 is double of 2. It's consistent.
@@diedoktor well we didnt understand that part had to be considered
Banarch-Tarski: Has a bag that gives him infinite gold.
Also Banarch-Tarski: Can't afford to forgive your debt.
He just wants to make people suffer.
I thought I had a different solution, but it turned out to be wrong. My idea was to multiply odd numbers by 2 and multiply even numbers by 1.5, and in two uses that does triple most numbers you put into it, but it turns out that it fails when you start with a multiple of four.
Got the same “solution”.
How does it fail again?
@@christiannielsen725 because two uses only triples most numbers, but it is supposed to triple any number you start with. Starting with four, or any multiple of four doesn't work the way it's supposed to.
@@Pyrogecko08 yeah ok, ty
@Pyrogecko08 mate, I thought the same and worked around it.
Let's say we are currently having x gold coins.
1) If x is odd, we double the coins.
2) If x is divisible by 2 but not 4, multiply x by 3/2.
Following these 2 steps, we will have almost all numbers in its distinct loop. Note that if number x already lies in a loop, next number is found by tripling the number at previous step of the loop.
Initially, we might have left a few numbers that are divisible by 4. Form loops of 2 with such nearby numbers and continue the loop by tripling the previous element.
Doing this, we are able to uniquely map each element in its distinct loop such that the number is always tripled 2 steps ahead.
Loops for first few numbers are,
1 - 2 - 3 - 6 - 9 - 18 - 27 -...
4 - 8 - 12 - 24 -...
5 - 10 - 15 - 30 -...
7 - 14 - 21 -...
11 - 22 - 33 -...
13 - 26 - 39 -...
17 - 34 - 51 -...
19 - 38 - 57 -...
This logic too works. So, it makes me wonder, are there infinitely many such possible functions on whole numbers which when applied twice, triples a number.
So the next number looped with 13 is 26
AM I WRONG ANYWHERE..?!
The issue with this strategy is 7->14 but 8->12 which is less. This is due to using two different multipliers, as two adjacent numbers will get mapped non-monotonically (fail to satisfy the condition that the more you put in, the more you get out).
How dare they trick me to doing math at 6:00 in the morning
So if I understand correctly, this is a function defined by induction, meaning f(x) is defined in terms of f(y) where y
I can't believe that this is the first puzzle I haven't failed!
Congratulations
Mind explaining me how it works? Because I can for the life of me not figure it out, like it feels like the explanation makes even less sense
@@Cora.T the explanation is really clear tho.. you don't have to use any mathematical formula, its just pure logic.. you simply just start from 1-2-3 and keep on doing that until you got 13
@@andrejors9501 how though?? Why is it 3,6,9 and not 3,4,9? Or 3,5,9?
@@Cora.T
1 goes to 2, which goes to 3.
2 goes to X, which goes to 6. Based on the first sentence, X equals 3. Because of this, 3 goes to 6, and since the outcome is triple, 3 goes to 6 goes to 9.
The same logic can apply to the rest.
what's even more exciting about this function is that it is describes it's value for every integer, as big as we want, with those few simple rules.
also, it's easy to notice it is altering from jumping 1 step at a time to 3 steps at a time in increasing lengths.
One can explain this last phenomenon geometrically by looking at it between the graphs of f(x)=x and g(x)=3x. When drawing a line from the x axis at one point (n,0) to it's value obtained by the said function to (n,h(n)) and then taking a perpendicular to (h(n),h(n)) you can always close continue it by taking it to (h(n),h(h(n)) and the great surprise is that the alternating behaviour of the function leads it to return back to (n,3n)=(h(h(n))/3,h(h(n)) by going back horizontally to g(x)=3x!
this is much better explained visually so I highly encourage anyone who wants to understand how this function behaves
what function are you referring to when you say h?
yeah, i was surprised there's only one function f: N -> N that satisfies those rules
@@sussykanyeballs176f and g refer to 2 simpler related functions, and h refers to the function from the video
h(n) = #coins after using the magic bag on n coins (once)
@@sussykanyeballs176 it’s logarithmic. If the number of starting coins (n) is between 3 and 8 you add somewhere between 3 and 7 coins.
If n is between 9 and 26 you add somewhere between 9 and 25 coins.
The number you add is based on how close to the next power of 3 you are. The power of 3 becomes 1 at n = 3, then it becomes 2 at n = 9, 3 at n = 27… it’s basically floor(log3(n)) where floor means round down to the nearest whole number.
If n divided by the current power of 3 is 2 or less you just add that power.
n = 6
power of 3 is 1
6/3^1 = 2
Just add 3
6 + 3 = 9
n = 13
power of 3 is 2
13/3^2 < 2
Just add 9
13 + 9 = 22
If n divided by the current power of 3 is greater than 2, you have to add 2 times the difference
n = 25
power of 3 is 2
25/3^2 > 2
Add 9 and 2*(25-18)
25 + 23 = 48
You have to add this number because as n passes a power of 3 you add that power until n becomes double the power of 3.
So 3-6, 9-18, 27-54, 81-162…
Whenever you have one of the above numbers you add a power of 3.
So 3, 9, 27, 81…
You add this number whether you are using the starting number of coins or you are doing the second step.
Therefor, for the other numbers: 7-8, 19-26, 55-80, 163-242
You have to add the power and 2 for each number you are past the double of the power
Hence 13 is +9 but 25 is + 23.
13 +9
14 +9
15 +9
16 +9
17 +9
18 +9 (note: 18 = 9*2)
19 +9 +2
20 +9 +4
21 +9 +6
22 +9 +8
23 +9 +10
24 +9 +12
25 +9 +14
26 +9 +16
27 +27 (the next power of 3)
Looking at the above pattern also shows that 27 is +9 +18 which makes sense following +9 +16 just above it!
Ain’t math cool!
It's honestly really satisfying having our character have a line in 1 of these let alone 3-5
I can't be the only one who realized the riddle's backstory references Rumpelstiltkin, even all the way up to the lady promising the little man his firstborn and the little man riddling her to guess his name.
proud to say i noticed this too:D
it's only one of my the most famous fairy tales in the world, of course you aren't the only one who noticed.
I hope... or maybe I'm just one of very few people who read Grimm's Fairy Tales...
Must admit I didn't remember the bit about the baby
I only watch the video show
I will try to get Grimm Fairy Tales though to read @@irishmanfromengland25
I did this one! I've learned after watching a lot of these, that most can be solved by making a sudoku-esque table and using the rules they give you to solve it
Haven’t watched the solution, but if you put in n coins, one possible (but not necessarily the only) rule could be that you get back (7n-cos(πn))/4 coins. n=13 evaluates to 26.
Edit: I did not see that the function must be strictly increasing.
I love the animation! It looks so refined and animated compared to the old style 😀
The sequence f(x) where f(f(x)) = 3x, can also be described as the list of numbers who's base 3 representations begin with a 2 or end in a 0 (starting from 2). Proving the equivalency is left as an exercise to the reader.
I watched all TED-Ed riddles and loved them :)
I love the art style in this one! The animation is stellar
.... But... 13 times 2 is 26....
x is the starting value of the coins,
y is the multiplier used in every action
we start with the base X and multiply it with Y (First action)
afterwards, we multiply it again with the same multiplier as in First action (Second action)
-> with that said we can create the formula y^2 * x = 3x
with easy access to y we can solve that the multiplier is 1.732, which answers the question and saves the baby.
Doesn't work.
6 * 1.732 = 10.392.
10 * 1.732 = 17.32
Your formula says that 6 * 1.732^2 should equal 18, therefore putting 10 coins in the big should get you 18 coins back. However, your formula also says that 10 coins put in the bag also returns 17 coins, which contradicts the first rule saying the bag works consistently.
1:44 everyone else: what a good riddle.
Me: bros name tag went to the backrooms
I love that his name is Banach-Tarsky, after the mathematical paradox that theoretically allows you to split a sphere into 2 spheres which are perfectly identical to the original.
At first I thought it was some myth story. But it was my favorite riddle video again. Thanks!
1: Read the back of the little man's shirt.
2: Confirm you have green eyes
3: Ask the guard if you can leave
4: Steal the secret sauce recipe
5: Lick the male frog
6: Pick the Churrozard disk
7: Cheat death
8: Get your guitar from the drumset box
9: drop the worthless egg from story 34
10: Separate the Fire dragons from the Ice dragons
11: Write down the jousting tournament scores
12: Ask "If I had a burrito for lunch, would you say Ozo"?
13: Light all of the giant's birthday candles
14: Keep the Keystone
15: Put in the charged batteries in the giant iron
16: Cut the werewolf antidote into five squares
17: Make the Professor and the Janitor cross the bridge together
18: Program the multiverse teleportation robot
19: Stop going on youtube because you watch WAY too much Ted-Ed riddles
20: Have a nice day!
I love how casually the whole sold my baby for my life thing was said. I really had to get that over my head before I continued to the riddle
Have you never heard of the German fairy tale Rumpilstilskin :o?
“Sometimes an enigmatic man is going to pose you a riddle, that’s life”
Who do you think I am Ted-Ed, Professor Layton?
One of the few ones I managed to solve. At first I tried to figure out the logic behind the function but couldn't so I just ended up doing it exactly the same way showed in the video. Genuinely can't believe they did it the same way. Never felt smarter 🙈🙈🙈😍😍😍
i think they already patched it, doesn't work
I loved this riddle here! I want more of this characther.
I enjoy these riddle videos for not just the riddles, but also the scenarios that come with them. My guess for this riddle was 26 coins, well I was close.
Unfortunately, that doesn’t work because the bag has no way to “know” you started with 13 coins before the doubled magic (rather than 26 being your starting point)
You want 13 -> 26 to yield 39, but if you apply the same reasoning when starting with 26, then you would be wanting to triple it via 26 -> 52 -> 78
This is inconsistent, since 26 cannot yield both 39 and 52 at the same time
The secret to the bag is that there's a mini universe inside of it and he's giving the little people in there loans at a 200% interest rate
actually root of 3 does work, if you assume its around 1.7, it comes out to 22.1 coins, which rounds up to 22.
Why isn’t the answer f(x) = { 3/2x for x even, 2x for x odd } where x is the number of coins put in the bag? In the even case, x (even) -> 3/2x (odd) -> 3x. In the odd case, x (odd) -> 2x (even) -> 3x. This is a strictly increasing function that will always triple after 2 uses. The answer according to this would be 26.
Exactly my thoughts, and because of such, I have become confused as to why the answer was 22 instead of 26
As a arithmetic series
With those rules you also get 4 -> 6 -> 9, which doesn't triple the initial number@@syphon5899
Okay wow, I got that wrong. I thought it was 26, since if it triples at 2, maybe it only double at 1. But then they brought out the 1-2-3 into 2-3-6, so I started writing that out and went 'oh, okay maybe it's a 'if,then' computer function, where if your starting number is odd, you add itself, but if it's even, you add half of itself. But that doesn't work for anything not in the 3's family.
tldr, I would definitely have needed the 3 guesses....or knowing that this guy keeps using his answer keys as his clothing fabric.
Ya, I thought you would multiply by root 3 until the no bits rule came up, then I tried to associate it to sets since in those relations, you don't need to know the function itself and this is how they get the answer, but my mind drew a blank and went: 26, even though you initially disproved it.
I had a similar idea, I thought that if you put in some gold then you get that gold doubled but if you put that same gold in again you only get that initial amount doubled so in this example it would go 13, 26, 39, 52 and so on. But doesn't make much sense so yeah
I got the same idea but then realized any number divisible by 4 wouldnt work lol
Guys, I thought of the same idea and worked around it.
Let's say we are currently having x gold coins.
1) If x is odd, we double the coins.
2) If x is divisible by 2 but not 4, multiply x by 3/2.
Following these 2 steps, we will have almost all numbers in its distinct loop. Note that if number x already lies in a loop, next number is found by tripling the number at previous step of the loop.
Initially, we might have left a few numbers that are divisible by 4. Form loops of 2 with such nearby numbers and continue the loop by tripling the previous element.
Doing this, we are able to uniquely map each element in its distinct loop such that the number is always tripled 2 steps ahead.
Loops for first few numbers are,
1 - 2 - 3 - 6 - 9 - 18 - 27 -...
4 - 8 - 12 - 24 -...
5 - 10 - 15 - 30 -...
7 - 14 - 21 -...
11 - 22 - 33 -...
13 - 26 - 39 -...
17 - 34 - 51 -...
19 - 38 - 57 -...
This logic too works. So, it makes me wonder, are there infinitely many such possible functions on whole numbers which when applied twice, triples a number.
So the next number looped with 13 is 26
AM I WRONG ANYWHERE..?!
@dwaraganathanrengasamy6169 I came up with the exact same logic as you. Weird to find it this deep in the comments. It works for all cases as far as I can tell.
I'm like half sure this riddle has slight nods to Rumpelstiltskin. Could just be me being a literature nerd though.
Pretty sure it’s the inspiration. There’s a lot of obvious inspiration in the riddleverse
it definitely is
not even inspiration, it’s literally a rendition of it
I thought of Rumplestiltskin too. Maybe they're related 😉
only a literature nerd would know the very obscure tale of ... Rumpelstiltskin
I was expecting a little more mathy of an answer.
…so here it is:
First find log3 of the number of starting coins, then round down (0 for less than 3, 1 for 3-8, 2 for 9-26, 3 for 27-80…)Then raise 3 to the power of that result.
Then if the number of starting coins is equal to or less than double that number simply add that number.
If the number of coins is greater than the number add 2 times the difference.
Starting coins are 19; log3(19) = 2; 3^2 = 9; 19 < 9*2 is false; add 9 then add 2*(19-(9*2)) - or 2.
Starting coins are 13; log3(13) = 2; 3^2 = 9; 13 > 9*2 is false; add just 9.
"Also, it was written on the back of your shirt," killed me. This is the worst-prepared magical baby snatcher I've ever heard of
Never thought I’d see “worst prepared magical baby snatcher” in my life but here we are
Great riddle. After a while, it became the first riddle that I was actually able to solve without cheating, so yay I guess🥳🤭
How would 1-2-3 work if they said more gold in will mean more comes out? If you put 1 in, you get 2 out. Meaning you get a gain of 1 coin. So if you put in 2 coins, you must need greater than 1 coin to come back out which must be greater than 3? That’s how I interpreted the problem
They provided an example. (In 1:54, when they showed the rules.) Basically the number of coins you get back putting 3 coins in the bag has to be greater than the number of coins you get back putting 2 coins in the bag.
@@kohwenxu but it should work the same for 2 coins vs 1 coin and 3 coins vs 6 coins but in both cases you get the same amount of additional coins as the previous term in the series which breaks the rule
@@johnwhinston4626 The rule doesn't care about "additional coins", it only cares about number of coins.
Putting 1 coin in gives you 2 coins out. Simple as that. The rule doesn't talk about coin generation (or marginal coins or the derivative of coins or however you want to say it).
So 2 has to give you more than 2, because 1 gives you 2.
@@personalanonymous3172 1:58 rule #2 at best it's bad wording at worst it's straight up false
Glad to see another riddle!
There are multiple solutions to this problem. The first time in the bag could be x2 and the second time x1.5 the riddle states: 'if you use the magic twice' which could be read as 'if you apply the function to the same set twice'. This solution doesn't require that only multiples of three have commutative multiplication.
The first rule is clear on the fact that putting in a given amount of coins AT ANY POINT will always produce the same result.
In other words, if you have F(1) = 2 and F(2) = 3, F(2) can't also equal 4, as these results are occurring at different points (i.e. previous consecutive uses of the magic) yet produce different results. So you're breaking the first rule.
I thought this is gonna be a story time and end up letting my guard down
These such theories of wonders that matchs with physics is really auspicious within the interconnection of the fictional magical world to sense making practical world. Awesome right!
I solved it differently and got something else: if you make a long chain starting with 1, you get: 1 --> 2 --> 3-->6-->9-->18-->27-->54-->81 etc. so then you see the patern: if the number is odd, then you add the previous two, if even, then the previous three numbers. So 13 must go to 39, which is odd, so 39 = x + 13, giving us 26. ( im pretty sure i messed up with rule number 2, can't spot it tho)
I thought we needed to find the equation, figured out the answer of 22 quick enough but also (hopefully!) found the equation as well:
Find the closest power of 3 (aka 3, 9, 27, 81, basically 3^x) equal to or less than the current number
Take that closest power and multiply it by 2.
If the current number is equal to or less than this result, add the closest power to it.
If the current number is greater than this result add the closest power + 2*(current number - (closest power * 2))
Some examples:
3, closest power of 3 is 3 and 3 < 2*3 so the next number is 3 + 3 = 6
5, closest power of 3 less than or equal to 5 is 3 and 5 < 2*3 so the next number is 5 + 3 = 8
7, closest power of 3 less than or equal to 7 is 3 and 7 > 2*3 so the next number is 7 + 3 + (2*(7-6)) = 7 + 5 = 12
23, closest power equal to or less than 23 is 9 and 23 > 9*2 so the next number is 23 + 9 + (2*(23-18)) = 23 + 19 = 42
Btw the 18 in the “23” example comes from 9*2 (closest power times 2) in case my original function isn’t legible since I’m bad at explaining
Can you solve the infinite gold riddle? would be a better title.
The title sounds like a video game hack
Edit: I actually came really close this time
▶
I thought I had it by defining a piece-wise function:
f(x) = 2x, if x is odd; 3x/2 if x is even
That function meets all the requirements except for the second one ("the more gold comes in, the more comes out"). In my system, f(5) = 10, but f(6) = 9. Since 9 < 10, it fails.
I'm a little disappointed that the answer wasn't a nice, elegant closed-form expression but rather merely a set of arbitrary mappings. I guess that's why I'm more interested in mathematics than magics.
it is closed-form, it's just piecewise
This also wouldn’t work for multiples of 4 because you would end up multiplying by 1.5 twice
Proud of myself for figuring this one out. Took a moment to realize an equation wouldn't work, but then I got it!
I definitely didn’t get this right on my first try (I had to finish the video to find my error), but I eventually found a piecewise definition for the bag function, f(x)
f(0) = 0
f(3ᵃ + b) = 2•3ᵃ + b, 0 ≤ b ≤ 3ᵃ
f(2•3ᵃ + b) = 3ᵃ⁺¹ + 3•b, 0 ≤ b ≤ 3ᵃ
Note that the piecewise definition is consistent on the overlapping cases where b = 3ᵃ as f(3ᵃ⁺¹) = 2•3ᵃ⁺¹ = 3ᵃ⁺¹ + 3•3ᵃ = f(2•3ᵃ + 3ᵃ), and f(2•3ᵃ) = 3ᵃ⁺¹ = 2•3ᵃ + 3ᵃ = f(3ᵃ + 3ᵃ).
It’s easy to see from the definition that f(x) > x for all x > 0.
It’s less obvious that f(x) is monotonically increasing (that is, f(x + 1) > f(x) for all x, or “the more coins you put in, the more you get out”). The overlapping cases of f(x) make proving this easier, though.
If x = 3ᵃ + b, 0 ≤ b < 3ᵃ, then
f(x) = f(3ᵃ + b) = 2•3ᵃ + b
f(x + 1) = f(3ᵃ + (b + 1)) = 2•3ᵃ + (b + 1) since 0 < (b + 1) ≤ 3ᵃ
so f(x+1) - f(x) = 1 > 0.
If x = 2•3ᵃ + b , 0 ≤ b < 3ᵃ, then
f(x) = f(2•3ᵃ + b) = 3ᵃ⁺¹ + 3•b
f(x + 1) = f(2•3ᵃ + (b + 1)) = 3ᵃ⁺¹ + 3•(b + 1) since 0 < (b + 1) ≤ 3ᵃ
so f(x+1) - f(x) = 3 > 0.
Finally, to prove f(f(x)) = 3•x, it suffices to examine it by cases.
If x = 0, then
f(f(x)) = f(f(0)) = f(0) = 0 = 3•0 = 3•x.
If x = 3ᵃ + b with 0 ≤ b ≤ 3ᵃ, then
f(f(x)) = f(f(3ᵃ + b)) = f(2•3ᵃ + b) = 3ᵃ⁺¹ + 3•b = 3•(3ᵃ + b) = 3•x.
If x = 2•3ᵃ + b with 0 ≤ b ≤ 3ᵃ, then
we know 0 ≤ 3•b ≤ 3ᵃ⁺¹, so
f(f(x)) = f(f(2•3ᵃ + b)) = f(3ᵃ⁺¹ + 3•b) = 2•3ᵃ⁺¹ + 3•b = 3•(2•3ᵃ + b) = 3•x.
and then you realize to do 1 2 3 and then go from there
@mathguy37 The nice thing about having a formulaic representation of the
function rather than a linear algorithm is that we can calculate f(x) without
first calculating f(y) for y < x.
For example, consider f(1,000,000,000).
One billion = 2·3¹⁸ + 225,159,022
So f(1,000,000,000) = 3¹⁹ + 3·225,159,022 = 1,837,738,533.
can someone explain the part at 3:49? I don't understand how it gives the answer of the next 2 blanks shown.
Notice how we have 4,7,12. That means 7 goes to 12. Now we have 7,12,21 so 12 goes to 21. By the same reasoning, that’s how we get 15 and 24.
@@GreenMeansGOF oh I see. Got it
"I'm thinking of a number between 1 and 3, not including 1 or 3."
"M!"
I would really like if they brought back the demon of reason
Smart how you chose a name for the guy based on a paradox based on duplicating things. That led me down quite the rabbit hole…
Now if only I can figure out where the heck his name tag magically disappeared to at 1:45….probably on the side of his shirt.
Well I thought this was a clever puzzle - even though I didn't figure it out. The rule about putting in a given amount always producing the same result threw me because I didn't consider a -> b -> c implies b -> c, even though obvious in hindsight. That and the cardinal rule of always start with a simpler case.
I started out the same, but then noticed a pattern of: 2x-0, 2x-1, 2x-0, 2x-1, 2x-2, 2x-3, 2x-2, 2x-1, 2x
So I extrapolated the next loop down from 2x-0 to 2x-5 and back again, making 13 land at 2x-4, or 22.
This one is fun because it tricks you into thinking it's a math puzzle. But it isn't math, it's just logic!
People often say that, but IMO math and logic are too similar to make a clear distinction. For example, even though the function given in the video was never completely defined, you can use math to figure out the exact nature of the function (indeed, many people have done this in the comments).
well, this is math
Can it be solved with basic algebra? No
But it’s still math. Not everything can be solved with a simple formula (though there is a rather simple algorithm to solve the puzzle for any number of coins, it’s just not a closed algebraic formula like some might assume)
Who chose that opening quote?! Lol.
i got a different answer, based on defining the rules of the bag by a piecewise function - the function doubles the number of coins if it is odd, and multiplies it by 3/2 if it is even. using the even/odd parity in this way means that all rules are followed, and the first transformation for 13 should be 26
Doesn't work. 3 * 2 = 6, 4 * 1.5 = 6. Rule 2 says if more coins go in, more coins should come out, so putting in 4 coins should result in getting more coins than if you had put in 3 coins.
my first thought was that its multiplying the coins by the square root of three, which by the way, does work, but it gives irrational answers when you only use it once, although if you do it twice, (so as to triple your money), then it always gives whole numbers, assuming that you put a whole number of coins in. alternatively, given that x is the starting number of coins, you can _add_ the quantity (square root of 3, minus one) times x, _to x_ twice to get 3x, its the same as the first but I've swapped from just multiplying, to adding the value pre-multiplied, which is why I have to remove the 1. either way you get irrational numbers.
Then it literally doesn't work.
3√3 = 5.19 (rounds to 5, ceilings to 6, floors to 5)
5√3 = 8.66 (rounds 9, ceilings to 9, floors to 8)
13√3 = 22.52 (rounds to 23, ceilings to 23, floors to 22)
All operations (round, ceiling, floor) produce a wrong result somewhere.
This even isn't necessary though. The rules say you can't get fractions of a coin out and multiplying anything by √3 is going to result in a fraction/decimal.
@@rioc2802 I was just giving my situation, I know that its not the right answer.
His name is Rumpelstielzschen.
If bag works as a function what would be the equation of that function
A function does not necesarrily have an equation.
That is also how I approached the problem and I got stumped. There has to be some internal logic to that bag, a function that for input x returns output y. The solution suggests that it's just a lookup table and solves the problem through deduction. It works for solving the riddle, but I suspect the approach will fail for higher numbers.
@@XCM666 A function is essentially defined as a lookup table tbh, assigning exactly one value of the output set to each value within the input set.
@@XCM666 I found that you can define a sort of piecewise recursive formula that covers all natural numbers in this function. f(x+1)=f(x)+1 or f(x+1)=f(x)+3. The first case is followed if 3^k
Had one I did (piecewise function)
f(x)
= x + 3^[floor(log_3(x))] if x < 2 * 3 ^[floor(log_3(x))]
= 3x - 3^[floor(log_3(x))] otherwise.
I thought I did find a formula which was: If odd then double the coin count, if even then halve it and then triple the coin count. Sadly it breaks in that sometimes the "always more coins" as you put it doesn't occur.
I noticed the pattern right away, after every 3rd +1 add 3 and you’ll get the answer for the 4th then repeat.
Ok, but if you graph these points. . . this is an insane function. It seems to be alternating between y=x and y=3x at seemingly random intervals, although the function equals 3x exactly as often as it equals x. How would you make this function continuous?
Amazing how you can show that, no matter the whole number, you could find the value when you apply this, strange function on it. I'd like to know more about functions like these.
y=zigzag(x) 🤣
I've love to know as well.
I've got as far as the lines of the zigzag are of this form:
y = x+3^n and y=3x-3^n (for all +ve integer n), where 1.5x
It alternates between being y=x and y=3x with intervals of 3^k, where k = 0,1,2,3, …, starting with an interval of being y=x of length 1
f(x)=2(x-2*3^floor(log_3(x)))+|x-2*3^floor(log_3(x))|+3^(floor(log_3(x))+1). If you graph f(f(x)) then it equals 3x for all positive x.
Also, I wish I had realize someone commented on this earlier, but I studied nothing but this function and all it's siblings for like a week or so, so I understood this and the general case of k>3
Glad the baby is ok after she drop it 😂
It is not stated that the same magic happens on the second time, so:
1->+1=2->*3=3. 1 needs at least 1 more so 2 will come out the first time so 3 will come out the second time.
2->+3=5->*3=6. 2 needs at least 3 more to come out because 2 is 2 times 1 and 1 needs 2 -> 5.
3->+5=8->*3=3. 3+5 (more than f1(1)+f1(2)=1+3=4) -> 8. f2(3)=3*3=9.
4->+7=11->*3=12. 4+7 (more than f1(2)+f1(2)=3+3=6) -> 11. f2(4)=3*4=12.
5->+9=14->*3=15. 5+9 (more than f1(2)+f1(3)=3+5=8) -> 14. f2(5)=3*5=15.
6->+11=17->*3=18. 6+11 (more than f1(3)+f1(3)=5+5=11) -> 17. f2(6)=3*6=18.
7->+13=20->*3=21. 7+13 (more than f1(3)+f1(4)=5+7=12) -> 20. f2(7)=3*7=21.
etc. ->
13->+25=38->*3=39. 13+25 (more than f1(6)+f1(7)=11+13=24) -> 25. f2(13)=3*13=39.
seems like the "at least" is "exactly".
we can also deduce f1(x)=f2(x)-1=3x-1 -> f1(13)=f2(13)-1=39-1=38.
So, my first guess would be 38.
my second guess would be: zero times into the bag -> f0(x)=1x, two times into the bag -> f2(x)=3x, then one time into the bag -> f1(x)=2x ->> f1(1)=26.
Only if I were wrong would I have had to resort to the method described in the video.
Me: Just take my child-
Me literally...
Print dollars and use the dollars to buy the world's gold, it's a neat trick.
I think the function is f(x) = { 2x if x is even, otherwise x + x/2 }, not 100% certain though since I haven't had time to thoroughly check it.
I think you meant f(x) = { 2x if x is *odd*, 1.5x if x is *even* }. In your case x + x/2 will result in a fraction. I think it doesn't work because of this:
If x is odd it works fine,
if x is even it may result in 4x after applying the function twice, consider x = 4. f(4) = 8, f(8) = 16.
Multiplying an even number by 2 doesn't guarantee an odd result.
A better solution would be, for any initial number of coins 'a', the first draw will result '2a' and the second '1.5x(2a)' which is always equal to '3a'. So, for 13 coins it is 2x13=26 and 2nd draw will give 26x1.5=39. This is a general formula, which satisfies all the rules of the riddle.
1*2 = 2*1.5 = 3
2*2 = 4*1.5 = 6
2 is becoming both 3 and 4, which breaks the first rule saying the bag works consistently and putting in x amount of coins should always result in y coins.
Interesting. I missed that point.
Wait, this is a riddle?
Yes. It’s riddleverse canon now
Wait but he didn't say the rhyme so he's holding 13
But the riddle never said the rhyme was needed for the magic to happen lol