Answer:
Yes, the function k(x,z) is a kernel
Explanation:
To show that k(x,z) is a kernel.
First, we'll need to explicitly construct two features of k(x,z).
The features are:
vector φ(x) and vector φ(z) in such a way that K(x,z) =φ(x)·φ(z).
Then, we proceed to the next step...
For any given documents, a vocabulary V can be constructed.
Vocabulary V is finite size for the words in the document set.
Given V, a feature mapping φ(x) can then be constructed for x by the following:
For the kth word wk in V, if wk appears in document x, assign φ(x) k(the kth element of φ(x)) to be 1; else assign 0 to it.
Then the number of unique words common in x and z is φ(x)·φ(z).
This gives us the kernel.