Thursday, April 18, 2024

Graph Search Strategy:

Must read

A graph search control strategy might explore many equivalent paths in producing a database containing only M’s.

Redundant Paths can lead to inefficiencies because the control strategy might attempt to explore all of them; worse it might do work that is wasted ultimately in exploring paths that do not terminate.

One way to avoid the exploration of these redundant paths is to recognize that the initial database can be decomposed or split into separate components that can be processed independently.

C B Z can be looked at as 3 distinct elements of C,B,Z so this is what we do here we break C B Z into  C, B and Z  then apply the rewriting rules that we have highlighted initially. So C can be written as D L or BM , B  is written as MM and Z is written  as  BMM.DL can be changed as D to D and  L,B M is BMM, MM is written as MM and BB MM is  again split as B M B .So, we had an initial C B  Z. We split it up as C,B and Z  applied the rewriting rules to get DL ,BM,MM, BMM. Then again split this into D and L,B M into B and M, MM into M and M and BMM as BMB. So then we start applying the rewriting rules and apply only to this B. And we get a string where all of these M’s are satisfied. Now, one thing to note here is very important property that we want to explore. If you look at here; at this point,  all of C, B and Z needs to be brought to termination. All of these parts are important. But at this point ,When I think of rewriting C as either DL and BM, I can rewrite only  in 1 one way, whereas again at the next lower level both of them needs to be looked at. All of 3  needs to be looked at here. But again here when I’m looking at , I look at only 1 alternate path but here there are no alternate path I have only 1 path So it became simpler here.

- Advertisement -

More articles

- Advertisement -

Latest article