Advertisement
add1ctus

Прва група

May 24th, 2015
655
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. Module[{f}, f = Input["Vnesete ja funkcijata f"]; Print[BooleanTable[f] // TableForm]; Print[BooleanConvert[f, "NAND"]]; Print[BooleanMinimize[f, "DNF"]] ]
  2.  
  3. Module[{M,MT,L, f, n, m}, f = Input["Vnesete ja funkcijata f"]; m = Input["m"]; n = Input["n"]; M = Table[f, {x, m}, {y, n}];MT=Transpose[M];L=LowerTriangularize[M]; Print[ M // MatrixForm]; Print[MT // MatrixForm]; Print[L // MatrixForm] ]
  4.  
  5. <<Combinatorica`;
  6. f=CompleteGraph[3, 4]
  7. ShowGraph[f]
  8. f=DeleteVertex[f,1]
  9. f=DeleteEdge[f,{1,4}]
  10. f=DeleteEdge[f,{2,4}]
  11. f=DeleteEdge[f,{3,4}]
  12. ShowGraph[f,VertexColor->Red]
  13. TableForm[ToAdjacencyMatrix[f]]
  14.  
  15. list={"a","b","c","d","e"}
  16. permutations=Permutations[list,{3}]
  17. Select[permutations, !MatchQ[#, {___, "b", ___, "a", ___}] &]
  18.  
  19. array= RecurrenceTable[{a[n + 1] == 7*a[n], a[1] == 7}, a, {n, 1, 20}]
  20. Select[array, DigitCount[#, 10, 5] == 0 &, 7]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement