jsMath



               CM 1.2 MrG 2011.0917
#1)subsets of {a,b} are {}, {a}, {b}, {a,b}


#2)subsets of {a,b,c} are
{},{a},{b},{c},{a,b},{a,c},{b,c},{a,b,c} show(2**3) show(2**4)
show(2**5) show(2**x)

         8


     16


     32


     2x

#3)f:{a,b,c,d,e} -> {1,2,3,4,5}
#f(a)=1,f(b)=2,f(c)=4,f(d)=5,f(e)=3


#4)g:{1,2,3} -> {5,9} #g(1)=5,g(2)=5,g(3)=9 #yes


#5)h:{a,b,c} -> {1,2,3,4} #h(a)=4,h(b)=3,h(c)=2 #yes


#6) def f(n): return n%3 show(f(18)) show(f(19)) show(f(20))

     0


     1
2

CM 1.2 MrG 2011.0917 - sage

  • 1.
    jsMath CM 1.2 MrG 2011.0917 #1)subsets of {a,b} are {}, {a}, {b}, {a,b} #2)subsets of {a,b,c} are {},{a},{b},{c},{a,b},{a,c},{b,c},{a,b,c} show(2**3) show(2**4) show(2**5) show(2**x) 8 16 32 2x #3)f:{a,b,c,d,e} -> {1,2,3,4,5} #f(a)=1,f(b)=2,f(c)=4,f(d)=5,f(e)=3 #4)g:{1,2,3} -> {5,9} #g(1)=5,g(2)=5,g(3)=9 #yes #5)h:{a,b,c} -> {1,2,3,4} #h(a)=4,h(b)=3,h(c)=2 #yes #6) def f(n): return n%3 show(f(18)) show(f(19)) show(f(20)) 0 1
  • 2.