This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programming Diversions and the fly likes Counting in decimal on 6-sided dice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "Counting in decimal on 6-sided dice" Watch "Counting in decimal on 6-sided dice" New topic

Counting in decimal on 6-sided dice

David O'Meara

Joined: Mar 06, 2001
Posts: 13459

I haven't tried this myself but thought it might be an interesting problem.
Given two 6-sided dice, and able to write any (single) number on any face of either dice, what is the largest number you can count up to (ie display each number starting from 1) and how are the numbers arranged on the dice?
Assume you only need to show a single value for numbers less than 10 ie 9 and not 09
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

my max is 29, I can't make 30
Vlado Zajac
Ranch Hand

Joined: Aug 03, 2004
Posts: 245
If 6 can be turned upside down and used as 9 it is 43. (otherwise 32)
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Nice, inverting a 6 would be allowed.
The practical use is that we have a Christmas thing with dice that count the days down to Christmas, and rather than looking to what they have I thought I'd pose the question here instead.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

I'm not sure whether I got the question.

> any (single) number

Do you mean cipher by that?

> count up to

That just means: arrange the two dice (being allowed to hide one of them), so that they show a number?

Ryan McGuire
Ranch Hand

Joined: Feb 18, 2005
Posts: 1041
What if, in addition to a 6 being flipped over to make a 9, you could also flip a 7 over to make a 1? In that case, how high could you count?

fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11855

well while we're at it...a lot of sports teams use the same thing for a '2' and a '5'. Or are we now making it too easy?

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
I agree. Here's the link:
subject: Counting in decimal on 6-sided dice
It's not a secret anymore!