13 reputation
3
bio website
location
age
visits member for 2 years, 1 month
seen Jul 16 at 8:26

Jul
2
comment Needs alternative algorithm for a graph problem
Thanks for the pointer, @Ilmari Karonen
Jul
2
awarded  Scholar
Jul
2
accepted Needs alternative algorithm for a graph problem
Jul
2
comment Needs alternative algorithm for a graph problem
oh! I see it now. Thanks for the explanation @Henning Makholm.
Jul
2
comment Needs alternative algorithm for a graph problem
I understood your answer except the sentence: "That is simply a system of $n$ linear equations in $n$ unknowns." I get the part that it has $n$ unknowns, but I can't figure out how there are $n$ equations. I can see only one. Currently I am adding another fact that "these unknwons can only be 0, 1 or 2 because pressing a button n times will have the same effect as pressing it n mod 3 times" to the program. This will make my work a lot simpler.
Jul
2
comment Needs alternative algorithm for a graph problem
I just read first line of your answer and realized my mistake in the problem. I shouldn't have said "Initially all the bulbs have different colours." In fact what I meant to say was "Not all the bulbs have same colour initially". I have removed the misleading sentence from the problem statement. Now that I read your answer further, I see that you have explained the situation I desired as well. Thanks for the explanation and pointer to Gaussian Elimination Technique.
Jul
2
awarded  Editor
Jul
2
revised Needs alternative algorithm for a graph problem
deleted 48 characters in body
Jul
2
awarded  Student
Jul
2
asked Needs alternative algorithm for a graph problem