• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Grain

Digits of Pi

30 posts in this topic

I'm kind of OCD and irrational numbers really bother me. So how many digits of Pi would you need to calculate a circle the size of the known universe with the accuracy of the Planck length? That way, at least in a physical sense Pi does have a practical end and I can stop worrying about it.
2

Share this post


Link to post
Share on other sites
I understand that being OCD is not the result of some rational process. But, can you try to describe what exactly bothers you about irrational numbers?
0

Share this post


Link to post
Share on other sites
I like thing that are evenly spaced, or symmetrical or balanced. Irrational and prime numbers bother me just because you can't make them line up evenly with things.
0

Share this post


Link to post
Share on other sites

Don't represent it using digits then. The ancient greek mathematicians got by pretty well without having a proper number system to assist them, instead, performing math using geometry. If you represent Pi using geometry, it's about the most ordered image possible cool.png

2

Share this post


Link to post
Share on other sites

It's not that nice in geometry - try constructing a square with the same area as a given circle using a compass and unmarked straight edge ;)

 

http://en.wikipedia.org/wiki/Squaring_the_circle

 

EDIT: You can't do it with origami either! Although you can use origami to double the cube and to trisect an angle, both of which are not constructible using ruler and straightedge.

 

EDIT2: Although if you have magic scissors which can cut the circle up into non-measurable sets you can cut up a circle and reassemble it into a square (assuming the axiom of choice) - http://en.wikipedia.org/wiki/Tarski%27s_circle-squaring_problem there is a solution which only requires 1050 pieces! Which is much harder than cutting up a ball using a magic knife and then reassembling it into 2 identical copies (good if you do it with a ball of gold! Infinite money), since that can be done with just 5 pieces! http://en.wikipedia.org/wiki/Banach%E2%80%93Tarski_paradox

Edited by Paradigm Shifter
0

Share this post


Link to post
Share on other sites

A favorite joke of mine (and one of the jokes with the smallest target audience I know): An anagram of "Banach-Tarski" is "Banach-Tarski Banach-Tarski". :)

1

Share this post


Link to post
Share on other sites

I like thing that are evenly spaced, or symmetrical or balanced. Irrational and prime numbers bother me just because you can't make them line up evenly with things.

 

Like so many parts of mathematics, irrational numbers seem a little unwelcome at first but there are plenty of beautiful things to discover about them.  I suggest you learn a bit more, but understand that it is up to you to decide what kind of arithmetic you will use to solve any particular problem - for example, most of computer science only really requires you to use the integers.  Like fractions, complex numbers and even negative numbers, you can think of irrational numbers as an optional extension.

 

