# 14.2.2 Graphical Representations

You can interpret the ${prop}$ relation in terms of a directed graph, where the relation

 ${prop}(Ind,Prop,Val)$

is depicted with $Ind$ and $Val$ as nodes with an arc labeled with $Prop$ between them. Such a graph is called a semantic network or knowledge graph. There is a straightforward mapping form a knowledge graph into a knowledge base using the ${prop}$ relation, as in the following example.

###### Example 14.7.

Figure 14.1 shows a semantic network for the delivery robot showing the sort of knowledge that the robot might have about a particular computer in a university department. Some of the knowledge represented in the network is

 $\displaystyle{{prop}(comp\_2347,owned\_by,fran).}$ $\displaystyle{{prop}(comp\_2347,managed\_by,sam).}$ $\displaystyle{{prop}(comp\_2347,model,lemon\_laptop\_10000).}$ $\displaystyle{{prop}(comp\_2347,brand,lemon\_computer).}$ $\displaystyle{{prop}(comp\_2347,has\_logo,lemon\_icon).}$ $\displaystyle{{prop}(comp\_2347,color,green).}$ $\displaystyle{{prop}(comp\_2347,color,yellow).}$ $\displaystyle{{prop}(comp\_2347,weight,light).}$ $\displaystyle{{prop}(fran,has\_office,r107).}$ $\displaystyle{{prop}(r107,in\_building,comp\_sci).}$

The network also shows how the knowledge is structured. For example, it is easy to see that computer number $2347$ is owned by someone (Fran) whose office (r107) is in the $comp\_sci$ building. The direct indexing evident in the graph can be used by humans and machines.

This graphical notation has a number of advantages:

• It is easy for a human to see the relationships without being required to learn the syntax of a particular logic. The graphical notation helps the builders of knowledge bases to organize their knowledge.

• You can ignore the labels of nodes that just have meaningless names – for example, the name $b123$ in Example 14.6, or $comp\_2347$ in Figure 14.1. You can just leave these nodes blank and make up an arbitrary name if you must map to the logical form.