Kernel: SageMath 10.1
Lista I
Zadanie 1.1
Wykonaj poniższe rachunki:
a.
b.
In [15]:
Out[15]:
In [22]:
Out[22]:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In [22], line 5
3 F=D*E
4 G=transpose(A)
----> 5 H=F*G
6 show(D,E,F,G)
File /ext/sage/10.1/src/sage/structure/element.pyx:3939
, in sage.structure.element.Matrix.__mul__()
3937
3938 if BOTH_ARE_ELEMENT(cl):
-> 3939 return coercion_model.bin_op(left, right, mul)
3940
3941 cdef long value
File /ext/sage/10.1/src/sage/structure/coerce.pyx:1269
, in sage.structure.coerce.CoercionModel.bin_op()
1267 # We should really include the underlying error.
1268 # This causes so much headache.
-> 1269 raise bin_op_exception(op, x, y)
1270
1271 cpdef canonical_coercion(self, x, y):
TypeError: unsupported operand parent(s) for *: 'Full MatrixSpace of 3 by 3 dense matrices over Integer Ring' and 'Full MatrixSpace of 4 by 3 dense matrices over Integer Ring'
In [21]:
Out[21]:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In [21], line 1
----> 1 H=F*G
2 show(H)
File /ext/sage/10.1/src/sage/structure/element.pyx:3939
, in sage.structure.element.Matrix.__mul__()
3937
3938 if BOTH_ARE_ELEMENT(cl):
-> 3939 return coercion_model.bin_op(left, right, mul)
3940
3941 cdef long value
File /ext/sage/10.1/src/sage/structure/coerce.pyx:1269
, in sage.structure.coerce.CoercionModel.bin_op()
1267 # We should really include the underlying error.
1268 # This causes so much headache.
-> 1269 raise bin_op_exception(op, x, y)
1270
1271 cpdef canonical_coercion(self, x, y):
TypeError: unsupported operand parent(s) for *: 'Full MatrixSpace of 3 by 3 dense matrices over Integer Ring' and 'Full MatrixSpace of 4 by 3 dense matrices over Integer Ring'
Zadanie 2.1
Znajdź macierz spełniajacą poniżesze równanie
a.
In [37]:
Out[37]:
Zadanie 3.1
Wyznaczyć rząd macierzy
a.
Zadanie 4.1
Znajdź rozwiązanie układu:
i.
In [53]:
Out[53]:
In [61]:
Out[61]:
Zadanie 4.2
Z podanego układu równań utwórz macierz uzupełnioną, sprowadź macierz uzupełnioną do postaci schodkowej. Znajdź rozwiązanie układu dowolną metodą.
a.
In [0]:
Zadanie 4.3
Rozwiąż układ równań, podaj i narysuj interpretację geometryczną rozwiązania.
i. $$ x
y = $$
In [0]:
Zadanie 5.1
Wykonaj następujące rachunki w odpowiednim ciele lub pierścieniu.
a. b. c. d.
In [0]:
Zadanie 6.1
Oblicz iloczyn permutacji:
a.
In [0]:
Zadanie 6
Wyznacz permutację odwrotną do permutacji :
a.
In [0]:
Zadanie 7
Określ parzystość permutacji
a.
In [0]:
Zadanie 8
Pokaż tabelkę dla wskazanego działania oraz obiektu. Sprawdź czy działanie jest przemienne.
i. ii. iii.
In [0]:
Zadanie A
Wykonaj obliczenia dla algorytmu PageRank dla zadania z wykładu 1.
In [3]:
Out[3]:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In [3], line 6
3 c=matrix(Integer(3),Integer(3),[-Integer(1),Integer(1),Integer(2),Integer(0),-Integer(2),Integer(1),Integer(0),Integer(0),Integer(0)])
4 d=matrix(Integer(2),Integer(3),[Integer(3),-Integer(3),Integer(0),Integer(0),Integer(6),Integer(3)])
----> 6 show(a+b)
File /ext/sage/10.1/src/sage/structure/element.pyx:1226
, in sage.structure.element.Element.__add__()
1224 # Left and right are Sage elements => use coercion model
1225 if BOTH_ARE_ELEMENT(cl):
-> 1226 return coercion_model.bin_op(left, right, add)
1227
1228 cdef long value
File /ext/sage/10.1/src/sage/structure/coerce.pyx:1269
, in sage.structure.coerce.CoercionModel.bin_op()
1267 # We should really include the underlying error.
1268 # This causes so much headache.
-> 1269 raise bin_op_exception(op, x, y)
1270
1271 cpdef canonical_coercion(self, x, y):
TypeError: unsupported operand parent(s) for +: 'Full MatrixSpace of 3 by 2 dense matrices over Integer Ring' and 'Full MatrixSpace of 2 by 3 dense matrices over Integer Ring'