So what's beautiful about irrational numbers?  They aren't just a special exception for awkward numbers like e and pi - there are actually more irrational numbers than rational numbers (look up Cantor's diagonal argument).  Yet between any two irrational numbers you can always find a rational, and vice-versa, between any two rational numbers you can always find an irrational.

 

When you think about it it they come up in real life as well, just you aren't necessarily aware of them.  Wouldn't it be strange, for example, if you measured the distance between two atoms and it turned out to be exactly 1 metre?  Or an exact fraction like 1.4 metres?  Or even a long fraction like 1.453162343055682m?  It seems much more likely that the number would be an infinite series of random-looking digits, which would make the distance an irrational number.

 

Pi is actually an extraordinarly organized irrational number.  Although you cannot express it as an exact fraction, you can express it exactly as the limit of an infinite series such as:

 

pi = 4/1 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 + ...

 

I think I'll stop there.  I encourage you to find out more, and I do hope I've make this better for you not worse...

0

Share this post


Link to post
Share on other sites


When you think about it it they come up in real life as well, just you aren't necessarily aware of them. Wouldn't it be strange, for example, if you measured the distance between two atoms and it turned out to be exactly 1 metre? Or an exact fraction like 1.4 metres? Or even a long fraction like 1.453162343055682m? It seems much more likely that the number would be an infinite series of random-looking digits, which would make the distance an irrational number.

 

That assumes a naive model for the universe in which we live. The distance between two atoms is not a number that can be determined with arbitrary precision, so it doesn't make a lot of sense to ask whether it is rational or irrational. I am not a physicist, but my understanding is that this is not just a limitation of our instruments, but a feature of nature.

 

The way I think of the world these days, everything that matters is discrete. Real numbers are a convenient approximation in situations where the numbers are large enough. This is often the case in physics; but there is nothing "real" about real numbers.

1

Share this post


Link to post
Share on other sites
Like so many parts of mathematics, irrational numbers seem a little unwelcome at first but there are plenty of beautiful things to discover about them.

 

Though, everything with a grain of salt. Equally, like many parts of mathematics, irrational numbers have the property that they aren't very practical. Mathematics work exceptional well for mathematical problems, and they can be fun to think about, but they're not necessarily very suited for reality. biggrin.png

 

Mathematics allow you to calculate the likelihood that in a group of n people, two will have the same birthday. Which, of course, works fine for purely mathematical problems such as hash functions. On the other hand, it's complete bollocks for actually calculating the likelihood of two people having the same birthday in any group of real random people, since the base assumptions are wrong. Real birthdays are, in contrast to the mathematical thought experiment, very unevenly spaced. Not only due to seasons, but also due to holidays.

 

Mathematics tell you that you can't divide by zero. An electric engineer will tell you that it's very easily possible. Division by zero is the moment when there's that little electric arc, and current goes to infinity, just before your board goes up in flames.

 

Mathematics tell you that the likelihood of a goat being behind Monty's doors changes when he opens another one, and you're twice as likely to win if you change mind. Unless Monty's assistant is swapping prizes behind the scene (which of course we cannot know for sure), the likelihood doesn't change. Again, while the reasoning is correct, the assumptions and conclusions are wrong (the mathematican coming up with the proof has probably never seen the show).

 

Mathematicians come up with thought games like prisoner's dilemma where you can either defect or cooperate (= confess), but ignore the fact the only realistic outcome to asking would be that each prisoner will blame the other one alone, but moreover the police doesn't ask. The police are lying, they'll tell each suspect that his partner "has already confessed" and that the only way of getting a somewhat lesser sentence is to also confess. If that doesn't make you confess, they'll not let you sleep for 72 hours. You'll confess anything they want anyway only so you get to sleep. Again, the mathematician's base assumptions are unrealistic, and it's a fun thought experiment, but that's all it is.

 

Mathematics tell you that all numbers on a roulette wheel are equally likely, and that all lottery tickets are equally likely to win. Yet when you look at reality, some numbers do occur significantly more often than others. Mathematicians speak of "fallacy" in this context, but in reality the fallacy is with them. They assume all lotto balls are identical in size and weight and start from the same position, etc. when in reality they don't. They assume that the roulette ball is equally likely to drop into the field you've betted on as to drop into a field close to the eddy current brake. Which of course isn't the case, that's what casinos make money with.

 

Mathematics tell you that pi is neither 22/7 nor 355/113. However, for all practical means, it is. You yet have to draw a circle on the ground and demonstrate a practical difference with your tape measure. Wise people like Aristotle or Liu Hui already knew this 2,000 years ago.

Mathematics allow you to calculate the length of a circle the size of the known universe when in reality you neither really know the size of the known universe nor whether or not it expands (you only know one possible interpretation of what you see), nor do you know whether the universe is even approximately of circular/spherical shape, nor would you be able to tell whether the result is correct.

-2

Share this post


Link to post
Share on other sites

 


When you think about it it they come up in real life as well, just you aren't necessarily aware of them. Wouldn't it be strange, for example, if you measured the distance between two atoms and it turned out to be exactly 1 metre? Or an exact fraction like 1.4 metres? Or even a long fraction like 1.453162343055682m? It seems much more likely that the number would be an infinite series of random-looking digits, which would make the distance an irrational number.

 

That assumes a naive model for the universe in which we live. The distance between two atoms is not a number that can be determined with arbitrary precision, so it doesn't make a lot of sense to ask whether it is rational or irrational. I am not a physicist, but my understanding is that this is not just a limitation of our instruments, but a feature of nature.

 

The way I think of the world these days, everything that matters is discrete. Real numbers are a convenient approximation in situations where the numbers are large enough. This is often the case in physics; but there is nothing "real" about real numbers.

 

 

Yeah, fair point, I was assuming a simple Newtonian / Euclidian universe - just trying to build up some kind of intuition about what irrational numbers are.

0

Share this post


Link to post
Share on other sites
Mathematics tell you that the likelihood of a goat being behind Monty's doors changes when he opens another one, and you're twice as likely to win if you change mind. Unless Monty's assistant is swapping prizes behind the scene (which of course we cannot know for sure), the likelihood doesn't change. Again, while the reasoning is correct, the assumptions and conclusions are wrong (the mathematican coming up with the proof has probably never seen the show).

 

I agree with what you said about mathematics being based on assumptions, but I think you've got this one confused.  The Monty Hall problem isn't about absolute probabilities (which are simply 1 for the door with the prize behind it, 0 for the other two doors) it's about conditional probabilities given the information available to you.  Initial that is nothing so they begin at 1/3, 1/3, 1/3, but when the presenter opens one of the doors you did not choose this affects your probabilities in an asymmetric way.  If you aren't convinced, draw up all nine possibilities (3 positions of the prize and 3 possible guesses) and see how often you do better by changing!

Edited by Geoffrey
0

Share this post


Link to post
Share on other sites

Do the Monty Hall problem with 1,000,000 doors instead. Pick a door at random. Then the host opens up 999,998 doors and they all have goats behind them. Do you change your pick? If yes, how many doors do you think you need to have to make it a better choice to change? Correct answer: 3, as in the original problem.

 

Paul Erdos also disagreed with the Monty Hall problem, until he was shown a computer simulation ;) And Erdos used probabilistic arguments to prove results in combinatorics!

