add1ctus

Втора група

May 24th, 2015
513
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. Module[{f}, f = Input["Vnesete ja funkcijata f"]; Print[BooleanTable[f] // TableForm]; Print[BooleanConvert[f, "NOR"]]; Print[BooleanMinimize[f, "DNF"]] ]
  2.  
  3. f[a0_, b0_] :=
  4. Module[{a = Abs[a0], b = UpperTriangularize[b0]},
  5. If[a0Koloni == b0Redici, Print[MatrixForm[a.b]],
  6. Print["Matricite nemozat da se mnozat!"]];]
  7. a0Redici = Input["Vnesi broj na redici na prvata matrica"]
  8. a0Koloni = Input["Vnesi broj na koloni"]
  9. a0 = Table[Input["Vnesi element:"], {i, a0Redici}, {j, a0Koloni}]
  10. b0Redici = Input["Vnesi broj na redici na vtorata matrica"]
  11. b0Koloni = Input["Vnesi broj na koloni"]
  12. b0 = Table[Input["Vnesi element:"], {i, b0Redici}, {j, b0Koloni}]
  13. f[a0, b0]
  14.  
  15. <<Combinatorica`;
  16. f=CompleteGraph[5]
  17. ShowGraph[f]
  18. f=DeleteVertex[f,1]
  19. f=DeleteVertex[f,1]
  20. f=DeleteEdge[f,{1,2}]
  21. f=DeleteEdge[f,{2,3}]
  22. ShowGraph[f,VertexColor->Blue]
  23. TableForm[ToAdjacencyMatrix[f]]
  24.  
  25. list={"x","y","z","w","t"}
  26. permutations=Permutations[list,{4}]
  27. Select[permutations, !MatchQ[#, {___, "t", ___, "z", ___}] &]
  28.  
  29. array= RecurrenceTable[{a[n + 1] == 11*a[n], a[1] == 7}, a, {n, 1, 25}]
  30. Select[array, DigitCount[#, 10, 3] == 0 &, 11]
Advertisement
Add Comment
Please, Sign In to add comment