Pihedron
Pihedron
  • 23
  • 39 261
Competitive Programming
Socials:
github.com/pihedron
ko-fi.com/pihedron
มุมมอง: 3 323

วีดีโอ

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 Hardest AS Level Maths Question
มุมมอง 414 หลายเดือนก่อน
The Hardest AS Level Maths Question
The Easiest Pure Math Question
มุมมอง 434 หลายเดือนก่อน
The Easiest Pure Math Question
Binomial Expansion (Double Brackets)
มุมมอง 1584 หลายเดือนก่อน
Binomial Expansion (Double Brackets)
Factor Quadratic (a ≠ 1)
มุมมอง 224 หลายเดือนก่อน
Factor Quadratic (a ≠ 1)
NZIC Round 2 Beau's Route Solution
มุมมอง 195 หลายเดือนก่อน
NZIC Round 2 Beau's Route Solution
Windows Forms Platformer #1
มุมมอง 385 หลายเดือนก่อน
Windows Forms Platformer #1
Bitmurai Speedrun Any%
มุมมอง 536 หลายเดือนก่อน
Bitmurai Speedrun Any%

ความคิดเห็น

  • @zool84
    @zool84 วันที่ผ่านมา

    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?

  • @pavelgorokhov2976
    @pavelgorokhov2976 2 วันที่ผ่านมา

    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.

  • @VincentGPT-lol
    @VincentGPT-lol 4 วันที่ผ่านมา

    I just use de moirve Theorem.

  • @dominiccaesarok5077
    @dominiccaesarok5077 4 วันที่ผ่านมา

    may God bless yall

  • @hurstilthymy4943
    @hurstilthymy4943 5 วันที่ผ่านมา

    >Ford-Fuckerson Lmao

  • @___frosty-zx
    @___frosty-zx 5 วันที่ผ่านมา

    Whar do you think about AI doing CP

    • @pahul_deep
      @pahul_deep 4 วันที่ผ่านมา

      Think it as cp become foundation as elementary maths in AI age.

    • @pihedron
      @pihedron 3 วันที่ผ่านมา

      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.

  • @kaydenlimpert2779
    @kaydenlimpert2779 5 วันที่ผ่านมา

    stop putting tables on your food!

  • @daniel_77.
    @daniel_77. 7 วันที่ผ่านมา

    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

    • @Wkaelx
      @Wkaelx 6 วันที่ผ่านมา

      Sério? Eu fiz a OBA, vou ver pra fazer essa aí também, parece legal.

    • @daniel_77.
      @daniel_77. 6 วันที่ผ่านมา

      @Wkaelx nunca esperaria um br aqui

    • @pihedron
      @pihedron 6 วันที่ผ่านมา

      Good luck!

  • @alreadytakenhandle
    @alreadytakenhandle 8 วันที่ผ่านมา

    Bro what kind of software did you use to create this video presentation?

    • @pihedron
      @pihedron 8 วันที่ผ่านมา

      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.

    • @alreadytakenhandle
      @alreadytakenhandle 8 วันที่ผ่านมา

      @pihedron thanks

  • @louisrobitaille5810
    @louisrobitaille5810 10 วันที่ผ่านมา

    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 😐.

  • @paulortega5317
    @paulortega5317 10 วันที่ผ่านมา

    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(-)ⁿ

  • @krunkiesop1785
    @krunkiesop1785 11 วันที่ผ่านมา

    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)

    • @pihedron
      @pihedron 10 วันที่ผ่านมา

      Yeah, that is kind of annoying. I guess we could use a 64 bit integer instead of the pair.

  • @bluewhale2846
    @bluewhale2846 13 วันที่ผ่านมา

    34 and 17

  • @DerexWolfheart
    @DerexWolfheart 14 วันที่ผ่านมา

    I feel like just using pascals triangle would have been way faster, its like 3 steps😭

    • @pihedron
      @pihedron 14 วันที่ผ่านมา

      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.

  • @lucidonzr
    @lucidonzr 14 วันที่ผ่านมา

    yo it’s me lucid

  • @tapasibardhan501
    @tapasibardhan501 20 วันที่ผ่านมา

    WTF💀💀💀💀💀💀💀

  • @tudorgabriela6166
    @tudorgabriela6166 21 วันที่ผ่านมา

    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.

  • @oybcj01p
    @oybcj01p 24 วันที่ผ่านมา

    The answer should be 2/(843 +377sqr5)

  • @kimba381
    @kimba381 24 วันที่ผ่านมา

    Not wrong, incomplete

  • @VyshnavM-mg5zm
    @VyshnavM-mg5zm 25 วันที่ผ่านมา

    Very useful video

    • @pihedron
      @pihedron 24 วันที่ผ่านมา

      Thanks a lot!

  • @kenhoo3702
    @kenhoo3702 26 วันที่ผ่านมา

    1 ÷ by (3+√5)/2 for 7 times

  • @wes9627
    @wes9627 27 วันที่ผ่านมา

    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...

  • @DarthVader-ch4um
    @DarthVader-ch4um หลายเดือนก่อน

    Awesome solution!

  • @mismis3153
    @mismis3153 หลายเดือนก่อน

    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.

    • @pihedron
      @pihedron 28 วันที่ผ่านมา

      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.

    • @alphazero339
      @alphazero339 3 วันที่ผ่านมา

      How does the big o work for example what do O(1) or O(n) represent

    • @mismis3153
      @mismis3153 3 วันที่ผ่านมา

      @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.

    • @pihedron
      @pihedron วันที่ผ่านมา

      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.

  • @UC3rm0aNC4ysyZipDZotXnZA
    @UC3rm0aNC4ysyZipDZotXnZA หลายเดือนก่อน

    Great video! I think I'll use the calculator for this one. Me is dumb

  • @tvvt005
    @tvvt005 หลายเดือนก่อน

    I don’t understand now but hopefully someday I get better at this

    • @pihedron
      @pihedron หลายเดือนก่อน

      Don't worry, you will.

  • @jursamaj
    @jursamaj หลายเดือนก่อน

    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).

    • @superbfacts4786
      @superbfacts4786 22 วันที่ผ่านมา

      or just use the binomial theorem?

  • @jursamaj
    @jursamaj หลายเดือนก่อน

    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.

    • @pihedron
      @pihedron หลายเดือนก่อน

      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.

    • @jursamaj
      @jursamaj หลายเดือนก่อน

      @@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.

    • @pihedron
      @pihedron หลายเดือนก่อน

      "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.

  • @Hello1-t1y
    @Hello1-t1y หลายเดือนก่อน

    1 / (1 + golden ratio) ^ 7

    • @PerfectYarn
      @PerfectYarn หลายเดือนก่อน

      you're not wrong but you can further simplify this to be 1/(golden ratio)^14

  • @thaithanhdanh5286
    @thaithanhdanh5286 หลายเดือนก่อน

    Okay Instantly knew it, φ^2.

    • @pihedron
      @pihedron หลายเดือนก่อน

      It also applies to numbers besides the powers of phi by the way.

  • @ru2979
    @ru2979 หลายเดือนก่อน

    I subscribed and liked , now I want more food.😐

    • @pihedron
      @pihedron หลายเดือนก่อน

      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.

  • @pihedron
    @pihedron หลายเดือนก่อน

    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.

  • @NihmbleTech
    @NihmbleTech หลายเดือนก่อน

    But........... it blows up at zero, because of the C in the denominator beneath the discriminant? So all C except zero?

    • @pihedron
      @pihedron หลายเดือนก่อน

      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.

  • @irumizol9216
    @irumizol9216 หลายเดือนก่อน

    how you do your maths edit plz

    • @pihedron
      @pihedron หลายเดือนก่อน

      I use Manim.

  • @Mr.KareemDoesStuff
    @Mr.KareemDoesStuff หลายเดือนก่อน

    But then, if you picked door C at the start, door A would have a higher probability.

    • @pihedron
      @pihedron หลายเดือนก่อน

      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.

  • @krunkiesop1785
    @krunkiesop1785 หลายเดือนก่อน

    what place did you come in the NZIC?

    • @pihedron
      @pihedron หลายเดือนก่อน

      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?

    • @krunkiesop1785
      @krunkiesop1785 หลายเดือนก่อน

      @@pihedron yes, do you have discord?

  • @donotread1234
    @donotread1234 หลายเดือนก่อน

    I like 1:07 because it's really just the quirk of booleans being numbers combined with left-to-right evaluation

    • @deltamico
      @deltamico หลายเดือนก่อน

      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.

    • @pihedron
      @pihedron หลายเดือนก่อน

      (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.

    • @deltamico
      @deltamico หลายเดือนก่อน

      right, im just dumb

    • @pihedron
      @pihedron หลายเดือนก่อน

      It's not your fault JavaScript is weird.

  • @musicsrise
    @musicsrise หลายเดือนก่อน

    Exactly as worst users on stack overflow XD

  • @linebreaker8751
    @linebreaker8751 หลายเดือนก่อน

    hidden gem fr

  • @yewo.m
    @yewo.m หลายเดือนก่อน

    Ah, so you named the channel after the algorithm for *edging*?

    • @pihedron
      @pihedron หลายเดือนก่อน

      I totally didn't make it: github.com/pihedron/edging

  • @CodexMathematica
    @CodexMathematica หลายเดือนก่อน

    Are you make the video with manim?

    • @pihedron
      @pihedron หลายเดือนก่อน

      Yes.

  • @CodexMathematica
    @CodexMathematica หลายเดือนก่อน

    Great channel ❤

  • @RealQinnMalloryu4
    @RealQinnMalloryu4 หลายเดือนก่อน

    {21+35}/14=56/14=4 (x ➖ 4x+4).

  • @lordpetal12
    @lordpetal12 หลายเดือนก่อน

    1brown3blue ahh video

    • @pihedron
      @pihedron หลายเดือนก่อน

      I'm 0blue4brown.

  • @zainhaddad6873
    @zainhaddad6873 หลายเดือนก่อน

    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)

  • @zainhaddad6873
    @zainhaddad6873 หลายเดือนก่อน

    Great everything expect the last last

  • @mathmachine4266
    @mathmachine4266 หลายเดือนก่อน

    ((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

  • @MilesIsReal
    @MilesIsReal หลายเดือนก่อน

    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.

    • @volbla
      @volbla หลายเดือนก่อน

      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.

    • @jursamaj
      @jursamaj หลายเดือนก่อน

      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.

    • @pihedron
      @pihedron หลายเดือนก่อน

      @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.

    • @jursamaj
      @jursamaj หลายเดือนก่อน

      @@pihedron I was referring to the value it printed with dozens of digits.

    • @narfharder
      @narfharder 29 วันที่ผ่านมา

      HiPER scientific calculator for android gets this right

  • @GeoffreyMunyunyu-o4o
    @GeoffreyMunyunyu-o4o หลายเดือนก่อน

    "Put the table on the food."💀

  • @hansonyang5973
    @hansonyang5973 หลายเดือนก่อน

    W channel #make contents on other stuff as well