同心円の四角の部分の数字(パート2)

enter image description here

矩形のすべての頂点に4つの異なる1桁の非負数(A、B、C、D)を入れます。

次に、接続された2つの頂点の積の最後の桁を矩形の辺に置きます。

より大きな矩形の辺を接続する小さな矩形を作成します。

上記の手順を 5回以上します(4つの新しい番号を使用する必要はありません)。

最後の4つの数字は(1,1,1,1)でなければなりません。

E = last digit of (A×B)           G = last digit of (B×D)
H = last digit of (C×D)           F = last digit of (A×C)
I = last digit of (F×E)           J = last digit of (E×G)
K = last digit of (F×H)           L = last digit of (H×G)
and so on....

Find (A, B, C, D)

注:(A、B、C、D)のすべての置換は同じ結果(1,1,1,1)を生成します。

ベストアンサー

$(1,1,1,1)$の前の段階は必須です

one of $(1,1,1,1)$ itself,
$(9,9,9,9)$, or
$(3,7,3,7)$ – 7 opposite 7 [& 3 opposite 3] ($3times 3$ and
$7times 7$ do not end in $1$.)
– thanks to Etoplay for spotting the last one, I totally discounted
it when considering the multiplication noted above!

前のステージ

a $(9,9,9,9)$は
 (9,3,9,3)$、$(7,7,7,7)$、$(1,9,1,9)$のうちの1つであり、 p>

$(3,3,3,3)$ needs $(1,3)$または$(7,9)$の組み合わせは、

同様に

$(7,7,7,7)$ needs $(1,7)$または$(3,9)$の組み合わせです。

しかし

$(1,9,1,9)$に対して、$(3,7)$と$(7,3)$

を使って、

その後

break the $(3,3,7,7)$ into $(3,1,3,9)$ which we can then break
into $(1,3,7,9)$.

This does it in five steps, しかし $(1,1,1,1)$ goes to
$(1,1,1,1)$.

これは、

$(1,3,7,9) rightarrow(3,1,3,9) rightarrow(3,3,7,7)
rightarrow(9,1,9,1) rightarrow(9 、9,9,9) rightarrow(1,1,1,1)
rightarrow(1,1,1,1)$


また、

$(3,3,3,3)$と$(7,7,7,7)$は、パターン$(1,3,1,3)$、$
(7,9,7,9)$、$(3,3,3,3)$、$(7,7,7,7)$、$(1,7,1,7)$、$(1)
、9,1,9)$、$(3,9,3,9)$です。

私たちが

$(3,7,3,7)$は、$(1,3,9,7)$!

に直接行くことができます。

チェックする

$3024$ possible starting arrangements (ignoring $0$ since it
will only lead to more zeros) the valid ones are indeed all $24$
permutations of $(1,3,7,9)$:

from itertools import combinations, permutations
target = [1,1,1,1]
for choice in combinations(range(1, 10), 4):
    for outerSquare in permutations(choice):
            squares = [list(outerSquare)]
            while len(squares) <= 6:
                    nextIn = [(x*y)%10 for x,y in zip(squares[-1], squares[-1][1:] + [squares[-1][0]])]
                    squares.append(nextIn)
                    if nextIn == target:
                            break
            else:
                    continue
            print(squares)

[[1, 3, 7, 9], [3, 1, 3, 9], [3, 3, 7, 7], [9, 1, 9, 1], [9, 9, 9, 9], [1, 1, 1, 1]]
[[1, 3, 9, 7], [3, 7, 3, 7], [1, 1, 1, 1]]
[[1, 7, 3, 9], [7, 1, 7, 9], [7, 7, 3, 3], [9, 1, 9, 1], [9, 9, 9, 9], [1, 1, 1, 1]]
[[1, 7, 9, 3], [7, 3, 7, 3], [1, 1, 1, 1]]
[[1, 9, 3, 7], [9, 7, 1, 7], [3, 7, 7, 3], [1, 9, 1, 9], [9, 9, 9, 9], [1, 1, 1, 1]]
[[1, 9, 7, 3], [9, 3, 1, 3], [7, 3, 3, 7], [1, 9, 1, 9], [9, 9, 9, 9], [1, 1, 1, 1]]
[[3, 1, 7, 9], [3, 7, 3, 7], [1, 1, 1, 1]]
[[3, 1, 9, 7], [3, 9, 3, 1], [7, 7, 3, 3], [9, 1, 9, 1], [9, 9, 9, 9], [1, 1, 1, 1]]
[[3, 7, 1, 9], [1, 7, 9, 7], [7, 3, 3, 7], [1, 9, 1, 9], [9, 9, 9, 9], [1, 1, 1, 1]]
[[3, 7, 9, 1], [1, 3, 9, 3], [3, 7, 7, 3], [1, 9, 1, 9], [9, 9, 9, 9], [1, 1, 1, 1]]
[[3, 9, 1, 7], [7, 9, 7, 1], [3, 3, 7, 7], [9, 1, 9, 1], [9, 9, 9, 9], [1, 1, 1, 1]]
[[3, 9, 7, 1], [7, 3, 7, 3], [1, 1, 1, 1]]
[[7, 1, 3, 9], [7, 3, 7, 3], [1, 1, 1, 1]]
[[7, 1, 9, 3], [7, 9, 7, 1], [3, 3, 7, 7], [9, 1, 9, 1], [9, 9, 9, 9], [1, 1, 1, 1]]
[[7, 3, 1, 9], [1, 3, 9, 3], [3, 7, 7, 3], [1, 9, 1, 9], [9, 9, 9, 9], [1, 1, 1, 1]]
[[7, 3, 9, 1], [1, 7, 9, 7], [7, 3, 3, 7], [1, 9, 1, 9], [9, 9, 9, 9], [1, 1, 1, 1]]
[[7, 9, 1, 3], [3, 9, 3, 1], [7, 7, 3, 3], [9, 1, 9, 1], [9, 9, 9, 9], [1, 1, 1, 1]]
[[7, 9, 3, 1], [3, 7, 3, 7], [1, 1, 1, 1]]
[[9, 1, 3, 7], [9, 3, 1, 3], [7, 3, 3, 7], [1, 9, 1, 9], [9, 9, 9, 9], [1, 1, 1, 1]]
[[9, 1, 7, 3], [9, 7, 1, 7], [3, 7, 7, 3], [1, 9, 1, 9], [9, 9, 9, 9], [1, 1, 1, 1]]
[[9, 3, 1, 7], [7, 3, 7, 3], [1, 1, 1, 1]]
[[9, 3, 7, 1], [7, 1, 7, 9], [7, 7, 3, 3], [9, 1, 9, 1], [9, 9, 9, 9], [1, 1, 1, 1]]
[[9, 7, 1, 3], [3, 7, 3, 7], [1, 1, 1, 1]]
[[9, 7, 3, 1], [3, 1, 3, 9], [3, 3, 7, 7], [9, 1, 9, 1], [9, 9, 9, 9], [1, 1, 1, 1]]

返信を残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です