All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Classroom Dice (Posted on 2008-09-24) Difficulty: 3 of 5
The class had 30 students, but a few were absent that day. The teacher gave each student present a cardboard cube and either a red or a blue marking pen, and she told each student to mark the faces of his or her cube like the faces of a die: with numbers 1 through 6 on the faces in such a manner that opposite faces add to 7. This was the only required similarity to a standard die.

The teacher gathered all the cubes and placed all the red-marked ones in one row, and all the blue-marked ones in another row. Both rows stretched from left to right and each cube had its 5 face on top and its 3 face toward the teacher.

In the red row, the sum of the digits on the left sides of the cubes was a perfect square, as was the sum of the digits on the right sides.

In the blue row, the corresponding sums were not squares, but rather prime numbers. The ratio of the larger to the smaller prime was less than 2.

How many students were absent? How many red markers and how many blue markers were handed out? What were the sums involved (the perfect squares and the primes)?

  Submitted by Charlie    
Rating: 4.0000 (1 votes)
Solution: (Hide)
There were 4 absences, leaving 26 students, 14 with red markers and 12 with blue.

The sums for the red-marked cubes were both 49, each containing 7 1's and 7 6's. For the blue cubes, the sums were 37 (7 1's and 5 6's) and 47 (5 1's and 7 6's).

DATA 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73
DATA 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163
DATA 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251
CLS
DIM prim(42)
DO
i = i + 1
READ prim(i)
LOOP UNTIL prim(i) > 180
nPrimes = i

PRINT nPrimes

FOR absent = 1 TO 29
class = 30 - absent
FOR red = 1 TO class - 1
blue = class - red
FOR left1 = 0 TO red
leftSum = left1 + 6 * (red - left1): rightSum = 6 * left1 + (red - left1)
sr1 = INT(SQR(leftSum) + .5): sr2 = INT(SQR(rightSum) + .5)
IF sr1 * sr1 = leftSum AND sr2 * sr2 = rightSum THEN

FOR left1b = 1 TO blue - 1
leftSum = left1b: rightSum = 6 * (blue - left1b)
leftSum = left1b + 6 * (blue - left1b): rightSum = 6 * left1b + (blue - left1b)
IF leftSum / rightSum > 1 AND leftSum / rightSum < 2 OR rightSum / leftSum > 1 AND rightSum / leftSum < 2 THEN FOR i = 1 TO nPrimes
IF leftSum = prim(i) THEN good1 = 1
IF rightSum = prim(i) THEN good2 = 1
NEXT i
IF good1 AND good2 THEN
PRINT absent; class, red; blue, left1; left1b
END IF
END IF
NEXT left1b

END IF
NEXT left1
NEXT red
NEXT absent

Based on "A question of symmetry", Enigma No. 1509, by Adrian Somerfield, New Scientist, 30 August 2008.

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Puzzle AnswerK Sengupta2023-07-22 02:05:47
My first ever trial/error solutionrod hines2008-09-26 18:58:56
Puzzle correctionCharlie2008-09-24 16:32:08
re: Solutioned bottemiller2008-09-24 12:36:22
Solution(continued)ed bottemiller2008-09-24 12:18:30
SolutionSolutionDej Mar2008-09-24 12:02:21
Solution (prior)ed bottemiller2008-09-24 11:55:05
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information