How to solve a large system of linear algebra?
$begingroup$
A friend has given me the following puzzle to solve, however, I lack the linear algebra knowledge to calculate the solution, and my attempts to brute force the solution have been foiled by a large number of combinations.
The Problem:
Every letter in the alphabet is assigned a whole number from $1-26$. No two letters have the same number. Below is a list of $44$ words and the value of their letters added up. For example, if $O=11$, $H=23$, $I=2$, OHIO would equal $11+23+2+11 = 47$ (these values are not necessarily correct).
find the value of ALBUQUERQUE (added in the same manner).
Thanks for any solutions or ideas.
linear-algebra systems-of-equations puzzle
New contributor
$endgroup$
add a comment |
$begingroup$
A friend has given me the following puzzle to solve, however, I lack the linear algebra knowledge to calculate the solution, and my attempts to brute force the solution have been foiled by a large number of combinations.
The Problem:
Every letter in the alphabet is assigned a whole number from $1-26$. No two letters have the same number. Below is a list of $44$ words and the value of their letters added up. For example, if $O=11$, $H=23$, $I=2$, OHIO would equal $11+23+2+11 = 47$ (these values are not necessarily correct).
find the value of ALBUQUERQUE (added in the same manner).
Thanks for any solutions or ideas.
linear-algebra systems-of-equations puzzle
New contributor
$endgroup$
$begingroup$
Welcome to Mathematics Stack Exchange! A quick tour will enhance your experience. Here are helpful tips to write a good question and write a good answer. For equations, please use MathJax.
$endgroup$
– dantopa
4 hours ago
$begingroup$
With a computer you could run Gaussian elimination, though it's not obvious to me that the solution over vectors of 26 real numbers is actually unique (because if any solution exists, then at least 18 of the equations are redundant, so what's to stop more than 18 of them from being redundant?)
$endgroup$
– Ian
3 hours ago
3
$begingroup$
Didn't noticed Albuquerque was so close to Jamestown.
$endgroup$
– zwim
3 hours ago
add a comment |
$begingroup$
A friend has given me the following puzzle to solve, however, I lack the linear algebra knowledge to calculate the solution, and my attempts to brute force the solution have been foiled by a large number of combinations.
The Problem:
Every letter in the alphabet is assigned a whole number from $1-26$. No two letters have the same number. Below is a list of $44$ words and the value of their letters added up. For example, if $O=11$, $H=23$, $I=2$, OHIO would equal $11+23+2+11 = 47$ (these values are not necessarily correct).
find the value of ALBUQUERQUE (added in the same manner).
Thanks for any solutions or ideas.
linear-algebra systems-of-equations puzzle
New contributor
$endgroup$
A friend has given me the following puzzle to solve, however, I lack the linear algebra knowledge to calculate the solution, and my attempts to brute force the solution have been foiled by a large number of combinations.
The Problem:
Every letter in the alphabet is assigned a whole number from $1-26$. No two letters have the same number. Below is a list of $44$ words and the value of their letters added up. For example, if $O=11$, $H=23$, $I=2$, OHIO would equal $11+23+2+11 = 47$ (these values are not necessarily correct).
find the value of ALBUQUERQUE (added in the same manner).
Thanks for any solutions or ideas.
linear-algebra systems-of-equations puzzle
linear-algebra systems-of-equations puzzle
New contributor
New contributor
edited 4 hours ago
dantopa
6,57942244
6,57942244
New contributor
asked 4 hours ago
Klaus234Klaus234
161
161
New contributor
New contributor
$begingroup$
Welcome to Mathematics Stack Exchange! A quick tour will enhance your experience. Here are helpful tips to write a good question and write a good answer. For equations, please use MathJax.
$endgroup$
– dantopa
4 hours ago
$begingroup$
With a computer you could run Gaussian elimination, though it's not obvious to me that the solution over vectors of 26 real numbers is actually unique (because if any solution exists, then at least 18 of the equations are redundant, so what's to stop more than 18 of them from being redundant?)
$endgroup$
– Ian
3 hours ago
3
$begingroup$
Didn't noticed Albuquerque was so close to Jamestown.
$endgroup$
– zwim
3 hours ago
add a comment |
$begingroup$
Welcome to Mathematics Stack Exchange! A quick tour will enhance your experience. Here are helpful tips to write a good question and write a good answer. For equations, please use MathJax.
$endgroup$
– dantopa
4 hours ago
$begingroup$
With a computer you could run Gaussian elimination, though it's not obvious to me that the solution over vectors of 26 real numbers is actually unique (because if any solution exists, then at least 18 of the equations are redundant, so what's to stop more than 18 of them from being redundant?)
$endgroup$
– Ian
3 hours ago
3
$begingroup$
Didn't noticed Albuquerque was so close to Jamestown.
$endgroup$
– zwim
3 hours ago
$begingroup$
Welcome to Mathematics Stack Exchange! A quick tour will enhance your experience. Here are helpful tips to write a good question and write a good answer. For equations, please use MathJax.
$endgroup$
– dantopa
4 hours ago
$begingroup$
Welcome to Mathematics Stack Exchange! A quick tour will enhance your experience. Here are helpful tips to write a good question and write a good answer. For equations, please use MathJax.
$endgroup$
– dantopa
4 hours ago
$begingroup$
With a computer you could run Gaussian elimination, though it's not obvious to me that the solution over vectors of 26 real numbers is actually unique (because if any solution exists, then at least 18 of the equations are redundant, so what's to stop more than 18 of them from being redundant?)
$endgroup$
– Ian
3 hours ago
$begingroup$
With a computer you could run Gaussian elimination, though it's not obvious to me that the solution over vectors of 26 real numbers is actually unique (because if any solution exists, then at least 18 of the equations are redundant, so what's to stop more than 18 of them from being redundant?)
$endgroup$
– Ian
3 hours ago
3
3
$begingroup$
Didn't noticed Albuquerque was so close to Jamestown.
$endgroup$
– zwim
3 hours ago
$begingroup$
Didn't noticed Albuquerque was so close to Jamestown.
$endgroup$
– zwim
3 hours ago
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
To solve it by hand you need to look for words that have similar sets of letters. Using OREGON and RENO you know $G+O=28$. It's too bad they didn't give you ARKANSAS. RENO and NOME give $M=R+3$. Can you find $D+A-O=17?$ MONTGOMERY and MONTEREY are interesting. It is supposed to be a certain amount of work.
$endgroup$
add a comment |
$begingroup$
Linear System
Craft a linear system. ALASKA represents $3times A + L + K + S = 73$ ...
Definitions:
$n=44$, number of names
$m=26$, number of letters in alphabet
Linear System
Create the linear system $mathbf{A}x = b$ where $mathbf{A}inmathbb{R}^{44times 26}$
System matrix
Rules for building $mathbf{A}$:
Each row corresponds to a name. E.g. ALASKA is in row $1$, WICHITA in row $44$.
Each column corresponds to a letter. E.g. A is $1$, Z is $26$.
Example: ALASKA has 3 A, 1 K, 1 L, 1 S. The non-zero entries of the first row are:
$$mathbf{A}_{1,1} = 3, quad mathbf{A}_{1,11} = 1, quad mathbf{A}_{1,12} = 1, quad mathbf{A}_{1,19} = 1$$
Array plots
The system matrix and data vector are plotted below.
Solution via Gaussian Elimination
Thanks to astute reader @FredH, the system can be solved exactly by elementary means.
begin{array}{cc}
text{A} & 10 \
text{B} & 20 \
text{C} & 3 \
text{D} & 12 \
text{E} & 6 \
text{F} & 15 \
text{G} & 23 \
text{H} & 13 \
text{I} & 24 \
text{J} & 9 \
text{K} & 16 \
text{L} & 19 \
text{M} & 21 \
text{N} & 4 \
text{O} & 5 \
text{P} & 22 \
text{Q} & 0 \
text{R} & 18 \
text{S} & 8 \
text{T} & 14 \
text{U} & 7 \
text{V} & 26 \
text{W} & 25 \
text{X} & 11 \
text{Y} & 17 \
text{Z} & 2 \
end{array}
Raw data
To spare others from tedious typing, here is the data in cut and paste form.
b = (73,56,134,64,73,64,78,88,81,64,129,85,56,102,68,77,91,56,105,77,81,83,91,49,109,111,36,61,72,157,47,58,93,65,61,44,70,122,33,69,106,91,99,113)
(ALASKA, HOUSTON, MONTGOMERY, SALEM, ARIZONA, IDAHO, NANTUCKET, SAN ANTONILO, ATLANTA, IOWA, NASHVILLE, SAVANNAH, BOSTON, JAMESTOWN, NEVADA, SEATTLE, BUFFALO, KANSAS, NEW ORLEANS, TAMPA, CHICAGO, KENTUCKY, NEW YORK, TEXAS, COLUMBIA, LOUISIANA, NOME, TOLEDO, DENVER, LOUISVILLE, OHIO, TULSA, DETROIT, MAINE, OREGON, UTAH, EL PASO, MICHIGAN, RENO, VENICE, HAWAII, MONTEREY, SACRAMENTO, WICHITA)
Albuquerque
This is a trick question because we have no Q values in the data table (matrix rank = 25). So we can not make any statement about the value of Q.
The row vector for ALBUQUERQUE is
$${1,1,0,0,2,0,0,0,0,0,0,1,0,0,0,0,2,1,0,0,3,0,0,0,0,0}$$. The dot product of this vector with the solution vector $=100$.
Final answer: ALBUQUERQUE $= 100 + 2Q$ where $Q$ is unknown.
$endgroup$
1
$begingroup$
Your data contains a typo: "SAN ANTONILO" instead of "SAN ANTONIO". Perhaps that will work better?
$endgroup$
– FredH
2 hours ago
2
$begingroup$
The problem says the values are distinct whole numbers from $1$ to $26$, so $Q = 1$ and ALBUQUERQUE $= 102$.
$endgroup$
– FredH
2 hours ago
add a comment |
$begingroup$
This question has already been answered sufficiently by dantopa with the addition of the comment by FredH. However, I'll just put some Java/MATLAB code here for the sake of completeness, and so you can see how to solve a problem like this using a computer.
Java:
import java.util.*;
public static void main(String args) {
String names = {"alaska", "arizona", "atlanta", "boston", "buffalo", "chicago", "columbia", "denver", "detroit", "elpaso", "hawaii", "houston", "idaho", "iowa",
"jamestown", "kansas", "kentucky", "louisiana", "louisville", "maine", "michigan", "monterey", "montgomery", "nantucket", "nashville", "nevada", "neworleans", "newyork", "nome",
"ohio", "oregon", "reno", "sacramento", "salem", "sanantonio", "savannah", "seattle", "tampa", "texas", "toledo", "tulsa",
"utah", "venice", "wichita"};
int x = new int[44][26];
int count = 0;
int value = 0;
for(String y :names) {
for(int i = 0; i < y.length(); i++) {
value = (int)y.charAt(i) - 97; // I looked up an ASCII table because chars are stored as integers and subtracted 97 to that a would be at the first index.
x[count][value]++;
}
count++;
}
System.out.print("["); // This is just printing out in a convenient form so I we can copy it into MATLAB easily
for(int i = 0; i < 44; i++) {
for(int j = 0; j < 26; j++) {
System.out.print(x[i][j]);
if(j < 25) System.out.print(",");
}
System.out.println(";");
}
System.out.println("]");
}}
Ok copy the output MATLAB (you could do it in some Java library or done this first part in MATLAB however I don't like doing normal programming on MATLAB or doing math in Java)
In MATLAB:
a = \paste the output from java here:
b = [73, 73, 81, 56, 91, 81, 109, 72, 93, 70, 106, 56, 64, 64, 102, 56, 83, 111, 157, 65, 122, 91, 134, 78, 129, 68, 105, 91, 36, 47, 61, 33, 99, 64, 88, 85, 77, 77, 49, 61, 58, 44, 69, 113];
b = b';
x = ab
The output will be all the solutions in alphabetical order, however $Q$ will be $0$. Since the problem called for numbers between $1$ and $26$, just replace it with the number which is not included already. It is $1$, so you can deduce that $Q = 1$ and use it to calculate the value of Albuquerque.
$endgroup$
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
Klaus234 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3130809%2fhow-to-solve-a-large-system-of-linear-algebra%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
To solve it by hand you need to look for words that have similar sets of letters. Using OREGON and RENO you know $G+O=28$. It's too bad they didn't give you ARKANSAS. RENO and NOME give $M=R+3$. Can you find $D+A-O=17?$ MONTGOMERY and MONTEREY are interesting. It is supposed to be a certain amount of work.
$endgroup$
add a comment |
$begingroup$
To solve it by hand you need to look for words that have similar sets of letters. Using OREGON and RENO you know $G+O=28$. It's too bad they didn't give you ARKANSAS. RENO and NOME give $M=R+3$. Can you find $D+A-O=17?$ MONTGOMERY and MONTEREY are interesting. It is supposed to be a certain amount of work.
$endgroup$
add a comment |
$begingroup$
To solve it by hand you need to look for words that have similar sets of letters. Using OREGON and RENO you know $G+O=28$. It's too bad they didn't give you ARKANSAS. RENO and NOME give $M=R+3$. Can you find $D+A-O=17?$ MONTGOMERY and MONTEREY are interesting. It is supposed to be a certain amount of work.
$endgroup$
To solve it by hand you need to look for words that have similar sets of letters. Using OREGON and RENO you know $G+O=28$. It's too bad they didn't give you ARKANSAS. RENO and NOME give $M=R+3$. Can you find $D+A-O=17?$ MONTGOMERY and MONTEREY are interesting. It is supposed to be a certain amount of work.
edited 3 hours ago
answered 4 hours ago
Ross MillikanRoss Millikan
298k23198371
298k23198371
add a comment |
add a comment |
$begingroup$
Linear System
Craft a linear system. ALASKA represents $3times A + L + K + S = 73$ ...
Definitions:
$n=44$, number of names
$m=26$, number of letters in alphabet
Linear System
Create the linear system $mathbf{A}x = b$ where $mathbf{A}inmathbb{R}^{44times 26}$
System matrix
Rules for building $mathbf{A}$:
Each row corresponds to a name. E.g. ALASKA is in row $1$, WICHITA in row $44$.
Each column corresponds to a letter. E.g. A is $1$, Z is $26$.
Example: ALASKA has 3 A, 1 K, 1 L, 1 S. The non-zero entries of the first row are:
$$mathbf{A}_{1,1} = 3, quad mathbf{A}_{1,11} = 1, quad mathbf{A}_{1,12} = 1, quad mathbf{A}_{1,19} = 1$$
Array plots
The system matrix and data vector are plotted below.
Solution via Gaussian Elimination
Thanks to astute reader @FredH, the system can be solved exactly by elementary means.
begin{array}{cc}
text{A} & 10 \
text{B} & 20 \
text{C} & 3 \
text{D} & 12 \
text{E} & 6 \
text{F} & 15 \
text{G} & 23 \
text{H} & 13 \
text{I} & 24 \
text{J} & 9 \
text{K} & 16 \
text{L} & 19 \
text{M} & 21 \
text{N} & 4 \
text{O} & 5 \
text{P} & 22 \
text{Q} & 0 \
text{R} & 18 \
text{S} & 8 \
text{T} & 14 \
text{U} & 7 \
text{V} & 26 \
text{W} & 25 \
text{X} & 11 \
text{Y} & 17 \
text{Z} & 2 \
end{array}
Raw data
To spare others from tedious typing, here is the data in cut and paste form.
b = (73,56,134,64,73,64,78,88,81,64,129,85,56,102,68,77,91,56,105,77,81,83,91,49,109,111,36,61,72,157,47,58,93,65,61,44,70,122,33,69,106,91,99,113)
(ALASKA, HOUSTON, MONTGOMERY, SALEM, ARIZONA, IDAHO, NANTUCKET, SAN ANTONILO, ATLANTA, IOWA, NASHVILLE, SAVANNAH, BOSTON, JAMESTOWN, NEVADA, SEATTLE, BUFFALO, KANSAS, NEW ORLEANS, TAMPA, CHICAGO, KENTUCKY, NEW YORK, TEXAS, COLUMBIA, LOUISIANA, NOME, TOLEDO, DENVER, LOUISVILLE, OHIO, TULSA, DETROIT, MAINE, OREGON, UTAH, EL PASO, MICHIGAN, RENO, VENICE, HAWAII, MONTEREY, SACRAMENTO, WICHITA)
Albuquerque
This is a trick question because we have no Q values in the data table (matrix rank = 25). So we can not make any statement about the value of Q.
The row vector for ALBUQUERQUE is
$${1,1,0,0,2,0,0,0,0,0,0,1,0,0,0,0,2,1,0,0,3,0,0,0,0,0}$$. The dot product of this vector with the solution vector $=100$.
Final answer: ALBUQUERQUE $= 100 + 2Q$ where $Q$ is unknown.
$endgroup$
1
$begingroup$
Your data contains a typo: "SAN ANTONILO" instead of "SAN ANTONIO". Perhaps that will work better?
$endgroup$
– FredH
2 hours ago
2
$begingroup$
The problem says the values are distinct whole numbers from $1$ to $26$, so $Q = 1$ and ALBUQUERQUE $= 102$.
$endgroup$
– FredH
2 hours ago
add a comment |
$begingroup$
Linear System
Craft a linear system. ALASKA represents $3times A + L + K + S = 73$ ...
Definitions:
$n=44$, number of names
$m=26$, number of letters in alphabet
Linear System
Create the linear system $mathbf{A}x = b$ where $mathbf{A}inmathbb{R}^{44times 26}$
System matrix
Rules for building $mathbf{A}$:
Each row corresponds to a name. E.g. ALASKA is in row $1$, WICHITA in row $44$.
Each column corresponds to a letter. E.g. A is $1$, Z is $26$.
Example: ALASKA has 3 A, 1 K, 1 L, 1 S. The non-zero entries of the first row are:
$$mathbf{A}_{1,1} = 3, quad mathbf{A}_{1,11} = 1, quad mathbf{A}_{1,12} = 1, quad mathbf{A}_{1,19} = 1$$
Array plots
The system matrix and data vector are plotted below.
Solution via Gaussian Elimination
Thanks to astute reader @FredH, the system can be solved exactly by elementary means.
begin{array}{cc}
text{A} & 10 \
text{B} & 20 \
text{C} & 3 \
text{D} & 12 \
text{E} & 6 \
text{F} & 15 \
text{G} & 23 \
text{H} & 13 \
text{I} & 24 \
text{J} & 9 \
text{K} & 16 \
text{L} & 19 \
text{M} & 21 \
text{N} & 4 \
text{O} & 5 \
text{P} & 22 \
text{Q} & 0 \
text{R} & 18 \
text{S} & 8 \
text{T} & 14 \
text{U} & 7 \
text{V} & 26 \
text{W} & 25 \
text{X} & 11 \
text{Y} & 17 \
text{Z} & 2 \
end{array}
Raw data
To spare others from tedious typing, here is the data in cut and paste form.
b = (73,56,134,64,73,64,78,88,81,64,129,85,56,102,68,77,91,56,105,77,81,83,91,49,109,111,36,61,72,157,47,58,93,65,61,44,70,122,33,69,106,91,99,113)
(ALASKA, HOUSTON, MONTGOMERY, SALEM, ARIZONA, IDAHO, NANTUCKET, SAN ANTONILO, ATLANTA, IOWA, NASHVILLE, SAVANNAH, BOSTON, JAMESTOWN, NEVADA, SEATTLE, BUFFALO, KANSAS, NEW ORLEANS, TAMPA, CHICAGO, KENTUCKY, NEW YORK, TEXAS, COLUMBIA, LOUISIANA, NOME, TOLEDO, DENVER, LOUISVILLE, OHIO, TULSA, DETROIT, MAINE, OREGON, UTAH, EL PASO, MICHIGAN, RENO, VENICE, HAWAII, MONTEREY, SACRAMENTO, WICHITA)
Albuquerque
This is a trick question because we have no Q values in the data table (matrix rank = 25). So we can not make any statement about the value of Q.
The row vector for ALBUQUERQUE is
$${1,1,0,0,2,0,0,0,0,0,0,1,0,0,0,0,2,1,0,0,3,0,0,0,0,0}$$. The dot product of this vector with the solution vector $=100$.
Final answer: ALBUQUERQUE $= 100 + 2Q$ where $Q$ is unknown.
$endgroup$
1
$begingroup$
Your data contains a typo: "SAN ANTONILO" instead of "SAN ANTONIO". Perhaps that will work better?
$endgroup$
– FredH
2 hours ago
2
$begingroup$
The problem says the values are distinct whole numbers from $1$ to $26$, so $Q = 1$ and ALBUQUERQUE $= 102$.
$endgroup$
– FredH
2 hours ago
add a comment |
$begingroup$
Linear System
Craft a linear system. ALASKA represents $3times A + L + K + S = 73$ ...
Definitions:
$n=44$, number of names
$m=26$, number of letters in alphabet
Linear System
Create the linear system $mathbf{A}x = b$ where $mathbf{A}inmathbb{R}^{44times 26}$
System matrix
Rules for building $mathbf{A}$:
Each row corresponds to a name. E.g. ALASKA is in row $1$, WICHITA in row $44$.
Each column corresponds to a letter. E.g. A is $1$, Z is $26$.
Example: ALASKA has 3 A, 1 K, 1 L, 1 S. The non-zero entries of the first row are:
$$mathbf{A}_{1,1} = 3, quad mathbf{A}_{1,11} = 1, quad mathbf{A}_{1,12} = 1, quad mathbf{A}_{1,19} = 1$$
Array plots
The system matrix and data vector are plotted below.
Solution via Gaussian Elimination
Thanks to astute reader @FredH, the system can be solved exactly by elementary means.
begin{array}{cc}
text{A} & 10 \
text{B} & 20 \
text{C} & 3 \
text{D} & 12 \
text{E} & 6 \
text{F} & 15 \
text{G} & 23 \
text{H} & 13 \
text{I} & 24 \
text{J} & 9 \
text{K} & 16 \
text{L} & 19 \
text{M} & 21 \
text{N} & 4 \
text{O} & 5 \
text{P} & 22 \
text{Q} & 0 \
text{R} & 18 \
text{S} & 8 \
text{T} & 14 \
text{U} & 7 \
text{V} & 26 \
text{W} & 25 \
text{X} & 11 \
text{Y} & 17 \
text{Z} & 2 \
end{array}
Raw data
To spare others from tedious typing, here is the data in cut and paste form.
b = (73,56,134,64,73,64,78,88,81,64,129,85,56,102,68,77,91,56,105,77,81,83,91,49,109,111,36,61,72,157,47,58,93,65,61,44,70,122,33,69,106,91,99,113)
(ALASKA, HOUSTON, MONTGOMERY, SALEM, ARIZONA, IDAHO, NANTUCKET, SAN ANTONILO, ATLANTA, IOWA, NASHVILLE, SAVANNAH, BOSTON, JAMESTOWN, NEVADA, SEATTLE, BUFFALO, KANSAS, NEW ORLEANS, TAMPA, CHICAGO, KENTUCKY, NEW YORK, TEXAS, COLUMBIA, LOUISIANA, NOME, TOLEDO, DENVER, LOUISVILLE, OHIO, TULSA, DETROIT, MAINE, OREGON, UTAH, EL PASO, MICHIGAN, RENO, VENICE, HAWAII, MONTEREY, SACRAMENTO, WICHITA)
Albuquerque
This is a trick question because we have no Q values in the data table (matrix rank = 25). So we can not make any statement about the value of Q.
The row vector for ALBUQUERQUE is
$${1,1,0,0,2,0,0,0,0,0,0,1,0,0,0,0,2,1,0,0,3,0,0,0,0,0}$$. The dot product of this vector with the solution vector $=100$.
Final answer: ALBUQUERQUE $= 100 + 2Q$ where $Q$ is unknown.
$endgroup$
Linear System
Craft a linear system. ALASKA represents $3times A + L + K + S = 73$ ...
Definitions:
$n=44$, number of names
$m=26$, number of letters in alphabet
Linear System
Create the linear system $mathbf{A}x = b$ where $mathbf{A}inmathbb{R}^{44times 26}$
System matrix
Rules for building $mathbf{A}$:
Each row corresponds to a name. E.g. ALASKA is in row $1$, WICHITA in row $44$.
Each column corresponds to a letter. E.g. A is $1$, Z is $26$.
Example: ALASKA has 3 A, 1 K, 1 L, 1 S. The non-zero entries of the first row are:
$$mathbf{A}_{1,1} = 3, quad mathbf{A}_{1,11} = 1, quad mathbf{A}_{1,12} = 1, quad mathbf{A}_{1,19} = 1$$
Array plots
The system matrix and data vector are plotted below.
Solution via Gaussian Elimination
Thanks to astute reader @FredH, the system can be solved exactly by elementary means.
begin{array}{cc}
text{A} & 10 \
text{B} & 20 \
text{C} & 3 \
text{D} & 12 \
text{E} & 6 \
text{F} & 15 \
text{G} & 23 \
text{H} & 13 \
text{I} & 24 \
text{J} & 9 \
text{K} & 16 \
text{L} & 19 \
text{M} & 21 \
text{N} & 4 \
text{O} & 5 \
text{P} & 22 \
text{Q} & 0 \
text{R} & 18 \
text{S} & 8 \
text{T} & 14 \
text{U} & 7 \
text{V} & 26 \
text{W} & 25 \
text{X} & 11 \
text{Y} & 17 \
text{Z} & 2 \
end{array}
Raw data
To spare others from tedious typing, here is the data in cut and paste form.
b = (73,56,134,64,73,64,78,88,81,64,129,85,56,102,68,77,91,56,105,77,81,83,91,49,109,111,36,61,72,157,47,58,93,65,61,44,70,122,33,69,106,91,99,113)
(ALASKA, HOUSTON, MONTGOMERY, SALEM, ARIZONA, IDAHO, NANTUCKET, SAN ANTONILO, ATLANTA, IOWA, NASHVILLE, SAVANNAH, BOSTON, JAMESTOWN, NEVADA, SEATTLE, BUFFALO, KANSAS, NEW ORLEANS, TAMPA, CHICAGO, KENTUCKY, NEW YORK, TEXAS, COLUMBIA, LOUISIANA, NOME, TOLEDO, DENVER, LOUISVILLE, OHIO, TULSA, DETROIT, MAINE, OREGON, UTAH, EL PASO, MICHIGAN, RENO, VENICE, HAWAII, MONTEREY, SACRAMENTO, WICHITA)
Albuquerque
This is a trick question because we have no Q values in the data table (matrix rank = 25). So we can not make any statement about the value of Q.
The row vector for ALBUQUERQUE is
$${1,1,0,0,2,0,0,0,0,0,0,1,0,0,0,0,2,1,0,0,3,0,0,0,0,0}$$. The dot product of this vector with the solution vector $=100$.
Final answer: ALBUQUERQUE $= 100 + 2Q$ where $Q$ is unknown.
edited 2 hours ago
answered 2 hours ago
dantopadantopa
6,57942244
6,57942244
1
$begingroup$
Your data contains a typo: "SAN ANTONILO" instead of "SAN ANTONIO". Perhaps that will work better?
$endgroup$
– FredH
2 hours ago
2
$begingroup$
The problem says the values are distinct whole numbers from $1$ to $26$, so $Q = 1$ and ALBUQUERQUE $= 102$.
$endgroup$
– FredH
2 hours ago
add a comment |
1
$begingroup$
Your data contains a typo: "SAN ANTONILO" instead of "SAN ANTONIO". Perhaps that will work better?
$endgroup$
– FredH
2 hours ago
2
$begingroup$
The problem says the values are distinct whole numbers from $1$ to $26$, so $Q = 1$ and ALBUQUERQUE $= 102$.
$endgroup$
– FredH
2 hours ago
1
1
$begingroup$
Your data contains a typo: "SAN ANTONILO" instead of "SAN ANTONIO". Perhaps that will work better?
$endgroup$
– FredH
2 hours ago
$begingroup$
Your data contains a typo: "SAN ANTONILO" instead of "SAN ANTONIO". Perhaps that will work better?
$endgroup$
– FredH
2 hours ago
2
2
$begingroup$
The problem says the values are distinct whole numbers from $1$ to $26$, so $Q = 1$ and ALBUQUERQUE $= 102$.
$endgroup$
– FredH
2 hours ago
$begingroup$
The problem says the values are distinct whole numbers from $1$ to $26$, so $Q = 1$ and ALBUQUERQUE $= 102$.
$endgroup$
– FredH
2 hours ago
add a comment |
$begingroup$
This question has already been answered sufficiently by dantopa with the addition of the comment by FredH. However, I'll just put some Java/MATLAB code here for the sake of completeness, and so you can see how to solve a problem like this using a computer.
Java:
import java.util.*;
public static void main(String args) {
String names = {"alaska", "arizona", "atlanta", "boston", "buffalo", "chicago", "columbia", "denver", "detroit", "elpaso", "hawaii", "houston", "idaho", "iowa",
"jamestown", "kansas", "kentucky", "louisiana", "louisville", "maine", "michigan", "monterey", "montgomery", "nantucket", "nashville", "nevada", "neworleans", "newyork", "nome",
"ohio", "oregon", "reno", "sacramento", "salem", "sanantonio", "savannah", "seattle", "tampa", "texas", "toledo", "tulsa",
"utah", "venice", "wichita"};
int x = new int[44][26];
int count = 0;
int value = 0;
for(String y :names) {
for(int i = 0; i < y.length(); i++) {
value = (int)y.charAt(i) - 97; // I looked up an ASCII table because chars are stored as integers and subtracted 97 to that a would be at the first index.
x[count][value]++;
}
count++;
}
System.out.print("["); // This is just printing out in a convenient form so I we can copy it into MATLAB easily
for(int i = 0; i < 44; i++) {
for(int j = 0; j < 26; j++) {
System.out.print(x[i][j]);
if(j < 25) System.out.print(",");
}
System.out.println(";");
}
System.out.println("]");
}}
Ok copy the output MATLAB (you could do it in some Java library or done this first part in MATLAB however I don't like doing normal programming on MATLAB or doing math in Java)
In MATLAB:
a = \paste the output from java here:
b = [73, 73, 81, 56, 91, 81, 109, 72, 93, 70, 106, 56, 64, 64, 102, 56, 83, 111, 157, 65, 122, 91, 134, 78, 129, 68, 105, 91, 36, 47, 61, 33, 99, 64, 88, 85, 77, 77, 49, 61, 58, 44, 69, 113];
b = b';
x = ab
The output will be all the solutions in alphabetical order, however $Q$ will be $0$. Since the problem called for numbers between $1$ and $26$, just replace it with the number which is not included already. It is $1$, so you can deduce that $Q = 1$ and use it to calculate the value of Albuquerque.
$endgroup$
add a comment |
$begingroup$
This question has already been answered sufficiently by dantopa with the addition of the comment by FredH. However, I'll just put some Java/MATLAB code here for the sake of completeness, and so you can see how to solve a problem like this using a computer.
Java:
import java.util.*;
public static void main(String args) {
String names = {"alaska", "arizona", "atlanta", "boston", "buffalo", "chicago", "columbia", "denver", "detroit", "elpaso", "hawaii", "houston", "idaho", "iowa",
"jamestown", "kansas", "kentucky", "louisiana", "louisville", "maine", "michigan", "monterey", "montgomery", "nantucket", "nashville", "nevada", "neworleans", "newyork", "nome",
"ohio", "oregon", "reno", "sacramento", "salem", "sanantonio", "savannah", "seattle", "tampa", "texas", "toledo", "tulsa",
"utah", "venice", "wichita"};
int x = new int[44][26];
int count = 0;
int value = 0;
for(String y :names) {
for(int i = 0; i < y.length(); i++) {
value = (int)y.charAt(i) - 97; // I looked up an ASCII table because chars are stored as integers and subtracted 97 to that a would be at the first index.
x[count][value]++;
}
count++;
}
System.out.print("["); // This is just printing out in a convenient form so I we can copy it into MATLAB easily
for(int i = 0; i < 44; i++) {
for(int j = 0; j < 26; j++) {
System.out.print(x[i][j]);
if(j < 25) System.out.print(",");
}
System.out.println(";");
}
System.out.println("]");
}}
Ok copy the output MATLAB (you could do it in some Java library or done this first part in MATLAB however I don't like doing normal programming on MATLAB or doing math in Java)
In MATLAB:
a = \paste the output from java here:
b = [73, 73, 81, 56, 91, 81, 109, 72, 93, 70, 106, 56, 64, 64, 102, 56, 83, 111, 157, 65, 122, 91, 134, 78, 129, 68, 105, 91, 36, 47, 61, 33, 99, 64, 88, 85, 77, 77, 49, 61, 58, 44, 69, 113];
b = b';
x = ab
The output will be all the solutions in alphabetical order, however $Q$ will be $0$. Since the problem called for numbers between $1$ and $26$, just replace it with the number which is not included already. It is $1$, so you can deduce that $Q = 1$ and use it to calculate the value of Albuquerque.
$endgroup$
add a comment |
$begingroup$
This question has already been answered sufficiently by dantopa with the addition of the comment by FredH. However, I'll just put some Java/MATLAB code here for the sake of completeness, and so you can see how to solve a problem like this using a computer.
Java:
import java.util.*;
public static void main(String args) {
String names = {"alaska", "arizona", "atlanta", "boston", "buffalo", "chicago", "columbia", "denver", "detroit", "elpaso", "hawaii", "houston", "idaho", "iowa",
"jamestown", "kansas", "kentucky", "louisiana", "louisville", "maine", "michigan", "monterey", "montgomery", "nantucket", "nashville", "nevada", "neworleans", "newyork", "nome",
"ohio", "oregon", "reno", "sacramento", "salem", "sanantonio", "savannah", "seattle", "tampa", "texas", "toledo", "tulsa",
"utah", "venice", "wichita"};
int x = new int[44][26];
int count = 0;
int value = 0;
for(String y :names) {
for(int i = 0; i < y.length(); i++) {
value = (int)y.charAt(i) - 97; // I looked up an ASCII table because chars are stored as integers and subtracted 97 to that a would be at the first index.
x[count][value]++;
}
count++;
}
System.out.print("["); // This is just printing out in a convenient form so I we can copy it into MATLAB easily
for(int i = 0; i < 44; i++) {
for(int j = 0; j < 26; j++) {
System.out.print(x[i][j]);
if(j < 25) System.out.print(",");
}
System.out.println(";");
}
System.out.println("]");
}}
Ok copy the output MATLAB (you could do it in some Java library or done this first part in MATLAB however I don't like doing normal programming on MATLAB or doing math in Java)
In MATLAB:
a = \paste the output from java here:
b = [73, 73, 81, 56, 91, 81, 109, 72, 93, 70, 106, 56, 64, 64, 102, 56, 83, 111, 157, 65, 122, 91, 134, 78, 129, 68, 105, 91, 36, 47, 61, 33, 99, 64, 88, 85, 77, 77, 49, 61, 58, 44, 69, 113];
b = b';
x = ab
The output will be all the solutions in alphabetical order, however $Q$ will be $0$. Since the problem called for numbers between $1$ and $26$, just replace it with the number which is not included already. It is $1$, so you can deduce that $Q = 1$ and use it to calculate the value of Albuquerque.
$endgroup$
This question has already been answered sufficiently by dantopa with the addition of the comment by FredH. However, I'll just put some Java/MATLAB code here for the sake of completeness, and so you can see how to solve a problem like this using a computer.
Java:
import java.util.*;
public static void main(String args) {
String names = {"alaska", "arizona", "atlanta", "boston", "buffalo", "chicago", "columbia", "denver", "detroit", "elpaso", "hawaii", "houston", "idaho", "iowa",
"jamestown", "kansas", "kentucky", "louisiana", "louisville", "maine", "michigan", "monterey", "montgomery", "nantucket", "nashville", "nevada", "neworleans", "newyork", "nome",
"ohio", "oregon", "reno", "sacramento", "salem", "sanantonio", "savannah", "seattle", "tampa", "texas", "toledo", "tulsa",
"utah", "venice", "wichita"};
int x = new int[44][26];
int count = 0;
int value = 0;
for(String y :names) {
for(int i = 0; i < y.length(); i++) {
value = (int)y.charAt(i) - 97; // I looked up an ASCII table because chars are stored as integers and subtracted 97 to that a would be at the first index.
x[count][value]++;
}
count++;
}
System.out.print("["); // This is just printing out in a convenient form so I we can copy it into MATLAB easily
for(int i = 0; i < 44; i++) {
for(int j = 0; j < 26; j++) {
System.out.print(x[i][j]);
if(j < 25) System.out.print(",");
}
System.out.println(";");
}
System.out.println("]");
}}
Ok copy the output MATLAB (you could do it in some Java library or done this first part in MATLAB however I don't like doing normal programming on MATLAB or doing math in Java)
In MATLAB:
a = \paste the output from java here:
b = [73, 73, 81, 56, 91, 81, 109, 72, 93, 70, 106, 56, 64, 64, 102, 56, 83, 111, 157, 65, 122, 91, 134, 78, 129, 68, 105, 91, 36, 47, 61, 33, 99, 64, 88, 85, 77, 77, 49, 61, 58, 44, 69, 113];
b = b';
x = ab
The output will be all the solutions in alphabetical order, however $Q$ will be $0$. Since the problem called for numbers between $1$ and $26$, just replace it with the number which is not included already. It is $1$, so you can deduce that $Q = 1$ and use it to calculate the value of Albuquerque.
answered 1 hour ago
Jack PfaffingerJack Pfaffinger
364112
364112
add a comment |
add a comment |
Klaus234 is a new contributor. Be nice, and check out our Code of Conduct.
Klaus234 is a new contributor. Be nice, and check out our Code of Conduct.
Klaus234 is a new contributor. Be nice, and check out our Code of Conduct.
Klaus234 is a new contributor. Be nice, and check out our Code of Conduct.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3130809%2fhow-to-solve-a-large-system-of-linear-algebra%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
$begingroup$
Welcome to Mathematics Stack Exchange! A quick tour will enhance your experience. Here are helpful tips to write a good question and write a good answer. For equations, please use MathJax.
$endgroup$
– dantopa
4 hours ago
$begingroup$
With a computer you could run Gaussian elimination, though it's not obvious to me that the solution over vectors of 26 real numbers is actually unique (because if any solution exists, then at least 18 of the equations are redundant, so what's to stop more than 18 of them from being redundant?)
$endgroup$
– Ian
3 hours ago
3
$begingroup$
Didn't noticed Albuquerque was so close to Jamestown.
$endgroup$
– zwim
3 hours ago