function y=backward_solve_3(i)

	b=[ 1 1 0 1 0 0 0 0 0;
		1 1 1 0 1 0 0 0 0;
		0 1 1 0 0 1 0 0 0;
		1 0 0 1 1 0 1 0 0;
		0 1 0 1 1 1 0 1 0;		# in matrix b, b(i,j)=1 iff button i is toggled on pressing button j
		0 0 1 0 1 1 0 0 1;
		0 0 1 0 1 1 0 0 1;
		0 0 0 1 0 0 1 1 0;
		0 0 0 0 1 0 1 1 1;
		0 0 0 0 0 1 0 1 1];

	initial=i(:);	# converts initial matrix i of order 3*3 into order 9*1
	x=det(b);
	action=-x*inverse(b)*initial;	#computes the action matrix using matrix operations
	z=int32(action);				#round off the action matrix into integer
	y=[ 0 0 0;
		0 0 0;			
		0 0 0];
	for i=1:9
		y(i)=mod(z(i),2);			# takes remainder with 2
	endfor
	return;

endfunction