How Best to Turn Off the Lights

Description

Your submission should include a typed report as well as a copy of any mathematica/matlab script, calculator input/output, program you write, or other resource that you use to do your calculations. Only one partner needs to submit the work for the partnership

Don't use plagiarized sources. Get Your Custom Assignment on
How Best to Turn Off the Lights
From as Little as $13/Page

Unformatted Attachment Preview

Project 1: How Best to Turn Off the Lights
Linear Algebra
This project is about a game that consists of a 5 × 5 grid of lights. Buttons are adjacent
if they are directly touching vertically or horizontally (not diagonally). In the game, all
buttons can be in one of two states, on or off. Pressing any button changes the state of
that button and all adjacent buttons. The goal of the game is to turn off all of the lights
on the game board. The goal of this project is to use linear algebra and matrix theory to
analyze the game and find solutions to various starting conditions. A picture of the game
with buttons labeled can be found below.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
The student should do at least the following analysis of the game:
a. Create an adjacency matrix, M , for the 5 × 5 game. This is a matrix consisting of
0s and 1s which encodes whether two buttons are adjacent to each other. The
mij entry should be a 1 if and only if the ith and j th buttons are adjacent. For
example, m12 = 1 but m17 = 0 since 1 and 2 are adjacent buttons, but 1 and 7 are
not. (Note: Since in the game a button changes its own state when pressed, a
button is adjacent to itself.)
b. If x→i is the initial state vector, what would it look like for the initial state of all the
lights being on? (This should be a column vector. Use 0 for off and 1 for on.)
c. If x→f is the final state vector, what would it look like at the end of the game?
d. Does it matter in what order the buttons are pushed? A push vector can be
created, where 0 represents a button which is not pushed and 1 a button which is
pushed. Create a push vector where buttons 1, 8, and 25 are pushed and all
others are not.
e. With M as the adjacency matrix and →
p as a push vector, what does M →
p
represent in context? If you have trouble with this simply try serval push vectors
and compare them to the vector found when multiplying by the adjacency matrix.
It can help to map them out on the game grid so you can see them in context
instead of just as a column vector.
f. Calculate M →
p using the vector →
p from part d. Is this push vector a solution to the
5 × 5 game which starts with all lights on? How do you know?
g. The goal is to find a push vector that does solve a given initial state vector. Do
you think the game has a solution when it is started with all light on? If so, what is
it and how did you find it? Is there only one? (Hint: Since this is a linear algebra
course, try making a system of equations to solve involving the various vectors
and the adjacency matrix you have developed.)
h. Find a strategy for finding the solution given any initial state vector. Is there
always a solution to the game or are there some starting configurations without
push vectors that solve them. If you think there are initial states without solutions,
try to find one.
i. Now imagine that the buttons in the game can take on three states, 0, 1, and 2.
(You can think of them as off, dim, and bright light if that helps.) They now cycle
from 2 to 1 to 0 and back to 2 when pressed. The goal of the game is to go from
an initial state of all lights in state 2 (bright) and end with all lights in state 0 (off).
How will your process in finding a solution change with this new version of the
game? Does the game have a solution and if so what is it?
Note: If you are having difficulty answering these questions for the full 5 × 5 game, do
the mathematical thing and try out smaller versions of it (e.g. 2 × 2 or 3 × 3 ) to gain
insight.

Purchase answer to see full
attachment