ADJACENCY GRID Problem

Anoop Kumar
@anoop-kumar-GDGRCn โ€ข Oct 26, 2024

arrange the numbers 1 to 8 in the grid below such that adjacent numbers are not in adjacent boxes (horizontally, vertically, or diagonally).
[โ€‹IMG]
the arrangement above, for example, is wrong because 3 and 4, 4 and 5, 6 and 7, and 7 and 8 are adjacent.
Please provide explaination .๐Ÿ˜€

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • K Vikrant

    @k-vikrant-7iVOHh • Jan 20, 2012

    abcmt

    (Sorry for the numbers not being aligned properly.)
    Logic is simple. The numbers in center are ones which will have max numbers touching them. So to ensure that the ones touching them aren't the ones adjacent to them in number line , we must select the two extreme numbers from the sequence, namely 1 and 8.
    Now we have to keep 2 and 7 as far as possible from 1 and 8 hence 2 and 7 go to the bottom and top positions. Filling the rest of the spaces is easy after that.

  • Anoop Kumar

    @anoop-kumar-GDGRCn • Jan 20, 2012

    yup, you are right.
    every number has two adjacent number except 1 & 8. and middle brackets have at lease two adjacent hence only 1 & 8 fits here. rest are easy