For language $M ⊆ \{0, 1\}^*$ lets denote $And(M) = \#(M\#)^*$ and $Or(M)=\#\{0,1,\#\}^*\#M\#\{0,1,\#\}^*\#$. We can say that language has $AND$ ($OR$) property with respect to polynomial reductions if there exists polynomial reduction from $AND(M)$$(OR(M))$ to $M$. The same story about reductions in $L$.
Show that:
(a) reachability problem (in directed graphs) has property $Or$ and $And$ with respect to $L$ reduction.(b) each language in $P$ has both properties with respect to polynomial reductions.
(c) each language in $NP$ has both properties with respect to polynomial reductions.
This is content of exercise. My problem is that I am not sure if I correctly understand it.
Let's consider (a)
We know that reachibility in directed (and undirected) graphs is in $L$. However, adjacency matrix (or arbitrary form of input graph) is contaminated with $\#,0,1$. For example $And$ generates something like:
$\#[graph]\#[graph]\#[graph]\#[graph]$, where $[graph]$ is input graph (for instance adjacency matrix).
We should shell $[graph]$ and launch on it well known algorithm for reachability in digraph. So this digging into $[graph]$ must be done in logspace, however it is seems to be easy. We only need counter to find begin position and end position of input graph (in $AND$ case - find first and second $\#$), $Or$ is also easy (when it comes to digging into $[graph]$
Can you tell me if I properly understand this exercise? In particular if part (a) is ok ?
Edit
After discussion in comments with @TStancek
(a)
I have some doubts about proper solution - simply I don't know what exactly reduction means as I think.
First attempt:
Let $K$ will be machine for solving reachibilty in directed graphs in logspace. We launch $K$ on each word between $\#s$. Our reduction/machines captures trying to read from input tape by $K$ and provide proper field of input (it is easy to do in logspace).
Second attempt:
This one look like reduction. In logspace transform input graph and launch on it (transformed graph) $K$.
What attempt is correct ? And how to transform it ?