2

Share this post


Link to post
Share on other sites

Most of samoth's examples indicate lack of understanding. In particular, I really don't get why people get stuck on the Monty Hall problem. When you learn more information about a situation, the probabilities do change.

0

Share this post


Link to post
Share on other sites

I really don't get why people get stuck on the Monty Hall problem. When you learn more information about a situation, the probabilities do change.

 

But we don't generally encounter evolving situations like this much in education, so most people aren't really equipped to accept the counterintuitive result (I know I wasn't, the first time I saw it).  This is exactly why it's such a good problem, because it teaches young mathematicians that their intuition can be wrong.  If you got it right the first time, congratulations, but maybe one day something else will come along to keep your ego in check.  :)

0

Share this post


Link to post
Share on other sites

I can give you another probability problem that I like even better than the Monty Hall problem. Two people play Russian roulette the following way: A neutral referee goes into a room and secretly tosses a fair coin, either puts a bullet in a revolver or doesn't --depending on the result of the coin toss--, spins the drum, comes out of the room and hands the gun to one of the participants. Then the participants will take turns pointing the revolver at their own head and pulling the trigger. The revolver's drum has 6 chambers for bullets.

 

Imagine you are participating in such a game, your opponent goes first, pulls the trigger and no bullet comes out, then you go, then the opponent again, then you, then the opponent once more. Still no bullet. Now you are at the sixth position, so if there is a bullet in the revolver, you are going to get it. What is the probability that you will get your brains blown out when you pull the trigger?

0

Share this post


Link to post
Share on other sites
Do the Monty Hall problem with 1,000,000 doors instead.

Yes, yes... Vos Savant's well-known explanation. Very entertaining, very smart. Except it's based on a wrong assumption. Monty isn't forced to, and indeed doesn't always open a door with a goat. And that's the point.

I watched that show a few times when I was around 10 years old, and sure enough, they'd sometimes (admittedly rarely) bring out the prize on the first door. If the host doesn't like you and you choose the goat, they just give you the goat. They'd occasionally have only one "zonk" (that's what the "goat", which is a fluff animal, is called here), too. In that case, you'd have a car in one vault, a home trainer or some equivalent value in another, and a "zonk".

