Skip to content

PHY-SC-P9 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions experiment/aim.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
### Aim of the experiment

# Gaussian Elimination:
### This method aims to solve a given system of linear equations.


5 changes: 3 additions & 2 deletions experiment/contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ EMPTY
### Subject Matter Experts
| SNo. | Name | Email | Institute | ID |
| :---: | :---: | :---: | :---: | :---: |
| 1 | name | email | institute | id |
| 1 | Dr. Suchi Agarwal | suchissrai@gmail.com | Dayalbagh Educational Institute | PHY-SC-P9 |
| 2 | Dr. Yogita Singh Kardam | yogita.singh27@gmail.com | Dayalbagh Educational Institute | PHY-SC-P9 |

### Developers
| SNo. | Name | Email | Institute | ID |
| :---: | :---: | :---: | :---: | :---: |
| 1 | name | email | institute | id |
| 1 | Anhad Parashar | anhadparashar07@gmail.com | Dayalbagh Educational Institute | PHY-SC-P9 |
2 changes: 2 additions & 0 deletions experiment/experiment-name.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
## Experiment name

## Gaussian Elimination
43 changes: 22 additions & 21 deletions experiment/posttest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,39 @@
"version": 2.0,
"questions": [
{
"question": "This is a Sample Question 1?",
"question": "What is the solution of the given system, when solved by Gaussian Elimination? \n 4x + 3y = 11 \n x - 3y= -1",
"answers": {
"a": "answer1",
"b": "answer2",
"c": "answer3",
"d": "answer4"
"a": "(2,1)",
"b": "(1,2)"
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "On placing x=2 and y=1, the given system is satisfied",
"b": "On placing x=1 and y=2, the given system is not satisfied"
},
"correctAnswer": "a",
"difficulty": "beginner"
"difficulty": "Intermediate"
},
{
"question": "This is a Sample Question 2?",
"question": "Read the solutions by back substitution method: \n ",
"matrix": [
[1, 0, 0, 2],
[0, 1, 0, -1],
[0, 0, 1, 3]
],
"answers": {
"a": "answer1",
"b": "answer2",
"c": "answer3",
"d": "answer4"
"a": "(1 1 3)",
"b": "(1 2 3)",
"c": "(0 2 3)",
"d": "(2 -1 3)"
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "The value of x and y is incorrect",
"b": "The value of x and y is incorrect",
"c": "The value of x and y is incorrect",
"d": "The correct values are \n x = 2, y = -1, z = 3"
},
"correctAnswer": "c",
"difficulty": "beginner"
"correctAnswer": "d",
"difficulty": "Advanced"
}
]
}
55 changes: 35 additions & 20 deletions experiment/pretest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,51 @@
{
"question": "This is a Sample Question 1?",
"answers": {
"a": "answer1",
"b": "answer2",
"c": "answer3",
"d": "answer4"
"a": "(0 1 -7 -4)",
"b": "(0 1 7 4)",
"c": "(0 1 7 8)",
"d": "(0 1 -7 -8)"
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "From R2, twice of R1 is subtracted to obtain (0 1 -7 -4)",
"b": "Subtraction of 2R1 from R2 is incorrect",
"c": "Subtraction of 2R1 from R2 is incorrect",
"d": "Subtraction of 2R1 from R2 is incorrect"
},
"correctAnswer": "a",
"difficulty": "beginner"
"difficulty": "intermediate"
},
{
"question": "This is a Sample Question 2?",
"question": "Which of the following is in echelon form? ",
"answers": {
"a": "answer1",
"b": "answer2",
"c": "answer3",
"d": "answer4"
"a": [
[1, 2, 3, 4],
[0, 0, 1, 3],
[0, 0, 0, 1]
],
"b": [
[7, 0],
[0, 2]
],
"c": [
[1, 2, 1],
[0, 0, 0],
[0, 1, 1]
],
"d": [
[2, 3, 0, 6],
[0, 1, 0, 2],
[0, 0, 2, 3]
]
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "The first non zero element in each row is 1",
"b": "First non zero entry in each row is not 1",
"c": "Rows with all zero elements , if any are below the rows having a non-zero element",
"d": "First non zero entry in each row is not 1"
},
"correctAnswer": "c",
"difficulty": "beginner"
"correctAnswer": "a",
"difficulty": "intermediate"
}
]
}
15 changes: 14 additions & 1 deletion experiment/procedure.md
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
### Procedure
### Procedure
## Procedure for the Gaussian Elimination method is as follows:

### Frame the augmented matrix of the given mxn system of linear equations.Reduce the matrix into echelon form by applying elementary row operations

### Row echelon form matrix 2 to be added

### If the row echelon form has row of the form (0 0 ---- 0 | b) where b ≠ 0, then stop. The system is inconsistent and has no solution.
### If in the row echelon form the number of leading 1's = n, then the system has a unique solution.

