matematyka dyskretna
m.: help plz,
1.Wykorzystując zasadę indukcji pokazać czy 5124680 − 5121560 jest wielokrotnością liczby 6
2.Wykorzystując zasadę indukcji pokazać 2n−1 < n! dla neN
3.
A= (x ∊ N : |x+1|≤4),
B={(x,y) ∊ N2 : 3 < |x+y| ≤ 6 )
Oblicz liczbe elementow zbioru A x B
11 wrz 10:16
Patronus: 2.
1o dla n=1
21 − 1 = 1
Nierówność nie jest spełniona dla każdej liczby n∊N
11 wrz 10:42
m.: a umiałby ktoś rozpisac w 3 zadaniu zbiór B?

za 3 h kolokwium a jeszcze tego n rozumiem do konca
11 wrz 10:49
m.: up
11 wrz 11:25
Trivial:
3. Z pomocą przychodzi Haskell!
Prelude> let nat = [0..1000]
Prelude> let a = [ x | x <− nat, x+1 <= 4 ]
Prelude> let b = [ (x,y) | x <− nat, y <− nat, 3<(x+y) && (x+y)<=6 ]
Prelude> let result = [ (x,y) | x <− a, y <− b ]
Prelude> a
[0,1,2,3]
Prelude> b
[(0,4),(0,5),(0,6),(1,3),(1,4),(1,5),(2,2),(2,3),(2,4),(3,1),(3,2),(3,3),(4,0),(
4,1),(4,2),(5,0),(5,1),(6,0)]
Prelude> result
[(0,(0,4)),(0,(0,5)),(0,(0,6)),(0,(1,3)),(0,(1,4)),(0,(1,5)),(0,(2,2)),(0,(2,3))
,(0,(2,4)),(0,(3,1)),(0,(3,2)),(0,(3,3)),(0,(4,0)),(0,(4,1)),(0,(4,2)),(0,(5,0))
,(0,(5,1)),(0,(6,0)),(1,(0,4)),(1,(0,5)),(1,(0,6)),(1,(1,3)),(1,(1,4)),(1,(1,5))
,(1,(2,2)),(1,(2,3)),(1,(2,4)),(1,(3,1)),(1,(3,2)),(1,(3,3)),(1,(4,0)),(1,(4,1))
,(1,(4,2)),(1,(5,0)),(1,(5,1)),(1,(6,0)),(2,(0,4)),(2,(0,5)),(2,(0,6)),(2,(1,3))
,(2,(1,4)),(2,(1,5)),(2,(2,2)),(2,(2,3)),(2,(2,4)),(2,(3,1)),(2,(3,2)),(2,(3,3))
,(2,(4,0)),(2,(4,1)),(2,(4,2)),(2,(5,0)),(2,(5,1)),(2,(6,0)),(3,(0,4)),(3,(0,5))
,(3,(0,6)),(3,(1,3)),(3,(1,4)),(3,(1,5)),(3,(2,2)),(3,(2,3)),(3,(2,4)),(3,(3,1))
,(3,(3,2)),(3,(3,3)),(3,(4,0)),(3,(4,1)),(3,(4,2)),(3,(5,0)),(3,(5,1)),(3,(6,0))
]
Prelude> length result
72
11 wrz 12:14
m.: ok, mi wyszlo troche mniej, ale nie uwzglednilem 0 jako liczby ∊ N

dzieki
11 wrz 12:18
Trivial:
Wersja bez zera.

Prelude> let nat = [1..1000]
Prelude> let a = [ x | x <− nat, x+1 <= 4 ]
Prelude> let b = [ (x,y) | x <− nat, y <− nat, 3<(x+y) && (x+y)<=6 ]
Prelude> let result = [ (x,y) | x <− a, y <− b ]
Prelude> a
[1,2,3]
Prelude> b
[(1,3),(1,4),(1,5),(2,2),(2,3),(2,4),(3,1),(3,2),(3,3),(4,1),(4,2),(5,1)]
Prelude> result
[(1,(1,3)),(1,(1,4)),(1,(1,5)),(1,(2,2)),(1,(2,3)),(1,(2,4)),(1,(3,1)),(1,(3,2))
,(1,(3,3)),(1,(4,1)),(1,(4,2)),(1,(5,1)),(2,(1,3)),(2,(1,4)),(2,(1,5)),(2,(2,2))
,(2,(2,3)),(2,(2,4)),(2,(3,1)),(2,(3,2)),(2,(3,3)),(2,(4,1)),(2,(4,2)),(2,(5,1))
,(3,(1,3)),(3,(1,4)),(3,(1,5)),(3,(2,2)),(3,(2,3)),(3,(2,4)),(3,(3,1)),(3,(3,2))
,(3,(3,3)),(3,(4,1)),(3,(4,2)),(3,(5,1))]
Prelude> length result
36
11 wrz 12:20
Trivial:
A jeśli chodzi o drugie, to można pokazać, że to jest spełnione dla n ≥ 4
2n−1 < n!
1. n = 4: 16−1 < 24 OK
2. n ≥ 4:
2n+1−1 = 2*2n−1 = 2*(2n−1)+1 <ind. 2*n!+1 < n*n!+n! = n!*(n+1) = (n+1)! OK
11 wrz 12:36
m.: a skad to przeksztalcenie
2*(2n−1)+1 <ind. 2*n!+1
bo nie rozumiem
11 wrz 12:39
Trivial: Zakładamy indukcyjnie, że 2n−1 < n!, czyli także 2*(2n−1)+1 < 2*n!+1
11 wrz 12:40
m.: dzięki
11 wrz 12:43