Petru finalizeaza de asezat piesele de domino. Inca isi aduce aminte de copilarie! :) Apoi, o varianta simplificata a jocului 15-1 ii atrage atentia.

 

C. 9-1 (10%)

Jocul 9-1 este o varianta simplificata a jocului 15-1. Sunt 8 patrate numerotate de la 1 la 8 si un patrat liber. Prin deplasarea in spatiul liber (doar prin alunecare, in plan), patratele pot fi reordonate. Petru gaseste jocul in starea ilustrata in dreapta. Se poate aduce la configuratia initiala, ilustrata in stanga? Daca da, incercati sa folositi un numar cat mai mic de mutari.  

Nota: Pentru usurinta in editarea rezolvarii, puteti sa indicati secventa numerelor care se muta in patratul liber. Spre exemplu, pornind din configuratia initiala 6 – 3 – 2 inseamna ca prima mutare a fost 6 in coltul din drapta jos, apoi 3 pe linia 2, coloana 3 si in final 2 pe linia 1, coloana 3.

Sursa: problema originală (Ruxandra F. Olimid)

 

Peter finishes placing the dominoes. He still remembers childhood! Then, a simplified version of the game 15-1 draws his attention.

 

C. 9-1 (10%)

The game of 9-1 is a simplified version of the game 15-1. There are 8 squares numbered from 1-8 and an empty square. Squares can be reordered by sliding squares in the free space. Peter founds the 9-1 game in the state shown at right. Can he bring it to the original configuration, shown in the left? If yes, try to use as few number of moves as possible.

Note: For ease of editing solve, the solution can be given as the sequence of numbers that move freely in the square. For example, starting from the initial configuration 6-3-2 means that the first move was sliding 6 in the in the lower right corner, then slide 3 on line 2 and column 3, and finally slide 2 in the upper right corner.

Source: original problem (Ruxandra F. Olimid)

Logheaza-te in site pentru a trimite solutii si comentarii