Numerical Analysis: An electronic children’s toy consists of a $7 times 7$ grid of lights, which are...











up vote
0
down vote

favorite
1












An electronic children’s toy consists of a $7 times 7$ grid of lights, which are initially all switched off. Pressing on a light toggles it on or off, and toggles its orthogonal adjacent neighbors on or off. A single press in the interior of the grid therefore creates set of lights in the shape of a plus sign, while several presses may lead to more complicated patterns. Three examples of the lights after different presses $(i,j)$ are show below.



enter image description here



Question:



a. Let $x$ be a vector in $mathbb{Z}_{2}^{49}$ that represents which lights have been pressed, and let $b$ be a vector in $mathbb{Z}_{2}^{49}$ that represents which lights are lit. Write a program that creates the 49 x 49 binary matrix $A$ representing the linear relation between $x$ and $b$, namely such that $Ax=b$



b. The toy presents different patterns of lights and the aim is to determine the correct presses to switch off all of the lights. For each of the pattern below, use binary LU solver to determine the correct presses
enter image description here



Note: I’m stuck and I just need an idea of how to approach this. I’m using MATLAB to create the program.










share|cite|improve this question
























  • This shouldn't be tagged numerical-methods.
    – Connor Harris
    Dec 3 at 18:28










  • Related. As for the question of writing a program to construct the matrix for you, that is a programming question more than a math question and falls outside the scope of what this site is intended for.
    – JMoravitz
    Dec 3 at 18:28










  • As for a hint on how to proceed, as mentioned in the linked problem, construct your $47times 47$ matrix $A$ by setting $A_{i,j}=begin{cases}1&text{if button }jtext{ toggles light }i\0&text{otherwise}end{cases}$. Since you imply that you should have learned how to program loops in matlab or other languages already, I leave it to you to figure out how to exactly phrase the logic to accomplish this.
    – JMoravitz
    Dec 3 at 18:32












  • A final note, this paper provides additional details and follows a similar method that I did in my linked answer above (I was unaware of the paper's existence at the time of writing my answer there). It mentions at the end that for your $7times 7$ case, the nullspace of the corresponding matrix will happen to be zero, implying that there will in fact be a solution for each of the puzzles and further the solution will be unique (mod 2).
    – JMoravitz
    Dec 3 at 18:37










  • Thank you so much! The hint and paper is very helpful.
    – Sarah2018
    Dec 3 at 18:56















up vote
0
down vote

favorite
1












An electronic children’s toy consists of a $7 times 7$ grid of lights, which are initially all switched off. Pressing on a light toggles it on or off, and toggles its orthogonal adjacent neighbors on or off. A single press in the interior of the grid therefore creates set of lights in the shape of a plus sign, while several presses may lead to more complicated patterns. Three examples of the lights after different presses $(i,j)$ are show below.



enter image description here



Question:



a. Let $x$ be a vector in $mathbb{Z}_{2}^{49}$ that represents which lights have been pressed, and let $b$ be a vector in $mathbb{Z}_{2}^{49}$ that represents which lights are lit. Write a program that creates the 49 x 49 binary matrix $A$ representing the linear relation between $x$ and $b$, namely such that $Ax=b$



b. The toy presents different patterns of lights and the aim is to determine the correct presses to switch off all of the lights. For each of the pattern below, use binary LU solver to determine the correct presses
enter image description here



Note: I’m stuck and I just need an idea of how to approach this. I’m using MATLAB to create the program.










share|cite|improve this question
























  • This shouldn't be tagged numerical-methods.
    – Connor Harris
    Dec 3 at 18:28










  • Related. As for the question of writing a program to construct the matrix for you, that is a programming question more than a math question and falls outside the scope of what this site is intended for.
    – JMoravitz
    Dec 3 at 18:28










  • As for a hint on how to proceed, as mentioned in the linked problem, construct your $47times 47$ matrix $A$ by setting $A_{i,j}=begin{cases}1&text{if button }jtext{ toggles light }i\0&text{otherwise}end{cases}$. Since you imply that you should have learned how to program loops in matlab or other languages already, I leave it to you to figure out how to exactly phrase the logic to accomplish this.
    – JMoravitz
    Dec 3 at 18:32












  • A final note, this paper provides additional details and follows a similar method that I did in my linked answer above (I was unaware of the paper's existence at the time of writing my answer there). It mentions at the end that for your $7times 7$ case, the nullspace of the corresponding matrix will happen to be zero, implying that there will in fact be a solution for each of the puzzles and further the solution will be unique (mod 2).
    – JMoravitz
    Dec 3 at 18:37










  • Thank you so much! The hint and paper is very helpful.
    – Sarah2018
    Dec 3 at 18:56













up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





An electronic children’s toy consists of a $7 times 7$ grid of lights, which are initially all switched off. Pressing on a light toggles it on or off, and toggles its orthogonal adjacent neighbors on or off. A single press in the interior of the grid therefore creates set of lights in the shape of a plus sign, while several presses may lead to more complicated patterns. Three examples of the lights after different presses $(i,j)$ are show below.



enter image description here



Question:



a. Let $x$ be a vector in $mathbb{Z}_{2}^{49}$ that represents which lights have been pressed, and let $b$ be a vector in $mathbb{Z}_{2}^{49}$ that represents which lights are lit. Write a program that creates the 49 x 49 binary matrix $A$ representing the linear relation between $x$ and $b$, namely such that $Ax=b$



b. The toy presents different patterns of lights and the aim is to determine the correct presses to switch off all of the lights. For each of the pattern below, use binary LU solver to determine the correct presses
enter image description here



Note: I’m stuck and I just need an idea of how to approach this. I’m using MATLAB to create the program.










share|cite|improve this question















An electronic children’s toy consists of a $7 times 7$ grid of lights, which are initially all switched off. Pressing on a light toggles it on or off, and toggles its orthogonal adjacent neighbors on or off. A single press in the interior of the grid therefore creates set of lights in the shape of a plus sign, while several presses may lead to more complicated patterns. Three examples of the lights after different presses $(i,j)$ are show below.



enter image description here



Question:



a. Let $x$ be a vector in $mathbb{Z}_{2}^{49}$ that represents which lights have been pressed, and let $b$ be a vector in $mathbb{Z}_{2}^{49}$ that represents which lights are lit. Write a program that creates the 49 x 49 binary matrix $A$ representing the linear relation between $x$ and $b$, namely such that $Ax=b$



b. The toy presents different patterns of lights and the aim is to determine the correct presses to switch off all of the lights. For each of the pattern below, use binary LU solver to determine the correct presses
enter image description here



Note: I’m stuck and I just need an idea of how to approach this. I’m using MATLAB to create the program.







linear-algebra abstract-algebra numerical-methods algebraic-combinatorics






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 3 at 19:33









Jneven

715320




715320










asked Dec 3 at 18:23









Sarah2018

141




141












  • This shouldn't be tagged numerical-methods.
    – Connor Harris
    Dec 3 at 18:28










  • Related. As for the question of writing a program to construct the matrix for you, that is a programming question more than a math question and falls outside the scope of what this site is intended for.
    – JMoravitz
    Dec 3 at 18:28










  • As for a hint on how to proceed, as mentioned in the linked problem, construct your $47times 47$ matrix $A$ by setting $A_{i,j}=begin{cases}1&text{if button }jtext{ toggles light }i\0&text{otherwise}end{cases}$. Since you imply that you should have learned how to program loops in matlab or other languages already, I leave it to you to figure out how to exactly phrase the logic to accomplish this.
    – JMoravitz
    Dec 3 at 18:32












  • A final note, this paper provides additional details and follows a similar method that I did in my linked answer above (I was unaware of the paper's existence at the time of writing my answer there). It mentions at the end that for your $7times 7$ case, the nullspace of the corresponding matrix will happen to be zero, implying that there will in fact be a solution for each of the puzzles and further the solution will be unique (mod 2).
    – JMoravitz
    Dec 3 at 18:37










  • Thank you so much! The hint and paper is very helpful.
    – Sarah2018
    Dec 3 at 18:56


















  • This shouldn't be tagged numerical-methods.
    – Connor Harris
    Dec 3 at 18:28










  • Related. As for the question of writing a program to construct the matrix for you, that is a programming question more than a math question and falls outside the scope of what this site is intended for.
    – JMoravitz
    Dec 3 at 18:28










  • As for a hint on how to proceed, as mentioned in the linked problem, construct your $47times 47$ matrix $A$ by setting $A_{i,j}=begin{cases}1&text{if button }jtext{ toggles light }i\0&text{otherwise}end{cases}$. Since you imply that you should have learned how to program loops in matlab or other languages already, I leave it to you to figure out how to exactly phrase the logic to accomplish this.
    – JMoravitz
    Dec 3 at 18:32












  • A final note, this paper provides additional details and follows a similar method that I did in my linked answer above (I was unaware of the paper's existence at the time of writing my answer there). It mentions at the end that for your $7times 7$ case, the nullspace of the corresponding matrix will happen to be zero, implying that there will in fact be a solution for each of the puzzles and further the solution will be unique (mod 2).
    – JMoravitz
    Dec 3 at 18:37










  • Thank you so much! The hint and paper is very helpful.
    – Sarah2018
    Dec 3 at 18:56
















This shouldn't be tagged numerical-methods.
– Connor Harris
Dec 3 at 18:28




This shouldn't be tagged numerical-methods.
– Connor Harris
Dec 3 at 18:28












Related. As for the question of writing a program to construct the matrix for you, that is a programming question more than a math question and falls outside the scope of what this site is intended for.
– JMoravitz
Dec 3 at 18:28




Related. As for the question of writing a program to construct the matrix for you, that is a programming question more than a math question and falls outside the scope of what this site is intended for.
– JMoravitz
Dec 3 at 18:28












As for a hint on how to proceed, as mentioned in the linked problem, construct your $47times 47$ matrix $A$ by setting $A_{i,j}=begin{cases}1&text{if button }jtext{ toggles light }i\0&text{otherwise}end{cases}$. Since you imply that you should have learned how to program loops in matlab or other languages already, I leave it to you to figure out how to exactly phrase the logic to accomplish this.
– JMoravitz
Dec 3 at 18:32






As for a hint on how to proceed, as mentioned in the linked problem, construct your $47times 47$ matrix $A$ by setting $A_{i,j}=begin{cases}1&text{if button }jtext{ toggles light }i\0&text{otherwise}end{cases}$. Since you imply that you should have learned how to program loops in matlab or other languages already, I leave it to you to figure out how to exactly phrase the logic to accomplish this.
– JMoravitz
Dec 3 at 18:32














A final note, this paper provides additional details and follows a similar method that I did in my linked answer above (I was unaware of the paper's existence at the time of writing my answer there). It mentions at the end that for your $7times 7$ case, the nullspace of the corresponding matrix will happen to be zero, implying that there will in fact be a solution for each of the puzzles and further the solution will be unique (mod 2).
– JMoravitz
Dec 3 at 18:37




A final note, this paper provides additional details and follows a similar method that I did in my linked answer above (I was unaware of the paper's existence at the time of writing my answer there). It mentions at the end that for your $7times 7$ case, the nullspace of the corresponding matrix will happen to be zero, implying that there will in fact be a solution for each of the puzzles and further the solution will be unique (mod 2).
– JMoravitz
Dec 3 at 18:37












Thank you so much! The hint and paper is very helpful.
– Sarah2018
Dec 3 at 18:56




Thank you so much! The hint and paper is very helpful.
– Sarah2018
Dec 3 at 18:56















active

oldest

votes











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3024477%2fnumerical-analysis-an-electronic-children-s-toy-consists-of-a-7-times-7-grid%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3024477%2fnumerical-analysis-an-electronic-children-s-toy-consists-of-a-7-times-7-grid%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Bressuire

Cabo Verde

Gyllenstierna