24
Discrete Mathematics mif.vu.lt/~algis Content of the course

Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Discrete Mathematics

mif.vu.lt/~algis

Content of the course

Page 2: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Content ò  Topic: notions and notations

ò  Topic: functions

ò  Topic: construction technique

ò  Topic: relations

ò  Topic: analysis technique

ò  Topic: elementary logic

ò  Topic: program correctness

ò  Topic: algebraic structures

ò  Colloquiums and examination (examples)

ò  Literature

Page 3: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Literature

ò  James L. Hein. Discrete Structures, Logic and Computability. Jones and Bartlett Publishers International, London, 1995 (main textbook)

ò  L. Lovasz, K. Vesztergombi. Discrete Mathematics. Lecture Notes, Yale University, 1999

ò  Kenneth H. Rosen. Discrete Mathematics and its Applications. McGraw-Hill, 1998

ò  G. Bareikis. Diskrečioji matematika. http://www.mif.vu.lt/katedros/matinf/asm/bg/bg.html, 2003

ò  V. Dičiūnas, G. Skersys. Diskrečioji matematika. http://www.mif.vu.lt/katedros/cs/Staff/VisiI.htm, 2003

Page 4: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Self-training hours

Primer proofs, sets, ordered structures, graphs and trees 9

Functions, construction of functions, properties, countability 5

Construction techniques 8

Relations, equivalence, order, inductive proofs 7

Analysis techniques, permutations, combinations, recurrences 12

Elementary logic 10

Program correctness and higher-order logic 5

Algebraic structures and techniques: algebras, Boolean algebras,

cryptology 12

Page 5: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: notions and notations

ò  Elementary notions and notations: primer proofs, sets, ordered structures, graphs and trees

ò  Proof primer: logical statements, proof techniques [H, pp. 2-13]

ò  Sets: definitions, operations, counting finite sets, bags, not too complicated sets [H, pp. 13-35]

ò  Ordered structures: tuples, lists, strings, relations, counting tuples [H, pp. 35-55]

ò  Graphs and trees: definitions, paths in graphs, graph traversal, trees, binary trees, binary search trees, spanning trees [H, pp. 55-71]

Page 6: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: notions and notations

ò  Examples of exercises:

ò  Truth tables, divisibility and prime numbers, divisibility proof, an odd proof, iff proof, other cases of proof

ò  Sets proofs, Venn diagrams, subsets, subsets condition, English words as union, surveys, least and greatest

ò  Product of sets, computer representation of tuples, lists and numerals, relations, counting tuples

ò  Drawing graphs and trees, weighted graphs, path in graphs, computer representation of graphs and trees

Page 7: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: functions

ò  Functions: definitions, examples, construction of functions, properties, countability

ò  Definitions and examples: describing functions, terminology, useful functions, large partial functions [H, pp. 74-90]

ò  Constructing functions: composition of functions, sequence, distribute and pairs functions, the map function, graphing with maps [H, pp. 91-100]

ò  Properties of functions: injective and surjective functions, the pigeonhole principle, simple ciphers, hash functions, collisions [H, pp. 100-115]

ò  Countability: comparing the size of sets, diagonalization, limits on computability [H, pp. 115-125]

Page 8: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: functions

ò  Examples of exercises:

ò  Sample notations, functions and not functions, functions and binary relations, floor, celling functions, gcd, Euclid algorithm, mod, converting decimal to binary, log, partial-defined functions

ò  Distribute a sequence, max, list of pairs, map, list of squares, graphing with map

ò  Injective, surjective functions, inverses, pigeonhole examples, cipher examples, hash table, probe sequences

ò  Countable sets, techniques to evaluate countability, countability of the rationals, counting strings

Page 9: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: construction techniques

ò  Construction techniques: sets, inductively defined sets, recursive functions and procedures, grammars

ò  Inductively defined sets: numbers, strings, lists, binary trees, cartesian product [H, pp. 128-141]

ò  Recursive functions and procedures: numbers, strings, lists, binary trees, sequences [H, pp. 145-168]

ò  Grammars: example, structure, derivations, constructing grammars [H, pp. 173-188]