You thus have a 1/3 (or 2/3, if there's a second prize) chance of "surviving" round 1. But of course you always "survive" since your vault isn't opened. Insofar the 1/3 chance is entirely irrelevant. You could just as well not make any kind of choice and only decide in round two.

The second round is an independent event. Which leaves you with two vaults, or a 50/50 chance.

The only "gained information" that you have between rounds 1 and 2 is that there are now 2 doors instead of 3. So the chance has "gone up" to 1/2 from 1/3, but it's none higher for either door. And it sure isn't magically 2/3 for one door because you didn't decide to change your mind.

That left aside, you don't know if the host is cheating and assistants move prizes around after you made your final choice. There's no way of knowing.

Edited by samoth
-1

Share this post


Link to post
Share on other sites

Of course, a good description of the Monty Hall problem makes the assumptions explicit. The applicability to the show that inspired the problem is something I don't particularly care about.

 

Will anyone give my problem a try? You can write a simulation, if you can't think of the math...

0

Share this post


Link to post
Share on other sites

Will anyone give my problem a try? You can write a simulation, if you can't think of the math...

 

Fairly sure it's 1/7.

1

Share this post


Link to post
Share on other sites

 

Will anyone give my problem a try? You can write a simulation, if you can't think of the math...

 

Fairly sure it's 1/7.

 

 

Yay! This is my favorite way of introducing Bayes' theorem. I tried asking a few non-science types, and I got "1/2" a lot. I bet it's quite correlated with the Monty Hall problem.

0

Share this post


Link to post
Share on other sites

That's another good example of mathematics being unreal. The chance of killing yourself in Russian Roulette is known to be considerably less than 1/6 with the first shot.

Why? Because the gun doesn't care that you say it's a 1/6 chance, but gravity makes sure that most of the time the loaded chamber stops at the bottom.

Insofar, the person getting the 3rd shot in row has by far the highest chance of blowing their brain out, if there's a bullet in the gun.

 

But assuming the gun obeys your math, the chance is exactly 50%. Every time someone pulled the trigger, there was a chance he'd blow out his brain, assuming there was a bullet loaded in one of the chambers. And yes, pulling the trigger three times in a row and still being alive is less likely than only having to pull it once. But whatever, it didn't happen, it's over.

 

Now there is only one chamber left that hasn't been triggered/tried, and you must use this one. Which means you could just as well use a single-chamber gun (one of those things they use in pirate movies) that has been secretly loaded (or not loaded) by a referee (with a fair coin, if you will).

 

So, the chance of blowing out your brain is only dependent on whether the referee put in a bullet or not. No matter what nice mathematics you do, it only depends on whether the referee put in a bullet, or not.

-2

Share this post


Link to post
Share on other sites

Oh, let's convince the Erd?s-style thinkers out there:

 

#include <iostream>
#include <cstdlib>
#include <ctime>

int main() {
  std::srand(std::time(0));
 
  int brains_blown_out_counter = 0;
  int brains_not_blown_out_counter = 0;
  int things_did_not_go_as_described_in_the_problem_counter = 0;
 
  for (int i=0; i<10000000; ++i) {
    bool is_there_a_bullet_at_all = std::rand() % 2;
    int chamber_if_there_is_a_bullet = std::rand() % 6;
    if (is_there_a_bullet_at_all == false) {
      brains_not_blown_out_counter++;
    }
    else if (chamber_if_there_is_a_bullet == 5) {
      brains_blown_out_counter++;
    }
    else
      things_did_not_go_as_described_in_the_problem_counter++;
  }
  std::cout << "Brains blown out: " << brains_blown_out_counter << '\n';
  std::cout << "Brains not blown out: " << brains_not_blown_out_counter << '\n';
  std::cout << "Things did not go as described in the problem: " << things_did_not_go_as_described_in_the_problem_counter << '\n';
  std::cout << "Frequency of brains blown out given that things did go as described in the problem: " <<
    double(brains_blown_out_counter) / (brains_blown_out_counter + brains_not_blown_out_counter) << '\n';
}

 

Output:

Brains blown out: 834503
Brains not blown out: 4998343
Things did not go as described in the problem: 4167154
Frequency of brains blown out given that things did go as described in the problem: 0.14307
1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0