Advertisement
add1ctus

Четврта група

May 24th, 2015
519
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. Module[{f}, f = Input["Vnesete ja funkcijata f"]; Print
  2.  
  3. [BooleanTable[f] // TableForm]; Print[BooleanConvert[f, "NOR"]];
  4.  
  5. Print[BooleanMinimize[f, "DNF"]] ]
  6.  
  7. Module[{M, MT, L, f, n}, f = Input["Vnesete ja funkcijata f"];
  8. n = Input["n"]; M = Table[f, {i, n}, {j, n}]; MT = Transpose[M];
  9. L = UpperTriangularize[M]; Print[M // MatrixForm];
  10. Print[TM // MatrixForm]; Print[L // MatrixForm]]
  11.  
  12. //Третата задача работи само во Mathematica 10 (останатите се пишувани во 8)
  13. Module[{W, M}, Print[W = WheelGraph[6]];
  14. Print[M =
  15. VertexDelete[EdgeDelete[W, {2 <-> 3, 4 <-> 3, 1 <-> 3}], 3]];
  16. TableForm[AdjacencyMatrix[M]]]
  17.  
  18. Select[Permutations[Reverse@{1, 2, 3, 4, 5}, {3}],
  19. GreaterEqual @@ # &]
  20.  
  21. array= RecurrenceTable[{a[n + 1] == 7+3*a[n], a[1] == 6}, a, {n, 1, 25}]
  22. Select[array, DigitCount[#, 10, 5] == 0 &, 5]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement