math-exercises 3.0.215 → 3.0.217

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/lib/exercises/math/arithmetic/whichDayInXDays.d.ts.map +1 -1
  2. package/lib/exercises/math/arithmetic/whichDayInXDays.js +2 -1
  3. package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.d.ts.map +1 -1
  4. package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.js +19 -32
  5. package/lib/exercises/math/complex/unitRoots/giveOneSolutionToComplexPowNEqualsOne.js +1 -1
  6. package/lib/exercises/math/conversion/clock/index.d.ts +0 -1
  7. package/lib/exercises/math/conversion/clock/index.d.ts.map +1 -1
  8. package/lib/exercises/math/conversion/clock/index.js +1 -1
  9. package/lib/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.js +2 -2
  10. package/lib/exercises/math/graphs/adjacentMatrixPath.d.ts +10 -0
  11. package/lib/exercises/math/graphs/adjacentMatrixPath.d.ts.map +1 -0
  12. package/lib/exercises/math/graphs/adjacentMatrixPath.js +89 -0
  13. package/lib/exercises/math/graphs/edgesNumberFromSummitsDegrees.d.ts +7 -0
  14. package/lib/exercises/math/graphs/edgesNumberFromSummitsDegrees.d.ts.map +1 -0
  15. package/lib/exercises/math/graphs/edgesNumberFromSummitsDegrees.js +98 -0
  16. package/lib/exercises/math/graphs/eulerianChainFromAdjacentMatrix.d.ts +8 -0
  17. package/lib/exercises/math/graphs/eulerianChainFromAdjacentMatrix.d.ts.map +1 -0
  18. package/lib/exercises/math/graphs/eulerianChainFromAdjacentMatrix.js +96 -0
  19. package/lib/exercises/math/graphs/graphsChainOrPathOfLengthN.d.ts +15 -0
  20. package/lib/exercises/math/graphs/graphsChainOrPathOfLengthN.d.ts.map +1 -0
  21. package/lib/exercises/math/graphs/graphsChainOrPathOfLengthN.js +262 -0
  22. package/lib/exercises/math/graphs/graphsCheckIsConnectedGraph.d.ts +11 -0
  23. package/lib/exercises/math/graphs/graphsCheckIsConnectedGraph.d.ts.map +1 -0
  24. package/lib/exercises/math/graphs/graphsCheckIsConnectedGraph.js +178 -0
  25. package/lib/exercises/math/graphs/graphsCheckIsConnectedUndirectedGraph.d.ts +11 -0
  26. package/lib/exercises/math/graphs/graphsCheckIsConnectedUndirectedGraph.d.ts.map +1 -0
  27. package/lib/exercises/math/graphs/graphsCheckIsConnectedUndirectedGraph.js +178 -0
  28. package/lib/exercises/math/graphs/graphsCheckIsSameGraph.d.ts +19 -0
  29. package/lib/exercises/math/graphs/graphsCheckIsSameGraph.d.ts.map +1 -0
  30. package/lib/exercises/math/graphs/graphsCheckIsSameGraph.js +301 -0
  31. package/lib/exercises/math/graphs/graphsCheckIsVerticesAdjacent.d.ts +16 -0
  32. package/lib/exercises/math/graphs/graphsCheckIsVerticesAdjacent.d.ts.map +1 -0
  33. package/lib/exercises/math/graphs/graphsCheckIsVerticesAdjacent.js +207 -0
  34. package/lib/exercises/math/graphs/graphsDegreeOfVertex.d.ts +15 -0
  35. package/lib/exercises/math/graphs/graphsDegreeOfVertex.d.ts.map +1 -0
  36. package/lib/exercises/math/graphs/graphsDegreeOfVertex.js +232 -0
  37. package/lib/exercises/math/graphs/graphsOrderOfGraph.d.ts +14 -0
  38. package/lib/exercises/math/graphs/graphsOrderOfGraph.d.ts.map +1 -0
  39. package/lib/exercises/math/graphs/graphsOrderOfGraph.js +222 -0
  40. package/lib/exercises/math/graphs/index.d.ts +10 -0
  41. package/lib/exercises/math/graphs/index.d.ts.map +1 -0
  42. package/lib/exercises/math/graphs/index.js +9 -0
  43. package/lib/exercises/math/index.d.ts +1 -0
  44. package/lib/exercises/math/index.d.ts.map +1 -1
  45. package/lib/exercises/math/index.js +1 -0
  46. package/lib/exercises/math/integration/fromExpr/integralFromExpr.d.ts.map +1 -1
  47. package/lib/exercises/math/integration/fromExpr/integralFromExpr.js +2 -0
  48. package/lib/exercises/math/matrices/areMatricesInverse.d.ts +9 -0
  49. package/lib/exercises/math/matrices/areMatricesInverse.d.ts.map +1 -0
  50. package/lib/exercises/math/matrices/areMatricesInverse.js +106 -0
  51. package/lib/exercises/math/matrices/computeFixedMatrixInRecurrenceSequence.d.ts +9 -0
  52. package/lib/exercises/math/matrices/computeFixedMatrixInRecurrenceSequence.d.ts.map +1 -0
  53. package/lib/exercises/math/matrices/computeFixedMatrixInRecurrenceSequence.js +144 -0
  54. package/lib/exercises/math/matrices/findInversedMatrixFromSystem.d.ts +8 -0
  55. package/lib/exercises/math/matrices/findInversedMatrixFromSystem.d.ts.map +1 -0
  56. package/lib/exercises/math/matrices/findInversedMatrixFromSystem.js +148 -0
  57. package/lib/exercises/math/matrices/index.d.ts +12 -0
  58. package/lib/exercises/math/matrices/index.d.ts.map +1 -1
  59. package/lib/exercises/math/matrices/index.js +12 -0
  60. package/lib/exercises/math/matrices/isMatrixTransitionMatrix.d.ts +8 -0
  61. package/lib/exercises/math/matrices/isMatrixTransitionMatrix.d.ts.map +1 -0
  62. package/lib/exercises/math/matrices/isMatrixTransitionMatrix.js +132 -0
  63. package/lib/exercises/math/matrices/matrixBuildMatrixFromCoefficients.d.ts +8 -0
  64. package/lib/exercises/math/matrices/matrixBuildMatrixFromCoefficients.d.ts.map +1 -0
  65. package/lib/exercises/math/matrices/matrixBuildMatrixFromCoefficients.js +152 -0
  66. package/lib/exercises/math/matrices/matrixCheckIsSymmetrical.d.ts +8 -0
  67. package/lib/exercises/math/matrices/matrixCheckIsSymmetrical.d.ts.map +1 -0
  68. package/lib/exercises/math/matrices/matrixCheckIsSymmetrical.js +155 -0
  69. package/lib/exercises/math/matrices/matrixComputeDetOfMat2.d.ts +8 -0
  70. package/lib/exercises/math/matrices/matrixComputeDetOfMat2.d.ts.map +1 -0
  71. package/lib/exercises/math/matrices/matrixComputeDetOfMat2.js +142 -0
  72. package/lib/exercises/math/matrices/matrixComputeInverseOfMat2.d.ts +8 -0
  73. package/lib/exercises/math/matrices/matrixComputeInverseOfMat2.d.ts.map +1 -0
  74. package/lib/exercises/math/matrices/matrixComputeInverseOfMat2.js +237 -0
  75. package/lib/exercises/math/matrices/matrixComputeLinearCombination.d.ts +15 -0
  76. package/lib/exercises/math/matrices/matrixComputeLinearCombination.d.ts.map +1 -0
  77. package/lib/exercises/math/matrices/matrixComputeLinearCombination.js +232 -0
  78. package/lib/exercises/math/matrices/matrixComputePower.d.ts +12 -0
  79. package/lib/exercises/math/matrices/matrixComputePower.d.ts.map +1 -0
  80. package/lib/exercises/math/matrices/matrixComputePower.js +230 -0
  81. package/lib/exercises/math/matrices/matrixComputeProduct.d.ts +9 -0
  82. package/lib/exercises/math/matrices/matrixComputeProduct.d.ts.map +1 -0
  83. package/lib/exercises/math/matrices/matrixComputeProduct.js +178 -0
  84. package/lib/exercises/math/matrices/writeMatrixAssociatedToSystem.d.ts +8 -0
  85. package/lib/exercises/math/matrices/writeMatrixAssociatedToSystem.d.ts.map +1 -0
  86. package/lib/exercises/math/matrices/writeMatrixAssociatedToSystem.js +105 -0
  87. package/lib/exercises/math/spaceGeometry/parametricLine/lineLineRelativePositionsFromParametricLines.d.ts.map +1 -1
  88. package/lib/exercises/math/spaceGeometry/parametricLine/lineLineRelativePositionsFromParametricLines.js +56 -3
  89. package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlaneEquation.d.ts.map +1 -1
  90. package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlaneEquation.js +6 -0
  91. package/lib/exercises/vea/matrixVEA.d.ts +2 -0
  92. package/lib/exercises/vea/matrixVEA.d.ts.map +1 -0
  93. package/lib/exercises/vea/matrixVEA.js +1 -0
  94. package/lib/exercises/vea/treeTableVEA.d.ts.map +1 -1
  95. package/lib/exercises/vea/treeTableVEA.js +2 -0
  96. package/lib/index.d.ts +86 -13
  97. package/lib/index.d.ts.map +1 -1
  98. package/lib/math/geometry/point.d.ts.map +1 -1
  99. package/lib/math/geometry/point.js +3 -1
  100. package/lib/math/graphs/graph.d.ts +43 -0
  101. package/lib/math/graphs/graph.d.ts.map +1 -0
  102. package/lib/math/graphs/graph.js +447 -0
  103. package/lib/math/matrices/matrix.d.ts +42 -3
  104. package/lib/math/matrices/matrix.d.ts.map +1 -1
  105. package/lib/math/matrices/matrix.js +173 -7
  106. package/lib/math/matrices/parseMatrix.d.ts +3 -0
  107. package/lib/math/matrices/parseMatrix.d.ts.map +1 -0
  108. package/lib/math/matrices/parseMatrix.js +22 -0
  109. package/lib/math/systems/generalSystem.d.ts +2 -0
  110. package/lib/math/systems/generalSystem.d.ts.map +1 -1
  111. package/lib/math/systems/generalSystem.js +5 -0
  112. package/lib/math/utils/graphs/graphRenderer.d.ts +25 -0
  113. package/lib/math/utils/graphs/graphRenderer.d.ts.map +1 -0
  114. package/lib/math/utils/graphs/graphRenderer.js +123 -0
  115. package/lib/playground.d.ts +6 -1
  116. package/lib/playground.d.ts.map +1 -1
  117. package/lib/playground.js +6 -5
  118. package/lib/tree/parsers/latexParser.d.ts +1 -1
  119. package/lib/tree/utilities/nodeSimplifier.d.ts +1 -1
  120. package/lib/types/keyIds.d.ts +2 -0
  121. package/lib/types/keyIds.d.ts.map +1 -1
  122. package/lib/utils/arrays/arrayChunks.d.ts +9 -0
  123. package/lib/utils/arrays/arrayChunks.d.ts.map +1 -0
  124. package/lib/utils/arrays/arrayChunks.js +34 -0
  125. package/lib/utils/strings/ordinalSuffixed.d.ts +2 -0
  126. package/lib/utils/strings/ordinalSuffixed.d.ts.map +1 -0
  127. package/lib/utils/strings/ordinalSuffixed.js +5 -0
  128. package/package.json +7 -1
