Physics Lournal

Powered by 🌱Roam Garden

Chapter 0: Intro And Preliminary

What is Discrete Mathematics?

Generally, Discrete Mathematics is the application of any mathematical technique, to any distinct, or collection of distinct items.

Specifically, by discrete we mean items that are entirely separate from each other, with a clean demarcation.

Investigate!

The number of handshakes that take place is 10!10!: we can prove this by imagining 11 person shakes everyone's hand, and then steps away from the group. (We can do this because no one else needs to shake his hand, when it's their turn, as they already have when it was histurn.) There are now 99 people left.

Then we imagine another person (11), repeats this process. There are now 8 people left.

And so on, and so forth, until we've gone from a group of 10, to a group of 1.

Ah, well at least our hunch was correct: factorial began to seem a bit off when we realized we couldn't come up with a logical reason to multiply the first handshake iteration sum by the second, and also would get a rather large and unwieldy number from that.

At the warm-up event for Oscar's All Star Hot Dog Eating Contest, Al ate one hot dog. Bob then showed him up by eating three hot dogs. Not to be outdone, Carl ate five. This continued with each contestant eating two more hot dogs than the previous contestant. How many hot dogs did Zeno (the 26th and final contestant) eat? How many hot dogs were eaten all together?

So we have a few variables here:

PP, for people, hh, for hot-dogs, and nn for our place in line.

We're going to rely on Classical Mechanics: The number of hot-dogs eaten by a person at a given place in line, n, Pn(h)P_{n}(h), is equal to the number of hot-dogs eaten at time n1n - 1, plus two so: Pn(h)=Pn1(h+2)P_{n}(h) = P_{n - 1}(h + 2).

After excavating for weeks, you finally arrive at the burial chamber. The room is empty except for two large chests. On each is carved a message (strangely in English):

If this chest is empty, then the other chest's message is true.

This chest is filled with treasure or the other chest contains deadly scorpions

