मराठी
तामिळनाडू बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान इयत्ता ११

Assume an 8 × 8 chessboard with the usual coloring. "Recoloring" operation changes the color of all squares of a row or a column. You can recolor repeatedly. The goal - Computer Science

Advertisements
Advertisements

प्रश्न

Assume an 8 × 8 chessboard with the usual coloring. "Recoloring" operation changes the color of all squares of a row or a column. You can recolor repeatedly. The goal is to attain just one black square. Show that you cannot achieve the goal.

बेरीज

उत्तर

Let us start with a normal coloured chessboard, with a number of black squares B = 32 and the number of white squares W = 32.
So W – B = 0, which is divisible by 4 and W + B = 64.
W-B = 0 mod 4

Whenever we change the colours of a row or column, we change the colour of 8 squares. Let this row (or column) have w white squares + b black squares w + b = 8 squares.

If this operation B increases (or decreases) by 2n, then W decreases (or increases) by 2n so that W + B = 64, but B – W will change by 4n and it will remain divisible by 4.
W – B = 0 mod 4

After every operation, “B – W mod 4” can have no other values.
But the required state has 63 white squares and 1 black square, so it requires
W - B = 63 - 1 = 62 = 2 mod 4 which is impossible.

shaalaa.com
Invariants
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 8: Iteration and recursion - Evaluation - Section - D [पृष्ठ ११४]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 11 TN Board
पाठ 8 Iteration and recursion
Evaluation - Section - D | Q 1. | पृष्ठ ११४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×