### Row echelon form matrix 2 to be added

### If in the row echelon form the number of leading 1's < n, then the system has infinitely many solutions.
### Back substitution is finally performed to obtain the solution(s).
4 changes: 3 additions & 1 deletion experiment/references.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
### Link your references in here
### Link your references in here
## Linear Algebra with Applications by Steven J. Leon
## Introduction to linear Algebra by Gilbert Strang
141 changes: 140 additions & 1 deletion experiment/simulation/css/main.css
Original file line number Diff line number Diff line change
@@ -1 +1,140 @@
/* You CSS goes in here */
/* You CSS goes in here */
body {
font-family: Arial, sans-serif;
background-image: radial-gradient(at 50% 50%, #e0fcff, #eff9ff);
font-weight:600;
}



.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: rgb(233, 245, 249);
border-radius: 5px;
box-shadow: 0 20px 40px rgba(22, 75, 89, 0.3);
}

.container::before{
backdrop-filter: blur(15px);
}

h1 {
margin-top: 0;
font-size: 36px;
}

.alert {
margin-bottom: 20px;
padding: 15px;
border-radius: 3px;
}

.alert-info {
color: #31708f;
background-color: #d9edf7;
border-color: #bce8f1;
}

.text-warning {
color: #8a6d3b;
}

.text-danger {
color: #a94442;
}

.text-success {
color: #3c763d;
}

.text-info {
color: #31708f;
}

textarea {
width: 100%;
resize: none;
border: 1px solid rgb(67, 44, 44);
border-radius: 3px;
padding: 10px;
box-sizing: border-box;
margin-bottom: 20px;
}

#result, #result2, #result3 {
border: 1px solid #ccc;
border-radius: 3px;
padding: 10px;
box-sizing: border-box;
margin-bottom: 20px;
overflow-y: auto;
max-height: 300px;
}

#inputAdvancedOutput {
margin-right: 10px;
}

#inputAdvancedOutput + label {
vertical-align: middle;
}

body {
font-family: 'Roboto', sans-serif;
font-size: 16px;
color: #333;
background-color: #f5f5f5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
background-image: linear-gradient(to right, #0099bf, #5d008b);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

h1 {
font-size: 32px;
}

h2 {
font-size: 28px;
}

h3 {
font-size: 24px;
}

h4 {
font-size: 20px;
}

h5 {
font-size: 16px;
}

h6 {
font-size: 14px;
}

p {
font-size: 16px;
line-height: 1.5;
margin: 10px 0;
}

a {
color: #0066cc;
text-decoration: none;
}

a:hover {
color: #0044cc

}
51 changes: 42 additions & 9 deletions experiment/simulation/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,46 @@
<!DOCTYPE html>
<html>
<head>
<!-- Add CSS at the head of HTML file -->
<link rel="stylesheet" href="./css/main.css">
<title>Gaussian Ellimination method</title>
<link rel="stylesheet" href="./css/main.css">

</head>
<body>
<!-- Your code goes here-->
<body class="backdrop-blur">

<div class="container backdrop">
<h1 class="text-warning">Gaussian Elimination Simulation</h1>
<div class="alert alert-info">For an mxn system of linear equations consisting of m equations having n variables, the input is a mx(n+1) matrix containing the cofficients and the last column being the constants</div>

<!-- Add JS at the bottom of HTML file -->
<script src="./js/main.js"></script>
</body>
</html>
<div class="col-md-6">
<h3 class="text-danger">Enter the Augmented matrix (Input)</h3>
<textarea id="matrixInput" class="form-control" rows="8">
</textarea>
</div>

<div class="col-md-6">
<h3 class="text-info" data-mdb-animation="slide-right">System of linear equations (cofficients only)</h3>
<div id="result" class="jumbotron"></div>
</div>

<div class="col-xs-12">
<h3 class="text-info">Matrix in row echelon form</h3>
<p><input type="checkbox" id="inputAdvancedOutput"/> Steps of calculation</p>
<div id="result2" class="jumbotron" ></div>
</div>
<div class="col-xs-12">
<h3 class="text-success">Result after back substitution</h3>
<div id="result3" class="jumbotron"></div>
</div>
</div>
<script src="./js/main.js"></script>
<script>
var matrix = [];
document.getElementById('matrixInput').onkeyup = function(){
gaussian.calculateWholeMatrix('matrixInput', 'result', 'result2', 'result3', document.getElementById("inputAdvancedOutput").checked);
};
document.getElementById("inputAdvancedOutput").onchange = function(){
gaussian.calculateWholeMatrix('matrixInput', 'result', 'result2', 'result3', document.getElementById("inputAdvancedOutput").checked);
};
gaussian.calculateWholeMatrix('matrixInput', 'result', 'result2', 'result3', document.getElementById("inputAdvancedOutput").checked);
</script>
</body>
</html>
Loading