Assume C1C1 is empty: C2sC2's message must be true. However, that says that C1C1 isn't empty, which means in order for C1C1 to be true, it must be lying. Logically we want to focus on if the consequent (the other chest's message being true)- C1C1 can only be false if it is empty, and C2sC2's message is false.

Assume C2C2 is true: If it contains the treasure, the other one (C1C1might, or might not have scorpions: it can have scorpions or be empty. We know if we check C2C2, the worst outcome is that it, is empty, and the best outcome is that we're rich. We know if we check C1C1, the worst outcome is that we die, and the best outcome is that we don't.

Back in the days of yore, five small towns decided they wanted to build roads directly connecting each pair of towns. While the towns had plenty of money to build roads as long and as winding as they wished, it was very important that the roads not intersect with each other (as stop signs had not yet been invented). Also, tunnels and bridges were not allowed. Is it possible for each of these towns to build a road to each of the four other towns without creating any intersections?

Note that this is about Graph Theory: We're dealing with nodes (the towns), and edges (the roads), and trying to show that the graph representing this arrangement of towns and roads, contains nodes with indegree, and outdegree (inbound and outbound edges), values that cannot exist without overlap.

No:

{{mermaid}}

graph TD; A-->B; B-->C; C-->D; D-->E; D-->C; E-->A; E-->D; E-->C;

At most, one city can be connected to two other cities, and furthermore, once one city is connected to three cities, any other city with two connections will cause an overlap on the third.

Mathematical Statements

A statement is a declarative sentence that obeys the law of excluded middles. It's values are binary, boolean in nature.

A statement can be atomic, meaning that is logically indivisible into further components, otherwise it is molecular, and thus is necessarily made up of atomic statements via the use of logical connectives.

3+x=123 + x = 12:

This sentence is not a statement, as the boolean value of it depends on xx, which is a placeholder for information not given in the statement:

In order to deal with this, we have option of substituting the value via a wherewhere clause, or we can capture the free variable by quantifying over it.

Logical Connectives:

These are the words: and,  or,  if/then,  notand,\; or,\; if/then,\; not.

And, or and if/then, are binary connectives, as they require two operands, whereas not is a unary connective, as it only requires one.

Molecular statements, have truth values, that are defined by the connectives within them, and the truth values of the atomic statements therein.

When analyzing these connectives, we rely on propositional-variables, P,  Q,  R,  S.\small P,\;Q,\;R,\;S., as well as symbols for the connectives: ,    ,¬\land, \lor\, \implies, \neg, because the content of these statements are trivial, we care more about the logicality.

PQ  =Conjunction.\small P \land Q\; = Conjunction.

PQ  =Disjunction.\small P \lor Q\; = Disjunction.

P    Q=Implication.\small P \implies Q = Implication.

PQ=Biconditional.\small P \leftrightarrow Q = Biconditional.

One should think of this as saying the two atomic parts of a statement are equivalent in terms of their boolean value. Again, we do not assume any causal relationship between P, and Q: P is not the cause of Q, but if P is true, then Q should be as well.

¬P=Negation.\small \neg P = Negation.

Truth Conditions

PQ=T    P,  and  Q=T\small P \land Q = T \iff P,\; and\; Q = T.

PQ=T    PQ=T.\small P \lor Q = T \iff P \lor Q = T.

P    Q    PQ=TF.\small P \implies Q \iff P \land Q = T \lor F.

PQ=T    PQ=TF.\small P \leftrightarrow Q = T \iff P \land Q = T \lor F.

Implications

We say that PP is the hypothesis or antecedent, and that QQ is the conclusion or consequent.

Implications are strewn throughout mathematics (see Formal Logic), even if not obviously: Given the Pythagorean Theorem, a2+b2=c2a^{2} + b^{2} = c^{2}, we realize it can not be a statement, as it contains uncaptured/unquantified free variables, but if we quantify that aa and bb are the legs of a right triangle, with hypotenuse cc, we now have a statement.

Example:

If Bob gets a 90%, he passes.

P    QP \implies Q, can still hold, even if ¬P\neg P, as "PiP_{i}", isn't the only PP where Q, so we can't falsify QQ solely because we can say ¬P\neg P.

In short, ¬P  !!    ¬(P    Q)\neg P \newcommand{\notimplies}{\;\not!!!\implies} \notimplies \neg(P \implies Q).

With implications, we focus more on the truth value of the consequent (Q\small Q), since there is no causal relationship, QQ is only logically dependent upon PP, the implication asserts the consequent, not the antecedent, hence the antecedent can be false, while the consequent remains true.

For instance, the fact that there is no gravity in sections of space does not mean that gravity is false- if things fall, gravity exists- we have artificial zero-gravity, but that certainly does not disprove the existence of gravity.

iff

If and only if is equivalent to: (P    Q)(Q    P)(P \implies Q) \land (Q \implies P)

We also deal with two concepts: the converse, and the contrapositive:

The converse of P    QP \implies Q, is simply a reversal of the antecedent and consequent: Q    PQ \implies P.

Converses are logically independent of their implications.

The contrapositive of P    QP \implies Q, is the statement ¬Q    ¬P\neg Q \implies \neg P.

The contrapositive of any implication must necessarily have the same truth value as its implication.

Predicates and Quantifiers.

Implications are strewn throughout mathematics (see Formal Logic), even if not obviously: Given the Pythagorean Theorem, a2+b2=c2a^{2} + b^{2} = c^{2}, we realize it can not be a statement, as it contains uncaptured/unquantified free variables, but if we quantify that aa and bb are the legs of a right triangle, with hypotenuse cc, we now have a statement.

Specifically, we have symbology for dealing with these situations. First, the term for sentences with variables is predicate.

In situations where we need to speak about ranges of values, we apply quantifiers: For All: ,x\forall, \forall x, and Exists: ,x\exists, \exists x.

Usually we quantify over the NN, as they're discrete.

Negations:

¬x  P(x)=x  ¬P(x)\neg \forall x\; P(x) = \exists x\; \neg P(x).

Not for all x, is x prime = There exists some x such that x is not prime.

¬xP(x)=x¬P(x)\neg \exists x P(x) = \forall x \neg P(x).

There does not exist an x such that is prime = For all x, x is not prime.

Effectively, negating a quantifier makes it switch types.

Implicit Quantifiers

For situations, such as square rectangle relationships (every square is a rectangle, but every rectangle is not a square), we have implicit quantifiers: given S(x)S(x), meaning xx is a square, and R(x)R(x), meaning xx is a rectangle, we can make the following statement: x(S(x)    R(x))\forall x(S(x) \implies R(x)).

Sets

Sets

Sets are fundamental: in short they are collections of discrete and unique objects, and generally aren't ordered.

Notation

A=A = {1,2,31,2,3} : A is the set containing elements, 1, 2 and 3.

aa \in {a,b,ca, b, c}: a is a member of the set containing elements a, b and c.

dd \notin {a,b,ca, b, c}: d is not a. member of the set containing elements a, b and c.

A=A = {1,b,x,y,z,1, b, {x, y, z}, \empty}: There are some things to notice about the set AA, first that xAx \notin A, as there's not a letter in the set that equals x. Consider set B=1,bB = {1, b}, which contains elements in AA, but the set BB itself is not a member of AA, but rather a subset.

A=xN:nN(x=2n)A = {x \in \N: \exists n \in \N (x = 2n)}: A is the set of all x in the Natural numbers such that there exists an n in the Naturals such that x is equivalent to 2n.

Relationships Between Sets

Two sets can be considered equal if they have the same elements, barring any repeated elements. Also, it does not matter the representation of values in sets: 1,2,3=I, II, III\small {1, 2, 3} = {\text{I, II, III}}.

Given A=1,2,3  and  B=1,2,3,4A = {1, 2, 3}\; {and}\; B = {1, 2, 3, 4}, we see that AA has some of the elements of BB, but not all of them. Basically, AA is a subset\small {subset} of BB, or symbolically ABA \sub B. If they had exactly the same elements, we would say ABA \subseteq B, because AA is a subset  of  and  is  equal  to  B\small {subset\; of\; and\; is\; equal\; to}\; B.

Another method for comparing sets is by comparing size, which we refer to as cardinality: A|\small A|.

Operations On Sets

In terms of "addition", we can use the unionoperator to combine sets: C=AB\small C = A \cup B. CC is the union of AA and BB.

Another operation is intersection, which selects the elements expressly in both sets: C=AB\small C = A \cap B.

One more consideration: we want to clarify what "everything" is, with regards to our (perhaps finite) set, for instance, if we were only concerned with Naturals, our universe would be NN, also written UU.

Sometimes we will of course want to speak about elements that are not in our set, or the complement of a given set: B=AˉB = \bar A. Imagine A=1,2,3  and  B=1,2,3,4,5,9\small A = {1, 2, 3}\; {and}\; B ={1, 2, 3, 4, 5, 9}, we see Aˉ=4,5,9\small \bar A = {4, 5, 9}.

We also can combine operations, such as ABˉ\small A \cap \bar B: the set of all elements which are both members of AA, and not members of BB. This is the set difference. Effectively : AB=AB\small A \cap B = A \setminus B.

xAB    xAxB\small x \in A \cup B \iff x \in A \lor x \in B: For x to be a member of the union of A\small A or B\small B, x must be a member of A\small A, or a member of B.\small B.

xAB    xAxBx \in A \cap B \iff x \in A \land x \in B: For x to be a member of the intersection of AA or BB, x must be a member of AA, and a member of BB.

xAˉ    ¬(xA)x \in \bar A \iff \neg(x \in A): For x to be a member of the complement of AA or BB, x must not be a member of AA.

Cartesian Products

This is represented by A×B\small A \times B, and effectively:

A×B=(a,b):aAbB\small A \times B = {(a,b): a \in A \land b \in B}: We're simply putting an element from the first set, in an ordered pair, with an element from the second set.

We can also take the cartesian product of a set with itself:

A×A=(a,b):a,bA  also written as:  A2\small A \times A = {(a,b): a,b \in A}\; \text{also written as:}\; A^{2}.

A×BA \times B: {(1,3), (1,4) (1,5), (2,3), (2,4), (2, 5)}

A×AA \times A: (1,2), (1,1), ()

Not sure if (2, 1) is relevant here, it seems redundant though.

Turns out it's not redundant.

Oh well taking the product of a set with itself does imply two sets, so that explains part of it, as well as the fact that the nature of sets to ignore duplicates does not transfer down to the tuples made from cartesian products of them, hence (2,1) and (1,2) being listed out.

It seems like: A×B=BA\small |A \times B| = |B| *|A|

B×BB \times B: (3,4), (3,5), (4,5)

Exercises

Given A=1,4,9,and  B=1,3,6,10A = {1, 4, 9}, {and}\; B = {1, 3, 6, 10}, find:

ABA \cup B: 1,4,9,6,3,10{1,4,9,6,3,10}

ABA \cap B: 1{1} (a singleton).

ABA \setminus B: 4,9{4,9}

BAB \setminus A: 3,6,10{3, 6, 10}