Excel Project – Matrix Applications
Part 1 Cryptography
Matrices can be used to encode and decode messages. To begin with, we could assign the numbers 1-26 to the letters of the alphabet and assign the number 0 to a space between words. Then, we could translate any verbal message into a string of numbers from 0 to 26. Below is a table of each letter and its corresponding number.
We will use the matrix A below as the encoding matrix for our message.
Enter the encoding matrix A in your spreadsheet and label it.
Suppose we want to encode the message “SECRET CODE”. Start by translating the message into numbers using the correspondence above.
Now put these numbers into a matrix B that will have 3 rows. Start with the first number in the upper left and move down the first column until you have 3 rows. When you fill the column, start over in the second column. Fill in the matrix B with the numbers corresponding to the message. If you need to, add any extra blanks to the end of the message to fill out the matrix.
Create matrix B on your spreadsheet and make sure to label it.
To encode a message, simply take the matrix that contains our message, matrix B, and multiply on the left by the encoding matrix A. Using Excel, find matrix and label it.
Now our message “SECRET CODE” has been encoded and is represented by the numbers in matrix AB.
Suppose now that you are the one receiving this encoded message as represented by matrix AB, and you want to decode it to see what it says. To do this, you will need the decoding matrix . Find and label it.
Now perform the matrix multiplication to see what you get.
Suppose now that you have received an encoded message that looks like
Enter this matrix in Excel and label it C.
We want to find out the original message that was encoded to look like matrix C above.
use the decoding matrix to find the original message.
use the table at the top to decode the message and write the message in your Excel spreadsheet.
Part 2 – Construction Cost
A sub-contractor needs to decide which companies they should hire for each type of building they want to construct.
Below is the estimated time it should take (in hours) for each of the different types of buildings they work on.
Below are the hourly rates for some different construction companies in the area.
Input the information in the previous two tables in Excel. Make sure that you label all the information in your spreadsheet.
use matrix multiplication to determine which companies can complete each project at the lowest cost. Label your new matrix with the appropriate labels.
Highlight the cells that give the lowest cost for each building project.
Make a table that clearly identifies which company should be hired for each project.
Part 3 – Steelcase Production
Steelcase Corporation manufactures 3 basic products: chairs, desks, and tables. Below is chart which summarizes the number of labor hours spent for each product in each division.
In a given week, Steelcase has 250 hours available for carpentry, 100 hours available for finishing, and 400 hours available for assembly.
Steelcase makes a profit of $66 on each chair, $75 on each desk, and $100 on each table that they sell.
Steelcase also needs to produce at least one chair for every desk they produce, and 4 chairs for every table they produce. The total number of chairs must be greater than or equal to the sum of the chairs needed for desks and tables. They can produce more chairs on their own too.
How many chairs, desks, and tables should Steelcase manufacture each week in order to maximize profit?
Set up an Excel Spreadsheet to solve this linear programming problem. You may want to use the template below.
Excel has a function that will solve linear programming problems like this one. To access this function, go to the “Data” tab and select “Solver”. A window opens in which you need to set the following parameters for the LPP.
Set Target Cell – Select the cell that represents the objective function. This should be the value that you want to maximize or minimize.
Equal To – Choose whether you want to maximize, minimize, or set a specific value for your objective function.
By Changing Cells – Select the cells that represent your decision variables.
Subject to the Constraints – To set up your constraints, choose “Add”. Now you can set up your inequalities. One set of inequalities is that the number of labor hours used must be less than the number of hours available. Also make sure that the number of units manufactured is less than or equal to the number of units demanded. Finally, make sure that the decision variables are nonnegative.
Once you have set up the LPP, click “Solve”. If there is a solution, Excel will fill in the spreadsheet with the values that will solve the LPP.
Use Excel to solve this problem. Highlight the optimal decision variables in green and the maximum profit in blue.
Part 4 – Transportation Problem
Pioneer Corporation sells car speakers. They have two factory locations in the Midwest where they manufacture car speakers. One is in Flint, MI and one is in Kalamazoo, MI. They also have two major stores in the Midwest where they sell their speakers, one in Chicago and one in Detroit.
Below is a table that gives the shipping costs for each set of car speakers from each factory to each store.
The factory in Kalamazoo has a supply of 700 sets of speakers, and the factory in Flint has a supply of 900 sets of speakers. So the factories cannot ship more than they currently have.
The store in Detroit has a demand for 500 sets of speakers, and the store in Chicago has a demand for 1000 sets of speakers. So the stores need to receive at least this many speakers (possibly more).
What should be the shipping schedule that fulfills the demand for each store and minimizes shipping costs?
use the Excel “solver” function to solve this linear programming problem with 4 decision variables. Highlight the optimal decision variables in green and the minimum shipping cost in blue.