- 23
- 39 261
Pihedron
เข้าร่วมเมื่อ 12 มิ.ย. 2024
I make programming and mathematics videos but also cover the CIE and NCEA syllabus. I was selected for the Informatics Olympiad camp in my country.
วีดีโอ
Data Structures in 5 Minutes
มุมมอง 75628 วันที่ผ่านมา
This is a brief introduction to 8 essential data structures for computer science. Socials: github.com/pihedron x.com/pihedron
Programming Crimes
มุมมอง 1.5Kหลายเดือนก่อน
This is just a collection of programming memes. Images are supplied by me, some of my friends, and r/ProgrammerHumor. I had to retype some of the code to make it work and improve the image quality. Music: Senna, the Redeemer (Riot Games) Socials: github.com/pihedron x.com/pihedron
The solution feels like HACKING!
มุมมอง 23Kหลายเดือนก่อน
I cover the secret technique to solving this seemingly impossible question by hand. This question is so hard that regular calculators give the wrong answer. Socials: github.com/pihedron x.com/pihedron
NCEA Level 2 Calculus Excellence% World Record 17:22
มุมมอง 692 หลายเดือนก่อน
I just made this video for fun. This is now the new NCEA Mathematics meta. The video is quite laggy due to running the speedrun timer on Chrome. Songs: Calc's Plan by Justin Carew AC III Main Theme AC II Venice Rooftops AC Black Flag Main Theme AC Shadows Main Theme Socials: github.com/pihedron x.com/pihedron
Solve this Math Olympiad question in 2 minutes.
มุมมอง 1.8K2 หลายเดือนก่อน
Sorry for the mistake at 1:14. It should be 2k not k. Socials: github.com/pihedron x.com/pihedron
AS Level Statistics Oct Nov 2024
มุมมอง 402 หลายเดือนก่อน
I discuss the hardest question from AS Level Statistics 1 October November Variant 3. If you took the exam, then I wish the best of luck to you. Socials: github.com/pihedron x.com/pihedron
Why is the volume of a cone one third the volume of a cylinder?
มุมมอง 4.6K2 หลายเดือนก่อน
Subscribe so I can get a better mic. Socials: github.com/pihedron x.com/pihedron
This video will make you better at probability.
มุมมอง 2K2 หลายเดือนก่อน
In this video, we take a look at tackling the most famous probability problem intuitively in just 2 steps. Socials: github.com/pihedron x.com/pihedron
It's harder than it looks.
มุมมอง 2.6K3 หลายเดือนก่อน
This video covers how to solve a difference of cubes including the complex roots. It is possible to factor the cubic without any prior knowledge of solving cubic equations. #manim Socials: github.com/pihedron x.com/pihedron
The Enthalpy Formula NCEA Chemistry
มุมมอง 283 หลายเดือนก่อน
I solve an energy change question from the NCEA Level 2 2022 structure and bonding paper using a secret formula. Socials: github.com/pihedron x.com/pihedron
The CROCODILE Question AS Level Statistics
มุมมอง 963 หลายเดือนก่อน
I solve the controversial CROCODILE question from 9709 Summer 2022 Paper 5 Variant 2. Socials: github.com/pihedron x.com/pihedron
Geometry AS Level Pure Maths
มุมมอง 233 หลายเดือนก่อน
I solve A Level Mathematics May June 2023 Paper 1 Variant 2 Question 2. Socials: github.com/pihedron x.com/pihedron
Projectile Motion AS Level Physics
มุมมอง 243 หลายเดือนก่อน
I solve AS Level Physics May June Paper 2 Variant 1 Question 2! Socials: github.com/pihedron x.com/pihedron
69% got this IGCSE question wrong!
มุมมอง 464 หลายเดือนก่อน
I solve the difficult question 19 from IGCSE Mathematics Winter 2023 Paper 2 Variant 3. Socials: github.com/pihedron x.com/pihedron
Graph Transformations AS Level Pure Maths
มุมมอง 174 หลายเดือนก่อน
Graph Transformations AS Level Pure Maths
The key factor is that Monty deliberately opens a door with the goat behind it. If he had opened the second door with the goat behind it randomly, then we would have had a 50% chance of our first pick being correct, as: [(1 x 1/3)] / [(1 x 1/3) + (1/2 x 2/3)] = 1/2 Just imagine a similar situation in which Monty asked us to pick the ace of spades card in a poker deck. We draw the 2 of hearts but we are not allowed to take a look at it. Then Monty draws a card that he chooses and it happens to be the Queen of diamonds. What would you do then? Would you change or keep your card? And would it really mean a significant improvement if we changed it?
I just calculated x^-1=2/(3+√5)=2*(3-√5)/(9-5)=(3-√5)/2, then x^-2=(x^-1)^2, then x^-4=(x^-2)^2, then x^-3=x^-1*x^-2, then x^-7=x^-3*x^-4. Pretty easy.
I just use de moirve Theorem.
may God bless yall
>Ford-Fuckerson Lmao
Whar do you think about AI doing CP
Think it as cp become foundation as elementary maths in AI age.
I still think AI is still in its early stages when it comes to competitive programming. I haven't seen AlphaCode solve problems better than humans yet, but AlphaProof & AlphaGeometry managed to "get" Silver on Math Olympiad questions. It's possible for AI to do well in CP but I don't think it will beat the gold medalists in the next decade.
stop putting tables on your food!
In brazil we have the OBI (Olimpíada brasileira de informática) that takes us to the international level. I'll study a lot for that
Sério? Eu fiz a OBA, vou ver pra fazer essa aí também, parece legal.
@Wkaelx nunca esperaria um br aqui
Good luck!
Bro what kind of software did you use to create this video presentation?
I used a TypeScript library called Motion Canvas. I created some custom components (array, tree, graph) that can be found at the github.com/pihedron/motion-canvas-components repo.
@pihedron thanks
2:48 Because WolframAlpha is an extremely powerful AI calculator and Google's calculator is just a regular calculator. You're basically comparing apples and oranges at this point 😐.
Or [(3 + √5)/2]⁻⁷= [(3 - √5)/2]⁷ = [(1 - √5)/2]¹⁴ Let fₙ = [(1 - √5)/2]ⁿ = (aₙ - bₙ•√5)/2, find a₁₄ and b₁₄ aₙ & bₙ are each a Fibonacci series aₙ : 1, 3, 4, 7, 11,18, 29, 47, 76, 123, 199, 322, 521, 843 bₙ : 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377 Answer : (843 - 377√5)/2 Also aₙ² = 5•bₙ² + 4(-)ⁿ
i just wanted to say something about dictionaries in C++, apparently you cannot make a unordered_map<pair<int, int>, type> for some reason as C++ does not support hashing of a pair, which kinda makes it annoying to save cords. (nice vid btw)
Yeah, that is kind of annoying. I guess we could use a 64 bit integer instead of the pair.
34 and 17
I feel like just using pascals triangle would have been way faster, its like 3 steps😭
It would definitely be slower due to you having to create the triangle in the first place. Pascal's triangle grows at a rate of O(n^2). Plus there's lots of multiplication involved.
yo it’s me lucid
WTF💀💀💀💀💀💀💀
It is sufficient to understand that the sine rule for angles in [0,pi] gives two possible interpretations (or, solutions) for the angle. This would have been slightly trickier if the problem didn't just hand you the fact that PRQ is obtuse, since most would just write down theta ~ 63 deg and box their answer.
The answer should be 2/(843 +377sqr5)
Not wrong, incomplete
Very useful video
Thanks a lot!
1 ÷ by (3+√5)/2 for 7 times
Fibonacci solved this problem many decades ago. (3+√5)/2=Φ+1=Φ^2 where Φ is the Golden Ratio. [(3+√5)/2]^{-1}=1/Φ^2=φ^2 where φ=(√5-1)/2 is the Inverse Golden Ratio According to Fibonacci, [(3+√5)/2]^{-7}=Φ^{-14}=φ^14=233-377φ=421.5-188.5√5=0.001186241289642...
Awesome solution!
There is actually a way to solve these with computers. It works the same ways as a complex number : instead of storing a + b√5 as a float in memory, store it as two integers (a, b). Multiplication is as follows (a, b) * (c, d) = (ac + 5bd, ad + bc). Now just do 7 repeated multiplications (or implement fastexp), and print the result (m, n) as m + n√5. No precision loss ! As a bonus, this can compute fib(n) with O(lg n) complexity. It's very useful.
Yeah, I recently wrote an algorithm that can generate the nth Fibonacci and Lucas number in O(log n). So, it's possible to do phi^n in O(log n) without loss of precision. It's on GitHub if you're curious.
How does the big o work for example what do O(1) or O(n) represent
@alphazero339 You can probably ask chatGPT for an explanation or lookup in wikipedia. In general, the complexity is determined by the number of iterations you have to do in the main loop. Operations such as addition and exponentiation are done in one CPU cycle so their complexity is O(1). A naive implementation of exponentiation will be to repeatedly multiply the number by itself, n times. It requires n iterations of the multiplication loop so the complexity would be O(n). Fast exponentiation (look it up) needs log_2(n) operations, so it has a complexity of O(log n). There are some floating point multiplication algorithms that can compute the exponential with O(1) complexity but they lose precision. You always take the biggest complexity, so if for example the algorithm has n + n^2 iterations, you say it has a complexity of O(n^2). An algorithm in 3n iterations has a complexity of O(n). log(n) + 4n^3 has a complexity of O(n^3). It just gives an order of magnitude for the computational complexity. That's about it, it's not an exact value, it just gives some sort of reference for the efficiency of an algorithm. Some O(n) algorithms are better than other O(n) algorithms. For example, in my original comment I said that multiplication is the following : (a, b) * (c, d) = (ac + 5bd, ad + bc). While we assume that it's computed with O(1) complexity, multiplication does take more time than addition. Instead of computing the 4 following products : ac, bd, ad, bc we actually only need 3. Here is a little trick : compute ac, bd and (a+b)(c+d). Notice that ad + bc = (a+b)(c+d) - ac - bd. So computing the fast exponential the way I described using only 3 multiplications instead of 4 will be about 25% faster, even though both their complexities are O(lg n). By the way, this is called Karatsuba's multiplication algorithm.
Yes, powers of phi in algebraic form can be computed in O(log n) time due to the identities of the Fibonacci and Lucas sequences. The github.com/pihedron/fib repo contains a function which can compute both the nth Fibonacci and Lucas numbers in O(log n) steps which is O(n log n) time for big integers. Therefore, we can get the nth power of phi as (L + F * sqrt(5))/2.
Great video! I think I'll use the calculator for this one. Me is dumb
I don’t understand now but hopefully someday I get better at this
Don't worry, you will.
Fast algorithm I used: Note the (a+b√5)^2=(a^2+5b^2)+2ab√5. Perform this calculation 3 times, recursively, to get x^8. Now put x over x^8. Multiply numerator and denominator by the "conjugate" of x^8 (that is, flip the '+' in x^8 to a '-'). The denominator simplifies to an integer, while the numerator becomes another number in the form a+b√5. If you really don't want to do that division, you can use the simple (a+b√5)(c+d√5)=(ac+5db)+(ad+bc)√5 to calculate x^2, the x^3, then x^4, then multiple those 3 together to get x^7. Then simplify "conjugate" of x over (x times "conjugate" of x).
or just use the binomial theorem?
4:46 Calculators don't get it "wrong", they just operate with a given precision. Changing the order of operations can get a slightly different result. That -2e-15 is a difference in the last 2 out of 53 bits of precision. Neither of the 2 terms you subtracted are precise beyond that point, so it's not like one is "right" and the other is "wrong". They're both approximations of the real result.
I'm glad you understand FPA, but that wasn't the point of the video. I cut that part of the video because it was boring. If the result is not accurate, it's still considered wrong. The point of the video is to devise a method for getting the EXACT answer and bring awareness to the limitations of calculators.
@@pihedron It's not even a limitation of calculators themselves, unless you include *any* method of calculating a numeric result, including pencil & paper. *Any* answer not in the symbolic form of a+b√5 will have to be rounded off it some point. Of course, you can't do anything in the real world with √5. You *have* to turn it into an approximate number for it to be any use. Also, accuracy is not a binary, but a measure of *how* accurate it is. In approximating π, 3 is not very accurate. 22/7 is more accurate, and 3.1415926536 more accurate yet.
"Any answer not in the symbolic form of a+b√5 will have to be rounded off it some point." This is exactly the limitation associated with some calculators. They are approximating. Plus there's no denying that the symbolic answer given in the video is better or more "right" than the answer given by the calculator. When I said "not accurate", I meant "not 100% accurate" or "not accurate enough". It's perfectly reasonable to reject an approximation as an answer no matter how good it is. 4:46 is a warning for people who may blindly use a calculator to verify their answer and get surprised. The explanation as to why this error happens is left as an exercise for the viewer. I hope this clarifies anything you misunderstood.
1 / (1 + golden ratio) ^ 7
you're not wrong but you can further simplify this to be 1/(golden ratio)^14
Okay Instantly knew it, φ^2.
It also applies to numbers besides the powers of phi by the way.
I subscribed and liked , now I want more food.😐
I'm in the process of making a potentially longer video but I also have my SAT exam coming up soon. I'll try my best to release a video next week.
As this is my best video so far, if you want to see me do a cursed version of this (complex numbers), make sure to like this comment.
But........... it blows up at zero, because of the C in the denominator beneath the discriminant? So all C except zero?
The c can still be 0 because the discriminant will be 9 which is positive. I know you're saying that in the quadratic formula you will divide by 2c but in that case it's not a quadratic anymore and just a line. The lines will intersect at x = 1 if c = 0 due to 3 * x = 3.
how you do your maths edit plz
I use Manim.
But then, if you picked door C at the start, door A would have a higher probability.
Yes, door A would have a higher probability IF door B was opened. There are 2 conditions that need to be met, so this is conditional probability. If you pick door C, there's a 1 / 3 chance you are right and 2 / 3 chance you are wrong. This doesn't change because door C will never be opened. Monty can only open a door with a goat that also isn't C. If Monty opens B, A has a 2 / 3 chance because there's a 2 / 3 chance you were wrong and the goat is behind the other 2 doors. You are essentially playing for 2 doors when you switch.
what place did you come in the NZIC?
The scoreboards are basically public and they contain names, but I'll tell you I got high enough to qualify for camp. Did you get 10th?
@@pihedron yes, do you have discord?
I like 1:07 because it's really just the quirk of booleans being numbers combined with left-to-right evaluation
It's not right to left cause 0 <= 0 < 0 would be true and it's -not- left to right cause 0 < 0 <= 0 would be -false- true.
(0 < 0 <= 0) would be true in JavaScript because it's evaluated as ((0 < 0) <= 0). The (0 < 0) is false so implicitly becomes 0. Then, 0 <= 0 becomes true.
right, im just dumb
It's not your fault JavaScript is weird.
Exactly as worst users on stack overflow XD
hidden gem fr
Ah, so you named the channel after the algorithm for *edging*?
I totally didn't make it: github.com/pihedron/edging
Are you make the video with manim?
Yes.
Great channel ❤
{21+35}/14=56/14=4 (x ➖ 4x+4).
1brown3blue ahh video
I'm 0blue4brown.
For real advice this is poorly explained and for me to understand this need to do your work for myself So recommend making the video longer yet explain each bit thoroughly I still understand it myself ( mainly because I understand the concept which you did great in explaining)
Great everything expect the last last
((3-√(5))/2)⁷ ((3-√(5))/2)⁸ * ((3+√(5))/2) ((7-3√(5))/2)⁴ * ... ((47-21√(5))/2)² * ... ((2207-987√(5))/2) * ((3+√(5))/2) (843-377√(5))/2
Calculators "get it wrong" because of floating point arithmetic... e-15 is high accuracy, no? Wolframalpha got the precise answer because it is made for dealing with radicals. Ordinary calculators aren't.
Yeah, computers work with limited precision, so some values will get rounded during calculations. Adding first and multiplying second may not give exactly the same result as multiplying first and adding second. Imagine if you only had one digit of precision. We know that 1.4 + 1.4 should equal 2.8 and therefore round to 3, but if the inputs are rounded to 1 ahead of time the result becomes 2. Rounding errors are inevitable unless you do completely symbolic calculations.
Even Wolfram didn't get it "precise", just more precise than Google's calculator. It's still has to approximate at some point, because the answer is irrational.
@jursamaj If you paid close attention to the alternate forms, you can see that Wolfram gives a precise answer in symbolic form. Computers aren't limited to just FP approximations. Rational data types do exist. Wolfram has the tools necessary to do algebra.
@@pihedron I was referring to the value it printed with dozens of digits.
HiPER scientific calculator for android gets this right
"Put the table on the food."💀
W channel #make contents on other stuff as well