RandomMathsInc
Proving Pytho - The Rap
updated
I don't claim this idea to be unique or anything, but I still do want to give the problem a go myself regardless.
If you haven't played Wordle, check it here (I am not the developer of the game): powerlanguage.co.uk/wordle
Slight disclaimer: 99.9% win rate is only true for the game's easy mode. It's a slight caveat but it's still quite impressive the solver works
GitHub repository with the codes I wrote (as a Jupyter notebook, currently a bit untidy): github.com/thecheesynachos/word-game-solver.
I try my best to check for bugs, and I don't think there are any. If there are though, do let me know. Many improvements to the code can still be made (e.g. use approximation techniques, optimise code, judging words with a different objective, etc.), so I encourage anyone else to build on what I did if you want.
For the record, I don't use the solver when I actually play the game, since it kind of ruins the fun that way (lol).
Chapters
0:00 - Introduction
1:36 - The game
5:12 - Making the game work
8:52 - Setting up the problem
13:58 - How the variables relate to each other
19:03 - What should we try to optimise?
23:28 - The mathematical details
30:29 - Which words should be checked?
34:10 - Comparing the methods
37:31 - Some demo
40:15 - Words that are good (or bad) first guesses
44:29 - Some details on the implementation
45:21 - Other ways to potentially approach the problem
46:19 - Outro and a bit of rambling
Some points - the argument I made for the conservation of momentum in this video is a bit simplistic (e.g. that the forces during the collision is a constant throughout, or that we restrict ourselves to collisions of objects), but just as a simple "proof" this works well enough. The extra bit (linked above) should provide a good enough generalisation to deal with these points.
12 Classes playlist: youtube.com/playlist?list=PLBzCYlA4J3e58YH6o73Na3EeVDIO4Y5zO
12 Classes Playlist: youtube.com/playlist?list=PLBzCYlA4J3e58YH6o73Na3EeVDIO4Y5zO
Fun fact: because of how I don't make the videos in this series in order, this is the last video I filmed and edited.
12 Classes playlist: youtube.com/playlist?list=PLBzCYlA4J3e58YH6o73Na3EeVDIO4Y5zO
12 Classes Playlist: youtube.com/playlist?list=PLBzCYlA4J3e58YH6o73Na3EeVDIO4Y5zO
Andy's channel for random contents (NSFW warning probably appropriate): youtube.com/channel/UCyxKz0Boqiv6NjLXoc7aBiA
12 Classes Playlist: youtube.com/playlist?list=PLBzCYlA4J3e58YH6o73Na3EeVDIO4Y5zO
12 Classes playlist: youtube.com/playlist?list=PLBzCYlA4J3e58YH6o73Na3EeVDIO4Y5zO
12 Classes Playlist: youtube.com/playlist?list=PLBzCYlA4J3e58YH6o73Na3EeVDIO4Y5zO
12 Classes Playlist: youtube.com/playlist?list=PLBzCYlA4J3e58YH6o73Na3EeVDIO4Y5zO
Additional note for 5:44 that I should have mentioned: Taylor series, in the simplest explanation, says that you can turn any (continuous) function into a polynomial with infinitely many terms. However, if you take a few first terms of that polynomial, you can get a good approximation of the function around a certain point. We use that to calculate the error of our approximation. I haven't explained that too well.
12 Classes Playlist: youtube.com/playlist?list=PLBzCYlA4J3e58YH6o73Na3EeVDIO4Y5zO
12 Classes Playlist: youtube.com/playlist?list=PLBzCYlA4J3e58YH6o73Na3EeVDIO4Y5zO
12 Classes Playlist: youtube.com/playlist?list=PLBzCYlA4J3e58YH6o73Na3EeVDIO4Y5zO
Extra footage I had: youtu.be/GqjfCDIq_TI
12 Classes Playlist: youtube.com/playlist?list=PLBzCYlA4J3e58YH6o73Na3EeVDIO4Y5zO
Check it out at youtube.com/playlist?list=PLBzCYlA4J3e58YH6o73Na3EeVDIO4Y5zO
Traditionally (or at least in CLRS), this would be the pipe cutting problem. But honestly, that's a bit boring isn't it?
Part 1: youtu.be/Dn601s2-4Oc
Extra part (how to actually chop the videos up?): youtu.be/c5y_CpC9W4k
Part 2: youtu.be/RaKBxwIPsBA
The top down implementation: youtu.be/yeUxWw9vwl0
Whatever this is: youtu.be/uHOuLgC3Dvo
I was not sponsored by any mobile game in this video.
Sections:
0:09 - Flows Puzzle Problem
3:05 - Graphs
6:29 - Linear Programming (LP)
11:11 - Maximum Flow Problem
16:28 - Solving Maximum Flow Problem With LPs
25:48 - Finally, the Flows Solver!
36:28 - Results and Conclusion
Link to code on GitHub: github.com/thecheesynachos/flows_solver (need Julia 1.0 and a few packages on the computer)
Found a mistake somewhere in the video? Tell me and I'll put them down here in the description.
Paper by Schroeder and Moore: arxiv.org/pdf/1502.07051.pdf
The video on the presentation I gave (which wasn't that good): youtu.be/CADqG4S8E2Y
Extra part on sticks and stones method: youtu.be/8ERONDNqYHk
The series: youtube.com/playlist?list=PLBzCYlA4J3e7B1Vi9PJ44igHftCPpP7NK
The series: youtube.com/playlist?list=PLBzCYlA4J3e7B1Vi9PJ44igHftCPpP7NK
The series: youtube.com/playlist?list=PLBzCYlA4J3e7B1Vi9PJ44igHftCPpP7NK
The series: youtube.com/playlist?list=PLBzCYlA4J3e7B1Vi9PJ44igHftCPpP7NK
The series: youtube.com/playlist?list=PLBzCYlA4J3e7B1Vi9PJ44igHftCPpP7NK
Part 2: youtu.be/uOmm47_aglA
For the whole series: youtube.com/playlist?list=PLBzCYlA4J3e6zirZf7gu9vQgkJ_H1S0Fc
For the whole series: youtube.com/playlist?list=PLBzCYlA4J3e6zirZf7gu9vQgkJ_H1S0Fc
For the whole series: youtube.com/playlist?list=PLBzCYlA4J3e6zirZf7gu9vQgkJ_H1S0Fc
For the whole series: youtube.com/playlist?list=PLBzCYlA4J3e6zirZf7gu9vQgkJ_H1S0Fc
For the whole series: youtube.com/playlist?list=PLBzCYlA4J3e6zirZf7gu9vQgkJ_H1S0Fc
Link to the other method: youtu.be/YliEmHvxnvM
For the whole series: youtube.com/playlist?list=PLBzCYlA4J3e6zirZf7gu9vQgkJ_H1S0Fc
For the whole series: youtube.com/playlist?list=PLBzCYlA4J3e6zirZf7gu9vQgkJ_H1S0Fc
For the whole series: youtube.com/playlist?list=PLBzCYlA4J3e6zirZf7gu9vQgkJ_H1S0Fc
Here's the video of the proof I was talking about: youtu.be/SrufNRtvgZw
For the whole series: youtube.com/playlist?list=PLBzCYlA4J3e6zirZf7gu9vQgkJ_H1S0Fc
For the whole series (no pun intended): youtube.com/playlist?list=PLBzCYlA4J3e6zirZf7gu9vQgkJ_H1S0Fc
For the whole series: youtube.com/playlist?list=PLBzCYlA4J3e6zirZf7gu9vQgkJ_H1S0Fc
For the whole series: youtube.com/playlist?list=PLBzCYlA4J3e6zirZf7gu9vQgkJ_H1S0Fc
Little background:
I first came across this integral in my quantum mechanics class a couple of months ago (see D. Griffiths' Introduction to Quantum Mechanics, 2nd Ed., Problem 1.3). I thought the way to solve this integral was rather cool, and had it in my list of to-make video for a while now. And here it is.
Footnotes:
1 - If you want to know more about Monaco, wait until Geography Now makes a video about them (they're a great channel, you should check them out if you haven't already).
2 - Most of the time, rather than using truly random numbers, computers will use pseudorandom numbers (see en.wikipedia.org/wiki/Pseudorandom_number_generator). They aren't actually random, but looks random enough to us and is random enough for the Monte Carlo Method.
3 - Have you seen our Pi Day video this year? That problem was solved with the Monte Carlo Method: youtu.be/9r45ADGHK5s
Some pictures I used:
upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Whole_Monaco.jpg/1200px-Whole_Monaco.jpg
upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Monaco_location_map.svg/2000px-Monaco_location_map.svg.png
upload.wikimedia.org/wikipedia/commons/thumb/4/42/France-monaco-map.svg/2000px-France-monaco-map.svg.png
upload.wikimedia.org/wikipedia/commons/b/ba/Monte-Carlo01.gif
upload.wikimedia.org/wikipedia/commons/5/5f/RREA_Monte_Carlo_simulation.png
Featuring toothpicks, pies and Buffon's Needle Problem.
Me throwing a toothpick: youtu.be/9-nc8pGBiu4
Link to Wikipedia article on this: en.wikipedia.org/wiki/Buffon's_
Link to that excel spreadsheet: dropbox.com/s/1nouq6d79fkca3z/toothpick%20simulation.xlsx?dl=0
Links to photos I used that aren't public domain:
commons.wikimedia.org/wiki/File:Gianluigi_Buffon_(31815848711).jpg
commons.wikimedia.org/wiki/File:Dice-111.svg
It is also the channel's THIRD birthday. Isn't that cool?
But seriously guys, thanks for all the support. Even though our channel is very small and hardly anyone follows us, it's still great. I'll keep making these sorts of videos for you guys to watch. Thanks again for all the support!
Song on the outro: "This Ain't The End Of Me" by White Comic
Facebook Page: facebook.com/randommathsinc
Also, I'll buy an ice-cream for the first person to bump into me in real life and recite a line from a Shakespeare play (very unlikely, but why not).
Facebook Page: facebook.com/randommathsinc
Facebook Page: facebook.com/randommathsinc
Facebook Page: facebook.com/randommathsinc
We find out why the bond angle of methane is 109.5° using some vectors.
Making methane on paint: youtu.be/4yoSocEwTEY
Some picture I used:
Carbon dioxide molecule: commons.wikimedia.org/wiki/File:Carbon_dioxide_3D_ball.png
Sulphur hexafluoride molecule: commons.wikimedia.org/wiki/File:Sulfur-hexafluoride-from-xtal-3D-balls.png
This question was originally asked by my mechanics teacher a while back. Credits to him.
Some links I used:
http://www.statisticalconsultants.co.nz/blog/the-german-tank-problem.html
http://www.theregister.co.uk/2014/05/20/german_tank_problem_and_leaky_data
http://wikieducator.org/Point_estimation_-_German_tank_problem
en.wikipedia.org/wiki/German_tank_problem
Was a bit busy in the past month or so. I filmed a video explaining what I was up to, but that's still being edited. So stay tuned.
Presenting to you, the song about Euler's constant.
Extras: youtu.be/h4C-Bk1xxWg
Get it on iTunes: http://bitly.com/1H9DQSz
Lyrics:
There is this constant you oughta know
Named after some dude who came from Basel
Its value's just short of three, that's what I'm told.
The constant sets the world alight
It gives students a mare at night
Its decimals, well, would take a while to write.
The fifth letter of the alphabet
All thought out into a certain limit
One and one over x, to the power of x, as x turns infinite.
Or if you don't like thoughts of things approaching
There's also an option of endless adding
Involving factorials, if that's more your thing.
We're dealing with e, 'bout 2.7183.
We're talking with e,
Well who the fuck came up with this, with this constant e.
(Talking: Well apparently Jacob Bernoulli came up with e, but Napier made earlier references to it.)
Well e can be found in almost every place
When things are growing or if it decays
In interest rates or half-life of toxic waste
Describe complex numbers in a different notation
Or discuss the normal distribution
you'll find that e just joins in the fun.
e's part of Euler's identity
The most elegant thing in maths you'll see
It's got zero, and one, and pi, and e.
If you want something better than sex
Then raise e to the power of x
And its derivative will just be itself.
We're dealing with e, 'bout 2.7183.
We're talking with e,
Well when the fuck will we use something like this, use this constant e.
[Solo]
We're dealing with e, 'bout 2.7183.
We're talking with e,
Well who the fuck would write a song about this, about this constant e.
A bit more on decimal and fractional odds: support.skybet.com/app/answers/detail/a_id/37/~/fraction-and-decimal-pricing
If you're too lazy to watch the whole thing, you can go to;
- 0:00 for dice analogy (introduction),
- 1:53 for dice analogy (trying to make money),
- 3:08 for dice analogy (adjusting odds),
- 7:12 for start on part about bookmakers,
- 9:20 for implied probability and over-rounding, and
- 13:25 for why bookmakers have to adjust odds.
Sources I used:
en.wikipedia.org/wiki/Mathematics_of_bookmaking
http://www.pinnacle.com/en/betting-articles/educational/how-bookmakers-make-money
http://www.oddsportal.com (where I took sports odds from)
http://www.mirror.co.uk/sport/row-zed/how-odds-leicester-winning-premier-7736523
en.wikipedia.org/wiki/2015%E2%80%9316_Leicester_City_F.C._season
For maximum effect, sit back and don't bother calculating anything. Just have a guess!
Links I used:
en.wikipedia.org/wiki/RSA_(cryptosystem)
http://www.di-mgt.com.au/rsa_theory.html
http://www.di-mgt.com.au/rsa_alg.html
http://stackoverflow.com/questions/10214463/how-safe-and-secure-is-rsa
Photos I used:;
By Erik Tews (Own work) [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0)], via Wikimedia Commons
By len adlmen (by mail from len adlman) [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0)], via Wikimedia Commons
By Ronald L. Rivest (Own work) [CC BY-SA 4.0 (http://creativecommons.org/licenses/by-sa/4.0)], via Wikimedia Commons
UPDATE (April 2018) - For those who see this: I just won FameLab Thailand 2018 with this very topic!
Also "Secret Life of Codes" by Kjartan Poskitt (a very good book by a very good author, do check him out).


