Problem 389

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
Post Reply
psujono
Posts: 7
Joined: Sun Mar 18, 2012 8:09 am

Problem 389

Post by psujono »

Problem 389 (View Problem)
What is meant by "Find the variance of I"?
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 389

Post by TripleM »

psujono
Posts: 7
Joined: Sun Mar 18, 2012 8:09 am

Re: Problem 389

Post by psujono »

So that would be the square of the standard deviation?
mdean
Posts: 206
Joined: Tue Aug 02, 2011 2:05 am

Re: Problem 389

Post by mdean »

I was wondering what the code was with those letters for a minute before I figured it out:

Tetrahedron
Cube
Octahedron
Dodecahedron
Icosahedron

Ah well, probability is one of my weak points, but I may just have to attempt this problem anyway. Hoping I can complete it and maybe learn something from the other solutions.
Image
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Re: Problem 389

Post by thundre »

mdean wrote:Tetrahedron
Cube
Octahedron
Dodecahedron
Icosahedron
The Platonic solids. I didn't even notice!

You can make fair dice (all faces congruent and symmetric) with any even number of sides, but the Platonic solids are the only ones where the faces are all regular polygons.
Image
richard
Posts: 2
Joined: Fri Jun 22, 2012 12:05 am

Re: Problem 389

Post by richard »

I feel like I am solving this correctly but my answer is not accepted so obviously I've done something wrong. I've spent a lot of time looking for a mistake in my implementation but I'm not having any luck. Can someone post the variance of O (the results of the 8-sided dice) as an example that I can check against?

If that's too much of a clue maybe someone can give the variance for some other scenario involving dice with different numbers of sides from the actual problem (but involving at least 3 different types of dice) For example, one 5-sided = A then A 7-sided = B then B 9-sided = C, give the variance of C).
User avatar
Marcus_Andrews
Administrator
Posts: 1637
Joined: Wed Nov 09, 2011 5:23 pm

Re: Problem 389

Post by Marcus_Andrews »

The answer to your 5-7-9 example: 1180.0
richard
Posts: 2
Joined: Fri Jun 22, 2012 12:05 am

Re: Problem 389

Post by richard »

Thanks Marcus, I was able to track my bug down given the sample solution. I had calculated the variance across every unique roll sequence instead of based on the actual probabilities of the sequences.
User avatar
Marcus_Andrews
Administrator
Posts: 1637
Joined: Wed Nov 09, 2011 5:23 pm

Re: Problem 389

Post by Marcus_Andrews »

For future reference: I hope this is not too much of a spoiler, but a way to sanity-check your results manually if you are having trouble is to make a brute-force program that simulates dice rolls and calculates values for the variable I over and over again. That way you can calculate the variance on the fly to help cross-check your main program.
User avatar
hk
Administrator
Posts: 12831
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 389

Post by hk »

Marcus Stuhr wrote:For future reference: I hope this is not too much of a spoiler
I certainly isn't a spoiler.
It cannot be said often enough:
If you have an idea how to bruteforce for lower limits, or simpler cases or less accurate: just make that bruteforcer and check the results of more advanced programs with that.

It's just a way of solving your problems that should become a second nature.
I also use it when designing problems and when checking other's proposals.
Image
War ruins the life and health of untold numbers of innocent children.
haphaeu
Posts: 2
Joined: Mon Oct 14, 2013 8:16 pm

Re: Problem 389

Post by haphaeu »

Hi there,
sorry, this is sort of a silly question but I just want to make sure I'm getting it right...
Since this problem involves a floating point, the answer should be given with the dot and the following 4 places? Like xyz.1234 ?
Or should I just ignore the dot and enter, say, xyz1234?
Thanks!
toca pra cima
Image
User avatar
hk
Administrator
Posts: 12831
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 389

Post by hk »

Like xyz.1234.
Image
War ruins the life and health of untold numbers of innocent children.
haphaeu
Posts: 2
Joined: Mon Oct 14, 2013 8:16 pm

Re: Problem 389

Post by haphaeu »

thundre wrote:
mdean wrote:Tetrahedron
Cube
Octahedron
Dodecahedron
Icosahedron
The Platonic solids. I didn't even notice!

You can make fair dice (all faces congruent and symmetric) with any even number of sides, but the Platonic solids are the only ones where the faces are all regular polygons.
wouldn't it make more sense using Hexahedron? :)
toca pra cima
Image
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Re: Problem 389

Post by thundre »

haphaeu wrote:
thundre wrote:You can make fair dice (all faces congruent and symmetric) with any even number of sides, but the Platonic solids are the only ones where the faces are all regular polygons.
wouldn't it make more sense using Hexahedron? :)
Good point! A Hexahedron isn't Platonic because the vertexes don't all join the same number of sides. But all the faces are regular (provided all the sides are the same length).

How many other solids have regular congruent faces but aren't Platonic?
Image
User avatar
hk
Administrator
Posts: 12831
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 389

Post by hk »

How about http://en.wikipedia.org/wiki/Platonic_solid ?
There it says that a cube=a hexahedron=a six sided Platonic solid.

Please note that the problem statement doesn't use the terms -hedron or cube.
Image
War ruins the life and health of untold numbers of innocent children.
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Re: Problem 389

Post by thundre »

hk wrote:How about http://en.wikipedia.org/wiki/Platonic_solid ?
There it says that a cube=a hexahedron=a six sided Platonic solid.

Please note that the problem statement doesn't use the terms -hedron or cube.
Oops! I thought it meant two tetrahedrons joined at the face. My bad.
Image
square1001
Posts: 27
Joined: Tue Mar 15, 2016 2:58 am
Location: Tokyo, Japan
Contact:

Re: Problem 389

Post by square1001 »

What numbers are written in each dice? I don't know even 1-indexed or 0-indexed.
Please tell me.
Image
User avatar
Animus
Administrator
Posts: 1987
Joined: Sat Aug 16, 2014 1:23 pm

Re: Problem 389

Post by Animus »

The dice are 1-indexed, e.g. the numbers on the 4 sided die run from 1 to 4.
Junglemath
Posts: 72
Joined: Fri Sep 20, 2019 1:25 pm
Location: Minsk

Re: Problem 389

Post by Junglemath »

Animus wrote: Thu Jun 01, 2017 10:40 am The dice are 1-indexed, e.g. the numbers on the 4 sided die run from 1 to 4.
I had the same question as the person you replied to. The question does not specify the numbers on the dice, but only how many faces they have. I don't think it should be assumed that the numbers on the faces go from 1 to $n$. Can you add this condition explicitly to the problem statement?
Post Reply