100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Samenvatting

Summary Modelling Computing Systems Hoofdstuk 7 Faron Moller & Georg Struth

Beoordeling
-
Verkocht
-
Pagina's
5
Geüpload op
15-12-2020
Geschreven in
2020/2021

Logic for Computer Science / Logica voor computertechnolgie hoofdstuk 7. Samenvatting van het boek Modelling Computing Systems geschreven door Faron Moller en Georg Struth. Samenvatting geschreven in het Engels. Aan de hand van voorbeelden en plaatjes wordt de stof en theorie verduidelijkt. Gegeven op Universiteit Utrecht.

Meer zien Lees minder









Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Documentinformatie

Heel boek samengevat?
Nee
Wat is er van het boek samengevat?
Hoofdstuk 7
Geüpload op
15 december 2020
Aantal pagina's
5
Geschreven in
2020/2021
Type
Samenvatting

Onderwerpen

  • logica voor c

Voorbeeld van de inhoud

Hoofdstuk 7:

The truth set associated with a predicate P is the set: {x : P(x) holds}. We can also consider the truth
set associated with predicates that take more than one argument: {(x, y, z) : R(x, y, z) holds}. For
example:

R(x, y, z) might hold if and only if the customer with ID x ordered product y on the date z. The
corresponding truth set then defines a subset of the set CustomerID × ProductID × Date.

A relation R on A and B is a subset of a cartesian product A × B. We write R(a,b) or aRb if (a,b) ∈ R;
that is, a and b are related by R. Examples of relations:

- The less-than-or equals relation on numbers, x ⩽ 4
- The equality relation, x = y
- The ‘is-an-ancestor-of’ or the parenthood relation between humans.
- The ‘equivalent’ relation between programs, describing when two programs behave the
same.
- The propositionally equivalent relation between propositions.

Functions and relations are similar, but there are some important differences:

- Given a function f : A → B, we can construct the relation {(x, f(x) : x ∈ A}, sometimes referred
to as the graph of the function f.
- But not all relations are functions. For example, the ‘is-an-ancestor-of’ relation between me
and my ancestors is not a function. Each person has many different ancestors.
- A function f : A → B associates a value in B with each a ∈ A; in a relation each a ∈ A may be
associated with zero, one or many elements of B.
- Given a relation on A × B such that each a ∈ A is related to exactly one b ∈ B - this
determines a function f : A → B

A relation between two sets A and B is called a binary relation. Many familiar binary relations use an
infix operator: ⊆, =, ⇔, ⩽, … Given a relation R ⊆ A × B we sometimes refer to A as the source and B
as the target of R. When a relation R is a subset of A × A we sometimes call R a homogeneous
relation; When a relation R is a subset of A × B (for two different sets A and B) we call R a
heterogeneous relation.

On the right is a example of a relation. U can see this is not a function
because B doesn’t have a single number associated with it, and D has
multiple number associated with it. That’s why this is a relation and
not a function.

A × B is also a relation – every pair of elements (a,b) where a ∈ A and b
∈ B, is related. The empty set ∅ is also a subset of A × B – no two
elements are related. The equality relation on a set A is defined by {
(a,a) : a ∈ A}. For any relation R on A × B, we can define the inverse relation on B × A as follows: R −1
= {(b, a) : (a, b) ∈ R} For example, given the relation < ⊆ N × N, we can define the inverse relation on
B × A as follows: R −1 = {(b, a) : (a, b) ∈ R}.

, We can use familiar operations for manipulating sets to manipulate relations:

- a ⩽ b = (a < b) ∪ (a = b)
- Parent = Father ∪ Mother
- Son = Child ∩ Male

Given a relation R ⊆ A × B, we sometimes refer to the:

- the source of R is given by {a ∈ A : ∃b ∈ B (a, b) ∈ R}
- the target of R is given by {b ∈ B : ∃a ∈ A (a, b) ∈ R}

Properties of relations:

A relation is reflexive if R(x,x) for all x. Examples: 1. equality & 2. propositionally equivalent
formulas;
Non-examples: 1. x < y (where x and y are numbers); 2. The strict-subset relation on sets. 3. Is-a-
parent-of relation between people(no one is a parent of hisself).
If a relation R is ‘never reflexive’, that is, ∀x ¬(xRx) we call R irreflexive.

A relation is symmetric if R(x,y) implies R(y,x). Examples: 1. Equality, 2: propositionally equivalent
formulas, 3. The “is a sibling of relation(X is a brother of y, than y is a brother of x)”; Non-
examples: 1. x ⩽ y (where x and y are numbers); 2. The subset relation on sets. 3. The graph of the
sort function.

A relation is asymmetric if R(x,y) implies ¬R(y,x). Examples: 1. The < relation on numbers; 2. The
‘is-a-strict-prefix-of’ relation on strings. Example: when 4 < 5 then 5 ¬< 4.

A relation is antisymmetric if R(x,y) and R(y,x) implies x = y. Examples: 1. Equality; 2. ⩽ on natural
numbers; 3. ⊆ on sets. Non-examples: 1. Equivalence of propositional formulas. 2. The < relation
on numbers;

A relation is transitive if R(x,y) and R(y,z) implies R(x,z). Examples: 1. Subsets, equality,
comparison of numbers, prefixes of strings. If hell is a prefix of hello, and he is a prefix of hell.


We can compose relations. Given a relation R on A × B and a relation S on B × C, we can form the
composed relation R ◦ S on A × C as follows: R ◦ S = {(a, c) : there is some b ∈ B such that aRb ∧ bSc}.

If R is a relation on A × A:

- R is reflexive when it contains the equality relation, = ⊆ R
- R is symmetric when R −1 ⊆ R (or equivalently, when R ⊆ R −1 )
- R is transitive when R ◦ R ⊆ R

An equivalence relation is a relation that is:

- reflexive – R(x,x) for all x.
- symmetric – R(x,y) implies R (y,x)
- transitive – R(x,y) and R(y,z) implies R(x,z)

The canonical example of such a relation is equality.

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
luukvaa Universiteit Utrecht
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
760
Lid sinds
7 jaar
Aantal volgers
589
Documenten
12
Laatst verkocht
1 week geleden

Welkom op mijn stuvia pagina! Kijk gerust rond welke samenvattingen op dit moment op mijn pagina staan. Gedurende elk jaar zullen er weer nieuwe samenvattingen verschijnen, dus neem af en toe een kijkje en klik op het knopje \'\'volgen\". Succes met studeren!

4,0

284 beoordelingen

5
108
4
102
3
58
2
5
1
11

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen