416 views
0 votes
0 votes
Suppose there are 7 switches some of them are on and some of them are off. Now you are picking any two switches at a time and changing their state that is if the switch is on you are turning it off and if it is off you are turning it on. Now you have taken a sequence of moves and make all the switches on. Among the given options below choose the option which can't be the initial state of the switches.

A) on,off,on,on,on,on,on

B) off,on,off,off,off,off,off

C) off,on,off,on,on,off,off

D) on,off,on,off,on,on,on

1 Answer

Best answer
1 votes
1 votes
Option B is not correct

(off,on,off,off,off,off,off) we can take a sequence of moves to put all the switches on.

At first we select 1st and the third switch and put that on after that we select 4th and the 5th switch and put it on and then 6th and 7th switch and put that on.

Thus all the switches are turned on.

Similarly we can show option C and option D are not correct because both of them contains even number of off's and we will have a sequence of moves to put all the switches on by selecting the switches which are turned off two at a time.

So, option A is the correct answer.
selected by

Related questions

1 votes
1 votes
3 answers
1
0 votes
0 votes
1 answer
3
Sayan Bose asked Apr 14, 2019
670 views
0 votes
0 votes
1 answer
4
N asked May 1, 2019
522 views
Consider a max-heap of n distinct integers, n ≥ 4, stored in an array A[1 . . . n]. The second minimum of A is the integer that is less than all integers in A except th...