Quizzes: Module 1 - Formal Systems
Quizzes: Module 1 - Formal Systems
Quizzes: Module 1 - Formal Systems
Correct answer: 4.
Correct answer: 3 is incorrect. It should be: "Relations (triples) form a graph between
things"
b) 1 is correct; 2 is incorrect
c) 1 is incorrect; 2 is correct
¬(v(→ (A,v(¬(B),C)),v(¬(D),¬(E))))
¬(v(→(v(v(v(¬(¬(¬(A, B,C,D,E))))))
((((E)¬,(D)¬)v,((C,(B)¬)v,)→)v)¬
¬(v(→ (E,v(¬(B),D)),v(¬(C),¬(A))))
v(¬(v(A,→(¬(B),C)),v(¬(D),¬(E))))
Question 4: Consider the following propositional formula: ¬p → (q & ¬r). Which of the
following interpretations is a model?
There is no model.
Question 4: Consider the following propositional formula: p → (¬q & r). Which of the
following interpretations is a model?
There is no model
a) p
b) q
c) None of the above
d) r
a) q
b) p
c) both p and q are entailed
d) neither p nor q are entailed
a) No
b) Yes
c) Cannot be decided
d) It’s a tautology
p → (q → r) ⊨ p → (r → q)
a) Yes
b) No
c) Entailment is not defined for Propositional Logic
d) Not enough information available
Question 8: In Propositional Logics, which of the following entailments is true, and which
is false?
(a) p → (q → r) ⊨ p → (r → q)
(c) q ⊨ p → q
Correct answer: 3). The most difficult one was (b). Here p = T, q = F and r = F is a
counterexample, so the entailment is not true.
Question 1: Give the different reasons why data and knowledge reuse on the Web is
difficult.
a) Publishers use different syntaxes, such as XML, csv, tsf, etc,
b) There are no shared identifiers between datasets
c) There is too much data to be stored on one machine, so data can never be reused
d) There is no protocol to access data from remote servers
e) Information may mean different things in different contexts
f) People may disagree, causing inconsistencies
g) Not all data is in XML
And Clubs
The ultimate goal is to represent (some of) the information as a knowledge graph as
faithfully as possible. In order to do so, first determine what you want to model as
resources, literals, and properties. The following lists are not complete, but which of
them are correct:
Correct answer: a)
Question 7: Let KG =
{(stefan,teaches,kad),(carl,isa,teacher),(kad,isa,course),(carl,participates,kad),(klaas,isa,stu
dent)}
a) {(klaas,isa,student),(carl,isa,teacher),(kad,isa,course)}
b) {(stefan,teaches,kad),(stefan,isa,teacher)}
c)
{(stefan,teaches,kad),(klaas,isa,student),(kad,isa,course),(carl,participates,kad),(carl,isa,stu
dent),(carl,participates,course)}
d) {(carl,particpartes,course)}
e) {(stefan,teaches,course),(klaas,isa,student),(kad,isa,course),(carl,participates,course)}
Question 8: Why is it useful to use HTTP URIs, instead of other identifiers, such as Apples
App ID, or the Social Security Number of a person?
a) HTTP URIs can be dereferenced, ie they can be accessed via http, and provide useful
information about a resource.
b) HTTP is the only way to access data from a triple-store, so it is critical that your URIs
are HTTP addresses
c) Chances are very high that HTTP URIs are unique, whereas other identifiers can be the
same.
d) HTTP is the only way to provide information about resources that is human readable.
e) HTTP uses hypertext, and is therefore far more secure than standard identifiers
f) It is illegal to use Social Security Numbers, as they are protected under US laws.
g) HTTP URIs are more elegant, as they force people to write human readable identifiers,
which is socially desired.
h) HTTP URIs can easily be merged, which is crucial when merging datasets
i) HTTP URIs are unique, as one has to buy them using a domain service provider (DSP).
j) HTTP URIs encode the graph structure of a knowledge graph, and thus allow for more
efficient retrieval
Question 2: What is the function of vocabularies such as foaf, dublin core or skos?
(multiple correct answers possible, select them all)
a) These vocabularies, foaf, skos and dc, come with strict formal semantics that allow for
rich inferencing.
b) There is no need to use dublin core and foaf vocabularies, as they are already included
in RDFS.
c) While they do not provide a lot of formal semantics (and are thus not very powerful in
inferencing new facts) vocabularies are crucial to the Linked Data initiative, as one
cannot publish valid RDF without using these vocabularies.
d) While they do not provide a lot of formal semantics (and are thus not very powerful in
inferencing new facts) these vocabularies help people share the same terms when
talking about things. They provide some kind of social semantics to a formal language.
e) It is illegal to use RDFS and foaf in one document, as the uncertainty and
underspecification of semantics of foaf would destroy the formal semantics of RDFS.
f) While they do not provide a lot of formal semantics (and are thus not very powerful in
inferencing new facts) vocabularies help because people are forced to use the same
terms for domains in order to adhere to Tim Berners Lees 5-Star principle.
g) It is highly recommended to use extra vocabularies in RDF and RDFS documents in
order to make reuse of the data easier.
Question 3: This question is about the role of an index in a database, more specifically in
TripleStores. Which of the following statements are correct, and which are not?
http://dbpedia.org/sparql
a) Yasgui has a local copy of DBPedia, ready downloaded and indexed for efficient
processing. It returns the first 10 triples in the database.
b) Yasgui will attempt to send a query to a database http://dbpedia.org/sparql, but there
will be an error message, as it is not a valid http address
c) Yasqui sends an http GET request to the URL which denotes a SPARQL API. The
specified query is running against the DBPedia triple store, and the first 10 triples in that
store are returned to Yasgui, which renders it nicely.
d) Yasgui runs an instance of a triple store server, which it calls
"http://dbpedia.org/sparql". This instance returns the first 10 triples it has indexed and
Yasgui renders them nicely.
Correct answer: c)
There might be other triples that are entailed beyond those listed.
a)
(ex:i1 rdf:type ex:D) and
b)
(ex:i1 rdf:type ex:C)
(ex:i2 rdf:type ex:C)
c)
(ex:i1 rdf:type ex:C)
d)
(ex:i2 rdf:type ex:A)
There might be other triples that are entailed beyond those listed.
Question 6: Now consider the RDFS graph { (ex:1 rdfs:subClassOf ex:2), (ex:2
rdfs:subClassOf ex:3),(ex:3 rdfs:subClassOf ex:4), (ex:a rdf:type ex:1), (ex:b rdf:type ex:2)},
but now only the rule
Correct answer: d)
Given a Knowledge Graph {(ex:s ex:p ex:o), (ex:p rdfs:range ex:C), (rdfs:range rdfs:range
rdfs:Class), (ex:q a ex:B)}.
There is one triple you can derive which is undesirable. Which one?
There is one triple you can derive which is undesirable. Which one?
Which triples are not explicitly stated in the graph, but can be inferred by the rdf and
rdfs inference rules.
Which triples are not explicitly stated in the graph, but can be inferred by the rdf and
rdfs inference rules?
a) ex:TruffelTheCat ex:isOwnedBy ex:Victor.
b) ex:TruffelTheCat ex:isOwnedBy ex:Person .
c) ex:TruffelTheCat rdfs:subClassOf ex:Animal .
d) ex:TruffelTheCat rdf:type: ex:Animal .
e) ex:TruffelTheCat rdfs:domain ex:Cat .
f) ex:Cat rdf:type rdfs:Class .
g) ex:Victor rdf:type ex:Animal .
Question 3: Which of the statements can be made in OWL, but not in RDFS? (multiple
answers possible)
Question 4: Which of the following statements about the Unique Name Assumption are
correct (one or more)?
OWL has the Unique Naming Assumption because in OWL nothing is assumed true or
false unless it is explicitly specified.
OWL does not have the Unique Naming Assumption, as one URI can have multiple
labels.
OWL does not have the Unique Naming assumption as the same thing can be denoted
by different URIs.
Question 5: Consider the following OWL ontology (assuming the correct namespaces are
defined):
Which of the following statements (one or more) can be derived by an RDF(S) and OWL
reasoner?
motherOf
auntOf
ancestorOf
siblingOf
sisterOf
(cousinOf also works, from exam prep)
Which of the following facts can be derived (one or more can be correct)?
Question 8: Suppose you want to model the relation fatherInLaw in OWL as a property
chain. Which properties would you concatenate?
Question 9: Suppose there was only the following OWL entailment rule:
and a small ontology:
Comments: Using subClassOf we can define necessary conditions. Combining that with
someValuesFrom, we can derive propertyvalues for relations that have instances of that
class as a subject. In this case, we already know that match123 is of type footballmatch.
because it is only a necessary condition, we cannot derive type relations for john.
Ontologies have to be modelled in some kind of formal system, so that they are machine
interpretable.
Ontologies model a consensus of concepts, relations and instances that can be reused
Question 3: Given the four following terms: goat, goat_milk, farm, and mammal
• Job types
o Cat breeder
• Biology
o Animal
§ Cat
§ Dog
What is a good relation type for ALL the hierarchy relations in a formalized version of
this.
rdfs:subClassOf
skos:broader
rdf:type
skos:related
They are human-understandable questions that describe requirements for the ontology.
They are SPARQL queries used to evaluate the efficiency of a triple store.
Nouns extracted from these questions will become Classes and Properties in the
ontology
KG1:
and
KG2:
If I want to establish an alignment between the "ex" and "foaf" ontologies, what would
be good alignment triples (more than one answer possible)?
Not this one above, skos:related is defined between two concepts, not between property
and a class.
With RDF and RDFS reasoning only, the complete result is dbpedia:Saarland.
With RDF, RDFS and OWL reasoning, the complete result is dbpedia:Saarland and
sumo:Germany
With RDF, RDFS and OWL reasoning, the complete result is dbpedia:Saarland,
sumo:Germany, cyc:Europe
With RDF and RDFS reasoning only, the complete result is dbpedia:Saarland and
sumo:Germany
With RDF, RDFS and OWL reasoning, the complete result is dbpedia:Saarland only
Question 8: We would like to know the top 3 presidents of the United States, with the
most number of children.
Given the following WHERE clause of a SPARQL query, fill in the 4 empty lines (#1, #2, #3,
and #4) with the necessary values to answer the above question.
#2 GROUP BY ?child
#2 GROUP BY ?name
#3 ORDER BY (?N)
#3 ORDER BY (?child)
#4 FILTER(TOP(?child, 3))
#4 TOP 3
#4 LIMIT 3
Question 9: What statements are true about the following SPARQL query (executed
against a local triplestore running at localhost:7200)
The SERVICE keyword allows you to do a federated query, retrieving information from a
second SPARQL endpoint (in this case DBPedia)
This query combines information from two datasets, using explicit semantic alignment
triples
This query combines information from two datasets, using the matching labels
None of the above. There can be several people with the same name, last name, and
birth date.