Advertisement
add1ctus

Трета задача

May 24th, 2015
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. Module[{f}, f = Input["Vnesete ja funkcijata f"]; Print[BooleanTable[f] // TableForm]; Print[BooleanConvert[f, "NOR"]]; Print[BooleanMinimize[f, "CNF"]] ]
  2.  
  3. //Доколку ја има некој втората задача, нека ми пише
  4.  
  5. <<Combinatorica`;
  6. f=CompleteGraph[7,2]
  7. ShowGraph[f]
  8. f=DeleteVertex[f,1]
  9. f=DeleteVertex[f,1]
  10. f=DeleteEdge[f,{1,6}]
  11. f=DeleteEdge[f,{1,7}]
  12. ShowGraph[f,VertexColor->Green]
  13. TableForm[ToAdjacencyMatrix[f]]
  14.  
  15. list={"x","y","z","w","u","t"}
  16. permutations=Permutations[list,{3}]
  17. Select[permutations, !MatchQ[#, {___, "t", ___, "u", ___}] &]
  18.  
  19. array= RecurrenceTable[{a[n + 1] == 7*a[n], a[1] == 3}, a, {n, 1, 25}]
  20. Select[array, DigitCount[#, 10, 5] == 0 &, 10]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement