## 4 The Proposed Methodology--A Demonstration
### Proposed CFG to Detect L-Type Pseudoknots  
The proposed approach for detecting L-type pseudoknots in RNA sequences relies on syntactic pattern recognition techniques and a CFG parser. The selection of appropriate primitive patterns is emphasized, as it plays a significant role in accurate recognition. In RNA recognition, the nitrogenous bases adenine (\"A\"), cytosine (\"C\"), guanine (\"G\"), and uracil (\"U\") typically form the RNA representation. Hence, the suggested grammar's vocabulary includes these four terminal symbols, and any RNA sequence can be linguistically represented as a string of these symbols, such as \"UCACAACGAACCU\". In order to recognize a given pattern syntactically, an appropriate pattern grammar is used to parse the linguistic representation of the original pattern. The pattern grammar's design is critical in achieving accurate recognition, as it can significantly impact the results. Therefore, forming an efficient CFG to describe the pseudoknot syntactically is crucial. CFGs are widely known to be suitable for representing structural features, and in this study, the \(G_{Lpseudo}\) presented in Table 1 is used for the task of L-type pseudoknot prediction. \begin{table}
\begin{tabular}{c c} \hline \hline
**Enumeration** & **Syntactic Rules** \\ \hline
0 & S \(\rightarrow\) “A” L “A” L “A” D” U” L “U” L “U” L “U” \\
1 & S \(\rightarrow\) “A” L “A” L “A” L “U” D “U” L “U” L “A” \\
2 & S \(\rightarrow\) “A” L “A” L “A” L “G” D “U” L “U” L “C” \\
3 & S \(\rightarrow\) “A” L “A” L “A” L “C” D “U” L “U” L “G” \\
4 & S \(\rightarrow\) “A” L “U” L “A” D “U” L “A” L “U” \\
5 & S \(\rightarrow\) “A” L “U” L “U” D “U” L “A” L “A” \\
6 & S \(\rightarrow\) “A” L “U” L “G” D “U” L “A” L “C” \\
7 & S \(\rightarrow\) “A” L “U” L “C” D “U” L “A” L “G” \\
8 & S \(\rightarrow\) “A” L “G” L “A” D “U” L “C” L “U” \\
9 & S \(\rightarrow\) “A” L “G” L “U” D “U” L “C” L “A” \\
10 & S \(\rightarrow\) “A” L “G” L “G” D “U” L “C” L “C” \\
11 & S \(\rightarrow\) “A” L “G” L “C” D “U” L “C” L “C” \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Syntactic rules \(G_{Lpseudo}\). In the \(G_{LPS\! }\) grammar presented in Table 1, the second column displays the syntactic rules. The grammar comprises four non-terminal symbols, namely, NT = S, L, D, K, with S as the start symbol. All the syntactic rules with S on the left-hand side (i.e., rules 0 to 63) aim to identify a potential L-type pseudoknot in the input sequence. An L-type pseudoknot is defined as having at least three core stems, as depicted in Figure 1c. To recognize an L-type pseudoknot syntactically, an appropriate pattern grammar must be employed to parse the linguistic representation of the RNA sequence. The \(G_{LPS\! }\)CFG is designed to efficiently describe the syntax of an L-type pseudoknot within an RNA sequence, with the core stems forming the intercalated base pairs. For instance, the rule S \(\rightarrow\) \"U\" L \"G\" L \"G\" L \"G\" D \"A\" L \"C\" L \"C\" denotes the presence of a pseudoknot of the form U.G..G..A..C..C, where the base pairs U-A, G-C, and G-C are intercalated, and the colors indicate the base pairs. These intercalating base pairs are referred to as **core stems** throughout the article, and are represented by punctuation marks \"(\", \")\", \"[\", \"]\", \" {\" and \"}\" at the dot-bracket notation (see Tables 2 and 3). Since there are four possible base pairs (A-U, U-A, C-G, G-C) and three possible intercalations, there are sixty-four (4\({}^{3}\)) syntax rules with S on the left-hand side, with rules 12 to 59 omitted as they are easily understood. Figure 2 provides an example of how the core stems intercalate each other to form an L-type pseudoknot.