axis( [ 0.0 2.0 0.0 2.5 ]);
座標軸x在0.0和2.0之間
座標軸y在0.0和2.5之間
記得不要加逗號
2015年5月4日 星期一
2015年4月27日 星期一
Matlab不定積分
syms y x a b
y=a*x^2+b*x;
int(sqrt(1+diff(y)^2));
log(b + ((b + 2*a*x)^2 + 1)^(1/2) + 2*a*x)/(4*a) + (((b + 2*a*x)^2 + 1)^(1/2)*(b + 2*a*x))/(4*a)
======================================================================
syms y x a b 變數
int 積分
=======================================================================
要用到matlab symbolic math toolbox
y=a*x^2+b*x;
int(sqrt(1+diff(y)^2));
log(b + ((b + 2*a*x)^2 + 1)^(1/2) + 2*a*x)/(4*a) + (((b + 2*a*x)^2 + 1)^(1/2)*(b + 2*a*x))/(4*a)
======================================================================
syms y x a b 變數
int 積分
=======================================================================
要用到matlab symbolic math toolbox
2013年10月4日 星期五
2013年2月2日 星期六
離散數學(2)-1
Show
that for primitive statements p,q
p
V q(p xor q) ↔ (p^~q)V(~p^q) ↔ ~(p ↔ q)
p |
q |
p
V q |
p^~q |
~p^q |
(p^~q)V(~p^q) |
p
→ q
|
q
→ p
|
p↔q
|
~
p↔ q
|
0 |
0 |
0 |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
0 |
0 |
1 |
1 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
0 |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
離散數學(8)
第八章 The Principle of Inclusion and Exclusion
The Principle of Inclusion and Exclusion. Cosider a set S, with |S|=N, and coditions ci, 1<=i<=t, each of which way be satisfied by some of the elements of s of S. The number of elements of S that satisfy none of the conditions ci, 1<=i<=t, is denoted by N'=N(c1'c2'c3'...ct') where
N'=N-[N(c1)+N(c2)+...+N(ct)]+[N(c1c2)+n(c1c3)+...+N(c1ct)+N(c2c3)+...+N(ct-1ct)]-[N(c1c2c3)+N(c1c2c4)+...+N(c1c2ct)_N(c1c3c4)+...+N(c1c3ct)+...+N(ct-2ct-1ct)]+...+
(-1)^tN(c1c2c3...ct)
N'=N-1<=i<=t∑N(ci)+1<=i<j<=t∑N(cicj)-1<=i<j<k<=t∑N(cicjck)+...+
(-1)^tN(c1c2c3...ct)
2013年1月29日 星期二
離散數學(7)
第七章 Relations: The Second Tine Around
A relation R on a set A is called reflexive(反身性) if for all x ε A (x,x) ε R
Relation R on set A is called symmetric(對稱性) if(x,y) εR → (y,x) ε R for
all x,y ε A
For a set A, a relation R on A is called transitive of, for all x,y,z ε A, (x,y),(y,z) ε R → (x,z) ε R.(So if x “is related to” y, and y “is related to” z, we want x “related to” z, withy playing the role of “intermediary”.
Given a relation R on a set A, R is called antisymmetric if for all a,b εA ,(aRb and bRa) → a=b
A relation R on a set A is called a partial order, or a partial ordering relation, if R is reflexive, antisymmetric, and transitive.
If A, B, and C are sets with R1cAxB and R2c BxC, then the composite relation R1◦R2 is a relation from A to C defined by R1◦R2={(x,z)|x εA,
z ε C, and thereexists y ε B with (x,y) εR (y,z) εR2}
2013年1月27日 星期日
離散數學(6)
第六章
Languages:
Finite State Machines
If
∑ is an alphabet and n
ε Z+, we define the powers of ∑
recursively as follows:
1)∑1=∑
2)∑^n+1={xy|x
ε ∑, y ε ∑^n}
where xy denote the juxtaposition of x and y
For
a alphabet ∑ we define ∑0={λ},where λ denotes the empty
string—that is, the string consisting of no symbols taken from ∑.
If
∑ is an alphabet
a)∑
+=n=1 to 無限大U∑
n=Un ε z+∑ n
b)∑
*=n=0 to無限大
U∑
n
2013年1月26日 星期六
離散數學(5)
第五章
Relations
and Functions
5.1
Cartesian Products and Relations
For sets A,B the Cartesian product, or cross product, of A and B is denoted by AxB and equals{(a,b)|a ε A,b ε B}.
For
sets A,B, any subset of AxB is called a (binary) relation from A to
B. Any subset of AxA is called a (binary) relation on A.
For
nonempty sets A, B, a function, or mapping, from A to B, denoted
f
:A → B, is a relation from A to B in which every element of A
appears exactly once as the first component of an ordered pair in the
relation.
For
the function of f:A → B, A is called the domain(定義域)
of f and B the codomain(對應域)
of f. The subset of B consisting of those elements that appear as
second component in the ordered pairs of f is called the range(值域)
of f and is also denoted by f(A) because it is the set of images
under f.
A
domain f:A → B is called one-to-one, or injective, if each element
of B appears at most once as the image of an element of A.
A
function of f:A → B is called onto, or surjective, if f(A)=B—that
is, if for all b ε B there is at least one a ε A with f(a)=b.
2013年1月24日 星期四
離散數學(4)
第四章
Properties
of the integers: Mathematical Induction
All
that is needed is for the open statement S(n) to be true for some
first element n0 ε Z so that the induction process has a starting
place. We need the truth of S(n0) for our basis step. The integer n0
could be 5 just as well as 1. It could even be zero or negative
because the set Z+ in union with {0}{ or any finite set of negative
integers is well ordered.
Principle
of Mathematical Induction
[S(n0)
^ [all k>=n0[s(k) → s(k+1)]]] → all n >=no s(n)
Principle
of Strong Mathematical Induction
a)
If s(n0),s(n0+1), s(n0+2)...,s(n1-1),s(n1) are true
b)If
whenever s(n0) s(n0+1)...s(k-1)and s(k) are true for some k ε z+,
where k>=n1, then the statement s(k+1) is also true;then s(n) is
true for all n>=n0
If
a,b ε z and b=\0 , we say that b divides a and we write b|a, if
there is an integer n such that a=bn, where this occurs we say that b
is a divisor(因數),
or a is a multiple(倍數)
of b.
a)
1|a and a|0
b)
[(a|b)^(b|a)] → a=+-b
c)[(a|b)^(b|c)]
→ a|c
d)
a|b → a|bx for all x ε Z
e)
If x=y+z for some x,y,z ε Z, and a divides two of the three
integers x,y and z, then a divides the remaining integer.
f)[(a|b)^a|c)]
→ a|(bx+cy) for all x,y ε Z
g)For
1<=i<=n let ci ε Z. If a divides each ci, then
a|(c1x1+c2x2+...+cnxn), where xi ε Z for all 1<=i<=n
2013年1月23日 星期三
離散數學(3)
第三章
Set
Theory
A
set should be well-defined collection of objects. These objects are
called elements and we said to be members of the set.
If
C,D are sets from a universe U, we say that C is a subset of D and
write C c D or D c C , if every element of C is an
element of D. If , in addition, D contains an element that is not in
C, then C is called a proper subset of D, and this is denoted by C c
D
for
A,B c U we define the flowing
a)
A U B( the union of A and B) = {x|x ε
A V ε B}
b)
A∩B( the intersection
of A and B) = {x| x ε A
^ ε B}
c)AΔB(the
symmetric difference of A and B ) = {x| (x ε
A V ε B) ^
x
not ε A∩B}={x|x
ε AUB ^ x not ε
A∩B}
2013年1月22日 星期二
離散數學(2)
第二章
Fundamentals
of Logic
In
the development of any mathematical theory, assertions are made in
the form of sentences. Such verbal or written assertions, called
statements (or propositions), are declarative sentences that are
either true or false.
1)Transform
a given statement p into the statement ¬p,
which denotes its negation and is read “Not p.”
2)
a)
Conjunction:The conjunction of the statements p,q is denoted by p^q,
which is read “p and q.”
b)
Disjunction: The expression p V q denotes the disjunction of the
statements p,q and is read “p or q.”
c)Implication:
We say that “p implies q” and write p->q to designate the
statement, which is the implication of q by p.
i)If
p, then q.
ii)p
is sufficient for q
iii)p
is sufficient condition for q
iv)q
is necessary for p
v)q
is a necessary condition for p
vi)
p only if q
d)
Bi-conditional: The bi-conditional of two state¬ments p,q is
denoted by
p
↔ q, which is read “p if and only if q” or “p is necessary
and sufficient for q”
“p
if and only if q” 可縮寫成
“p
iff q”
p q
p^q p V q p V
q p->q q ↔ p
0 0 0 0 0 1 1
0 1 0 1 1 1 0
1 0 0 1 1 0 0
1 1 1 1 0 1¬ 1
A
compound statement is called a tautology if it is true for all truth
value assignments for its component statements. If a compound
statement is false for all such assignments, then it is called a
contradiction.
¬
Two
statements s1,s2 are said to be logically equivalent, and we write
s1
↔ s2, when the statement s1 is true if and only if the statement s2
is true.
¬
Let
s be a statement. If s contains no logical connectives other than ^
and V, then the dual of s denoted sd, is the statement obtained from
s by replacing each occurrence of ^ and V by V and ^, respectively,
and each occurrence of T0 and F0 by F0 and To, respectively.
The
principle of duality, let s and t be statements that contain no
logical connectives other than ^ and V.
if
s ↔ t, than sd ↔ td
p->q
↔ ~p V q
The
statement ¬q → ¬p is called contrapositive of the implication p
→ q
The
statement q → p is called the converse of p → q
¬p
→ ¬q is called the inverse of p → q
The
contrapositive(否逆):¬q
→ ¬p
The
converse(逆): q
→ p
The
inverse (否)
: ¬p → ¬q
When
we write allxp(x)->exist x p(x) we are saying that the implication
allxp(x) → exist x p(x) is a logical implication.
Two substitution rules
1)Suppose that the compound statement P is a tautology. If p is primitive statement that appears in P and we replace each occurrence of p by the same q, then the resulting compound statement P1 is also a taotology.
2)Let P be a compound statement where p is an arbitrary statement that appears in P, and let q be a statement such that q ↔ p, Suppose that in P we replace one or more occurences of p by q. Then this replacement yields the compound statement P1. Under these circumstances P1 ↔ P.
p → q <=> ~p V q <=> ~q → ~p
Two substitution rules
1)Suppose that the compound statement P is a tautology. If p is primitive statement that appears in P and we replace each occurrence of p by the same q, then the resulting compound statement P1 is also a taotology.
2)Let P be a compound statement where p is an arbitrary statement that appears in P, and let q be a statement such that q ↔ p, Suppose that in P we replace one or more occurences of p by q. Then this replacement yields the compound statement P1. Under these circumstances P1 ↔ P.
p → q <=> ~p V q <=> ~q → ~p
離散數學(1)
第一章 Fundamental Principles of Counting
Enumeration, or counting, may strike one as an obvious process that a student learns when first studying arithmetic.
Our study of discrete and combinatorial mathematics begins with two basic principles of counting: the rules of sum and product.
The Rule of Sum: If a first task con be performed in m ways, while a second task can be performed in n ways, and the two task cannot be performed simultaneously, then performing either task can be accomplished in any one of m+n ways.
The Rule of Product: If a procedure can be broken down into first and second stages, and if there are m possible outcomes for first stage and if, for each of these outcomes, there are n possible outcomes for the second stage, then the total procedure can be carried out, in the designated order, in mn ways.
For an integer n >= 0, n factorial ( denoted n¦)
is defined by 0¦=1
n¦=(n)(n-1)(n-2)...(3)(2)(1) for n >= 1
Given a collection of n distinct objects, any(linear) arrangement of these objects is called a permutation of the collection.
If there are n distinct objects and r is an integer, with 1<=r<=n, then by the rule of product, the number of permutation of size r for the n objects
p(n,r)=n*(n-1)*(n-2)*...*(n-r+1)
=(n)(n-1)(n-2)...(n-r+1)*(n-r)(n-r-1)...(3)(2)(1)/((n-r+1)*(n-r)(n-r-1)...(3)(2)(1))
=n¦/(n-r)¦
If there are n objects with n1 indistinguishable objects of a first type, n2 indistinguishable objects of a second type,..., and nr indistinguishable objects of a nth type, where n1+n2+...+nr=n
then there are n¦/(n1¦n2¦...nr¦) (linear) arrangements of the given n objects.
If we start with n distinct objects, each selection, or combination, of r of these objects, with no reference to order,corresponds to r¦ permutations of size r from the n objects. Thus the number of combinations of size r from a collection of size n is
C(n,r)=P(n,r)/r¦=n¦/(r¦(n-r)¦) 0<=r<=n
The binomial Theorem
(x+y)^n=(n,0)x^0y^n+(n,1)X^1y^n-1+(n,2)X^2y^(n-2)+...+(n,n-1)x^(n-1)y^1+(n,n)x^ny^0=form k=0 to n∑(n,k)x^ky^(n-k)
2012年12月14日 星期五
訂閱:
文章 (Atom)