Discrete mathematics
What is discrete mathematics?
It is also known as Mathematics for computer science. Sometimes finite mathematics, or concrete mathematics.
Discrete mathematics is the study of numerable sets, it is distinct from others. – such as integers, graphs, and statements in logic.
- Numerable. From Latin numerābilis.
- (mathematics) In one to one correspondence with the set of natural integers.
https://www.merriam-webster.com/dictionary/numerable
https://www.dictionary.com/browse/numerable?s=t
Discrete. "separate, distinct from others," late 14c., from Old French discret, discre, and directly from Latin discretus "separated;" see discreet. Related: Discretely; discreteness. https://www.etymonline.com/word/discrete
Resources
Foundations
Name | Why? | Topics | Authors | Last edition |
---|---|---|---|---|
Discrete mathematics | Most topics. Several examples. Coding. | Richard Johnsonbaugh | ||
Mathematics for Computer Science - Textbook | The clearest | Albert R MeyerEric LehmanF Thomson Leighton | ||
Discrete Mathematics and Its Applications | applications | Kenneth H. Rosen | ||
Discrete and combinatorial mathematicas | Ralph P. Grimaldi | |||
Mathematics for Computer Science (6.042J) - Course | Adam ChlipalaAlbert Meyer | |||
Concrete Mathematics (Second edition) | Discrete calculusDiscrete probabilityNumber Theory | Donald E. KnuthOren PatashnikRonald L. Graham | ||
CS103: Mathematical Foundations of Computing | ||||
1. Nilsson, N.J.: "Artificial Intelligence, a new synthesis", Ed. Morgan Kaufmann Publishers, 1998 | ||||
Untitled |
Requisites
- Minimum formal math.
Nice to have
- Calculus
- Coding skills
Foundations topics
Set theory
Sets
Mathematical logic
Combinatorics
Combinations
Permutations
Partitions
Graph theory
Graphs
Networks
Number theory
Integers
Transcendental numbers
Diophantine approximation
p-adic analytics
Function fields
Algebraic structures
Boolean algebra
Relational algebra
Algebraic coding theory
Formal languages
Discretization
Numerical analysis
Applications
Discrete calculus
Sequences
Recurrence relation
Discrete probability
Discrete geometry
Discrete collections
Operations research
Linear programming
Optimization
Queuing theory
Scheduling theory
Network theory
Continous-time Markov process
Game theory
Decision theory
Utility theory
Social choice theory
Game theory
Topology
Combinatorial topology
Topological graph theory
Information theory
Coding theory
Analog coding
Analog signals
Analog encryption
Theoretical computer science
Automata theory
Formal languages
Computational geometry
Sets
Definitions
Level 1.
Collection. A group of objects of one type that have been collected by one person or in one place. Oxford dictionary.
Object. The objects are sometimes referred to as elements or members. Elements are unique.
Level 2.
Group. A number of people or things that are located close together or are considered or classed together. Oxford dictionary.
Level 3.
Number - The content of a statement of number is an assertion about a concept. [source: The Foundations of Arithmetic, §55, Engl.transl. page 67].
How to use sets?
.
Finite sets. E.g.
Either infinite or large finite sets. E.g.
Number sets
Worked examples
Show that
By def.
By inspection
,
since every element of is an element of .
Show that
By def.
Let , because is closed under the operation
of multiplication.
since .
Show that
By def.
but iff , so the consequent always is , hence .
Show that ,
By def.
, so .
What is the correct option or
In a group of students, each student is taking a mathematics course or a computer science course or both. One-fifth of those taking a mathematics course are also taking a computer
science course, and one-eighth of those taking a computer science course are also taking a mathematics course. Are more than one-third of the students taking a mathematics course?,
We know , (1), but
(2)
By 1
We’ll substitute in (2)
Let C be a circle and D be the set of all diameters of C. What is ∩ D? (Here, by “diameter” we mean a line segment through the center of the circle with its endpoints on the circumference
of the circle.)If
then
Let P denote the set of integers greater than 1 (). For i ≥ 2, define . Describe .
describes composite numbers since describes multiples, so
The following exercise is from [1]
Let and .
Evaluate .
What is the fastest way that you come up with a solution for three exercises? List all elements and , and then apply them to the operations. You can find with Pascal Triangle.
So, .
Evaluate
Evaluate
Mathematical logic
Key ideas
Logic is the basis of all reasoning.
Classical Propositional Logical
A proposition is a communicated declarative sentence that is either true or false, but not both. Remember structure no content.
- Don't use "preposition" as synonymous with "proposition". A preposition is a word such as 'by', 'for', 'into', or 'with' which usually has a noun group as its object. Collins.
- Other views of propositions. A proposition is the meaning expressed by statements.
- Some people use statements and propositions interchangeably.
The following statements are propositions
-
-
- P=NP This is either true or false (but not both), but you don't know.
- for all , then
- Sun leaves tomorrow.
-
- She loves him.
- Whenever Juney barks, Ralph gets mad.
Moreover, the definition excludes statements such as
- Read 'Cogito ergo sum' in Discourse on the Method. (command)
- Let's go to the beach tomorrow. (proposal)
- God'll help you! (exclamation)
- (question)
- (indeterminate declarative sentence). It's a predicate.
- if , then
- (indeterminate declarative sentence)
- This sentence is false. A paradox is not a statement.
You gonna use variables to represent prepositions, thus as you use letters in algebra. e.g.
The Connectives of Propositional Logic. In short, Logical formulas
Definition.
Let and be propositions.
Name | Denotation | Meaning |
Conjunction | p && q | p and q |
Disjunction | p || q | p or q. Inclusive-or |
Negation | !p | not p |
Grammar
Perhaps you’ve never seen before this language formalization.
<S> := P | P is P | P are P
<Proposition> := <Proposition> and <Proposition>
<Proposition> := <Proposition> or <Proposition>
<Proposition> := <Proposition> xor <Proposition> | either <Proposition> or <Proposition>
<Proposition> := not <Proposition>
<Proposition> := <Proposition> => <Proposition>
<Proposition> := (<Proposition>)
<Proposition> := <p> | True | False
<p> is whatever string (including numbers) that doesn’t be a reserved word. In this grammar order is important, it indicates precedence order when they have the same precedence level they are equals.
Note that True
and False
are propositions. Either-or mean XOR. In Spanish, we can use “o … o …”.
Does "either-or " mean XOR or OR? (2022, December 13). Retrieved from https://math.stackexchange.com/questions/1906242/does-either-or-means-xor-or-or
When people claim something, it means they want it to be true.
Representations
Worked examples
- Write the negation of the proposition.
Ten heads were obtained when you flip 10 times a coin.
By Morgan Law
In plain English, the following propositions are equivalent
Ten heads were not obtained.
Some flipped coins were not head.
Some flipped coins were tail.
At least one flipped coin was tail.
Some heads were obtained when you flip 10 times coin.
By Morgan Law
In plain English, the following propositions are equivalent
At least one head was not obtained.
Some heads were not obtained.
All the flipped coins were not heads.
No flipped coin was head.
All the flipped coins were tail.
Some heads and some tails were obtained.
The above proposition is equivalent to
Because the flipped coins are either head or tail.
Because the coin is either head or tail, but not both.
So by complement law
The negation of the proposition is
Since 0/1 laws.
At least one was obtained.
No head was obtained.
All the flipped coins were tails.
For some positive integer ,
No positive integer ,
All positive integers ,
Every even integer greater than 4 is the sum of two primes.
Every even integer greater than 4 is not the sum of two primes.
At least one integer greater than 4 is not the sum of two primes.
- Determine whether each is true or false.
and
and are not the case.
or and are not the case.
- Formulate the symbol expression in words using
Lee doesn’t take computer science.
Lee takes computer science or no mathematics.
Lee takes computer science and mathematics.
Lee takes computer science, but no mathematics.
Lee takes neither computer science nor mathematics.
- Formulate the symbolic expression in words using .
Today is Monday or raining.
Today is neither Monday nor raining, but it is hot.
Today is Monday and it’s raining or hot, but it’s hot, raining, or Monday.
At one time, the following ordinance was in effect in Naperville, Illinois: “It shall be unlawful for any person to keep more than three [3] dogs and three [3] cats upon his property within the city.” Was Charles Marko, who owned five dogs and no cats, in violation of the ordinance? Explain. https://www.chicagotribune.com/news/ct-xpm-1990-10-12-9003250777-story.html
Yes.
Informally, if you have five dogs, then you’re keeping more than three dogs.
Formally
Maybe Charles Marko thought government counts in total such that
but his ordinance interpretation fails; the government doesn’t say it explicitly, and we don’t assume anything from the text.
Although attorney argues that is possible to change to , if you follow connectives of propositional strictly; it is a mistake.
Is “A statement that is either true or false.” a statement?
It is a statement.
Suppose that Smartphone A has 256 MB RAM and 32 GB ROM, and the resolution of its camera is 8 MP; Smartphone B has 288 MB RAM and 64 GB ROM, and the resolution of its camera is 4 MP; and Smartphone C has 128 MB RAM and 32 GB ROM, and the resolution of its camera is 5 MP. Determine the truth value of each of these propositions.
smartphone(a, ram(256), rom(32), cam(8)).
smartphone(b, ram(288), rom(64), cam(4)).
smartphone(c, ram(128), rom(32), cam(5)).
a) Smartphone B has the most RAM of these three smartphones.
? smartphone(b, ram(X), _, _), smartphone(Y, ram(Z), _, _), Y \= b, X > Z.
true
b) Smartphone C has more ROM or a higher resolution camera than Smartphone B.
? smartphone(c, _, rom(RomC), cam(CamC)), smartphone(b, _, rom(RomB),cam(CamB)), (RomC > RomB; CamC > CamB).
true
c) Smartphone B has more RAM, more ROM, and a higher resolution camera than Smartphone A.
d) If Smartphone B has more RAM and more ROM than Smartphone C, then it also has a higher resolution camera.
e) Smartphone A has more RAM than Smartphone B if and only if Smartphone B has more RAM than Smart-phone A.
Fuzyy logic.
happy(fred, 0.8).
happy(jonh, 0.4).
not(happy(_, Y), Z) :- Z is 1-Y.
and(happy(_, X), happy(_, Y), Z) :- Z is min(X,Y).
Lógica computacional, Enrique Paniagua Arís et al., Ed. Thomson, 2003.
Elementos de lógica formal, Calixto Badesa et al., Ed. Ariel, 2003.
Truth tables
- Created by Charles Sanders Peirce. Popularized by Ludwig Wittgenstein in his Tractatus Logico-Philosophicus.
When you wish to provide a conclusion (or proof in mathematics), you must use chain statements throughout logical consequences (or connectives, methods, and pieces of evidence) from a base set of previous results – such as axioms, theorems, and definitions.
value judgment
Environment
A particular row or instance in the truth table is an environment, world, or model.
Natural Language into Formal Language. Natural Logic.
2
Conditional propositions and logical equivalence
If and are propositions, the proposition
is called a conditional proposition and is denoted .
p | q | | Comments |
T | T | T | You must prove this by assuming the antecedent. |
T | F | F | You don’t prove this since the conclusion is false. |
F | T | T | True by default or vacuously true, so you don’t prove this. |
F | F | T | True by default or vacuously true, so you don’t prove this. |
- Sufficient condition. If A then B. B whenever the occurrence of A is all that is needed for the occurrence of B. A guarantees B, but B might be achieved in other ways.
If X is a cat, then X is an animal.
- Necessary condition. A cannot occur without the occurrence of B, but B doesn’t guarantee A.
If not B then not A.
If X is not an animal, then X is not a cat.
If X is a cat, then X is an animal.
Si P, entonces Q.
P: X es Y.
Q: Z es W.
Si X es Y, entonces Z es W.
P es una condicion suficiente para que ocurra Q.
Q ocurre porque P.
P no es una condicion necesaria para que ocurra Q.
Q puede ocurrir sin necesidad de que ocurra P.
P garantiza Q, pero Q puede lograrse de otras maneras.
Siempre que ocurra P, pasara Q.
La implicacion no es un argumento, sino su sintesis. Es el fundamento para las inferencias.
Analisis de la tabla de verdad:
True => True True
True => False False Si sabemos que (P=>Q es falso) entonces P es verdaero y Q es Falso.
True =>
Si no Q, no P.
Si no ocurre Q es una condicion suficiente para que no haya pasado P.
no P o Q.
A common mistake is no P ⇒ no Q, it is a mistake because Q can occur if P doesn’t happen.
English equivalences
if states a relation between cause and effect, makes a prediction, or speculates about what might happen. https://www.merriam-webster.com/grammar/if-vs-whether-difference-usage
Worked examples
Restate each proposition in the form of a conditional proposition.
Joey will pass the discrete mathematics exam if he studies
hard.p: Joey will pass the discrete mathematics exam
q: He studies hard.
Rosa may graduate if she has 160 quarter-hours of credit.
p: Rosa may graduate.
q: she has 160 quarter-hours of credit.
A necessary condition for Fernando to buy a computer is that he obtain $2000.
p: Fernando to buy a computer.
q: He obtains $2000.
A necessary condition for is .
not q then not p
A sufficient condition for Katrina to take the algorithms course is that she pass discrete mathematics.
p: Katrina to take the algorithms course.
q: She passes discrete mathematics.
A sufficient condition for is .
Getting that job requires knowing someone who knows the boss.
p: Getting that job.
q: Knowing someone who knows the boss.
A necessary condition for getting a job is knowing someone who knows the boss.
A necessary condition for p is q.
You can go to the Super Bowl unless you can’t afford the ticket.
p: You can go to the Super Bowl.
q: You can afford the ticket.
p unless not q
p except on the condition that not q
A necessary condition for is not (not ).
A necessary condition for is q.
You may inspect the aircraft only if you have the proper security clearance.
p: You may inspect the aircraft.
q: You have the proper security clearance.
A necessary condition for p is q.
if not q, not p.
if p, then q.
When better cars are built, Buick will build them.
p: Better cars are built
q: Buick will build them
If p then q
https://www.youtube.com/watch?v=_rKewYe3INU&ab_channel=OsbornTramain
The audience will go to sleep if the chairperson gives the lecture.
p: The audience will go to sleep.
q: The chairperson gives the lecture.
The program is readable only if it is well structured.
p: The program is readable.
q: It is well structured.
A necessary condition for the switch to not be turned properly is that the light is not on.
p: The switch is turned properly.
q: The light is on.
A necessary condition for not p is that not q.
if q then p.
Any set of Boolean operators that is sufficient to represent all Boolean expressions is said to be complete. Which of the following is NOT complete? A) {AND,NOT} B) {NOT, OR} C) {AND,OR} D) {NAND} E) {NOR}
Provide a method that given a set of Boolean operators, it gives you ifs
Represent the given proposition symbolically
Material Implication: If Pigs Could Fly. (2019, October 04). Retrieved from https://www.dcproof.com/IfPigsCanFly.html
Argument
Arguing or proving something is not the same as explaining it. So, if you prove something, you are not saying anything noting how the result or proof is coming up. This difference is useful when you ask since sometimes you want to learn the underlying patterns or the process.
Rules of Inference
Worked examples
Formulate the following arguments symbolically and determine whether each is valid.
Let
p: I study hard.
q: I get A’s.
r: I get rich.
If I study hard, then I get A’s. I study hard. Therefore, I get A’s.
It’s a valid argument because the argument uses the modus ponens.
If I study hard, then I get A’s. If I don’t get rich, then I don’t get A’s. Therefore, I get rich.
From contrapositive, we may use Hypothetical syllogism to conclude . Thus the conclusion follows from the hypotheses and the argument is valid.
I study hard if and only if I get rich. I get rich. Therefore, I study hard.
Argument (I)
By Disjunctive syllogism
By Modus ponens, (1) is valid
If I study hard or I get rich, then I get A’s. I Get A’s. Therefore, If I don’t study hard, then I get rich.
The argument becomes
It’s invalid because is equivalent , and it’s not the conclusion.
If I study hard, then I get A’s or I get rich. I don’t get A’s and I don’t get rich. Therefore, I don’t study hard.
It’s a valid argument since modus tollens application
Notes
https://en.wikipedia.org/wiki/List_of_rules_of_inference
https://calcworkshop.com/logic/rules-inference/
http://logic.stanford.edu/intrologic/glossary/rule_of_inference.html
http://intrologic.stanford.edu/chapters/chapter_04.html
https://www.cs.sfu.ca/~ggbaker/zju/math/inference.html
Predicates
A predicate can be understood as a proposition whose truth depends on the value of one or more variables.
: let x is in D, we claim
Example:
Quantifiers
, for all x in D we claim
Negation. The negation of is that there exists at least one value for which the statement is not true.
Nested Quantifiers
Exercises
Formulate the leap year definition as a predicate. If you achieve this, you don’t need to nest “if” clauses in your program.
on every year that is evenly divisible by 4
except every year that is evenly divisible by 100
unless the year is also evenly divisible by 400
Predicate
The last rule has more priority, so if is true, is a leap year.
Proofs
Mathematical systems and the Axiomatic method
What is suitable proof?
Uninformative and informative proofs
Direct proofs
Proof by contradiction
Proofs of equivalence
Prove the Morgan Law with .
Problem Set
Proofs
What is the proof?
Proof. A finite sequence of statements (called well-formed formulas in the case of a formal language), each of which is a previous result -axiom, an assumption, experiments, or theorems- in the sequence by a rule of inference.
Axiom. Simple postulate or assumption based on a priori knowledge and free contradictions.
Theorems. Important true statements.
Lemma. Preliminary statements.
Corollary. Statements that follow a few logical steps from the theorem.
https://mathoverflow.net/questions/18352/theorem-versus-proposition
Writing code and mathematics
- State your game plan.
- Keep a linear flow.
- The proof is an essay, not a calculation.
- Avoid excessive symbolism.
- Revise and simplify.
- Introduce notation thoughtfully.
- Structure long proofs.
- Be wary of the “obvious.”
- Finish.
Notes
https://math.mit.edu/~poonen/papers/writing.pdf
Logical Verification 2019–2020. (2022, December 13). Retrieved from https://lean-forward.github.io/logical-verification/2019
Theorem Proving in Lean — Theorem Proving in Lean 3.23.0 documentation. (2021, October 02). Retrieved from https://leanprover.github.io/theorem_proving_in_lean
Natural number game. (2021, May 27). Retrieved from https://www.ma.imperial.ac.uk/~buzzard/xena/natural_number_game
Logic and Proof — Logic and Proof 3.18.4 documentation. (2021, December 04). Retrieved from https://avigad.github.io/logic_and_proof/index.html
Mathematical Writing by Knuth, Larrabee, and Roberts, https://jmlr.csail.mit.edu/reviewing-papers/knuth_mathematical_writing.pdf
Guide to Proofs, Stanford https://web.stanford.edu/class/archive/cs/cs103/cs103.1156/handouts/070 Guide to Proofs.pdf
Proofwriting Checklist, Stanford https://web.stanford.edu/class/cs103/proofwriting_checklist
Some Remarks on Writing Mathematical Proofs by John M. Lee
https://www.youtube.com/watch?v=B0acu5nhG0w&ab_channel=StanfordOnline
https://math.stackexchange.com/questions/424854/1-0-by-integration-by-parts-of-tanx/424855#424855
Translating from English into Predicate Logic with Identity (Unit 10.1). (2015, February 17). Retrieved from https://dornsife.usc.edu/assets/sites/548/scripts/LogicWebExercises/bwr-exercises/unit10.1.html
Tammet, T. (2021, September 04). Logictools. Retrieved from https://logictools.org/index.html
Tree Proof Generator. (2022, December 13). Retrieved from https://www.umsu.de/trees
Methods
Direct proof
Worked examples
Prove that for all integers m and n, if m and n are even, then m + n is even.
Let such that is even and is even, by even definition we know
and where .
So, is even since .
Proof by perfect induction o Proof by exhaustion
Proof of a Boolean theorem through perfect induction.
Simple induction
We know by Modus Ponens:
The principle of induction says
use when but the same to simple if always is true then is always true.
Strong induction
https://www.youtube.com/watch?v=9w20J4j5-0Y&ab_channel=AtticPhilosophy
Worked example.
Therefore
Because ,
Our theorem is false since
our argument is always false.
Our argument is valid, but it is always false.
As
Our argument is valid and it happen be always true.
https://web.stanford.edu/~dntse/classes/cs70_fall09/cs70-2_notes3.pdf
https://www.purplemath.com/modules/inductn2.htm
Boolean Algebra
Proof of a Boolean theorem through perfect induction
https://www.youtube.com/watch?v=z7QCT8cgsR4&ab_channel=FrankStajanoExplains
Zermelo-Fraenkel Axioms
Our Axioms
Mathematical data types
Symbols
vs
FAQ
Is a definition a proposition?
Please Explain Kuratowski Definition of Ordered Pairs. (2022, December 22). Retrieved from https://math.stackexchange.com/questions/1767604/please-explain-kuratowski-definition-of-ordered-pairs
Why would definition not be proposition? (2022, December 22). Retrieved from https://philosophy.stackexchange.com/questions/1074/why-would-definition-not-be-proposition
What is the difference between proofs and arguments?
What's the difference between an argument and proof? (2022, December 22). Retrieved from https://www.quora.com/Whats-the-difference-between-an-argument-and-proof
How do I know if my mathematical proof is actually a proof or just a convincing argument? (2022, December 22). Retrieved from https://www.quora.com/How-do-I-know-if-my-mathematical-proof-is-actually-a-proof-or-just-a-convincing-argument
Counting
Counting is finding the finite set’s cardinality. We prefer reasoning over enumerate the set.
Foundations rules
The sum rule.
If two sets are disjoint,
The product rule.
Cardinality Rules
The Bijection Rule
Bijection := one-to-one correspondence
Each element of one set is paired with exactly one element of the other set, and each element of the other set is paired with exactly one element of the first set.
What does it mean to write |A| = n?
It means that there is a bijection f : A → {1, . . . , n}
MIT OpenCourseWare. 2016. 3.3.3 Counting with Bijections: Video. YouTube. Retrieved May 25, 2021 from https://www.youtube.com/watch?v=n0lce1dMAh8
The Bijection Rule or Equinumerosity
Let S and T be two finite sets. If there exists one-to-one correspondence (or bijection) between them, from S to T, if and only if i.e. S and T have the same number of elements. This is taken as the definition.
https://www.cs.colostate.edu/~cs220/summer19/slides/16_bijection_rule.pdf
Counting Sequences
Multiplication Principle or Product Rule
called Cartesian product.
Thus, if are finite sets, then
For example, if and
Key ideas
- When we're counting since cardinality is more important than the set . We will ignore writing it.
- No decision might be part b of the set. When your problem says about optional something.
- If repetitions are allowed,
- If repetitions are not allowed, You'd remove the last used element such that
-
Product Rule Worked examples
How many dinners at Kay’s Quick Lunch (Figure 6.1.1) consist of one appetizer and one beverage?
,
How many dinners at Kay’s Quick Lunch (Figure 6.1.1) consist of an optional appetizer, one main course, and an optional beverage?
How many dinners at Kay’s Quick Lunch (Figure 6.1.1) consist of one appetizer, one main course, and an optional beverage?
A man has eight shirts, four pairs of pants, and five pairs of shoes. How many different outfits are possible?
, and,
Two dice are rolled, one blue and one red. How many outcomes are possible?
,
The Braille system of representing characters was developed early in the nineteenth century by Louis Braille. The characters, used by the blind, consist of raised dots. The positions for the dots are selected from two vertical columns of three dots each. At least one raised dot must be present. How many distinct Braille characters are possible?
are Braille characters possibles.
The options available on a particular model of a car are five interior colors, six exterior colors, two types of seats, three types of engines, and three types of radios. How many different possibilities are available to the consumer?
How many different car license plates can be constructed if the licenses contain three letters followed by two digits if repetitions are allowed? if repetitions are not allowed?
If repetitions are allowed, then
If repetitions are not allowed, then
How many 7-digit phone numbers are possible, assuming that the first digit can’t be a 0 or a 1?
Re-solve the previous problem, except now assume also that the phone number is not allowed to start with 911
Why the number of ways to choose 5 people out of 10 is greater than the number of ways to choose 6 people out of 10?
Why the number of ways to break 10 people into 2 teams of 5 is less than the number of ways to break 10 people into a team of 6 and a team of 4?
How many different 3x3 pattern locks are possible?
Exercises 10–12 ask about strings of length 5 formed using the letters ABCDEFG without repetitions.
10. How many strings begin with the letter F and end with the letter A?
11. How many strings begin with the letter F and do not end with EB in that order?
12. How many strings contain CEG together in that order?
But, a sequence n and sub-sequence r together can simplify as .
sub-sequence,
, where CEG can be 3 distinct positions.
But, We'll convert to size sequence, such that
sub-sequence,
, where CEG can be 3 distinct positions.
Thus,
Two chess players, A and B, are going to play 7 games. Each game has three possible outcomes: a win for A (which is a loss for B), a draw (tie), and a loss for A (which is a win for B). A win is worth 1 point, a draw is worth 0.5 points, and a loss is worth 0 points.
How many possible outcomes for the individual games are there, such that overall player A ends up with 3 wins, 2 draws, and 2 losses?
How many possible outcomes for the individual games are there, such that A ends up with 4 points and B ends up with 3 points?
Now assume that they are playing a best-of-7 match, where the match will end when either player has 4 points or when 7 games have been played, whichever is first. For example, if after 6 games the score is 4 to 2 in favor of A, then A wins the match and they don't play a 7th game. How many possible outcomes for the individual games are there, such that the match lasts for 7 games and A wins by a score of 4 to 3?
267
Addition Principle or Sum Rule
If are disjoint sets, then:
Inclusion–exclusion principle
If and are finite sets, then
But, if we have three finite sets, then
And for finite sets
The k-to-1 rule or division rule
If B is a finite set and f : A → B maps precisely k items of A to every item of B, then A has k times as many items as B.
https://dspace.mit.edu/bitstream/handle/1721.1/70477/6-042j-fall-2002/contents/readings/ln9.pdf
The division rule is a common way to ignore “unimportant” differences when you are counting
things. You can count distinct objects, and then use the division rule to “merge” the ones that are
not significantly different.
Permutations
A permutation of n things taken r at a time, written P(n,r), is an arrangement in a row of r things, taken from a set of n distinct things. Order matters.
In your problem,
Example: How many permutations of the letters ABCDEF contain the letters DEF together in anyorder?
Counting Subsets or combinations
A combination of n things taken r at a time, written C(n,r) or n r (“n choose r”) is any subset of r things from n things. Order makes no difference.
In your problem,
The key points to remember in this section are that a permutation takes order into account and a combination does not take order into account. Thus, a key to solving counting problems is to determine whether we are counting ordered or unordered items.
Combinatorial Proofs
Vandermonde's identity
The Binomial Theorem
Pascal’s Triangle Identity
Worked examples
How many ways are there to split a dozen people into 3 teams, where one team has 2 people, and the other two teams have 5 people each?
For example, or . First one references to itself, the second one references to teams by that group by 2.