Skip to content

Commit

Permalink
Merge pull request #8 from virtual-labs/testing
Browse files Browse the repository at this point in the history
Updated quiz questions
  • Loading branch information
BalammaBoya authored Dec 7, 2021
2 parents ac20408 + e91a7e5 commit d43a962
Show file tree
Hide file tree
Showing 15 changed files with 267 additions and 680 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deployment-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
git clone --depth=1 https://github.com/virtual-labs/ph3-lab-mgmt
cd ph3-lab-mgmt
npm install
npm run build-ds-exp
npm run build-exp
cd ../
git config --local user.email "admin@vlabs.ac.in"
git config --local user.name "vleadadmin"
Expand Down
34 changes: 33 additions & 1 deletion experiment-descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
"source": "basics-of-queues.md",
"target": "basics-of-queues.html"
},

{
"unit-type": "task",
"label": "Pre Test Quiz",
"content-type": "assesment",
"source": "pretest.json",
"target": "pretest.html"
},
{
"unit-type": "lu",
"label": "BFS",
Expand Down Expand Up @@ -77,7 +85,15 @@
"content-type": "simulation",
"source": "simulation/bfs_exercise.html",
"target": "bfs_exercise.html"
}
},

{
"unit-type": "task",
"label": "Quiz",
"content-type": "assesment",
"source": "bfs-quiz.json",
"target": "bfs-quiz.html"
}

]
},
Expand Down Expand Up @@ -105,9 +121,25 @@
"content-type": "video",
"source": "comparison-with-other-algorithms.md",
"target": "comparison-with-other-algorithms.html"
},

{
"unit-type": "task",
"label": "Quiz",
"content-type": "assesment",
"source": "analysis-quiz.json",
"target": "analysis-quiz.html"
}
]
},

{
"unit-type": "task",
"label": "Post Test Quiz",
"content-type": "assesment",
"source": "posttest.json",
"target": "posttest.html"
},

{
"unit-type": "task",
Expand Down
149 changes: 0 additions & 149 deletions experiment/analysis/analysis-quiz.js

This file was deleted.

39 changes: 39 additions & 0 deletions experiment/analysis/analysis-quiz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"version": 2.0,
"questions": [
{
"question": "1. Consider the following graph:<br>Vertices, V = [a, b, c , d, e, f]<br>Edges, E = [[a, b], [a c], [b, d], [b, e], [c, e], [c, f]]<br>Where each array within E signifies an edge between the two mentioned vertices.<br>How many iterations of the queue would it take for the algorithm to traverse this graph completely?",
"answers": {
"a": "3",
"b": "5",
"c": "6",
"d": "7"
},
"correctAnswer": "c",
"explanations": {
"a": "This answer is probably obtained by an incorrect understanding of the algorithm. While there are 3 layers in the graph, the queue will contain each element/vertex exactly once during the run and the number of iterations depends on the number of elements the queue takes until it is empty again.",
"b": "This answer is probably obtained by miscounting. The queue will contain each element/vertex exactly once during the run and the number of iterations depends on the number of elements the queue takes until it is empty again. There are 6 vertices in the graph.",
"c": "The queue will contain each element/vertex exactly once during the run and the number of iterations depends on the number of elements the queue takes until it is empty again. Since there are 6 vertices, we will require 6 iterations.",
"d": "This answer is probably obtained by miscounting. The queue will contain each element/vertex exactly once during the run and the number of iterations depends on the number of elements the queue takes until it is empty again. There are 6 vertices in the graph."
},
"difficulty": "intermediate"
},
{
"question": "2. When will the space complexity of BFS be greater than DFS? Note that maximum height in the options refers to the longest thread of vertices from the root to a leaf or final non-repeating vertex.",
"answers": {
"a": "If the maximum height is less than the maximum number of nodes in a single level",
"b": "If the maximum height is greater than the maximum number of nodes in a single level",
"c": "BFS and DFS have same the space complexity",
"d": "Space complexity of DFS is always greater than that of BFS"
},
"correctAnswer": "a",
"explanations": {
"a": "In BFS, the space complexity is proportional to the number of nodes in the deepest level (as this level contains maximum number of nodes in a single level usually) as we traverse one level at a time while in DFS the space complexity is proportional to the maximum depth/height of the graph as we traverse one entire branch (starting from the root) at a time.",
"b": "In BFS, the space complexity is proportional to the number of nodes in the deepest level (as this level contains maximum number of nodes in a single level usually) as we traverse one level at a time while in DFS the space complexity is proportional to the maximum depth/height of the graph as we traverse one entire branch (starting from the root) at a time. Thus, a maximum height greater than maximum number of nodes in a single level would in fact make the space complexity of DFS greater than that of BFS.",
"c": "In BFS, the space complexity is proportional to the number of nodes in the deepest level (as this level contains maximum number of nodes in a single level usually) as we traverse one level at a time while in DFS the space complexity is proportional to the maximum depth/height of the graph as we traverse one entire branch (starting from the root) at a time. These two quantities are not the same and hence DFS and BFS have different space complexities.",
"d": "In BFS, the space complexity is proportional to the number of nodes in the deepest level (as this level contains maximum number of nodes in a single level usually) as we traverse one level at a time while in DFS the space complexity is proportional to the maximum depth/height of the graph as we traverse one entire branch (starting from the root) at a time. It is not necessary that the maximum height is always greater than the maximum number of nodes in a single level and hence this option is incorrect."
},
"difficulty": "intermediate"
}
]
}
139 changes: 0 additions & 139 deletions experiment/bfs/bfs-quiz.js

This file was deleted.

Loading

0 comments on commit d43a962

Please sign in to comment.