@@ -0,0 +1,232 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, propWhile, GeneratorOptionTarget, GeneratorOptionType, } from "../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
3
+ import { defaultArrayedOptsWhereNeeded } from "../../../exercises/utils/options/arrayedOptions.js";
4
+ import { greenMain } from "../../../geogebra/colors.js";
5
+ import { GeogebraConstructor } from "../../../geogebra/geogebraConstructor.js";
6
+ import { Point } from "../../../math/geometry/point.js";
7
+ import { GraphConstructor } from "../../../math/graphs/graph.js";
8
+ import { GraphRenderer, } from "../../../math/utils/graphs/graphRenderer.js";
9
+ import { randint } from "../../../math/utils/random/randint.js";
10
+ import { parseAlgebraic } from "../../../tree/parsers/latexParser.js";
11
+ import { NodeComparator } from "../../../tree/utilities/nodeComparator.js";
12
+ import { probaLawFlip } from "../../../utils/alea/probaLawFlip.js";
13
+ import { random } from "../../../utils/alea/random.js";
14
+ import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
15
+ import { joinanded } from "../../../utils/strings/joinanded.js";
16
+ const getHydrated = (identifiers) => {
17
+ const { graphIds, indexAsked } = identifiers;
18
+ const graph = GraphConstructor.fromIdentifiers(graphIds);
19
+ const nameVertexAsked = graph.vertexNames[indexAsked];
20
+ const arrNameVertexAdjacent = graph.getArrVertexNameAdjacent(nameVertexAsked);
21
+ return {
22
+ graph,
23
+ nameVertexAsked,
24
+ arrNameVertexAdjacent,
25
+ };
26
+ };
27
+ const getInstruction = (identifiers) => {
28
+ const { nameVertexAsked } = getHydrated(identifiers);
29
+ return `Un graphe est représenté ci-dessous.
30
+ Quel est le degré du sommet $${nameVertexAsked}$ ?`;
31
+ };
32
+ const getAnswerNode = (identifiers) => {
33
+ const { arrNameVertexAdjacent } = getHydrated(identifiers);
34
+ return arrNameVertexAdjacent.length.toTree();
35
+ };
36
+ const getAnswer = (identifiers) => {
37
+ return getAnswerNode(identifiers).toTex();
38
+ };
39
+ const getHint = () => {
40
+ return `Le degré d'un sommet est le nombre d'arêtes incidentes à ce sommet, sans tenir compte de leur sens de parcours.`;
41
+ };
42
+ const getCorrection = (identifiers) => {
43
+ const { nameVertexAsked, arrNameVertexAdjacent } = getHydrated(identifiers);
44
+ const nbAdjacent = arrNameVertexAdjacent.length;
45
+ return `Le sommet $${nameVertexAsked}$ a pour ${nbAdjacent === 1 ? "sommet adjacent" : "sommets adjacents"} ${joinanded(arrNameVertexAdjacent.map((nameVertex) => `$${nameVertex}$`), ", ", " et ")}.
46
+
47
+ Le degré de $${nameVertexAsked}$ est donc $${nbAdjacent.frenchify()}$.`;
48
+ };
49
+ const getCorrectionGGBOptions = (identifiers) => {
50
+ const { graphNodes, graphEdges } = identifiers;
51
+ const { graph, nameVertexAsked } = getHydrated(identifiers);
52
+ const arrPoint = graphNodes.map(({ label, x, y }) => new Point(label, x, y));
53
+ const pointCommands = arrPoint.flatMap((point) => point.toGGBCommand({
54
+ isFixed: false,
55
+ isSelectionnable: true,
56
+ showLabel: true,
57
+ style: 0,
58
+ size: 8,
59
+ color: point.name === nameVertexAsked ? greenMain : "#000000",
60
+ }));
61
+ const edgeCommands = graphEdges.flatMap((e, i) => {
62
+ return [
63
+ graph.isDirected
64
+ ? `edge${i + 1} = Vector(${e.from}, ${e.to})`
65
+ : `edge${i + 1} = Segment(${e.from}, ${e.to})`,
66
+ ...(e.from === nameVertexAsked || e.to === nameVertexAsked
67
+ ? [`SetColor(edge${i + 1}, "${greenMain}")`]
68
+ : []),
69
+ ];
70
+ });
71
+ const ggb = new GeogebraConstructor({
72
+ commands: [...pointCommands, ...edgeCommands],
73
+ fontSize: 16,
74
+ hideAxes: true,
75
+ hideGrid: true,
76
+ });
77
+ return ggb.getOptions({
78
+ coords: ggb.getCoordsForPoints(arrPoint),
79
+ });
80
+ };
81
+ const getGGBOptions = (identifiers) => {
82
+ const { graphNodes, graphEdges } = identifiers;
83
+ const { graph } = getHydrated(identifiers);
84
+ const arrPoint = graphNodes.map(({ label, x, y }) => new Point(label, x, y));
85
+ const pointCommands = arrPoint.flatMap((point) => point.toGGBCommand({
86
+ isFixed: false,
87
+ isSelectionnable: true,
88
+ showLabel: true,
89
+ style: 0,
90
+ size: 8,
91
+ }));
92
+ const edgeCommands = graphEdges.map((e, i) => graph.isDirected
93
+ ? `v${i + 1} = Vector(${e.from}, ${e.to})`
94
+ : `s${i + 1} = Segment(${e.from}, ${e.to})`);
95
+ const arrGGBCommandForGraph = [...pointCommands, ...edgeCommands];
96
+ const ggb = new GeogebraConstructor({
97
+ commands: [...arrGGBCommandForGraph],
98
+ fontSize: 16,
99
+ hideAxes: true,
100
+ hideGrid: true,
101
+ });
102
+ return ggb.getOptions({
103
+ coords: ggb.getCoordsForPoints(arrPoint),
104
+ });
105
+ };
106
+ const getPropositions = (n, { answer, ...identifiers }) => {
107
+ const propositions = [];
108
+ addValidProp(propositions, answer);
109
+ const { graph, nameVertexAsked } = getHydrated(identifiers);
110
+ //student: d -> d+ or d -> d-
111
+ if (graph.isDirected) {
112
+ const [_, dMinus, dPlus] = graph.getArrDegreeOfVertex(nameVertexAsked);
113
+ const [isAddWrongPropDMinus, isAddWrongPropDPlus] = probaLawFlip([
114
+ [[true, false], 0.4],
115
+ [[false, true], 0.4],
116
+ [[true, true], 0.2],
117
+ ]);
118
+ if (isAddWrongPropDMinus) {
119
+ tryToAddWrongProp(propositions, dMinus.frenchify());
120
+ }
121
+ if (isAddWrongPropDPlus) {
122
+ tryToAddWrongProp(propositions, dPlus.frenchify());
123
+ }
124
+ }
125
+ //student: degree of other vertex
126
+ {
127
+ [...Array(graph.vertexNames.length).keys()].forEach((index) => {
128
+ const identifiersWrong = {
129
+ ...identifiers,
130
+ indexAsked: index,
131
+ };
132
+ tryToAddWrongProp(propositions, getAnswer(identifiersWrong));
133
+ });
134
+ }
135
+ //filler
136
+ propWhile(propositions, n, () => {
137
+ const dWrong = randint(1, 10);
138
+ tryToAddWrongProp(propositions, dWrong.frenchify());
139
+ });
140
+ return shuffleProps(propositions, n);
141
+ };
142
+ const getKeys = () => {
143
+ return [];
144
+ };
145
+ const isAnswerValid = (ans, { answer }) => {
146
+ try {
147
+ const [nodeAns, nodeAnswer] = [ans, answer].map((str) => parseAlgebraic(str));
148
+ return NodeComparator.isEqualViaSub(nodeAns, nodeAnswer);
149
+ }
150
+ catch (err) {
151
+ return handleVEAError(err);
152
+ }
153
+ };
154
+ const createRandomIdentifiers = (isDirected) => {
155
+ const nbVertices = randint(5, 10);
156
+ const isSimple = true;
157
+ const minDensity = (() => {
158
+ switch (nbVertices) {
159
+ case 5:
160
+ return isDirected ? 0.4 : 0.62;
161
+ case 6:
162
+ return isDirected ? 0.35 : 0.57;
163
+ case 7:
164
+ return isDirected ? 0.3 : 0.52;
165
+ case 8:
166
+ return isDirected ? 0.27 : 0.37;
167
+ case 9:
168
+ return isDirected ? 0.24 : 0.32;
169
+ }
170
+ })();
171
+ const graph = GraphConstructor.random(nbVertices, isSimple, isDirected, minDensity, "ABCDEFGHIJKLM".split(""), true);
172
+ const indexAsked = randint(0, nbVertices);
173
+ const { nodes: graphNodes, edges: graphEdges } = GraphRenderer.renderToNodesAndEdges(graph);
174
+ const identifiers = {
175
+ graphIds: graph.toIdentifiers(),
176
+ indexAsked,
177
+ graphNodes,
178
+ graphEdges,
179
+ };
180
+ return identifiers;
181
+ };
182
+ const getGraphsDegreeOfVertexQuestion = (optsIn) => {
183
+ const arrayedOpts = defaultArrayedOptsWhereNeeded(optsIn, arrayedOptsDefault);
184
+ const opts = {
185
+ graphType: random(arrayedOpts.graphType),
186
+ };
187
+ const isDirected = opts.graphType === "orienté";
188
+ const identifiers = createRandomIdentifiers(isDirected);
189
+ return getQuestionFromIdentifiers(identifiers);
190
+ };
191
+ const getQuestionFromIdentifiers = (identifiers, opts) => {
192
+ const question = {
193
+ answer: getAnswer(identifiers, opts),
194
+ instruction: getInstruction(identifiers, opts),
195
+ keys: getKeys(identifiers, opts),
196
+ answerFormat: "tex",
197
+ identifiers,
198
+ hint: getHint(identifiers, opts),
199
+ correction: getCorrection(identifiers, opts),
200
+ correctionGgbOptions: getCorrectionGGBOptions(identifiers, opts),
201
+ ggbOptions: getGGBOptions(identifiers, opts),
202
+ };
203
+ return question;
204
+ };
205
+ const arrayedOptsDefault = {
206
+ graphType: ["non orienté"],
207
+ };
208
+ const options = [
209
+ {
210
+ id: "graphType",
211
+ label: "Types de graphes",
212
+ target: GeneratorOptionTarget.generation,
213
+ type: GeneratorOptionType.multiselect,
214
+ values: ["non orienté", "orienté"],
215
+ defaultValue: arrayedOptsDefault.graphType,
216
+ },
217
+ ];
218
+ export const graphsDegreeOfVertex = {
219
+ id: "graphsDegreeOfVertex",
220
+ label: "Déterminer le degré du sommet d'un graphe",
221
+ isSingleStep: true,
222
+ generator: (nb, opts) => getDistinctQuestions(() => getGraphsDegreeOfVertexQuestion(opts), nb),
223
+ options,
224
+ qcmTimer: 60,
225
+ freeTimer: 60,
226
+ isAnswerValid,
227
+ getPropositions,
228
+ subject: "Mathématiques",
229
+ getQuestionFromIdentifiers,
230
+ hasHintAndCorrection: true,
231
+ hasGeogebra: true,
232
+ };
@@ -0,0 +1,14 @@
1
+ import { Exercise } from "../../../exercises/exercise.js";
2
+ import { GraphIdentifiers } from "../../../math/graphs/graph.js";
3
+ import { GraphEdge, GraphNode } from "../../../math/utils/graphs/graphRenderer.js";
4
+ type Identifiers = {
5
+ graphIds: GraphIdentifiers;
6
+ graphNodes: GraphNode[];
7
+ graphEdges: GraphEdge[];
8
+ };
9
+ type Options = {
10
+ graphType: string;
11
+ };
12
+ export declare const graphsOrderOfGraph: Exercise<Identifiers, Options>;
13
+ export {};
14
+ //# sourceMappingURL=graphsOrderOfGraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphsOrderOfGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/graphs/graphsOrderOfGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAAoB,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EACL,SAAS,EACT,SAAS,EAEV,MAAM,0CAA0C,CAAC;AAUlD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAC;IAG3B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;AAoPF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAsBF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAe7D,CAAC"}
@@ -0,0 +1,222 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, propWhile, GeneratorOptionTarget, GeneratorOptionType, } from "../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
3
+ import { defaultArrayedOptsWhereNeeded } from "../../../exercises/utils/options/arrayedOptions.js";
4
+ import { greenMain } from "../../../geogebra/colors.js";
5
+ import { GeogebraConstructor } from "../../../geogebra/geogebraConstructor.js";
6
+ import { Point } from "../../../math/geometry/point.js";
7
+ import { GraphConstructor } from "../../../math/graphs/graph.js";
8
+ import { GraphRenderer, } from "../../../math/utils/graphs/graphRenderer.js";
9
+ import { randint } from "../../../math/utils/random/randint.js";
10
+ import { parseAlgebraic } from "../../../tree/parsers/latexParser.js";
11
+ import { NodeComparator } from "../../../tree/utilities/nodeComparator.js";
12
+ import { coinFlip } from "../../../utils/alea/coinFlip.js";
13
+ import { probaFlip } from "../../../utils/alea/probaFlip.js";
14
+ import { random } from "../../../utils/alea/random.js";
15
+ import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
16
+ import { joinanded } from "../../../utils/strings/joinanded.js";
17
+ const getHydrated = (identifiers) => {
18
+ const { graphIds } = identifiers;
19
+ const graph = GraphConstructor.fromIdentifiers(graphIds);
20
+ return {
21
+ graph,
22
+ };
23
+ };
24
+ const getInstruction = () => {
25
+ return `Un graphe est représenté ci-dessous.
26
+ Quel est son ordre ?`;
27
+ };
28
+ const getAnswerNode = (identifiers) => {
29
+ const { graph } = getHydrated(identifiers);
30
+ return graph.vertexNames.length.toTree();
31
+ };
32
+ const getAnswer = (identifiers) => {
33
+ return getAnswerNode(identifiers).toTex();
34
+ };
35
+ const getHint = () => {
36
+ return `L'ordre d'un graphe est le nombre de sommets dont il est composé.`;
37
+ };
38
+ const getCorrection = (identifiers) => {
39
+ const { graph } = getHydrated(identifiers);
40
+ return `Le graphe a pour sommets ${joinanded(graph.vertexNames.map((nameVertex) => `$${nameVertex}$`), ", ", " et ")}.
41
+
42
+ L'ordre du graphe est donc $${graph.vertexNames.length.frenchify()}$.`;
43
+ };
44
+ const getCorrectionGGBOptions = (identifiers) => {
45
+ const { graphNodes, graphEdges } = identifiers;
46
+ const { graph } = getHydrated(identifiers);
47
+ const arrPoint = graphNodes.map(({ label, x, y }) => new Point(label, x, y));
48
+ const pointCommands = arrPoint.flatMap((point) => point.toGGBCommand({
49
+ isFixed: false,
50
+ isSelectionnable: true,
51
+ showLabel: true,
52
+ style: 0,
53
+ size: 8,
54
+ color: greenMain,
55
+ }));
56
+ const edgeCommands = graphEdges.flatMap((e, i) => {
57
+ return [
58
+ graph.isDirected
59
+ ? `edge${i + 1} = Vector(${e.from}, ${e.to})`
60
+ : `edge${i + 1} = Segment(${e.from}, ${e.to})`,
61
+ ];
62
+ });
63
+ const ggb = new GeogebraConstructor({
64
+ commands: [...pointCommands, ...edgeCommands],
65
+ fontSize: 16,
66
+ hideAxes: true,
67
+ hideGrid: true,
68
+ });
69
+ return ggb.getOptions({
70
+ coords: ggb.getCoordsForPoints(arrPoint),
71
+ });
72
+ };
73
+ const getGGBOptions = (identifiers) => {
74
+ const { graphNodes, graphEdges } = identifiers;
75
+ const { graph } = getHydrated(identifiers);
76
+ const arrPoint = graphNodes.map(({ label, x, y }) => new Point(label, x, y));
77
+ const pointCommands = arrPoint.flatMap((point) => point.toGGBCommand({
78
+ isFixed: false,
79
+ isSelectionnable: true,
80
+ showLabel: true,
81
+ style: 0,
82
+ size: 8,
83
+ }));
84
+ const edgeCommands = graphEdges.map((e, i) => graph.isDirected
85
+ ? `v${i + 1} = Vector(${e.from}, ${e.to})`
86
+ : `s${i + 1} = Segment(${e.from}, ${e.to})`);
87
+ const arrGGBCommandForGraph = [...pointCommands, ...edgeCommands];
88
+ const ggb = new GeogebraConstructor({
89
+ commands: [...arrGGBCommandForGraph],
90
+ fontSize: 16,
91
+ hideAxes: true,
92
+ hideGrid: true,
93
+ });
94
+ return ggb.getOptions({
95
+ coords: ggb.getCoordsForPoints(arrPoint),
96
+ });
97
+ };
98
+ const getPropositions = (n, { answer, ...identifiers }) => {
99
+ const propositions = [];
100
+ addValidProp(propositions, answer);
101
+ const { graphEdges } = identifiers;
102
+ const { graph } = getHydrated(identifiers);
103
+ const isTerror = probaFlip(0.4);
104
+ //student: number of edges
105
+ {
106
+ const nbWrong = graphEdges.length;
107
+ tryToAddWrongProp(propositions, nbWrong.frenchify());
108
+ if (isTerror) {
109
+ if (coinFlip()) {
110
+ tryToAddWrongProp(propositions, (nbWrong - 1).frenchify());
111
+ }
112
+ if (coinFlip()) {
113
+ tryToAddWrongProp(propositions, (nbWrong + 1).frenchify());
114
+ }
115
+ }
116
+ }
117
+ //student: counting mistake (offset)
118
+ if (!isTerror) {
119
+ const nbAnswer = graph.vertexNames.length;
120
+ if (coinFlip()) {
121
+ tryToAddWrongProp(propositions, (nbAnswer - 1).frenchify());
122
+ }
123
+ if (coinFlip()) {
124
+ tryToAddWrongProp(propositions, (nbAnswer + 1).frenchify());
125
+ }
126
+ }
127
+ //filler
128
+ propWhile(propositions, n, () => {
129
+ const nbWrong = randint(5, 15);
130
+ tryToAddWrongProp(propositions, nbWrong.frenchify());
131
+ });
132
+ return shuffleProps(propositions, n);
133
+ };
134
+ const getKeys = () => {
135
+ return [];
136
+ };
137
+ const isAnswerValid = (ans, { answer }) => {
138
+ try {
139
+ const [nodeAns, nodeAnswer] = [ans, answer].map((str) => parseAlgebraic(str));
140
+ return NodeComparator.isEqualViaSub(nodeAns, nodeAnswer);
141
+ }
142
+ catch (err) {
143
+ return handleVEAError(err);
144
+ }
145
+ };
146
+ const createRandomIdentifiers = (isDirected) => {
147
+ const nbVertices = randint(5, 10);
148
+ const isSimple = true;
149
+ const minDensity = (() => {
150
+ switch (nbVertices) {
151
+ case 5:
152
+ return isDirected ? 0.4 : 0.62;
153
+ case 6:
154
+ return isDirected ? 0.35 : 0.57;
155
+ case 7:
156
+ return isDirected ? 0.3 : 0.52;
157
+ case 8:
158
+ return isDirected ? 0.27 : 0.37;
159
+ case 9:
160
+ return isDirected ? 0.24 : 0.32;
161
+ }
162
+ })();
163
+ const graph = GraphConstructor.random(nbVertices, isSimple, isDirected, minDensity, "ABCDEFGHIJKLM".split(""), true);
164
+ const { nodes: graphNodes, edges: graphEdges } = GraphRenderer.renderToNodesAndEdges(graph);
165
+ const identifiers = {
166
+ graphIds: graph.toIdentifiers(),
167
+ graphNodes,
168
+ graphEdges,
169
+ };
170
+ return identifiers;
171
+ };
172
+ const getGraphsOrderOfGraphQuestion = (optsIn) => {
173
+ const arrayedOpts = defaultArrayedOptsWhereNeeded(optsIn, arrayedOptsDefault);
174
+ const opts = {
175
+ graphType: random(arrayedOpts.graphType),
176
+ };
177
+ const isDirected = opts.graphType === "orienté";
178
+ const identifiers = createRandomIdentifiers(isDirected);
179
+ return getQuestionFromIdentifiers(identifiers);
180
+ };
181
+ const getQuestionFromIdentifiers = (identifiers, opts) => {
182
+ const question = {
183
+ answer: getAnswer(identifiers, opts),
184
+ instruction: getInstruction(identifiers, opts),
185
+ keys: getKeys(identifiers, opts),
186
+ answerFormat: "tex",
187
+ identifiers,
188
+ hint: getHint(identifiers, opts),
189
+ correction: getCorrection(identifiers, opts),
190
+ correctionGgbOptions: getCorrectionGGBOptions(identifiers, opts),
191
+ ggbOptions: getGGBOptions(identifiers, opts),
192
+ };
193
+ return question;
194
+ };
195
+ const arrayedOptsDefault = {
196
+ graphType: ["non orienté"],
197
+ };
198
+ const options = [
199
+ {
200
+ id: "graphType",
201
+ label: "Types de graphes",
202
+ target: GeneratorOptionTarget.generation,
203
+ type: GeneratorOptionType.multiselect,
204
+ values: ["non orienté", "orienté"],
205
+ defaultValue: arrayedOptsDefault.graphType,
206
+ },
207
+ ];
208
+ export const graphsOrderOfGraph = {
209
+ id: "graphsOrderOfGraph",
210
+ label: "Déterminer l'ordre d'un graphe",
211
+ isSingleStep: true,
212
+ generator: (nb, opts) => getDistinctQuestions(() => getGraphsOrderOfGraphQuestion(opts), nb),
213
+ options,
214
+ qcmTimer: 60,
215
+ freeTimer: 60,
216
+ isAnswerValid,
217
+ getPropositions,
218
+ subject: "Mathématiques",
219
+ getQuestionFromIdentifiers,
220
+ hasHintAndCorrection: true,
221
+ hasGeogebra: true,
222
+ };
@@ -0,0 +1,10 @@
1
+ export * from "./graphsOrderOfGraph.js";
2
+ export * from "./graphsDegreeOfVertex.js";
3
+ export * from "./graphsCheckIsVerticesAdjacent.js";
4
+ export * from "./graphsCheckIsSameGraph.js";
5
+ export * from "./graphsCheckIsConnectedGraph.js";
6
+ export * from "./graphsChainOrPathOfLengthN.js";
7
+ export * from "./edgesNumberFromSummitsDegrees.js";
8
+ export * from "./adjacentMatrixPath.js";
9
+ export * from "./eulerianChainFromAdjacentMatrix.js";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/graphs/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,yBAAyB,CAAC;AACxC,cAAc,sCAAsC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export * from "./graphsOrderOfGraph.js";
2
+ export * from "./graphsDegreeOfVertex.js";
3
+ export * from "./graphsCheckIsVerticesAdjacent.js";
4
+ export * from "./graphsCheckIsSameGraph.js";
5
+ export * from "./graphsCheckIsConnectedGraph.js";
6
+ export * from "./graphsChainOrPathOfLengthN.js";
7
+ export * from "./edgesNumberFromSummitsDegrees.js";
8
+ export * from "./adjacentMatrixPath.js";
9
+ export * from "./eulerianChainFromAdjacentMatrix.js";
@@ -26,5 +26,6 @@ export * from "./tests/index.js";
26
26
  export * from "./pcExosInMath.js";
