top of page
Learning Graphics Programming


Math Lesson #2: (a+b)^2
Notes:
chrisbentley349
Dec 2, 20241 min read
Â
Â
Â


chrisbentley349
Dec 1, 20241 min read
Â
Â
Â


Math Lesson #4: Powers of Two
A Story of how kings, hermits and numbers behave... A king became lost in a forest. He was found by a hermit who fed him and taught him the game of chess. "How can I ever repay you?" asked the king. "Well," suggested the hermit, "just pay me one grain of rice on the first square of the chess board, and then two on the second, 4 on the third and so on." The king thought this was too small a reward, but agreed... 1/2 a teaspoon of rice at the end of the first row... 4 cups
chrisbentley349
Nov 30, 20241 min read
Â
Â
Â


chrisbentley349
Nov 28, 20241 min read
Â
Â
Â


Math Lesson #6: Tower of Hanoi
Goal: move the stack of discs from "source" peg to "target" peg Rules: a) move only one disc at time, b) never put bigger disc on top of a smaller Questions: a) how to do it? b) how many moves needed for stack of n discs? Let's gain intuition, by solving simpler versions... A) stack of one disc... easy, just move lone disc... number of moves = 1 B) stack of two discs... move smallest to spare peg, base disc to target, smallest to target... number of moves = 3 C) stack
chrisbentley349
Oct 27, 20241 min read
Â
Â
Â


chrisbentley349
Oct 25, 20241 min read
Â
Â
Â


Math Lesson #8: Sets and Subsets
What's a set? A set is just a collection of items... in the case above it's a mini steam engine, a mango and a padlock... And what's a subset? It's just a collection of some or even all or none of those items... here the mini steam engine is missing... How many subsets can you make from a given set? For example, how many subsets can you make if your set has 3 items? To get a feeling for this, let's start with simpler cases... case 1: how many subsets if your set has 1 it
chrisbentley349
Oct 25, 20242 min read
Â
Â
Â


Math Lesson #9: How many 3-letter combinations?
How many combinations of 3 English letters exist? Any combination is fine, even if it's not a valid Engish word. So, "rkq" and "hhh" are ok... Well, there are 26 English letters, so there are 26 choices for the 1st letter: And 26 choices for the 2nd: And 26 choices for the 3rd: So, the total number of possibilities is 26 * 26 * 26 = 17,576... pretty cool!
chrisbentley349
Oct 24, 20241 min read
Â
Â
Â


Math Lesson #10: How many ways to re-order 3 cards?
How many ways to order 3 cards? Well, we can chose the ace first... that leaves us two choices for the second card, the 4 or the 9: So, we have either "Ace, 4, 9" or "Ace, 9, 4": Or, we can choose to start with the 9, which again leaves us with two choices for the second card: So, we have either "9, 4, Ace" or "9, Ace, 4": Finally, we can chose to start with the 4, which leaves two choices for the next card, the 9 or the Ace: So, we have either "4, Ace, 9" or "4, 9, Ace": Tak
chrisbentley349
Oct 22, 20241 min read
Â
Â
Â


Math Lesson #11: How many hands of 5 cards?
Well, there are 52 cards in a deck, so there are 52 choices for the first card: Leaving 51 choices for the second card: And 50 choices for the third card: And 49 for the fourth card: And 48 for the fifth card: So, this is 52 x 51 x 50 x 49 x 48 = 311,875,200 But, in poker it doesn't matter if you pull an Ace first or last... so we need to ignore the different order our cards can land in our hand. We saw in Math Lesson #10 that there are 5! = 120 ways of ordering 5 cards, so
chrisbentley349
Oct 21, 20241 min read
Â
Â
Â
bottom of page