I have six tiles numbered 1 to 6. Each is a different shape, (triangle, circle, square, pentagon, hexagon and octagon) and painted a different color (red, orange, blue, yellow, green and purple.)
I arranged the tiles in two rows of 3.
Given that
1) The top row formed an odd number and the bottom row a prime number
2) In the bottom row the colors were in reverse alphabetical order.
3) The Blue Number 1 was between the orange tile and the Circle;
4) The Hexagon was directly above the Red triangle numbered 4.
5) One tile has a color and shape beginning with the same letter.
Can you reproduce the layout?
(In reply to
Apology - Correction by Vernon Lewis)
Actually there are 12 solutons to the problem as listed:
215 215 215 215 215 215 215 215 215 215 215 215
oby oby gbo gbo gbo obg obg obg obp obp pbo pbo
hoc hsc cho cho chs ohc ohc shc ohc ohc cho cho
463 463 643 643 643 643 643 643 643 643 643 643
rpg rpg yrp yrp yrp yrp yrp yrp yrg yrg yrg yrg
tps tpo pts stp otp pts stp otp pts stp pts stp
where the colors are listed directly under the digits and the shapes directly under the colors.
Only one of these satisfies a condition that was originally in the puzzle in the queue: that the bottom row shapes also be in reverse alphabetic order.
50 cls
1000 S="sphoct":N="123456":C="ygprbo"
1010 Nh=N
1020 repeat
1030 Topnum=val(left(N,3)):Botnum=val(right(N,3))
1040 if Topnum@2=1 and prmdiv(Botnum)=Botnum then
1050 :Ch=C
1060 :repeat
1070 :Ix1=instr(N,"1"):Ix2=instr(C,"o"):Ix3=instr(C,"b")
1080 :if Ix1=Ix3 and (Ix1=2 or Ix1=5) and abs(Ix2-Ix1)=1 then
1090 :if mid(C,4,1)>mid(C,5,1) and mid(C,5,1)>mid(C,6,1) then
1100 :Sh=S
1110 :repeat
1120 :Circ=instr(S,"c")
1130 :Hexagon=instr(S,"h")
1140 :if abs(Ix1-Circ)=1 and Circ<>Ix2 then
1160 :Red=instr(C,"r"):Triangle=instr(S,"t"):IxFour=instr(N,"4")
1170 :if Red=Triangle and Red-Hexagon=3 and IxFour=Triangle then
1171 :Good=0
1172 :for Tile=1 to 6
1173 :if mid(C,Tile,1)=mid(S,Tile,1) then Good=1:endif
1174 :next
1178 :if Good then
1179 :Row=(Ct\12)*10+1:Col=(Ct@12)*6+1:Ct=Ct+1
1180 :locate Col,Row:print left(N,3):locate Col,Row+1:print left(
C,3):locate Col,Row+2:print left(S,3)
1181 :locate Col,Row+4:print right(N,3):locate Col,Row+5:print ri
ght(C,3):locate Col,Row+6:print right(S,3)
1182 :endif
1190 :endif
1210 :endif
1220 :gosub *Permute(&S)
1230 :until Sh=S
1240 :endif
1250 :endif
1260 :gosub *Permute(&C)
1270 :until Ch=C
1280 :endif
1290 gosub *Permute(&N)
1300 until Nh=N
9999 end
Note that the at-sign is part of the UBASIC programming language representing MOD. The comment editor automatically makes these e-mail address links, which they are not.
The Permute subroutine is elsewhere on the site.
|
Posted by Charlie
on 2007-02-25 14:21:04 |