Download presentation
Presentation is loading. Please wait.
Published byJoshua Day Modified over 9 years ago
1
English for Economic Informatics I Tomáš Foltýnek foltynek@pef.mendelu.cz Theoretical Foundations of Informatics
2
Theoretical foundations of informatics Propositional calculus A propositional formula (or proposition) is a sentence we can decide whether is true or false. Propositions are considered to be either simple, or compound using sentential connectives, –e.g. (AND), (OR), (IMPLIES), (IS EQUIVALENT), (NOT), XOR, NAND, NOR.
3
Theoretical foundations of informatics Laws of sentential connectives Both AND and OR obey the commutative and associative law. Distributive laws say that OR distributes over AND and AND distributes over OR. Distribution of NOT over OR and AND is described by DeMorgan’s laws.
4
Theoretical foundations of informatics Tautology and contradiction Tautology is a formula, which is always true independently on the value of its variables We can name well-known tautologies, such as –Law of identity: O O –Law of double negation (convolution): O ( O) –Law of contradiction: (O O) –Law of excluded middle: (O O) The opposite of a tautology is a contradiction.
5
Theoretical foundations of informatics Predicate calculus Predicate logic adds two quantifiers – existential and universal . The variables’ values are elements of a universe. The existential quantifier expresses the existence of at least one element of the universe with given property. Universal quantifier expresses the fact that all elements of the universe have given property.
6
Theoretical foundations of informatics Deductive system A deductive system consists of the axioms (or axiom schemes) and rules of inference that can be used to derive the theorems of the system. Deductive system is used to check value judgment’s rightness or wrongness. The rightness of the value judgment is often showed by proving that the conclusion tautologically flows from the conjunction of presumptions.
7
Theoretical foundations of informatics Set theory A set is formed by the grouping together of single objects into a whole. A set is a plurality thought of as a unit. We use following notation to say that a is an element of A: a A Set which doesn’t have any elements is called empty set and denoted If every element of a set A is also an element of a set B, we say that A is a subset of B (A B).
8
Theoretical foundations of informatics Set operations Let A, B are sets, their sum or union S = A B is a set of all elements that belong to A or B (or both). Their intersection I = A B is a set of all elements that belong both to A and B. Their difference D = A – B (or D = A \ B) is a set of all elements that belong to A and do not belong to B http://goose.ycp.edu/~dbabcock/PastCourses/mat235/lecture/images/lecture08/basicVenn.png
9
Theoretical foundations of informatics Cartesian product The set P = A×B of all ordered pairs p = (a,b), where a runs through all the elements of A and b runs through all the elements of B, is called Cartesian product of sets A and B. http://www.learner.org/courses/learningmath/number/session4/part_a/multiplication.html
10
Theoretical foundations of informatics Binary relation Any subset of A×B is called binary relation between the sets A and B. We can also say that it is an arbitrary association of elements within a set or with elements of another set.
11
Theoretical foundations of informatics Relation properties We say that relation R (A×B) is left-total if an only if for all a A a b B exists, such that aRb We say that relation R (A×B) is right-total or surjective iff for all b B an a A exists, such that aRb We say that relation R (A×B) is functional (or mapping or right-unique) iff for all a in A, and b and c in B it holds that if aRb and aRc then b = c We say that relation R (A×B) is injective (or left-unique) iff for all a 1 and a 2 in A and b in B it holds that if a 1 Rb and a 2 Rb then a 1 = a 2. We say that relation is bijective (or one-to-one correspondence) iff is left-total, right-total, functional and injective.
12
Theoretical foundations of informatics Relations over a set If A = B we say that the binary relation is over A. The important classes of binary relations over set A are: reflexive: for all x in A it holds that xRx. –"greater than or equal to" is a reflexive relation but "greater than" is not. symmetric: for all x and y in A it holds that if xRy then yRx. –"Is a blood relative of" is a symmetric relation, because x is a blood relative of y if and only if y is a blood relative of x. antisymmetric: for all x and y in A it holds that if xRy and yRx then x = y. –"Greater than or equal to" is an antisymmetric relation, because if x≥y and y≥x, then x=y. asymmetric: for all x and y in A it holds that if xRy then not yRx. –"Greater than" is an asymmetric relation, because if x>y then not y>x. transitive: for all x, y and z in A it holds that if xRy and yRz then xRz. –"Is an ancestor of" is a transitive relation, because if x is an ancestor of y and y is an ancestor of z, then x is an ancestor of z. total (or linear): for all x and y in A it holds that xRy or yRx (or both). –"Is greater than or equal to" is an example of a total relation.
13
Theoretical foundations of informatics Graph theory Graph is an abstract data type consisting of a set of nodes and a set of edges that establish relationships (connections) between the nodes. Formally, graph is a triple G = (V, E, f), where V is a set of vertices (nodes), E is a set of edges and f is the incidence mapping f: E V 2. Graph can be given by –incidence matrix –adjacency matrix –incidence/adjacency list. http://www.allthingsdistributed.comhttp://www.allthingsdistributed.com/
14
Theoretical foundations of informatics Graph properties Graph can be either directed or undirected, either simple or multigraph, either weighted or unweighted (sometimes we say edge-labeled or vertex-labeled). In a complete graph each pair of vertices is joined by an edge. In a bipartite graph, the vertices can be divided into two disjunctive sets, so that every edge has one vertex in each of the two sets. The degree or valency of a vertex is the number of edges incident to the vertex with loops counted twice. A vertex of degree 0 is called isolated vertex.
15
Theoretical foundations of informatics Walks, trails and paths A walk is an alternating sequence of vertices and edges, beginning and ending with a vertex, where each vertex is incident to both the edge that precedes it and the edge that follows it in the sequence. A trail is a walk in which all the edges are distinct. A path is a walk (trail) in which all the vertices are distinct, except the last one which can be equal to the first one. In that case we talk about closed path or a cycle. 15 https://www.pexels.com/photo/hiking-path-way-trail-4805/
16
Theoretical foundations of informatics Eulerian trail and Hamiltonian path Eulerian trail is a trail which passes through every edge (once and only once). Hamiltonian path is a path which passes through every node (once and only once). If the starting and ending nodes are the same, it is a Hamiltionian cycle. The problem of finding the shortest Hamiltonian cycle is called Travelling salesman problem. 16 Leonhard Euler, William Hamilton Source: Wikipedia
17
Theoretical foundations of informatics Tree According to the existence of cycles we divide graphs to cyclic and acyclic. A connected simple acyclic graph is called a tree. A simple acyclic graph is called forest. A spanning tree is a spanning subgraph that is a tree. 17 https://www.pexels.com/photo/wood-nature-leaves-tree-4258/
18
Theoretical foundations of informatics Graph algorithms There are some important algorithms dealing with graphs: Searching a graph: –Depth-first search uses a stack, –breadth-first search uses a queue. Finding the shortest path: Dijkstra algorithm, Floyd-Warshall algorithm, etc. Finding the cheapest spanning tree: Kruskal algorithm, Borůvka algorithm
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.