27
27
  export * from "./scratch/index.js";
28
28
  export * from "./integration/index.js";
29
+ export * from "./graphs/index.js";
29
30
  export * from "./arithmetic/index.js";
30
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/math/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/math/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAElC,cAAc,uBAAuB,CAAC"}
@@ -26,5 +26,6 @@ export * from "./tests/index.js";
26
26
  export * from "./pcExosInMath.js";
27
27
  export * from "./scratch/index.js";
28
28
  export * from "./integration/index.js";
29
+ export * from "./graphs/index.js";
29
30
  // export * from "./_debug/index.js";
30
31
  export * from "./arithmetic/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"integralFromExpr.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/integration/fromExpr/integralFromExpr.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAcrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAe7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,aAAa,EAAE,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IAClD,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAqWF,KAAK,OAAO,GAAG;IACb,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AA2CF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAe3D,CAAC"}
1
+ {"version":3,"file":"integralFromExpr.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/integration/fromExpr/integralFromExpr.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAcrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAe7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,aAAa,EAAE,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IAClD,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAuWF,KAAK,OAAO,GAAG;IACb,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AA2CF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAe3D,CAAC"}
@@ -252,7 +252,9 @@ const isIdentifiersQCPassed = (identifiers) => {
252
252
  const isExploding = (identifiers) => {
253
253
  let isExploding = false;
254
254
  try {
255
+ //anything that contain exploding simplify()
255
256
  getAnswer(identifiers);
257
+ getCorrection(identifiers);
256
258
  }
257
259
  catch (_) {
258
260
  isExploding = true;
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../exercises/exercise.js";
2
+ import { MatrixIdentifiers } from "../../../math/matrices/matrix.js";
3
+ type Identifiers = {
4
+ aIds: MatrixIdentifiers;
5
+ bIds: MatrixIdentifiers;
6
+ };
7
+ export declare const areMatricesInverse: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=areMatricesInverse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"areMatricesInverse.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/matrices/areMatricesInverse.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAEL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAKvC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE,iBAAiB,CAAC;CACzB,CAAC;AAmGF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAmBpD,CAAC"}
@@ -0,0 +1,106 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
3
+ import { MatrixConstructor, } from "../../../math/matrices/matrix.js";
4
+ import { randint } from "../../../math/utils/random/randint.js";
5
+ import { add } from "../../../tree/nodes/operators/addNode.js";
6
+ import { coinFlip } from "../../../utils/alea/coinFlip.js";
7
+ const getPropositions = (n, { answer }) => {
8
+ const propositions = [];
9
+ addValidProp(propositions, answer, "raw");
10
+ tryToAddWrongProp(propositions, "Oui", "raw");
11
+ tryToAddWrongProp(propositions, "Non", "raw");
12
+ return shuffleProps(propositions, n);
13
+ };
14
+ const getAnswer = (identifiers) => {
15
+ const { aIds, bIds } = identifiers;
16
+ const a = MatrixConstructor.fromIdentifiers(aIds);
17
+ const b = MatrixConstructor.fromIdentifiers(bIds);
18
+ const inv = a.toInversed();
19
+ return inv.simplify().toTex() === b.simplify().toTex() ? "Oui" : "Non";
20
+ };
21
+ const getInstruction = (identifiers) => {
22
+ const { aIds, bIds } = identifiers;
23
+ const a = MatrixConstructor.fromIdentifiers(aIds);
24
+ const b = MatrixConstructor.fromIdentifiers(bIds);
25
+ return `On considère les matrices :
26
+
27
+ $$
28
+ A = ${a.toTex()}
29
+ $$
30
+
31
+ $$
32
+ B = ${b.toTex()}
33
+ $$
34
+
35
+ $B$ est-elle la matrice inverse de $A$ ?`;
36
+ };
37
+ const getHint = () => {
38
+ return `$B$ est la matrice inverse de $A$ si et seulement si $AB = I$.`;
39
+ };
40
+ const getCorrection = (identifiers) => {
41
+ const { aIds, bIds } = identifiers;
42
+ const a = MatrixConstructor.fromIdentifiers(aIds);
43
+ const b = MatrixConstructor.fromIdentifiers(bIds);
44
+ const ab = a.matrixProduct(b);
45
+ const absimp = ab.simplify();
46
+ const isInv = absimp.isIdentity();
47
+ return `$B$ est la matrice inverse de $A$ si et seulement si $AB = I$.
48
+
49
+ On calcule donc le produit $AB$ :
50
+
51
+ $$
52
+ A\\times B = ${ab.toTex()}
53
+ $$
54
+
55
+ $$
56
+ A\\times B = ${absimp.toTex()}
57
+ $$
58
+
59
+ ${isInv
60
+ ? `On a donc $AB = I$ et donc $B$ est la matrice inverse de $A$.`
61
+ : `On a donc $AB \\neq I$ et donc $B$ n'est pas la matrice inverse de $A$.`}`;
62
+ };
63
+ const getAreMatricesInverseQuestion = () => {
64
+ const isInv = coinFlip();
65
+ const a = MatrixConstructor.randomInversible(2, 2, {
66
+ allowIdentity: false,
67
+ elementsOpts: [-5, 6],
68
+ });
69
+ const b = a.toInversed().simplify();
70
+ if (!isInv) {
71
+ b.elements[randint(0, 2)][randint(0, 2)] = add(b.elements[randint(0, 2)][randint(0, 2)], randint(-2, 2, [0])).simplify();
72
+ }
73
+ const identifiers = {
74
+ aIds: a.toIdentifiers(),
75
+ bIds: b.toIdentifiers(),
76
+ };
77
+ return getQuestionFromIdentifiers(identifiers);
78
+ };
79
+ const getQuestionFromIdentifiers = (identifiers) => {
80
+ return {
81
+ answer: getAnswer(identifiers),
82
+ instruction: getInstruction(identifiers),
83
+ keys: [],
84
+ answerFormat: "raw",
85
+ identifiers,
86
+ hint: getHint(identifiers),
87
+ correction: getCorrection(identifiers),
88
+ };
89
+ };
90
+ export const areMatricesInverse = {
91
+ id: "areMatricesInverse",
92
+ label: "Vérifier si $B$ est la matrice inverse de $A$ (matrices $2 \\times 2$)",
93
+ isSingleStep: true,
94
+ generator: (nb, opts) => getDistinctQuestions(() => getAreMatricesInverseQuestion(opts), nb),
95
+ qcmTimer: 60,
96
+ freeTimer: 60,
97
+ getPropositions,
98
+ subject: "Mathématiques",
99
+ getInstruction,
100
+ getHint,
101
+ getCorrection,
102
+ getAnswer,
103
+ getQuestionFromIdentifiers,
104
+ hasHintAndCorrection: true,
105
+ answerType: "QCU",
106
+ };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../exercises/exercise.js";
2
+ import { MatrixIdentifiers } from "../../../math/matrices/matrix.js";
3
+ type Identifiers = {
4
+ aIds: MatrixIdentifiers;
5
+ bIds: MatrixIdentifiers;
6
+ };
7
+ export declare const computeFixedMatrixInRecurrenceSequence: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=computeFixedMatrixInRecurrenceSequence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"computeFixedMatrixInRecurrenceSequence.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/matrices/computeFixedMatrixInRecurrenceSequence.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAUvC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE,iBAAiB,CAAC;CACzB,CAAC;AAqIF,eAAO,MAAM,sCAAsC,EAAE,QAAQ,CAAC,WAAW,CAqBxE,CAAC"}