Turmoil reigns at the Court of the White King; all pieces oppose one another.
The King and his entourage (The queen, king, and the 3 pieces to his right) can be spread inside the 5 x 5 domain from [Q1 - KR5] with only the King on the first rank, where he is at home.
During this state of upheaval no piece threatens another.
Within a smaller domain than the given 5x5 space, place the pieces such that the Queen can force "mate" in just one move while remaining free from aggression herself, though possibly threatening others. (I note two different arrangements)
Note:
1. Other than the "domestic aggression" all chess rules still apply.
2. No dimension of the smaller domain is greater than 5.
Bonus:
1. How many cases of the White Court's disarray can you find? I have slightly over 30.
2. Offer one where Q and KB files are vacant.
(In reply to
Solution by Dej Mar)
90 non-attacking courtyard arrangements:
bn... b.n.. .nb.. .nb.. ..bn. > ..bn. ..b.n ..b.n
..r.. ...r. r.... ....r r.... q.... r.... q....
....q ..... ..... ..... ..... ..... ..... .....
..... ....q ...q. ...q. ....q ....r ...q. ...r.
.k... .k... .k... .k... .k... .k.Q. .k... .k...
..b.. ..b.. > .n..b .n..b > ..n.b > ...nb ....b > ....b
q.... q.... r.... ..r.. ..... ..r.. q.... ..r..
...r. ..... ..... ..... r.... qQ... ....n qQ...
....n ...r. ...q. ...q. ...q. ..... ...r. ....n
.k... .k..n .k.Q. .k... .k.Q. .k... .k... .k...
....b > ....b ....b > ....b ....b ....b ....b ....b
q.... ..r.. ..q.. ..r.. ..q.. q.... ..q.. .....
...r. qQ... r.... qQ... r.... ..... ..... q....
....n ..... ..... ..... ..... ...r. ...r. ...r.
.k... .k.n. .k.n. .k..n .k..n .k..n .k..n .k..n
...r. ...r. ....q ...q. > ...q. ...r.*> ...n. ...n.
nb... nb... nb... nb... nb... .b... ...b. ...b.
....q ..... ...r. ....r ..... .n... r.... q....
..... ....q ..... ..... ....r ....q ....q ....r
.k... .k... .k... .k... .k.Q. .k... .k.Q. .k...
> r.... > ..... > qQ... q.... ..... n.... > n.... ...r.
.n.b. .n.b. ...b. ...b. ...b. ...r. ...q. n....
..... r.... ...n. ..... q.... b.... b.... b....
....q ....q ....r ....r ....r ....q ....r ....q
.k.QQ .k.QQ .k... .k.n. .k.n. .k... .k.Q. .k...
....r > ....q > ...q. ...r. ....q ....r ....q .....
n.... n.... n.... ..... ..r.. ..q.. ..r.. ..q..
b.... b.... b.... bn... bn... b.... b.... b....
...q. ...r. ....r ....q ..... ..... ..... ...r.
.k... .k..Q .k.Q. .k... .k... .k.n. .k.n. .k..n
...r. > ..... > .Q... q.... ...r. > ...q. q.... > r....
..... r.... q.... ..r.. q.... r.... ..r.. .Qq..
.nb.. .nbQ. .Qbn. ...nb ....b .Q..b ....b .Q..b
....q ....q ....r ..... ....n ....n ....n .....
.k... .k.Q. .k.Q. .k... .k... .k... .k... .k..n
...r. > .Q.q. ...n. ...n. ....r ..r.. ..q.. .....
q.... r.... ..r.. ....r ...n. q.... r.... ..r..
....b .Q..b q.... q.... q.... ..... ..... q....
..... ..... ...b. ...b. ...b. ...bn ...bn ...bn
.k..n .k..n .k... .k... .k... .k... .k... .k...
....r ....r ..q.. ....q ....q ..... ..q.. .....
..q.. ..... r.... r.... ..r.. ..r.. ....r ....r
..... q.... ..... ..... ..... q.... ..... q....
...b. ...b. ...b. ...b. ...b. ...b. ...b. ...b.
.k.n. .k.n. .k.n. .k.n. .k.n. .k.n. .k.n. .k.n.
> ....q > ..... ...n. ....n ...r. ..r.. ..r.. ...r.
....Q ..q.Q ..r.. ...r. ....n q.... q.... q....
r.... r.... q.... q.... q.... ....n ..... .....
...b. ...b. ..... ..... ..... ..... ....n ....n
.k.n. .k.n. .k..b .k..b .k..b .k..b .k..b .k..b
...r. ..q.. > ...q. ..... ...q. ..q.. ..... ..q..
..... r.... r.... ..r.. ..... ..... q.... r....
q.... ..... .Q... q.... r.... ...r. ...r. .....
....n ....n ....n ....n ....n ....n ....n .....
.k..b .k..b .k..b .k..b .k..b .k..b .k..b .k.nb
..... .....
..r.. ..q..
q.... r....
..... .....
.k.nb .k.nb
I've used lower case throughout, and used a capital Q to indicate where the Queen would go to checkmate the King (22 cases), when there's such an attack available, which is also indicated with a > pointing to the particular arrangement. The * is to the right of an arrangement where the Queen's file and the King's bishop's file are empty.
Two examples of arrangements not found by Dej Mar:
..q.. ..q..
..... r....
...r. .....
....n .....
.k..b .k.nb
The height (ht) and width (wd) and king's column (kc) in the program below are adjustable. The output actually was sent to a file, and the less than symbol after each solution was switched to the left side and changed to a greater than symbol.
ht = 5: wd = 5
CLS
REDIM bd$(ht, wd)
kr = ht: kc = 2
bd$(ht, kc) = "k"
FOR br = 1 TO ht
FOR bc = 1 TO wd
IF (br < kr - 1 OR ABS(bc - kc) > 1) AND ABS(br - kr) <> ABS(bc - kc) AND (ABS(br - kr) + ABS(bc - kc)) MOD 2 = 1 THEN
bd$(br, bc) = "b"
FOR nr = 1 TO ht
FOR nc = 1 TO wd
IF (nr < kr - 1 OR ABS(nc - kc) > 1) AND ABS(br - nr) <> ABS(bc - nc) THEN
nkDiffR = ABS(kr - nr): nkDiffC = ABS(kc - nc)
nbDiffR = ABS(br - nr): nbDiffC = ABS(bc - nc)
IF (nkDiffR <> 2 OR nkDiffC <> 1) AND (nkDiffR <> 1 OR nkDiffC <> 2) AND (nbDiffR <> 2 OR nbDiffC <> 1) AND (nbDiffR <> 1 OR nbDiffC <> 2) THEN
bd$(nr, nc) = "n"
FOR rr = 1 TO ht
FOR rc = 1 TO wd
IF (rr < kr - 1 OR ABS(rc - kc) > 1) AND ABS(br - rr) <> ABS(bc - rc) THEN
IF rr <> kr AND rc <> kc AND rr <> nr AND rc <> nc AND rr <> br AND rc <> bc THEN
nrDiffR = ABS(rr - nr): nrDiffC = ABS(rc - nc)
IF (nrDiffR <> 2 OR nrDiffC <> 1) AND (nrDiffR <> 1 OR nrDiffC <> 2) THEN
bd$(rr, rc) = "r"
FOR qr = 1 TO ht
FOR qc = 1 TO wd
IF (qr < kr - 1 OR ABS(qc - kc) > 1) THEN
IF qr <> kr AND qr <> rr AND qr <> br AND qr <> nr AND qc <> kc AND qc <> rc AND qc <> bc AND qc <> nc THEN
IF ABS(qr - kr) <> ABS(qc - kc) AND ABS(qr - br) <> ABS(qc - bc) AND ABS(qr - nr) <> ABS(qc - nc) AND ABS(qr - rr) <> ABS(qc - rc) THEN
nqDiffR = ABS(qr - nr): nqDiffC = ABS(qc - nc)
IF (nqDiffR <> 2 OR nqDiffC <> 1) AND (nqDiffR <> 1 OR nqDiffC <> 2) THEN
bd$(qr, qc) = "q"
good2 = 0
FOR dr = -1 TO 1
FOR dc = -1 TO 1
IF dr <> 0 OR dc <> 0 THEN
q2r = qr + dr: q2c = qc + dc
DO WHILE q2r > 0 AND q2r <= ht AND q2c > 0 AND q2c <= wd
IF (q2r < kr - 1 OR ABS(q2c - kc) > 1) THEN
IF q2r = kr OR q2c = kc OR ABS(q2r - kr) = ABS(q2c - kc) THEN
' be careful, though, there might be blocking pieces now, not checked for
' we will check for the queen being attacked however:
IF q2r <> rr AND q2c <> rc AND ABS(q2r - br) <> ABS(q2c - bc) THEN
nqDiffR = ABS(q2r - nr): nqDiffC = ABS(q2c - nc)
IF (nqDiffR <> 2 OR nqDiffC <> 1) AND (nqDiffR <> 1 OR nqDiffC <> 2) THEN
good = 1
FOR kdr = -1 TO 1
FOR kdc = -1 TO 1
hid = 1
k2r = kr + kdr
k2c = kc + kdc
IF k2r <= ht AND k2r > 0 AND k2c <= wd AND k2c > 0 THEN
IF k2r = q2r OR k2c = q2c OR ABS(k2c - q2c) = ABS(k2r - q2r) THEN hid = 0
' again, this doesn't check for a blocked queen, so may get false checkmate
nkDiffR = ABS(k2r - nr): nkDiffC = ABS(k2c - nc)
IF (nkDiffR = 2 AND nkDiffC = 1) OR (nkDiffR = 1 AND nkDiffC = 2) THEN
hid = 0
END IF
IF k2r = rr OR k2c = rc OR ABS(k2c - bc) = ABS(k2r - br) THEN hid = 0
IF hid THEN good = 0: EXIT FOR
END IF
NEXT
IF good = 0 THEN EXIT FOR
NEXT
IF good THEN
bd$(q2r, q2c) = "Q"
good2 = 1
END IF
END IF
END IF
END IF
END IF
q2r = q2r + dr: q2c = q2c + dc
LOOP
END IF
NEXT dc
NEXT dr
IF good2 OR ABS(rc - kc) <> 1 AND ABS(qc - kc) <> 1 AND ABS(bc - kc) <> 1 AND ABS(nc - kc) <> 1 THEN
r0 = (ct 8) * 6 + 1
c0 = (ct MOD 8) * 10 + 1
SELECT CASE (ct 8) MOD 2
CASE 0
COLOR 14
CASE 1
COLOR 7
END SELECT
FOR r = 1 TO ht
FOR c = 1 TO wd
LOCATE r0 + r, c0 + c
IF bd$(r, c) > "" THEN
PRINT bd$(r, c);
IF bd$(r, c) = "Q" THEN bd$(r, c) = ""
ELSE
PRINT ".";
END IF
NEXT
IF r = 1 THEN
IF ABS(rc - kc) <> 1 AND ABS(qc - kc) <> 1 AND ABS(bc - kc) <> 1 AND ABS(nc - kc) <> 1 THEN
PRINT "*";
IF good2 THEN PRINT "!";
ELSE
IF good2 THEN PRINT "!";
END IF
END IF
'PRINT
NEXT
'PRINT
ct = ct + 1
END IF
fff = 0
FOR r = 1 TO ht: FOR c = 1 TO wd
IF bd$(r, c) = "Q" THEN
bd$(r, c) = ""
END IF
NEXT: NEXT
ct2 = ct2 + 1
bd$(qr, qc) = ""
END IF
END IF
END IF
END IF
NEXT qc
NEXT qr
bd$(rr, rc) = ""
END IF
END IF
END IF
NEXT rc
NEXT rr
bd$(nr, nc) = ""
END IF
END IF
NEXT nc
NEXT nr
bd$(br, bc) = ""
END IF
NEXT bc
NEXT br
PRINT ct2
Edited on October 19, 2007, 5:34 pm
|
Posted by Charlie
on 2007-10-19 17:31:02 |