Page 10: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: construction techniques

ò  Examples of exercises:

ò  Even and odd numbers, inductive construction of numbers, strings, lists, binary trees

ò  Recursive construction of numbers, decimal numbers, strings, lists, binary trees, floor function, prefixes, distribute function, preorder, inorder, postorder traversals

ò  From grammar to inductive definition, union, product and closure rules, identifiers, palindromes, meaning and ambiguity

Page 11: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: relations

ò  Relations, equivalence, order, inductive proofs: binary relations, closures, equivalence classes, partitions, order relations, topological sorting, partial orders

ò  Properties of binary relations: composition of relations, closures, path problems, Floyd’s algorithm, the path matrix [H, pp. 194-213]

ò  Equivalence relations: definitions, examples, classes, partitions, generating relations, Kruskal algorithm [H, pp. 213-231]

ò  Order relations: partial orders, topological sorting, well-founded orders [H, pp. 232-250]

ò  Inductive proofs: proof by mathematical induction, well-founded induction and sums [H, pp. 253-268]

Page 12: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: relations

ò  Examples of exercises:

ò  Five binary relations, integer relations, constructing closures, adjacency matrix, Warshall’s algorithm, Floyd’s algorithm

ò  Equivalent binary trees, kernel and mod function equivalence, equivalent strings, partition a set of strings, program testing, solving the equality problem, minimum spanning trees

ò  Chains, predecessors, successors, minima, maxima, bound, lattices, topological sorting, lexicographical order of tuples and strings

ò  Sums of arithmetic and geometric progressons, other sums

Page 13: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: analysis technique

ò  Analysis techniques: analysis of algorithms, averaging and worth-case, closed forms, discrete probability, permutations and combinations, recurrences, rates of growth:

ò  Analyzing algorithms: worst-case, decision trees, binary search, optimal solution, lower bound [H, pp. 274-281]

ò  Closed form for sums, simple sort [H, pp. 281-289]

ò  Permutations, permutations with repeated elements, Pascal’s triangle [H, pp. 289-298]

ò  Discrete probability, conditional probability [H, pp. 298-312]

ò  Simple recurrences, substitutions, rate of growth [H, pp. 312-334]

Page 14: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: analysis technique

ò  Examples of exercises:

ò  Matrix multiplication, finding a minimum, a bad coin, decision trees

ò  Closed forms for elementary finite sums, arithmetic and geometric progressions

ò  Permutations, people in a circle, subsets of the same size, binomial coefficients, Pascal’s triangle, bag combination

ò  Binary search decision tree, complement of an event, switching pays, repeated independent trials, expectations

ò  Recurrences, solving by substitution and by cancelation, generating function, sample partial fractions

Page 15: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: elementary logic

ò  Elementary logic: prepositional calculus, formal reasoning, axioms, predicate logic, first-order predicates, equivalent formulas, formal proofs

ò  How do we reason? What is a calculus? [H, pp. 305-309]

ò  Prepositional calculus, well-formed formulas, semantics, equivalence, truth functions and normal forms, constructing full normal forms using equivalence, complete sets of connectives [H, pp. 309-329]

ò  Predicate logic, first-order predicates, well-formed formulas, semantics, validity, equivalent formulas, normal forms [H, pp. 351-378]

Page 16: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: elementary logic

ò  Examples of exercises:

ò  Discussion of ways of reasoning

ò  Truth tables of well-formed formulas, binary trees for reasoning, counting equivalence, truth functions and normal forms, constructing full normal forms using equivalence

ò  First order predicate calculus: examples and calculations, first-order predicates, well-formed formulas, semantics, validity, equivalent formulas, normal forms

Page 17: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: program correctness

ò  Program correctness and higher-order logic

ò  Equality, axioms for terms, replacement, multiple replacement [H, pp. 405-414]

ò  Imperative program correctness, examples, assignment statement, arrays, termination [H, pp. 414-434]

ò  Higher-order logic, classification, examples, semantics, higher-order reasoning [H, pp. 437-446]

Page 18: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: program correctness

ò  Examples of exercises:

