Hearted Youtube comments on Mathologer (@Mathologer) channel.
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
I'm from Brazil, and I was taught Heron's formula very early on, around 3rd or 4th grade. It always puzzled me, because it seemed to have been dropped on my lap out of nowhere (as far as my education was concerned, it really was). Still, I'm personally thankful it happened, because my first memory of doing maths by myself, out of sheer curiosity and without any obligation to do so, was trying to verify it from the usual formula for the area of a triangle, equating the two and working through the algebra. I wasn't successful, of course, but it got me here eventually, so that's nice.
4
-
4
-
4
-
4
-
4
-
4
-
4
-
30:07 Minimum number of moves for 9 disk and 4 pegs (I think): 41 (^.^). You explained how to divide the disks into 3 superdisks for 8 disks but not for 9. So, just for fun, I tried every possible division in a very inefficient c++ code. I found that you can solve optimally in 41 moves if you divide the disks into 3 superdisks of 2, 3 and 4 disks (from top to down); also dividing them into 4 superdisks of 1, 1, 3 and 4; 1, 2, 2 and 4; AND 1, 2, 3 and 3. I didn't check if these divisions provide different solutions (Challenge for anybody?), but my guess is that, at least, the 3 and 4 superdisk divisions are different optimal solutions.
Calculation (hopefully) explained: Assume that you got to solve for 8 disks and 4 pegs, and you divide the 8 disks into 3 superdisks of 1, 3 and 4 disks (from top to down, like Mathologer did). Also note that f(n)=2^n-1 is the optimal number of moves to solve n disks and 3 pegs. Then, (hopefully) it's easy to see that the number of moves, following the Mathologer path, is equal to f(1)+f(3)+f(1)+f(4)+f(1)+f(3)+f(1)=4f(1)+2f(3)+f(4)=2^2 f(1)+2^1 f(3)+2^0 f(4). Note that the arguments of the f's add up to the 8 disks and also note the decreasing powers of 2. (hopefully) it's easy to see that, for n disks, 4 pegs and m superdisks of a1, a2, ..., am disks, such that a1+a2+...+am=n, the resulting number of moves is equal to 2^(m-1)f(a1)+2^(m-2)f(a2)+...+2^0 f(am). For the code, I simply apply this formula to every possible division of the 9 disks into superdisks. I cycle through the possible divisions in a very inefficient and lazy way: I go though all possible lists of between 1 and 9 elements with all possible values between 1 and 9, checking if the accumulation of the elements add up to 9. Seeing the formula, it's easy to see that it's not worth it to check superdisk divisions that are not in decreasing amounts of disks, but whatever.
Here's the code for anyone interested:
#include <iostream>
#include <vector>
#include <numeric>//accumulate algorithm
using namespace std;
int pow(int b,int e){//b to the power of e with e being a non negative integer
int ans=1;
for(int i=0;i<e;i++)ans*=b;
return ans;
}
int h3(int n){//optimal number of moves with 3 pegs
return pow(2,n)-1;
}
bool operator!=(vector<int>v0,vector<int>v1){//how to compare vectors
if(v0.size()!=v1.size())return 1;
for(size_t i=0;i<v0.size();i++)
if(v0[i]!=v1[i])return 1;
return 0;
}
int main(int argc, char *argv[]) {
int N=9;//total amount of disks
for(int i=1;i<=N;i++){//i is the number of superdisks used in this attempts
vector<int>v(i,1),v0=v;//v holds how many disk in each superdisk, v0 is the initial attempt
do{
if(accumulate(v.begin(),v.end(),0)==N){//the total amount of disks has to be N
int m=0;//total number of moves in this attempt
for(size_t i=0;i<v.size();i++){
m+=pow(2,i)*h3(v[i]);
cout<<"2^"<<i<<" f("<<v[i]<<")+";
}
cout<<'\b'<<'='<<m<<endl;
}
for(size_t i=0;i<v.size();i++)//cycle through all possible v's
if(v[i]==9)v[i]=1;
else{++v[i];break;}
} while(v!=v0);//all possible attempts has been searched when v loops back to v0
}
return 0;
}
Enjoy. (^.^)
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
The whole idea of "summoning" satan with pentagrams/pentacles comes from horror movies heavily misrepresentating thing.
First, the pentacle/pentagram, if pointed up, is a protection symbol, and has been used by many religions, including Christianity, Pagans, and others.
Second, if pointed down, the symbol is linked to Satanist, which doesn't really have the right name since we don't even believe in Satan, and most Satanist are basically atheists with a few more rules (which are mostly common sence, ex. dont hurt kids; dont hurt innocents; if someone invites you, respect them; and so on) and the few that do believe in an entity believe in either Lucifer (which is NOT the one from the Bible) or Baphomet, which represents balance as they are both female and male, light and dark, good and bad, and so on.
4
-
4
-
4
-
4
-
4