ò  Equality expressions, replacement expressions, multiple replacement expressions

ò  Imperative program correctness, examples, assignment statement, arrays, termination

ò  Higher-order logic in exercises, classification, examples, examples of semantics, examples of higher-order reasoning

Page 19: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: algebraic structures

ò  Algebraic structures and techniques: definition of algebras, Boolean algebras, abstract data types as algebras, examples, computational algebras, cryptology

ò  Definitions, examples, working in algebras, algebras with one and several operations [H, pp. 502-516]

ò  Boolean algebras, simplification, digital circuits, properties [H, pp. 516-529]

ò  Abstract data types as algebras, numbers, lists strings, stacks, queues, binary trees, priority queues [H, pp. 529-545]

ò  Computational algebras: relational algebras, process algebras, functional algebras [H, pp. 545-557]

Page 20: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Topic: algebraic structures

ò  Examples of exercises:

ò  Definitions of algebras, examples, working in algebras, algebras with one and several operations

ò  Boolean algebras, their simplification, connection with digital circuits, characteristic properties

ò  Abstract data types as algebras, numbers, lists strings, stacks, queues, binary trees, priority queues

ò  Computational algebras: relational algebras, process algebras, functional algebras

Page 21: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Colloquiums

ò  Examples of tasks for the first colloquium:

ò  Calculate Venn diagrams for differences A \ B, A \ C, B \ C (0.1) of the sets A={a, b, c, d, e, f}, B={a, c, e, g}, C={b, d, f, h, k}

ò  Express number 101493 in Roman, number 31,21 - in binary, octal and hexadecimal systems (0.3)

ò  Find Cartesian products A × B, B × A and (A × B) ∩ (B × A) for sets A = {1, 2, 4, 3} and B = {6, 5, 3, 0}, (0.1)

ò  There are 13 stations and 80 people waiting in a bus route. How many ways could people enter the bus? How many groups could be made of 11 people? (0.4)

ò  Find gcd with the Euclid algorithm, for 425 and 2135 (0.1)

Page 22: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Colloquiums

ò  Examples of tasks for the second colloquium:

ò  Define truth table for expression (p ∧ (q ∨r)) => (p ∨ ¬q) (0.2)

ò  Formulate definition of equivalence of statement, and Morgan laws (0.1)

ò  For a given graph calculate adjacent matrix (0.1)

ò  What order to name vertices in, for the breath-in-width procedure, starting in vertex h for a given graph? (0.3)

ò  Form binary search tree for a sequence <name>xyz<surname>, and name the vertices in prefix order (0.3)

Page 23: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Examination

ò  Example of exam’s tasks:

ò  For sets A={a,b,c,d,e,f,g}, B={a,c,e,h,k,l}, C={b,c,d,h,k,l,m,n} form a universal set and then identify intersections for pairs (A, B), (A, C), (B, C ) (0.15 )

ò  Define reflexive, antireflexive, symmetric, antisymmetric relations (0.1)

ò  Roman number CLVMMLXXXVII record in decimal, number 29 record in binary, octal, hexadecimal and ternary systems (0.3)

ò  Proof the formula 2 + 3 + 4 + . . . + n = n(n+1)/2 – 1 by the mathematical induction (0.3)

ò  Express permutations and combinations without repetition formulas (0.1)

Page 24: Discrete Mathematicsalgis/dsax/Content.pdfSelf-training hours Primer proofs, sets, ordered structures, graphs and trees 9 Functions, construction of functions, properties, countability

Examination

ò  Express Newton binomial formula (0.1)

ò  There are 212 people in the group, and 17 times they are deleted, how many ways it can be done in? How many ways can be form a group of 15 persons (8 male and 7 female, group must contain both sex) in?. How many numbers less 1000, can be generated by 4, 3, 2, 1, 0? (0.6)

ò  Define injective and surjective functions (0.1)

ò  Give a truth table for expression (p => (q ∧r)) ∧(p ó q) (0.2)

ò  Formulate the laws for double negation, imposible third, silogism (0.15)

ò  To name the vertices for a graph by breath-in-depth approach (0.25)